viz-js-lib 0.12.4 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.qoder/docs/witness-to-validator-migration.md +292 -0
- package/.qoder/plans/Witness_to_Validator_Migration_6a06df6b.md +140 -0
- package/.qoder/plans/witness-to-validator-migration-reference.md +501 -0
- package/dist/statistics.html +1 -1
- package/dist/viz-tests.min.js +5 -5
- package/dist/viz-tests.min.js.gz +0 -0
- package/dist/viz.min.js +6 -6
- package/dist/viz.min.js.gz +0 -0
- package/lib/api/methods.js +38 -9
- package/lib/auth/serializer/src/ChainTypes.js +13 -7
- package/lib/auth/serializer/src/operations.js +32 -25
- package/lib/auth/serializer/src/serializer.js +20 -1
- package/lib/auth/serializer/src/types.js +60 -5
- package/lib/broadcast/operations.js +12 -0
- package/package.json +1 -1
- package/test/methods_by_version.js +8 -0
package/dist/viz.min.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=t,r.c=e,r.p="",r(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(273),s=r(283),a=r(286)(i),u=r(300),f=r(227),c={api:i,auth:o,broadcast:s,config:r(171),formatter:a,memo:u,aes:f,utils:r(174)};"undefined"!=typeof window&&(window.viz=c),void 0!==n&&(n.viz=c),e=t.exports=c}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=p(r(2)),o=p(r(3)),s=p(r(42)),a=p(r(154)),u=(p(r(167)),p(r(168))),f=p(r(171)),c=p(r(173)),l=r(174),h=p(r(267));function p(t){return t&&t.__esModule?t:{default:t}}var d=(0,u.default)("viz:emitters"),v=(0,u.default)("viz:protocol"),_=(0,u.default)("viz:setup"),y=(0,u.default)("viz:ws"),g={id:0},m=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return(0,a.default)(t,g),r.options=(0,s.default)(t),r.id=0,r.inFlight=0,r.currentP=o.default.fulfilled(),r.isOpen=!1,r.releases=[],r.requests={},r}return function(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)}(e,i.default),n(e,[{key:"_setTransport",value:function(t){if(t&&t.match("^((http|https)?://)"))this.transport=new h.default.http;else{if(!t||!t.match("^((ws|wss)?://)"))throw Error("unknown transport! ["+t+"]");this.transport=new h.default.ws}}},{key:"setWebSocket",value:function(t){console.warn("viz.api.setWebSocket(url) is now deprecated instead use viz.config.set('websocket',url)"),_("Setting WS",t),f.default.set("websocket",t),this._setTransport(t),this.stop()}},{key:"start",value:function(){var t=f.default.get("websocket");return this._setTransport(t),this.transport.start()}},{key:"stop",value:function(){var t=this.transport.stop();return this.transport=null,t}},{key:"listenTo",value:function(t,e,r){return d("Adding listener for",e,"from",t.constructor.name),t.addEventListener?t.addEventListener(e,r):t.on(e,r),function(){d("Removing listener for",e,"from",t.constructor.name),t.removeEventListener?t.removeEventListener(e,r):t.removeListener(e,r)}}},{key:"onMessage",value:function(t,e){var r=e.api,n=e.data,i=e.resolve,o=e.reject,s=e.start_time;y("-- VIZ.onMessage --\x3e",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)}v("Resolved",r,n,"->",t),this.emit("track-performance",n.method,Date.now()-s),delete this.requests[t.id],i(t.result)}},{key:"send",value:function(t,e,r){this.transport||this.start();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:"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="",s=!0;return function a(){s&&e.getDynamicGlobalPropertiesAsync().then(function(e){var s="irreversible"===t?e.last_irreversible_block_num:e.head_block_number;if(s!==i)if(i)for(var u=i;u<s;u++)u!==i&&r(null,u),i=u;else i=s,r(null,s);o.default.delay(n).then(function(){a()})},function(t){r(t)})}(),function(){s=!1}}},{key:"streamBlock",value:function(){var t=this,e=arguments.length>0&&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){if(e)return o(),void r(e);(n=s)!==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){if(t)return r(),void e(t);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){if(t)return r(),void e(t);n.operations.forEach(function(t){e(null,t)})});return r}}]),e}();c.default.forEach(function(t){var e=t.method_name||(0,l.camelCase)(t.method),r=t.params||[];m.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)},m.prototype[e]=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=r.reduce(function(t,e,r){return t[e]=n[r],t},{}),s=n[r.length];return this[e+"With"](o,s)}}),o.default.promisifyAll(m.prototype);var b=new m;(e=t.exports=b).VIZ=m,e.VIZ.DEFAULTS=g},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!function(t){return"number"==typeof t}(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,s,a,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(o(r=this._events[t]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(i(r))for(a=Array.prototype.slice.call(arguments,1),s=(f=r.slice()).length,u=0;u<s;u++)f[u].apply(this,a);return!0},r.prototype.addListener=function(t,e){var s;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?i(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,i(this._events[t])&&!this._events[t].warned&&(s=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&s>0&&this._events[t].length>s&&(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){if(!n(e))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},r.prototype.removeListener=function(t,e){var r,o,s,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(r=this._events[t]).length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,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(n(r=this._events[t]))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){return 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";var n;"undefined"!=typeof Promise&&(n=Promise);var i=r(4)();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(t){}return i},t.exports=i},function(t,e,r){(function(e){"use strict";t.exports=function(){var n=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},i=function(){return new R.PromiseInspection(this._target())},o=function(t){return R.reject(new g(t))};function s(){}var a={},u=r(6);u.setReflectHandler(i);var f=function(){var t=e.domain;return void 0===t?null:t},c=function(){return{domain:f(),async:null}},l=u.isNode&&u.nodeSupportsAsyncResource?r(!function(){var t=new Error('Cannot find module "async_hooks"');throw t.code="MODULE_NOT_FOUND",t}()).AsyncResource:null,h=function(){return{domain:f(),async:new l("Bluebird::Promise")}},p=u.isNode?c:function(){return null};u.notEnumerableProp(R,"_getContext",p);var d=r(7),v=r(8),_=new v;d.defineProperty(R,"_async",{value:_});var y=r(13),g=R.TypeError=y.TypeError;R.RangeError=y.RangeError;var m=R.CancellationError=y.CancellationError;R.TimeoutError=y.TimeoutError,R.OperationalError=y.OperationalError,R.RejectionError=y.OperationalError,R.AggregateError=y.AggregateError;var b=function(){},w={},E={},k=r(14)(R,b),T=r(15)(R,b,k,o,s),B=r(16)(R),S=B.create,x=r(17)(R,B,function(){p=h,u.notEnumerableProp(R,"_getContext",h)},function(){p=c,u.notEnumerableProp(R,"_getContext",c)}),A=(x.CapturedTrace,r(18)(R,k,E)),j=r(19)(E),I=r(20),O=u.errorObj,C=u.tryCatch;function R(t){t!==b&&function(t,e){if(null==t||t.constructor!==R)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new g("expecting a function but got "+u.classString(e))}(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 P(t){this.promise._resolveCallback(t)}function U(t){this.promise._rejectCallback(t,!1)}function L(t){var e=new R(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return R.prototype.toString=function(){return"[object Promise]"},R.prototype.caught=R.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var s=arguments[r];if(!u.isObject(s))return o("Catch statement predicate: expecting an object but got "+u.classString(s));n[i++]=s}if(n.length=i,"function"!=typeof(t=arguments[r]))throw new g("The last argument to .catch() must be a function, got "+u.toString(t));return this.then(void 0,j(n,t,this))}return this.then(void 0,t)},R.prototype.reflect=function(){return this._then(i,i,void 0,this,void 0)},R.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+u.classString(t);arguments.length>1&&(r+=", "+u.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},R.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},R.prototype.spread=function(t){return"function"!=typeof t?o("expecting a function but got "+u.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},R.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},R.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new T(this).promise()},R.prototype.error=function(t){return this.caught(u.originatesFromRejection,t)},R.getNewLibraryCopy=t.exports,R.is=function(t){return t instanceof R},R.fromNode=R.fromCallback=function(t){var e=new R(b);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=C(t)(I(e,r));return n===O&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},R.all=function(t){return new T(t).promise()},R.cast=function(t){var e=k(t);return e instanceof R||((e=new R(b))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},R.resolve=R.fulfilled=R.cast,R.reject=R.rejected=function(t){var e=new R(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},R.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+u.classString(t));return _.setScheduler(t)},R.prototype._then=function(t,e,r,n,i){var o=void 0!==i,s=o?i:new R(b),a=this._target(),f=a._bitField;o||(s._propagateFrom(this,3),s._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&f)?this._boundValue():a===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,s));var c=p();if(0!=(50397184&f)){var l,h,d=a._settlePromiseCtx;0!=(33554432&f)?(h=a._rejectionHandler0,l=t):0!=(16777216&f)?(h=a._fulfillmentHandler0,l=e,a._unsetRejectionIsUnhandled()):(d=a._settlePromiseLateCancellationObserver,h=new m("late cancellation observer"),a._attachExtraTrace(h),l=e),_.invoke(d,a,{handler:u.contextBind(c,l),promise:s,receiver:n,value:h})}else a._addCallbacks(t,e,s,n,c);return s},R.prototype._length=function(){return 65535&this._bitField},R.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},R.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},R.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},R.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},R.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},R.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},R.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},R.prototype._isFinal=function(){return(4194304&this._bitField)>0},R.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},R.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},R.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},R.prototype._setAsyncGuaranteed=function(){if(!_.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},R.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},R.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==a)return void 0===e&&this._isBound()?this._boundValue():e},R.prototype._promiseAt=function(t){return this[4*t-4+2]},R.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},R.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},R.prototype._boundValue=function(){},R.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=a),this._addCallbacks(e,r,n,i,null)},R.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=a),this._addCallbacks(r,n,i,o,null)},R.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=u.contextBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=u.contextBind(i,e));else{var s=4*o-4;this[s+2]=r,this[s+3]=n,"function"==typeof t&&(this[s+0]=u.contextBind(i,t)),"function"==typeof e&&(this[s+1]=u.contextBind(i,e))}return this._setLength(o+1),o},R.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},R.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(n(),!1);var r=k(t,this);if(!(r instanceof R))return this._fulfill(t);e&&this._propagateFrom(r,2);var i=r._target();if(i!==this){var o=i._bitField;if(0==(50397184&o)){var s=this._length();s>0&&i._migrateCallback0(this);for(var a=1;a<s;++a)i._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!=(33554432&o))this._fulfill(i._value());else if(0!=(16777216&o))this._reject(i._reason());else{var u=new m("late cancellation observer");i._attachExtraTrace(u),this._reject(u)}}else this._reject(n())}},R.prototype._rejectCallback=function(t,e,r){var n=u.ensureErrorObject(t),i=n===t;if(!i&&!r&&x.warnings()){var o="a promise was rejected with a non-error: "+u.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},R.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,r)});r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)}},R.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(0==(65536&i)){var o;n._pushContext(),e===w?r&&"number"==typeof r.length?o=C(t).apply(this._boundValue(),r):(o=O).e=new g("cannot .spread() a non-array: "+u.classString(r)):o=C(t).call(e,r);var s=n._popContext();0==(65536&(i=n._bitField))&&(o===E?n._reject(r):o===O?n._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,s,"",n,this),n._resolveCallback(o)))}},R.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},R.prototype._followee=function(){return this._rejectionHandler0},R.prototype._setFollowee=function(t){this._rejectionHandler0=t},R.prototype._settlePromise=function(t,e,r,n){var o=t instanceof R,a=this._bitField,u=0!=(134217728&a);0!=(65536&a)?(o&&t._invokeInternalOnCancel(),r instanceof A&&r.isFinallyHandler()?(r.cancelPromise=t,C(e).call(r,n)===O&&t._reject(O.e)):e===i?t._fulfill(i.call(r)):r instanceof s?r._promiseCancelled(t):o||t instanceof T?t._cancel():r.cancel()):"function"==typeof e?o?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,n,t)):e.call(r,n,t):r instanceof s?r._isResolved()||(0!=(33554432&a)?r._promiseFulfilled(n,t):r._promiseRejected(n,t)):o&&(u&&t._setAsyncGuaranteed(),0!=(33554432&a)?t._fulfill(n):t._reject(n))},R.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof R?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof R&&r._reject(i)},R.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},R.prototype._settlePromise0=function(t,e,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,i,e)},R.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},R.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=n();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():_.settlePromises(this),this._dereferenceTrace())}},R.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return _.fatalError(t,u.isNode);(65535&e)>0?_.settlePromises(this):this._ensurePossibleRejectionHandled()}},R.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},R.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},R.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){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()},R.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&d.defineProperty(R.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),R.defer=R.pending=function(){return x.deprecated("Promise.defer","new Promise"),{promise:new R(b),resolve:P,reject:U}},u.notEnumerableProp(R,"_makeSelfResolutionError",n),r(21)(R,b,k,o,x),r(22)(R,b,k,x),r(23)(R,T,o,x),r(24)(R),r(25)(R),r(26)(R,T,k,b,_),R.Promise=R,R.version="3.7.2",r(27)(R),r(28)(R,o,b,k,s,x),r(29)(R,T,o,k,b,x),r(30)(R),r(31)(R,b),r(32)(R,T,k,o),r(33)(R,b,k,o),r(34)(R,T,o,k,b,x),r(35)(R,T,x),r(36)(R,T,o),r(37)(R,b,x),r(38)(R,o,k,S,b,x),r(39)(R),r(40)(R,b),r(41)(R,b),u.toFastProperties(R),u.toFastProperties(R.prototype),L({a:1}),L({b:2}),L({c:3}),L(1),L(function(){}),L(void 0),L(!1),L(new R(b)),x.setBounds(v.firstLineError,u.lastLineError),R}}).call(e,r(5))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,f=[],c=!1,l=-1;function h(){c&&u&&(c=!1,u.length?f=u.concat(f):l=-1,f.length&&p())}function p(){if(!c){var t=a(h);c=!0;for(var e=f.length;e;){for(u=f,f=[];++l<e;)u&&u[l].run();l=-1,e=f.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];f.push(new d(t,e)),1!==f.length||c||a(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){(function(e,n){"use strict";var i=r(7),o="undefined"==typeof navigator,s={e:{}},a,u="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:void 0!==this?this:null;function f(){try{var t=a;return a=null,t.apply(this,arguments)}catch(t){return s.e=t,s}}function c(t){return a=t,f}var l=function(t,e){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype};function h(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function p(t){return"function"==typeof t||"object"==typeof t&&null!==t}function d(t){return h(t)?new Error(S(t)):t}function v(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=t[r];return i[r]=e,i}function _(t,e,r){if(!i.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function y(t,e,r){if(h(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return i.defineProperty(t,e,n),t}function g(t){throw t}var m=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(i.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],o=Object.create(null);null!=t&&!e(t);){var s;try{s=r(t)}catch(t){return n}for(var a=0;a<s.length;++a){var u=s[a];if(!o[u]){o[u]=!0;var f=Object.getOwnPropertyDescriptor(t,u);null!=f&&null==f.get&&null==f.set&&n.push(u)}}t=i.getPrototypeOf(t)}return n}}var n={}.hasOwnProperty;return function(r){if(e(r))return[];var i=[];t:for(var o in r)if(n.call(r,o))i.push(o);else{for(var s=0;s<t.length;++s)if(n.call(t[s],o))continue t;i.push(o)}return i}}(),b=/this\s*\.\s*\S+\s*=/;function w(t){try{if("function"==typeof t){var e=i.names(t.prototype),r=i.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=b.test(t+"")&&i.names(t).length>0;if(r||n||o)return!0}return!1}catch(t){return!1}}function E(t){function e(){}e.prototype=t;var r=new e;function n(){return typeof r.foo}return n(),n(),t}var k=/^[a-z$_][a-z$_0-9]*$/i;function T(t){return k.test(t)}function B(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function S(t){try{return t+""}catch(t){return"[no string representation]"}}function x(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function A(t){try{y(t,"isOperational",!0)}catch(t){}}function j(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function I(t){return x(t)&&i.propertyIsWritable(t,"stack")}var O="stack"in new Error?function(t){return I(t)?t:new Error(S(t))}:function(t){if(I(t))return t;try{throw new Error(S(t))}catch(t){return t}};function C(t){return{}.toString.call(t)}function R(t,e,r){for(var n=i.names(t),o=0;o<n.length;++o){var s=n[o];if(r(s))try{i.defineProperty(e,s,i.getDescriptor(t,s))}catch(t){}}}var P=function(t){return i.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var U="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};P=function(t){return i.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?U(t):null}}var L=void 0!==n&&"[object process]"===C(n).toLowerCase(),F=void 0!==n&&void 0!==n.env,D;function M(t){return F?n.env[t]:void 0}function N(){if("function"==typeof Promise)try{if("[object Promise]"===C(new Promise(function(){})))return Promise}catch(t){}}function q(t,e){if(null===t||"function"!=typeof e||e===D)return e;null!==t.domain&&(e=t.domain.bind(e));var r=t.async;if(null!==r){var n=e;e=function(){for(var t=arguments.length+2,e=new Array(t),i=2;i<t;++i)e[i]=arguments[i-2];return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return e}var z={setReflectHandler:function(t){D=t},isClass:w,isIdentifier:T,inheritedDataKeys:m,getDataPropertyOrDefault:_,thrower:g,isArray:i.isArray,asArray:P,notEnumerableProp:y,isPrimitive:h,isObject:p,isError:x,canEvaluate:o,errorObj:s,tryCatch:c,inherits:l,withAppended:v,maybeWrapAsError:d,toFastProperties:E,filledRange:B,toString:S,canAttachTrace:I,ensureErrorObject:O,originatesFromRejection:j,markAsOriginatingFromRejection:A,classString:C,copyDescriptors:R,isNode:L,hasEnvVariables:F,env:M,global:u,getNativePromise:N,contextBind:q};z.isRecentNode=z.isNode&&function(){var t;return n.versions&&n.versions.node?t=n.versions.node.split(".").map(Number):n.version&&(t=n.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),z.nodeSupportsAsyncResource=z.isNode&&function(){var t=!1;try{t="function"==typeof r(!function(){var t=new Error('Cannot find module "async_hooks"');throw t.code="MODULE_NOT_FOUND",t}()).AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),z.isNode&&z.toFastProperties(n);try{throw new Error}catch(t){z.lastLineError=t}t.exports=z}).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};t.exports={isArray:function(t){try{return"[object Array]"===i.call(t)}catch(t){return!1}},keys:s,names:s,defineProperty:function(t,e,r){return t[e]=r.value,t},getDescriptor:function(t,e){return{value:t[e]}},freeze:function(t){return t},getPrototypeOf:function(t){try{return Object(t).constructor.prototype}catch(t){return o}},isES5:r,propertyIsWritable:function(){return!0}}}},function(t,e,r){(function(e){"use strict";var n;try{throw new Error}catch(t){n=t}var i=r(9),o=r(12);function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=i}function a(t){for(;t.length()>0;)u(t)}function u(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var r=t.shift(),n=t.shift();e.call(r,n)}}s.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},s.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")}},s.prototype.invokeLater=function(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()},s.prototype.invoke=function(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()},s.prototype.settlePromises=function(t){this._normalQueue._pushOne(t),this._queueTick()},s.prototype._drainQueues=function(){a(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,a(this._lateQueue)},s.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},s.prototype._reset=function(){this._isTickUsed=!1},t.exports=s,t.exports.firstLineError=n}).call(e,r(5))},function(t,e,r){(function(e,n,i){"use strict";var o,s=r(6),a=s.getNativePromise();if(s.isNode&&"undefined"==typeof MutationObserver){var u=e.setImmediate,f=n.nextTick;o=s.isRecentNode?function(t){u.call(e,t)}:function(t){f.call(n,t)}}else if("function"==typeof a&&"function"==typeof a.resolve){var c=a.resolve();o=function(t){c.then(t)}}else o="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver(function(){t.classList.toggle("foo"),r=!1}).observe(n,e);return function(i){var o=new MutationObserver(function(){o.disconnect(),i()});o.observe(t,e),r||(r=!0,n.classList.toggle("foo"))}}():void 0!==i?function(t){i(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")};t.exports=o}).call(e,function(){return this}(),r(5),r(10).setImmediate)},function(t,e,r){var n=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(n.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(n.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.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";if(!t.setImmediate){var n,i=1,o={},s=!1,a=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){c(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&c(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),n=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){c(t.data)},n=function(e){t.port2.postMessage(e)}}():a&&"onreadystatechange"in a.createElement("script")?function(){var t=a.documentElement;n=function(e){var r=a.createElement("script");r.onreadystatechange=function(){c(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():n=function(t){setTimeout(c,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var s={callback:t,args:e};return o[i]=s,n(i),i++},u.clearImmediate=f}function f(t){delete o[t]}function c(t){if(s)setTimeout(c,0,t);else{var e=o[t];if(e){s=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}(e)}finally{f(t),s=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,function(){return this}(),r(5))},function(t,e){"use strict";function r(t){this._capacity=t,this._length=0,this._front=0}r.prototype._willBeOverCapacity=function(t){return this._capacity<t},r.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},r.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=r,this._length=n},r.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},r.prototype.length=function(){return this._length},r.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},r.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,function(t,e,r,n,i){for(var o=0;o<i;++o)r[o+n]=t[o+e],t[o+e]=void 0}(this,0,this,e,this._front+this._length&e-1)},t.exports=r},function(t,e,r){"use strict";var n,i,o=r(7),s=o.freeze,a=r(6),u=a.inherits,f=a.notEnumerableProp;function c(t,e){function r(n){if(!(this instanceof r))return new r(n);f(this,"message","string"==typeof n?n:e),f(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(r,Error),r}var l=c("Warning","warning"),h=c("CancellationError","cancellation error"),p=c("TimeoutError","timeout error"),d=c("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(t){n=c("TypeError","type error"),i=c("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),_=0;_<v.length;++_)"function"==typeof Array.prototype[v[_]]&&(d.prototype[v[_]]=Array.prototype[v[_]]);o.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var y=0;function g(t){if(!(this instanceof g))return new g(t);f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.prototype.toString=function(){var t=Array(4*y+1).join(" "),e="\n"+t+"AggregateError of:\n";y++,t=Array(4*y+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];e+=(n=i.join("\n"))+"\n"}return y--,e},u(g,Error);var m=Error.__BluebirdErrorTypes__;m||(m=s({CancellationError:h,TimeoutError:p,OperationalError:g,RejectionError:g,AggregateError:d}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error:Error,TypeError:n,RangeError:i,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:l}},function(t,e,r){"use strict";t.exports=function(t,e){var n=r(6),i=n.errorObj,o=n.isObject;var s={}.hasOwnProperty;return function(r,a){if(o(r)){if(r instanceof t)return r;var u=function(t){try{return function(t){return t.then}(t)}catch(t){return i.e=t,i}}(r);if(u===i){a&&a._pushContext();var f=t.reject(u.e);return a&&a._popContext(),f}if("function"==typeof u)return function(t){try{return s.call(t,"_promise0")}catch(t){return!1}}(r)?(f=new t(e),r._then(f._fulfill,f._reject,void 0,f,null),f):function(r,o,s){var a=new t(e),u=a;s&&s._pushContext(),a._captureStackTrace(),s&&s._popContext();var f=!0,c=n.tryCatch(o).call(r,function(t){a&&(a._resolveCallback(t),a=null)},function(t){a&&(a._rejectCallback(t,f,!0),a=null)});return f=!1,a&&c===i&&(a._rejectCallback(c.e,!0,!0),a=null),u}(r,u,a)}return r}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o){var s=r(6);s.isArray;function a(r){var n=this._promise=new t(e);r instanceof t&&(n._propagateFrom(r,3),r.suppressUnhandledRejections()),n._setOnCancel(this),this._values=r,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return s.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function e(r,o){var a=n(this._values,this._promise);if(a instanceof t){var u=(a=a._target())._bitField;if(this._values=a,0==(50397184&u))return this._promise._setAsyncGuaranteed(),a._then(e,this._reject,void 0,this,o);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(a._reason()):this._cancel();a=a._value()}if(null!==(a=s.asArray(a)))0!==a.length?this._iterate(a):-5===o?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(o));else{var f=i("expecting an array or an iterable object but got "+s.classString(a)).reason();this._promise._rejectCallback(f,!1)}},a.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,s=null,a=0;a<r;++a){var u=n(e[a],i);s=u instanceof t?(u=u._target())._bitField:null,o?null!==s&&u.suppressUnhandledRejections():null!==s?0==(50397184&s)?(u._proxy(this,a),this._values[a]=u):o=0!=(33554432&s)?this._promiseFulfilled(u._value(),a):0!=(16777216&s)?this._promiseRejected(u._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(u,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=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<e.length;++r)e[r]instanceof t&&e[r].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},function(t,e){"use strict";t.exports=function(t){var e=!1,r=[];function n(){this._trace=new n.CapturedTrace(i())}function i(){var t=r.length-1;if(t>=0)return r[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=r.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=function(){if(e)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,u=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=u,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=i,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},function(t,e,r){(function(e){"use strict";t.exports=function(t,n,i,o){var s,a,u,f,c=t._async,l=r(13).Warning,h=r(6),p=r(7),d=h.canAttachTrace,v=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,_=/\((?:timers\.js):\d+:\d+\)/,y=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,g=null,m=null,b=!1,w=!(0==h.env("BLUEBIRD_DEBUG")||!h.env("BLUEBIRD_DEBUG")&&"development"!==h.env("NODE_ENV")),E=!(0==h.env("BLUEBIRD_WARNINGS")||!w&&!h.env("BLUEBIRD_WARNINGS")),k=!(0==h.env("BLUEBIRD_LONG_STACK_TRACES")||!w&&!h.env("BLUEBIRD_LONG_STACK_TRACES")),T=0!=h.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(E||!!h.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function r(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();n()}function n(){e.length=0}f=function(t){e.push(t),setTimeout(r,1)},p.defineProperty(t,"_unhandledRejectionCheck",{value:r}),p.defineProperty(t,"_unhandledRejectionClear",{value:n})}(),t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),f(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){X("rejectionHandled",s,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(),X("unhandledRejection",a,t,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(t,e,r){return H(t,e,r||this)},t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();a=h.contextBind(r,e)},t.onUnhandledRejectionHandled=function(e){var r=t._getContext();s=h.contextBind(r,e)};var B=function(){};t.longStackTraces=function(){if(c.haveItemsQueued()&&!rt.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!rt.longStackTraces&&$()){var e=t.prototype._captureStackTrace,r=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;rt.longStackTraces=!0,B=function(){if(c.haveItemsQueued()&&!rt.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,t.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),rt.longStackTraces=!1},t.prototype._captureStackTrace=q,t.prototype._attachExtraTrace=z,t.prototype._dereferenceTrace=V,n.activateLongStackTraces()}},t.hasLongStackTraces=function(){return rt.longStackTraces&&$()};var S={unhandledrejection:{before:function(){var t=h.global.onunhandledrejection;return h.global.onunhandledrejection=null,t},after:function(t){h.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=h.global.onrejectionhandled;return h.global.onrejectionhandled=null,t},after:function(t){h.global.onrejectionhandled=t}}},x=function(){var t=function(t,e){if(!t)return!h.global.dispatchEvent(e);var r;try{return r=t.before(),!h.global.dispatchEvent(e)}finally{t.after(r)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new CustomEvent(e,{detail:r,cancelable:!0});return p.defineProperty(n,"promise",{value:r.promise}),p.defineProperty(n,"reason",{value:r.reason}),t(S[e],n)}}if("function"==typeof Event){e=new Event("CustomEvent");return h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:!0});return n.detail=r,p.defineProperty(n,"promise",{value:r.promise}),p.defineProperty(n,"reason",{value:r.reason}),t(S[e],n)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!0,r),t(S[e],n)}}catch(t){}return function(){return!1}}(),A=h.isNode?function(){return e.emit.apply(e,arguments)}:h.global?function(t){var e="on"+t.toLowerCase(),r=h.global[e];return!!r&&(r.apply(h.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function j(t,e){return{promise:e}}var I={promiseCreated:j,promiseFulfilled:j,promiseRejected:j,promiseResolved:j,promiseCancelled:j,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:j},O=function(t){var e=!1;try{e=A.apply(null,arguments)}catch(t){c.throwLater(t),e=!0}var r=!1;try{r=x(t,I[t].apply(null,arguments))}catch(t){c.throwLater(t),r=!0}return r||e};function C(){return!1}function R(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: "+h.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function P(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?h.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function U(){return this._onCancelField}function L(t){this._onCancelField=t}function F(){this._cancellationParent=void 0,this._onCancelField=void 0}function D(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)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&B()),"warnings"in e){var r=e.warnings;rt.warnings=!!r,T=rt.warnings,h.isObject(r)&&"wForgottenReturn"in r&&(T=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!rt.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=F,t.prototype._propagateFrom=D,t.prototype._onCancel=U,t.prototype._setOnCancel=L,t.prototype._attachCancellationCallback=P,t.prototype._execute=R,M=D,rt.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!rt.monitoring?(rt.monitoring=!0,t.prototype._fireEvent=O):!e.monitoring&&rt.monitoring&&(rt.monitoring=!1,t.prototype._fireEvent=C)),"asyncHooks"in e&&h.nodeSupportsAsyncResource){var n=rt.asyncHooks,s=!!e.asyncHooks;n!==s&&(rt.asyncHooks=s,s?i():o())}return t},t.prototype._fireEvent=C,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._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(t,e){};var M=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function N(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function q(){this._trace=new tt(this._peekContext())}function z(t,e){if(d(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=Y(t);h.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),h.notEnumerableProp(t,"__stackCleaned__",!0)}}}function V(){this._trace=void 0}function H(e,r,n){if(rt.warnings){var i,o=new l(e);if(r)n._attachExtraTrace(o);else if(rt.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var s=Y(o);o.stack=s.message+"\n"+s.stack.join("\n")}O("warning",o)||G(o,"",!0)}}function W(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||g.test(n),o=i&&Q(n);i&&!o&&(b&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function Y(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||g.test(n))break}return r>0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:W(e)}}function G(t,e,r){if("undefined"!=typeof console){var n;if(h.isObject(t)){var i=t.stack;n=e+m(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 X(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){c.throwLater(t)}"unhandledRejection"===t?O(t,r,n)||i||G(r,"Unhandled rejection "):O(t,n)}function Z(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():h.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){if(t.length<41)return t;return t.substr(0,38)+"..."}(e)+">, no stack trace)"}function $(){return"function"==typeof et}var Q=function(){return!1},K=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function J(t){var e=t.match(K);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function tt(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);et(this,tt),e>32&&this.uncycle()}h.inherits(tt,Error),n.CapturedTrace=tt,tt.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;for(n=(t=this._length=n)-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<t;++n){var s=r[e[n].stack];if(void 0!==s&&s!==n){s>0&&(e[s-1]._parent=void 0,e[s-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var a=n>0?e[n-1]:this;s<t-1?(a._parent=e[s+1],a._parent.uncycle(),a._length=a._parent._length+1):(a._parent=void 0,a._length=1);for(var u=a._length+1,f=n-2;f>=0;--f)e[f]._length=u,u++;return}}}},tt.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=Y(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(W(i.stack.split("\n"))),i=i._parent;!function(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],i=e.length-1,o=e[i],s=-1,a=n.length-1;a>=0;--a)if(n[a]===o){s=a;break}for(a=s;a>=0;--a){var u=n[a];if(e[i]!==u)break;e.pop(),i--}e=n}}(n),function(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}(n),h.notEnumerableProp(t,"stack",function(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}(r,n)),h.notEnumerableProp(t,"__stackCleaned__",!0)}};var et=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():Z(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,g=t,m=e;var r=Error.captureStackTrace;return Q=function(t){return v.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return g=/@/,m=e,b=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n="stack"in t}return"stack"in i||!n||"number"!=typeof Error.stackTraceLimit?(m=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?Z(e):e.toString()},null):(g=t,m=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(u=function(t){console.warn(t)},h.isNode&&e.stderr.isTTY?u=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:h.isNode||"string"!=typeof(new Error).stack||(u=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var rt={warnings:E,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return k&&t.longStackTraces(),{asyncHooks:function(){return rt.asyncHooks},longStackTraces:function(){return rt.longStackTraces},warnings:function(){return rt.warnings},cancellation:function(){return rt.cancellation},monitoring:function(){return rt.monitoring},propagateFromFunction:function(){return M},boundValueFunction:function(){return N},checkForgottenReturns:function(t,e,r,n,i){if(void 0===t&&null!==e&&T){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=W(a),f=u.length-1;f>=0;--f){var c=u[f];if(!_.test(c)){var l=c.match(y);l&&(o="at "+l[1]+":"+l[2]+":"+l[3]+" ");break}}if(u.length>0){var h=u[0];for(f=0;f<a.length;++f)if(a[f]===h){f>0&&(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)}},setBounds:function(t,e){if($()){for(var r,n,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),s=-1,a=-1,u=0;u<i.length;++u)if(f=J(i[u])){r=f.fileName,s=f.line;break}for(u=0;u<o.length;++u){var f;if(f=J(o[u])){n=f.fileName,a=f.line;break}}s<0||a<0||!r||!n||r!==n||s>=a||(Q=function(t){if(v.test(t))return!0;var e=J(t);return!!(e&&e.fileName===r&&s<=e.line&&e.line<=a)})}},warn:H,deprecated:function(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),H(r)},CapturedTrace:tt,fireDomEvent:x,fireGlobalEvent:A}}}).call(e,r(5))},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=r(6),o=t.CancellationError,s=i.errorObj,a=r(19)(n);function u(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function f(t){this.finallyHandler=t}function c(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function l(){return p.call(this,this.promise._target()._settledValue())}function h(t){if(!c(this,t))return s.e=t,s}function p(r){var i=this.promise,a=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?a.call(i._boundValue()):a.call(i._boundValue(),r);if(u===n)return u;if(void 0!==u){i._setReturnedNonUndefined();var p=e(u,i);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new o("late cancellation observer");return i._attachExtraTrace(d),s.e=d,s}p.isPending()&&p._attachCancellationCallback(new f(this))}return p._then(l,h,void 0,this,void 0)}}}return i.isRejected()?(c(this),s.e=r,s):(c(this),r)}return u.prototype.isFinallyHandler=function(){return 0===this.type},f.prototype._resultCancelled=function(){c(this.finallyHandler)},t.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new u(this,e,t),void 0)},t.prototype.lastly=t.prototype.finally=function(t){return this._passThrough(t,0,p,p)},t.prototype.tap=function(t){return this._passThrough(t,1,p)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,p);var n,o=new Array(r-1),s=0;for(n=0;n<r-1;++n){var u=arguments[n];if(!i.isObject(u))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(u)));o[s++]=u}o.length=s;var f=arguments[n];return this._passThrough(a(o,f,this),1,void 0,p)},u}},function(t,e,r){"use strict";t.exports=function(t){var e=r(6),n=r(7).keys,i=e.tryCatch,o=e.errorObj;return function(r,s,a){return function(u){var f=a._boundValue();t:for(var c=0;c<r.length;++c){var l=r[c];if(l===Error||null!=l&&l.prototype instanceof Error){if(u instanceof l)return i(s).call(f,u)}else if("function"==typeof l){var h=i(l).call(f,u);if(h===o)return h;if(h)return i(s).call(f,u)}else if(e.isObject(u)){for(var p=n(l),d=0;d<p.length;++d){var v=p[d];if(l[v]!=u[v])continue t}return i(s).call(f,u)}}return t}}}},function(t,e,r){"use strict";var n=r(6),i=n.maybeWrapAsError,o=r(13).OperationalError,s=r(7);var a=/^(?:name|message|stack|cause)$/;function u(t){var e;if(function(t){return t instanceof Error&&s.getPrototypeOf(t)===Error.prototype}(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var r=s.keys(t),i=0;i<r.length;++i){var u=r[i];a.test(u)||(e[u]=t[u])}return e}return n.markAsOriginatingFromRejection(t),t}t.exports=function(t,e){return function(r,n){if(null!==t){if(r){var o=u(i(r));t._attachExtraTrace(o),t._reject(o)}else if(e){for(var s=arguments.length,a=new Array(Math.max(s-1,0)),f=1;f<s;++f)a[f-1]=arguments[f];t._fulfill(a)}else t._fulfill(n);t=null}}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o){var s=r(6),a=s.tryCatch;t.method=function(r){if("function"!=typeof r)throw new t.TypeError("expecting a function but got "+s.classString(r));return function(){var n=new t(e);n._captureStackTrace(),n._pushContext();var i=a(r).apply(this,arguments),s=n._popContext();return o.checkForgottenReturns(i,s,"Promise.method",n),n._resolveFromSyncValue(i),n}},t.attempt=t.try=function(r){if("function"!=typeof r)return i("expecting a function but got "+s.classString(r));var n,u=new t(e);if(u._captureStackTrace(),u._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var f=arguments[1],c=arguments[2];n=s.isArray(f)?a(r).apply(c,f):a(r).call(c,f)}else n=a(r)();var l=u._popContext();return o.checkForgottenReturns(n,l,"Promise.try",u),u._resolveFromSyncValue(n),u},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 l=this._target();if(c._setBoundTo(f),f instanceof t){var h={promiseRejectionQueued:!1,promise:c,target:l,bindingPromise:f};l._then(e,s,void 0,c,h),f._then(a,u,void 0,c,h),c._setOnCancel(f)}else c._resolveCallback(l);return c},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},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;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=s(t).call(this._boundValue());n===a&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else t._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},function(t,e){"use strict";t.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();return this.caught(r,function(){return n})}}},function(t,e){"use strict";t.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o){var s,a=r(6),u=a.canEvaluate,f=a.tryCatch,c=a.errorObj;if(u){for(var l=function(t){return new Function("value","holder"," \n\t 'use strict'; \n\t holder.pIndex = value; \n\t holder.checkFulfillment(this); \n\t ".replace(/Index/g,t))},h=function(t){return new Function("promise","holder"," \n\t 'use strict'; \n\t holder.pIndex = promise; \n\t ".replace(/Index/g,t))},p=function(e){for(var r=new Array(e),n=0;n<r.length;++n)r[n]="this.p"+(n+1);var i=r.join(" = ")+" = null;",s="var promise;\n"+r.map(function(t){return" \n\t promise = "+t+"; \n\t if (promise instanceof Promise) { \n\t promise.cancel(); \n\t } \n\t "}).join("\n"),a=r.join(", "),u="Holder$"+e,l="return function(tryCatch, errorObj, Promise, async) { \n\t 'use strict'; \n\t function [TheName](fn) { \n\t [TheProperties] \n\t this.fn = fn; \n\t this.asyncNeeded = true; \n\t this.now = 0; \n\t } \n\t \n\t [TheName].prototype._callFunction = function(promise) { \n\t promise._pushContext(); \n\t var ret = tryCatch(this.fn)([ThePassedArguments]); \n\t promise._popContext(); \n\t if (ret === errorObj) { \n\t promise._rejectCallback(ret.e, false); \n\t } else { \n\t promise._resolveCallback(ret); \n\t } \n\t }; \n\t \n\t [TheName].prototype.checkFulfillment = function(promise) { \n\t var now = ++this.now; \n\t if (now === [TheTotal]) { \n\t if (this.asyncNeeded) { \n\t async.invoke(this._callFunction, this, promise); \n\t } else { \n\t this._callFunction(promise); \n\t } \n\t \n\t } \n\t }; \n\t \n\t [TheName].prototype._resultCancelled = function() { \n\t [CancellationCode] \n\t }; \n\t \n\t return [TheName]; \n\t }(tryCatch, errorObj, Promise, async); \n\t ";return l=l.replace(/\[TheName\]/g,u).replace(/\[TheTotal\]/g,e).replace(/\[ThePassedArguments\]/g,a).replace(/\[TheProperties\]/g,i).replace(/\[CancellationCode\]/g,s),new Function("tryCatch","errorObj","Promise","async",l)(f,c,t,o)},d=[],v=[],_=[],y=0;y<8;++y)d.push(p(y+1)),v.push(l(y+1)),_.push(h(y+1));s=function(t){this._reject(t)}}t.join=function(){var r,o=arguments.length-1;if(o>0&&"function"==typeof arguments[o]&&(r=arguments[o],o<=8&&u)){(w=new t(i))._captureStackTrace();for(var f=new(0,d[o-1])(r),c=v,l=0;l<o;++l){var h=n(arguments[l],w);if(h instanceof t){var p=(h=h._target())._bitField;0==(50397184&p)?(h._then(c[l],s,void 0,w,f),_[l](h,f),f.asyncNeeded=!1):0!=(33554432&p)?c[l].call(w,h._value(),f):0!=(16777216&p)?w._reject(h._reason()):w._cancel()}else c[l].call(w,h,f)}if(!w._isFateSealed()){if(f.asyncNeeded){var y=t._getContext();f.fn=a.contextBind(y,f.fn)}w._setAsyncGuaranteed(),w._setOnCancel(f)}return w}for(var g=arguments.length,m=new Array(g),b=0;b<g;++b)m[b]=arguments[b];r&&m.pop();var w=new e(m).promise();return void 0!==r?w.spread(r):w}}},function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}t.exports=function(t){var e,n,s=r(6),a=s.canEvaluate,u=s.isIdentifier,f=function(t){return new Function("ensureMethod"," \n\t return function(obj) { \n\t 'use strict' \n\t var len = this.length; \n\t ensureMethod(obj, 'methodName'); \n\t switch(len) { \n\t case 1: return obj.methodName(this[0]); \n\t case 2: return obj.methodName(this[0], this[1]); \n\t case 3: return obj.methodName(this[0], this[1], this[2]); \n\t case 0: return obj.methodName(); \n\t default: \n\t return obj.methodName.apply(obj, this); \n\t } \n\t }; \n\t ".replace(/methodName/g,t))(h)},c=function(t){return new Function("obj"," \n\t 'use strict'; \n\t return obj.propertyName; \n\t ".replace("propertyName",t))},l=function(t,e,r){var n=r[t];if("function"!=typeof n){if(!u(t))return null;if(n=e(t),r[t]=n,r[" size"]++,r[" size"]>512){for(var i=Object.keys(r),o=0;o<256;++o)delete r[i[o]];r[" size"]=i.length-256}}return n};function h(e,r){var n;if(null!=e&&(n=e[r]),"function"!=typeof n){var i="Object "+s.classString(e)+" has no method '"+s.toString(r)+"'";throw new t.TypeError(i)}return n}function p(t){return h(t,this.pop()).apply(t,this)}function d(t){return t[this]}function v(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}e=function(t){return l(t,f,i)},n=function(t){return l(t,c,o)},t.prototype.call=function(t){for(var r=arguments.length,n=new Array(Math.max(r-1,0)),i=1;i<r;++i)n[i-1]=arguments[i];if(a){var o=e(t);if(null!==o)return this._then(o,void 0,void 0,n,void 0)}return n.push(t),this._then(p,void 0,void 0,n,void 0)},t.prototype.get=function(t){var e;if("number"==typeof t)e=v;else if(a){var r=n(t);e=null!==r?r:d}else e=d;return this._then(e,void 0,void 0,t,void 0)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){var a=r(13).TypeError,u=r(6),f=u.errorObj,c=u.tryCatch,l=[];function h(e,r,i,o){if(s.cancellation()){var a=new t(n),u=this._finallyPromise=new t(n);this._promise=a.lastly(function(){return u}),a._captureStackTrace(),a._setOnCancel(this)}else{(this._promise=new t(n))._captureStackTrace()}this._stack=o,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(l):l,this._yieldedPromise=null,this._cancellationPhase=!1}u.inherits(h,o),h.prototype._isResolved=function(){return null===this._promise},h.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},h.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=c(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=c(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},h.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=c(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},h.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=c(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},h.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},h.prototype.promise=function(){return this._promise},h.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},h.prototype._continue=function(e){var r=this._promise;if(e===f)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(o instanceof t||null!==(o=function(e,r,n){for(var o=0;o<r.length;++o){n._pushContext();var s=c(r[o])(e);if(n._popContext(),s===f){n._pushContext();var a=t.reject(f.e);return n._popContext(),a}var u=i(s,n);if(u instanceof t)return u}return null}(o,this._yieldHandlers,this._promise))){var s=(o=o._target())._bitField;0==(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!=(33554432&s)?t._async.invoke(this._promiseFulfilled,this,o._value()):0!=(16777216&s)?t._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()}else this._promiseRejected(new a("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(t,e){if("function"!=typeof t)throw new a("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=h,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new n(void 0,void 0,r,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0),s}},t.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new a("expecting a function but got "+u.classString(t));l.push(t)},t.spawn=function(r){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof r)return e("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new h(r,this),i=n.promise();return n._run(t.spawn),i}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){var a=r(6),u=a.tryCatch,f=a.errorObj,c=t._async;function l(e,r,n,i){this.constructor$(e),this._promise._captureStackTrace();var s=t._getContext();if(this._callback=a.contextBind(s,r),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],c.invoke(this._asyncInit,this,void 0),a.isArray(e))for(var u=0;u<e.length;++u){var f=e[u];f instanceof t&&f.suppressUnhandledRejections()}}function h(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+a.classString(r));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+a.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+a.classString(i.concurrency)));s=i.concurrency}return new l(e,r,s="number"==typeof s&&isFinite(s)&&s>=1?s:0,o).promise()}a.inherits(l,e),l.prototype._asyncInit=function(){this._init$(void 0,-2)},l.prototype._init=function(){},l.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=e,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=e,this._queue.push(r),!1;null!==a&&(a[r]=e);var l=this._promise,h=this._callback,p=l._boundValue();l._pushContext();var d=u(h).call(p,e,r,o),v=l._popContext();if(s.checkForgottenReturns(d,v,null!==a?"Promise.filter":"Promise.map",l),d===f)return this._reject(d.e),!0;var _=i(d,this._promise);if(_ instanceof t){var y=(_=_._target())._bitField;if(0==(50397184&y))return c>=1&&this._inFlight++,n[r]=_,_._proxy(this,-1*(r+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(_._reason()),!0):(this._cancel(),!0);d=_._value()}n[r]=d}return++this._totalResolved>=o&&(null!==a?this._filter(n,a):this._resolve(n),!0)},l.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},l.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),i=0,o=0;o<r;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},l.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(t,e){return h(this,t,e,null)},t.map=function(t,e,r,n){return h(t,e,r,n)}}},function(t,e,r){"use strict";t.exports=function(t){var e=r(6),n=t._async,i=e.tryCatch,o=e.errorObj;function s(t,r){if(!e.isArray(t))return a.call(this,t,r);var s=i(r).apply(this._boundValue(),[null].concat(t));s===o&&n.throwLater(s.e)}function a(t,e){var r=this._boundValue(),s=void 0===t?i(e).call(r,null):i(e).call(r,null,t);s===o&&n.throwLater(s.e)}function u(t,e){if(!t){var r=new Error(t+"");r.cause=t,t=r}var s=i(e).call(this._boundValue(),t);s===o&&n.throwLater(s.e)}t.prototype.asCallback=t.prototype.nodeify=function(t,e){if("function"==typeof t){var r=a;void 0!==e&&Object(e).spread&&(r=s),this._then(r,u,void 0,this,t)}return this}}},function(t,e,r){"use strict";t.exports=function(t,e){var n={},i=r(6),o=r(20),s=i.withAppended,a=i.maybeWrapAsError,u=i.canEvaluate,f=r(13).TypeError,c={__isPromisified__:!0},l=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),h=function(t){return i.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t};function p(t){return!l.test(t)}function d(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function v(t,e,r){var n=i.getDataPropertyOrDefault(t,e+r,c);return!!n&&d(n)}function _(t,e,r,n){for(var o=i.inheritedDataKeys(t),s=[],a=0;a<o.length;++a){var u=o[a],c=t[u],l=n===h||h(u,c,t);"function"!=typeof c||d(c)||v(t,u,e)||!n(u,c,t,l)||s.push(u,c)}return function(t,e,r){for(var n=0;n<t.length;n+=2){var i=t[n];if(r.test(i))for(var o=i.replace(r,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new f("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}(s,e,r),s}var y=function(t){return t.replace(/([$])/,"\\$")},g=function(t){return i.filledRange(t,"_arg","")};var m=u?function(r,u,f,c,l,h){var p=Math.max(0,function(t){return"number"==typeof t.length?Math.max(Math.min(t.length,1024),0):0}(c)-1),d=function(t){for(var e=[t],r=Math.max(0,t-1-3),n=t-1;n>=r;--n)e.push(n);for(n=t+1;n<=3;++n)e.push(n);return e}(p),v="string"==typeof r||u===n;function _(t){var e=g(t).join(", "),r=t>0?", ":"";return(v?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===u?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n").replace("{{args}}",e).replace(", ",r)}var y="string"==typeof r?"this != null ? this['"+r+"'] : fn":"fn",m="'use strict'; \n\t var ret = function (Parameters) { \n\t 'use strict'; \n\t var len = arguments.length; \n\t var promise = new Promise(INTERNAL); \n\t promise._captureStackTrace(); \n\t var nodeback = nodebackForPromise(promise, "+h+"); \n\t var ret; \n\t var callback = tryCatch([GetFunctionCode]); \n\t switch(len) { \n\t [CodeForSwitchCase] \n\t } \n\t if (ret === errorObj) { \n\t promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\t } \n\t if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\t return promise; \n\t }; \n\t notEnumerableProp(ret, '__isPromisified__', true); \n\t return ret; \n\t ".replace("[CodeForSwitchCase]",function(){for(var t="",e=0;e<d.length;++e)t+="case "+d[e]+":"+_(d[e]);return t+=" \n\t default: \n\t var args = new Array(len + 1); \n\t var i = 0; \n\t for (var i = 0; i < len; ++i) { \n\t args[i] = arguments[i]; \n\t } \n\t args[i] = nodeback; \n\t [CodeForCall] \n\t break; \n\t ".replace("[CodeForCall]",v?"ret = callback.apply(this, args);\n":"ret = callback.apply(receiver, args);\n")}()).replace("[GetFunctionCode]",y);return m=m.replace("Parameters",function(t){return i.filledRange(Math.max(t,3),"_arg","")}(p)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",m)(t,c,u,s,a,o,i.tryCatch,i.errorObj,i.notEnumerableProp,e)}:function(r,u,f,c,l,h){var p=function(){return this}(),d=r;function v(){var i=u;u===n&&(i=this);var f=new t(e);f._captureStackTrace();var c="string"==typeof d&&this!==p?this[d]:r,l=o(f,h);try{c.apply(i,s(arguments,l))}catch(t){f._rejectCallback(a(t),!0,!0)}return f._isFateSealed()||f._setAsyncGuaranteed(),f}return"string"==typeof d&&(r=c),i.notEnumerableProp(v,"__isPromisified__",!0),v};function b(t,e,r,o,s){for(var a=new RegExp(y(e)+"$"),u=_(t,e,a,r),f=0,c=u.length;f<c;f+=2){var l=u[f],h=u[f+1],p=l+e;if(o===m)t[p]=m(l,n,l,h,e,s);else{var d=o(h,function(){return m(l,n,l,h,e,s)});i.notEnumerableProp(d,"__isPromisified__",!0),t[p]=d}}return i.toFastProperties(t),t}t.promisify=function(t,e){if("function"!=typeof t)throw new f("expecting a function but got "+i.classString(t));if(d(t))return t;var r=function(t,e,r){return m(t,e,void 0,t,null,r)}(t,void 0===(e=Object(e)).context?n:e.context,!!e.multiArgs);return i.copyDescriptors(t,r,p),r},t.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new f("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(e=Object(e)).multiArgs,n=e.suffix;"string"!=typeof n&&(n="Async");var o=e.filter;"function"!=typeof o&&(o=h);var s=e.promisifier;if("function"!=typeof s&&(s=m),!i.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var a=i.inheritedDataKeys(t),u=0;u<a.length;++u){var c=t[a[u]];"constructor"!==a[u]&&i.isClass(c)&&(b(c.prototype,n,o,s,r),b(c,n,o,s,r))}return b(t,n,o,s,r)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){var o,s=r(6),a=s.isObject,u=r(7);"function"==typeof Map&&(o=Map);var f=function(){var t=0,e=0;function r(r,n){this[t]=r,this[t+e]=n,t++}return function(n){e=n.size,t=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}();function c(t){var e,r=!1;if(void 0!==o&&t instanceof o)e=f(t),r=!0;else{var n=u.keys(t),i=n.length;e=new Array(2*i);for(var s=0;s<i;++s){var a=n[s];e[s]=t[a],e[s+i]=a}}this.constructor$(e),this._isMap=r,this._init$(void 0,r?-6:-3)}function l(e){var r,o=n(e);return a(o)?(r=o instanceof t?o._then(t.props,void 0,void 0,void 0,void 0):new c(o).promise(),o instanceof t&&r._propagateFrom(o,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}s.inherits(c,e),c.prototype._init=function(){},c.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var r;if(this._isMap)r=function(t){for(var e=new o,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],s=t[n];e.set(i,s)}return e}(this._values);else{r={};for(var n=this.length(),i=0,s=this.length();i<s;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},c.prototype.shouldCopyValues=function(){return!1},c.prototype.getActualLength=function(t){return t>>1},t.prototype.props=function(){return l(this)},t.props=function(t){return l(t)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){var o=r(6),s=function(t){return t.then(function(e){return a(e,t)})};function a(r,a){var u=n(r);if(u instanceof t)return s(u);if(null===(r=o.asArray(r)))return i("expecting an array or an iterable object but got "+o.classString(r));var f=new t(e);void 0!==a&&f._propagateFrom(a,3);for(var c=f._fulfill,l=f._reject,h=0,p=r.length;h<p;++h){var d=r[h];(void 0!==d||h in r)&&t.cast(d)._then(c,l,void 0,f,null)}return f}t.race=function(t){return a(t,void 0)},t.prototype.race=function(){return a(this,void 0)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){var a=r(6),u=a.tryCatch;function f(e,r,n,i){this.constructor$(e);var s=t._getContext();this._fn=a.contextBind(s,r),void 0!==n&&(n=t.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,r,i){return"function"!=typeof e?n("expecting a function but got "+a.classString(e)):new f(t,e,r,i).promise()}function h(e){this.accum=e,this.array._gotAccum(e);var r=i(this.value,this.array._promise);return r instanceof t?(this.array._currentCancellable=r,r._then(p,void 0,void 0,this,void 0)):p.call(this,r)}function p(e){var r,n=this.array,i=n._promise,o=u(n._fn);i._pushContext(),(r=void 0!==n._eachValues?o.call(i._boundValue(),e,this.index,this.length):o.call(i._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=r);var a=i._popContext();return s.checkForgottenReturns(r,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",i),r}a.inherits(f,e),f.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},f.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},f.prototype._init=function(){},f.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},f.prototype.shouldCopyValues=function(){return!1},f.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},f.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},f.prototype._iterate=function(e){var r,n;this._values=e;var i=e.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r;for(var o=n;o<i;++o){var s=e[o];s instanceof t&&s.suppressUnhandledRejections()}if(!r.isRejected())for(;n<i;++n){var a={accum:null,value:e[n],index:n,length:i,array:this};r=r._then(h,void 0,void 0,a,void 0),0==(127&n)&&r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(c,c,void 0,r,this)},t.prototype.reduce=function(t,e){return l(this,t,e,null)},t.reduce=function(t,e,r,n){return l(t,e,r,n)}}},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=t.PromiseInspection;function o(t){this.constructor$(t)}r(6).inherits(o,e),o.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var r=new i;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},o.prototype._promiseRejected=function(t,e){var r=new i;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},t.settle=function(t){return n.deprecated(".settle()",".reflect()"),new o(t).promise()},t.allSettled=function(t){return new o(t).promise()},t.prototype.settle=function(){return t.settle(this)}}},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=r(6),o=r(13).RangeError,s=r(13).AggregateError,a=i.isArray,u={};function f(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function c(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 f(t),i=r.promise();return r.setHowMany(e),r.init(),i}i.inherits(f,e),f.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=a(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},f.prototype.init=function(){this._initialized=!0,this._init()},f.prototype.setUnwrap=function(){this._unwrap=!0},f.prototype.howMany=function(){return this._howMany},f.prototype.setHowMany=function(t){this._howMany=t},f.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)},f.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},f.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},f.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new s,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},f.prototype._fulfilled=function(){return this._totalResolved},f.prototype._rejected=function(){return this._values.length-this.length()},f.prototype._addRejected=function(t){this._values.push(t)},f.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},f.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},f.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new o(e)},f.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(t,e){return c(t,e)},t.prototype.some=function(t){return c(this,t)},t._SomePromiseArray=f}},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=r(6),o=t.TimeoutError;function s(t){this.handle=t}s.prototype._resultCancelled=function(){clearTimeout(this.handle)};var a=function(t){return u(+this).thenReturn(t)},u=t.delay=function(r,i){var o,u;return void 0!==i?(o=t.resolve(i)._then(a,null,null,r,void 0),n.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(e),u=setTimeout(function(){o._fulfill()},+r),n.cancellation()&&o._setOnCancel(new s(u)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(t){return u(t,this)};function f(t){return clearTimeout(this.handle),t}function c(t){throw clearTimeout(this.handle),t}t.prototype.timeout=function(t,e){var r,a;t=+t;var u=new s(setTimeout(function(){r.isPending()&&function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new o("operation timed out"):new o(e),i.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()}(r,e,a)},t));return n.cancellation()?(a=this.then(),(r=a._then(f,c,void 0,u,void 0))._setOnCancel(u)):r=this._then(f,c,void 0,u,void 0),r}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,s){var a=r(6),u=r(13).TypeError,f=r(6).inherits,c=a.errorObj,l=a.tryCatch,h={};function p(t){setTimeout(function(){throw t},0)}function d(e,r){var i=0,s=e.length,a=new t(o);return function o(){if(i>=s)return a._fulfill();var u=function(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(e[i++]);if(u instanceof t&&u._isDisposable()){try{u=n(u._getDisposer().tryDispose(r),e.promise)}catch(t){return p(t)}if(u instanceof t)return u._then(o,p,null,null,null)}o()}(),a}function v(t,e,r){this._data=t,this._promise=e,this._context=r}function _(t,e,r){this.constructor$(t,e,r)}function y(t){return v.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function g(t){this.length=t,this.promise=null,this[t-1]=null}v.prototype.data=function(){return this._data},v.prototype.promise=function(){return this._promise},v.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},v.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==h?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},v.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},f(_,v),_.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},g.prototype._resultCancelled=function(){for(var e=this.length,r=0;r<e;++r){var n=this[r];n instanceof t&&n.cancel()}},t.using=function(){var r=arguments.length;if(r<2)return e("you must pass at least 2 arguments to Promise.using");var i,o=arguments[r-1];if("function"!=typeof o)return e("expecting a function but got "+a.classString(o));var u=!0;2===r&&Array.isArray(arguments[0])?(r=(i=arguments[0]).length,u=!1):(i=arguments,r--);for(var f=new g(r),h=0;h<r;++h){var p=i[h];if(v.isDisposer(p)){var _=p;(p=p.promise())._setDisposable(_)}else{var m=n(p);m instanceof t&&(p=m._then(y,null,null,{resources:f,index:h},void 0))}f[h]=p}var b=new Array(f.length);for(h=0;h<b.length;++h)b[h]=t.resolve(f[h]).reflect();var w=t.all(b).then(function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return c.e=r.error(),c;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),o=l(o);var n=u?o.apply(void 0,t):o(t),i=E._popContext();return s.checkForgottenReturns(n,i,"Promise.using",E),n}),E=w.lastly(function(){var e=new t.PromiseInspection(w);return d(f,e)});return f.promise=E,E._setOnCancel(f),E},t.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(t){if("function"==typeof t)return new _(t,this,i());throw new u}}},function(t,e){"use strict";t.exports=function(t){var e=t._SomePromiseArray;function r(t){var r=new e(t),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}t.any=function(t){return r(t)},t.prototype.any=function(){return r(this)}}},function(t,e){"use strict";t.exports=function(t,e){var r=t.reduce,n=t.all;function i(){return n(this)}t.prototype.each=function(t){return r(this,t,e,0)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,n){return r(t,n,e,0)._then(i,void 0,void 0,t,void 0)},t.mapSeries=function(t,n){return r(t,n,e,e)}}},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,r){var n=r(43),i=1,o=4;t.exports=function(t){return n(t,i|o)}},function(t,e,r){var n=r(44),i=r(88),o=r(89),s=r(92),a=r(115),u=r(119),f=r(120),c=r(121),l=r(125),h=r(129),p=r(131),d=r(132),v=r(137),_=r(138),y=r(152),g=r(100),m=r(101),b=r(68),w=r(94),E=1,k=2,T=4,B="[object Arguments]",S="[object Function]",x="[object GeneratorFunction]",A="[object Object]",j={};j[B]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j[A]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j[S]=j["[object WeakMap]"]=!1,t.exports=function t(e,r,I,O,C,R){var P,U=r&E,L=r&k,F=r&T;if(I&&(P=C?I(e,O,C,R):I(e)),void 0!==P)return P;if(!b(e))return e;var D=g(e);if(D){if(P=v(e),!U)return f(e,P)}else{var M=d(e),N=M==S||M==x;if(m(e))return u(e,U);if(M==A||M==B||N&&!C){if(P=L||N?{}:y(e),!U)return L?l(e,a(P,e)):c(e,s(P,e))}else{if(!j[M])return C?e:{};P=_(e,M,t,U)}}R||(R=new n);var q=R.get(e);if(q)return q;R.set(e,P);var z=F?L?p:h:L?keysIn:w,V=D?void 0:z(e);return i(V||e,function(n,i){V&&(n=e[i=n]),o(P,i,t(n,r,I,i,e,R))}),P}},function(t,e,r){var n=r(45),i=r(53),o=r(54),s=r(55),a=r(56),u=r(57);function f(t){var e=this.__data__=new n(t);this.size=e.size}f.prototype.clear=i,f.prototype.delete=o,f.prototype.get=s,f.prototype.has=a,f.prototype.set=u,t.exports=f},function(t,e,r){var n=r(46),i=r(47),o=r(50),s=r(51),a=r(52);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(48),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():i.call(e,r,1),--this.size,0))}},function(t,e,r){var n=r(49);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(48);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(48);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(48);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(45);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(45),i=r(58),o=r(73),s=200;t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var a=r.__data__;if(!i||a.length<s-1)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(a)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(59)(r(64),"Map");t.exports=n},function(t,e,r){var n=r(60),i=r(72);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(61),i=r(69),o=r(68),s=r(71),a=/^\[object .+?Constructor\]$/,u=Function.prototype,f=Object.prototype,c=u.toString,l=f.hasOwnProperty,h=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?h:a).test(s(t))}},function(t,e,r){var n=r(62),i=r(68),o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=n(t);return e==s||e==a||e==o||e==u}},function(t,e,r){var n=r(63),i=r(66),o=r(67),s="[object Null]",a="[object Undefined]",u=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?a:s:u&&u in Object(t)?i(t):o(t)}},function(t,e,r){var n=r(64).Symbol;t.exports=n},function(t,e,r){var n=r(65),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},function(t,e){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(e,function(){return this}())},function(t,e,r){var n=r(63),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var i=s.call(t);return n&&(e?t[a]=r:delete t[a]),i}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){var n=r(70),i=function(){var t=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=function(t){return!!i&&i in t}},function(t,e,r){var n=r(64)["__core-js_shared__"];t.exports=n},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){var n=r(74),i=r(82),o=r(85),s=r(86),a=r(87);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,r){var n=r(75),i=r(45),o=r(58);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},function(t,e,r){var n=r(76),i=r(78),o=r(79),s=r(80),a=r(81);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,t.exports=u},function(t,e,r){var n=r(77);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e,r){var n=r(59)(Object,"create");t.exports=n},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(77),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return r===i?void 0:r}return o.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(77),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},function(t,e,r){var n=r(77),i="__lodash_hash_undefined__";t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?i:e,this}},function(t,e,r){var n=r(83);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e,r){var n=r(84);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(83);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(83);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(83);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},function(t,e,r){var n=r(90),i=r(49),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var s=t[e];o.call(t,e)&&i(s,r)&&(void 0!==r||e in t)||n(t,e,r)}},function(t,e,r){var n=r(91);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(59),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){var n=r(93),i=r(94);t.exports=function(t,e){return t&&n(e,i(e),t)}},function(t,e,r){var n=r(89),i=r(90);t.exports=function(t,e,r,o){var s=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var f=e[a],c=o?o(r[f],t[f],f,r,t):void 0;void 0===c&&(c=t[f]),s?i(r,f,c):n(r,f,c)}return r}},function(t,e,r){var n=r(95),i=r(110),o=r(114);t.exports=function(t){return o(t)?n(t):i(t)}},function(t,e,r){var n=r(96),i=r(97),o=r(100),s=r(101),a=r(104),u=r(105),f=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),c=!r&&i(t),l=!r&&!c&&s(t),h=!r&&!c&&!l&&u(t),p=r||c||l||h,d=p?n(t.length,String):[],v=d.length;for(var _ in t)!e&&!f.call(t,_)||p&&("length"==_||l&&("offset"==_||"parent"==_)||h&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||a(_,v))||d.push(_);return d}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(98),i=r(99),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};t.exports=u},function(t,e,r){var n=r(62),i=r(99),o="[object Arguments]";t.exports=function(t){return i(t)&&n(t)==o}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){(function(t){var n=r(64),i=r(103),o="object"==typeof e&&e&&!e.nodeType&&e,s=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=s&&s.exports===o?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u}).call(e,r(102)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){t.exports=function(){return!1}},function(t,e){var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){return!!(e=null==e?r:e)&&("number"==typeof t||n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,r){var n=r(106),i=r(108),o=r(109),s=o&&o.isTypedArray,a=s?i(s):n;t.exports=a},function(t,e,r){var n=r(62),i=r(107),o=r(99),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!s[n(t)]}},function(t,e){var r=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){(function(t){var n=r(65),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i&&n.process,a=function(){try{return s&&s.binding&&s.binding("util")}catch(t){}}();t.exports=a}).call(e,r(102)(t))},function(t,e,r){var n=r(111),i=r(112),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(113)(Object.keys,Object);t.exports=n},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(61),i=r(107);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},function(t,e,r){var n=r(93),i=r(116);t.exports=function(t,e){return t&&n(e,i(e),t)}},function(t,e,r){var n=r(95),i=r(117),o=r(114);t.exports=function(t){return o(t)?n(t,!0):i(t)}},function(t,e,r){var n=r(68),i=r(111),o=r(118),s=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=i(t),r=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&r.push(a);return r}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},function(t,e,r){(function(t){var n=r(64),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}}).call(e,r(102)(t))},function(t,e){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},function(t,e,r){var n=r(93),i=r(122);t.exports=function(t,e){return n(t,i(t),e)}},function(t,e,r){var n=r(123),i=r(124),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),n(s(t),function(e){return o.call(t,e)}))}:i;t.exports=a},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}},function(t,e){t.exports=function(){return[]}},function(t,e,r){var n=r(93),i=r(126);t.exports=function(t,e){return n(t,i(t),e)}},function(t,e,r){var n=r(127),i=r(128),o=r(122),s=r(124),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,o(t)),t=i(t);return e}:s;t.exports=a},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},function(t,e,r){var n=r(113)(Object.getPrototypeOf,Object);t.exports=n},function(t,e,r){var n=r(130),i=r(122),o=r(94);t.exports=function(t){return n(t,o,i)}},function(t,e,r){var n=r(127),i=r(100);t.exports=function(t,e,r){var o=e(t);return i(t)?o:n(o,r(t))}},function(t,e,r){var n=r(130),i=r(126),o=r(116);t.exports=function(t){return n(t,o,i)}},function(t,e,r){var n=r(133),i=r(58),o=r(134),s=r(135),a=r(136),u=r(62),f=r(71),c=f(n),l=f(i),h=f(o),p=f(s),d=f(a),v=u;(n&&"[object DataView]"!=v(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=v(new i)||o&&"[object Promise]"!=v(o.resolve())||s&&"[object Set]"!=v(new s)||a&&"[object WeakMap]"!=v(new a))&&(v=function(t){var e=u(t),r="[object Object]"==e?t.constructor:void 0,n=r?f(r):"";if(n)switch(n){case c:return"[object DataView]";case l:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=v},function(t,e,r){var n=r(59)(r(64),"DataView");t.exports=n},function(t,e,r){var n=r(59)(r(64),"Promise");t.exports=n},function(t,e,r){var n=r(59)(r(64),"Set");t.exports=n},function(t,e,r){var n=r(59)(r(64),"WeakMap");t.exports=n},function(t,e){var r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&r.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},function(t,e,r){var n=r(139),i=r(141),o=r(142),s=r(146),a=r(147),u=r(150),f=r(151),c="[object Boolean]",l="[object Date]",h="[object Map]",p="[object Number]",d="[object RegExp]",v="[object Set]",_="[object String]",y="[object Symbol]",g="[object ArrayBuffer]",m="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",k="[object Int16Array]",T="[object Int32Array]",B="[object Uint8Array]",S="[object Uint8ClampedArray]",x="[object Uint16Array]",A="[object Uint32Array]";t.exports=function(t,e,r,j){var I=t.constructor;switch(e){case g:return n(t);case c:case l:return new I(+t);case m:return i(t,j);case b:case w:case E:case k:case T:case B:case S:case x:case A:return f(t,j);case h:return o(t,j,r);case p:case _:return new I(t);case d:return s(t);case v:return a(t,j,r);case y:return u(t)}}},function(t,e,r){var n=r(140);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},function(t,e,r){var n=r(64).Uint8Array;t.exports=n},function(t,e,r){var n=r(139);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}},function(t,e,r){var n=r(143),i=r(144),o=r(145),s=1;t.exports=function(t,e,r){var a=e?r(o(t),s):o(t);return i(a,n,new t.constructor)}},function(t,e){t.exports=function(t,e){return t.set(e[0],e[1]),t}},function(t,e){t.exports=function(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}},function(t,e){var r=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,r.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,r){var n=r(148),i=r(144),o=r(149),s=1;t.exports=function(t,e,r){var a=e?r(o(t),s):o(t);return i(a,n,new t.constructor)}},function(t,e){t.exports=function(t,e){return t.add(e),t}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},function(t,e,r){var n=r(63),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e,r){var n=r(139);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},function(t,e,r){var n=r(153),i=r(128),o=r(111);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:n(i(t))}},function(t,e,r){var n=r(68),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=o},function(t,e,r){var n=r(155),i=r(156),o=r(158),s=r(166),a=o(function(t){return t.push(void 0,s),n(i,void 0,t)});t.exports=a},function(t,e){t.exports=function(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)}},function(t,e,r){var n=r(93),i=r(157),o=r(116),s=i(function(t,e,r,i){n(e,o(e),t,i)});t.exports=s},function(t,e,r){var n=r(158),i=r(165);t.exports=function(t){return n(function(e,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++n<o;){var u=r[n];u&&t(e,u,n,s)}return e})}},function(t,e,r){var n=r(159),i=r(160),o=r(161);t.exports=function(t,e){return o(i(t,e,n),t+"")}},function(t,e){t.exports=function(t){return t}},function(t,e,r){var n=r(155),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=i(o.length-e,0),u=Array(a);++s<a;)u[s]=o[e+s];s=-1;for(var f=Array(e+1);++s<e;)f[s]=o[s];return f[e]=r(u),n(t,this,f)}}},function(t,e,r){var n=r(162),i=r(164)(n);t.exports=i},function(t,e,r){var n=r(163),i=r(91),o=r(159),s=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=s},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var r=800,n=16,i=Date.now;t.exports=function(t){var e=0,o=0;return function(){var s=i(),a=n-(s-o);if(o=s,a>0){if(++e>=r)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(49),i=r(114),o=r(104),s=r(68);t.exports=function(t,e,r){if(!s(r))return!1;var a=typeof e;return!!("number"==a?i(r)&&o(e,r.length):"string"==a&&e in r)&&n(r[e],t)}},function(t,e,r){var n=r(49),i=Object.prototype,o=i.hasOwnProperty;t.exports=function(t,e,r,s){return void 0===t||n(t,i[r])&&!o.call(s,r)?e:t}},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,r){(function(n){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t}(e=t.exports=r(169)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),!r)return;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&&"%c"===t&&(o=++i)}),t.splice(o,0,n)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"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+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),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(i())}).call(e,r(5))},function(t,e,r){var n;function i(t){function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,function(r,n){if("%%"===r)return r;u++;var i=e.formatters[n];if("function"==typeof i){var o=s[u];r=i.call(t,o),s.splice(u,1),u--}return r}),e.formatArgs.call(t,s),(r.log||e.log||console.log.bind(console)).apply(t,s)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(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]}(t),"function"==typeof e.init&&e.init(r),r}(e=t.exports=i.debug=i.default=i).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){e.save(t),e.names=[],e.skips=[];for(var r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&("-"===(t=r[i].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(170),e.names=[],e.skips=[],e.formatters={}},function(t,e){var r=1e3,n=60*r,i=60*n,o=24*i,s=365.25*o;function a(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}t.exports=function(t,e){e=e||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;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)return;var a=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return a*s;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*i;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?function(t){return a(t,o,"day")||a(t,i,"hour")||a(t,n,"minute")||a(t,r,"second")||t+" ms"}(t):function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=n)return Math.round(t/n)+"m";if(t>=r)return Math.round(t/r)+"s";return t+"ms"}(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";var n=r(172);t.exports=function(){var t=n;return{get:function(e){return t[e]},set:function(e,r){t[e]=r}}}()},function(t,e){t.exports={websocket:"",address_prefix:"VIZ",chain_id:"2040effda178d4fffff5eab7a915d4019879f5205cc5392e4bcced2b6edda0cd",broadcast_transaction_with_callback:!1,reference_irreversible_block:!1,tx_expiration_seconds:60}},function(t,e){"use strict";t.exports=[{api:"witness_api",method:"get_miner_queue"},{api:"witness_api",method:"get_witness_schedule"},{api:"witness_api",method:"get_witnesses",params:["witnessIds"]},{api:"witness_api",method:"get_witness_by_account",params:["accountName"]},{api:"witness_api",method:"get_witnesses_by_vote",params:["from","limit"]},{api:"witness_api",method:"get_witnesses_by_counted_vote",params:["from","limit"]},{api:"witness_api",method:"get_witness_count"},{api:"witness_api",method:"lookup_witness_accounts",params:["lowerBoundName","limit"]},{api:"witness_api",method:"get_active_witnesses"},{api:"account_history",method:"get_account_history",params:["account","from","limit"]},{api:"operation_history",method:"get_ops_in_block",params:["blockNum","onlyVirtual"]},{api:"operation_history",method:"get_transaction",params:["trxId"]},{api:"tags",method:"get_trending_tags",params:["afterTag","limit"]},{api:"tags",method:"get_tags_used_by_author",params:["author"]},{api:"tags",method:"get_discussions_by_payout",params:["query"]},{api:"tags",method:"get_discussions_by_trending",params:["query"]},{api:"tags",method:"get_discussions_by_created",params:["query"]},{api:"tags",method:"get_discussions_by_active",params:["query"]},{api:"tags",method:"get_discussions_by_cashout",params:["query"]},{api:"tags",method:"get_discussions_by_votes",params:["query"]},{api:"tags",method:"get_discussions_by_children",params:["query"]},{api:"tags",method:"get_discussions_by_hot",params:["query"]},{api:"tags",method:"get_discussions_by_feed",params:["query"]},{api:"tags",method:"get_discussions_by_blog",params:["query"]},{api:"tags",method:"get_discussions_by_contents",params:["query"]},{api:"tags",method:"get_discussions_by_author_before_date",params:["author","startPermlink","beforeDate","limit"]},{api:"tags",method:"get_languages"},{api:"social_network",method:"get_replies_by_last_update",params:["startAuthor","startPermlink","limit","voteLimit"]},{api:"social_network",method:"get_content",params:["author","permlink","voteLimit"]},{api:"social_network",method:"get_content_replies",params:["parent","parentPermlink","voteLimit"]},{api:"social_network",method:"get_all_content_replies",params:["parent","parentPermlink","voteLimit"]},{api:"social_network",method:"get_active_votes",params:["author","permlink","voteLimit"]},{api:"social_network",method:"get_account_votes",params:["voter","from","voteLimit"]},{api:"database_api",method:"get_block_header",params:["blockNum"]},{api:"database_api",method:"get_block",params:["blockNum"]},{api:"database_api",method:"get_irreversible_block_header",params:["blockNum"]},{api:"database_api",method:"get_irreversible_block",params:["blockNum"]},{api:"database_api",method:"get_config"},{api:"database_api",method:"get_dynamic_global_properties"},{api:"database_api",method:"get_chain_properties"},{api:"database_api",method:"get_hardfork_version"},{api:"database_api",method:"get_next_scheduled_hardfork"},{api:"database_api",method:"get_account_count"},{api:"database_api",method:"get_owner_history",params:["account"]},{api:"database_api",method:"get_master_history",params:["account"]},{api:"database_api",method:"set_block_applied_callback",params:["callback"]},{api:"database_api",method:"get_recovery_request",params:["account"]},{api:"database_api",method:"get_escrow",params:["from","escrowId"]},{api:"database_api",method:"get_withdraw_routes",params:["account","withdrawRouteType"]},{api:"database_api",method:"get_transaction_hex",params:["trx"]},{api:"database_api",method:"get_required_signatures",params:["trx","availableKeys"]},{api:"database_api",method:"get_potential_signatures",params:["trx"]},{api:"database_api",method:"verify_authority",params:["trx"]},{api:"database_api",method:"verify_account_authority",params:["name","signers"]},{api:"database_api",method:"get_accounts",params:["accountNames"]},{api:"database_api",method:"lookup_account_names",params:["accountNames"]},{api:"database_api",method:"lookup_accounts",params:["lowerBoundName","limit"]},{api:"database_api",method:"get_proposed_transaction",params:["account"]},{api:"database_api",method:"get_database_info"},{api:"database_api",method:"get_vesting_delegations",params:["account","from","limit","type"]},{api:"database_api",method:"get_expiring_vesting_delegations",params:["account","from","limit"]},{api:"database_api",method:"get_proposed_transactions",params:["account","from","limit"]},{api:"database_api",method:"get_accounts_on_sale",params:["from","limit"]},{api:"database_api",method:"get_accounts_on_auction",params:["from","limit"]},{api:"database_api",method:"get_subaccounts_on_sale",params:["from","limit"]},{api:"follow",method:"get_followers",params:["following","startFollower","followType","limit"]},{api:"follow",method:"get_following",params:["follower","startFollowing","followType","limit"]},{api:"follow",method:"get_follow_count",params:["account"]},{api:"follow",method:"get_feed_entries",params:["account","entryId","limit"]},{api:"follow",method:"get_feed",params:["account","entryId","limit"]},{api:"follow",method:"get_blog_entries",params:["account","entryId","limit"]},{api:"follow",method:"get_blog",params:["account","entryId","limit"]},{api:"follow",method:"get_reblogged_by",params:["author","permlink"]},{api:"follow",method:"get_blog_authors",params:["blogAccount"]},{api:"account_by_key",method:"get_key_references",params:["account_name_type"]},{api:"network_broadcast_api",method:"broadcast_transaction",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_transaction_with_callback",params:["confirmationCallback","trx"]},{api:"network_broadcast_api",method:"broadcast_transaction_synchronous",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_block",params:["block"]},{api:"committee_api",method:"get_committee_request",params:["request_id","votes_count"]},{api:"committee_api",method:"get_committee_request_votes",params:["request_id"]},{api:"committee_api",method:"get_committee_requests_list",params:["status"]},{api:"invite_api",method:"get_invites_list",params:["status"]},{api:"invite_api",method:"get_invite_by_id",params:["id"]},{api:"invite_api",method:"get_invite_by_key",params:["invite_key"]},{api:"paid_subscription_api",method:"get_paid_subscriptions",params:["from","limit"]},{api:"paid_subscription_api",method:"get_paid_subscription_options",params:["account"]},{api:"paid_subscription_api",method:"get_paid_subscription_status",params:["subscriber","account"]},{api:"paid_subscription_api",method:"get_active_paid_subscriptions",params:["subscriber"]},{api:"paid_subscription_api",method:"get_inactive_paid_subscriptions",params:["subscriber"]},{api:"custom_protocol_api",method:"get_account",params:["account","custom_protocol_id"]},{api:"auth_util",method:"check_authority_signature",params:["account_name","level","signatures"]},{api:"block_info",method:"get_block_info",params:["start_block_num","count"]},{api:"block_info",method:"get_blocks_with_info",params:["start_block_num","count"]},{api:"raw_block",method:"get_raw_block",params:["block_num"]}]},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="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};e.camelCase=function(t){return t.replace(o,function(t,e){return e.toUpperCase()})},e.validateAccountName=function(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<2)return i+"be longer.";if(o>25)return i+"be shorter.";/\./.test(t)&&(i="Each account segment should ");var s=t.split(".");for(e=0,n=s.length;e<n;e++){if(r=s[e],!/^[a-z]/.test(r))return i+"start with a letter.";if(!/^[a-z0-9-]*$/.test(r))return i+"have only letters, digits, or dashes.";if(/--/.test(r))return i+"have only one dash in a row.";if(!/[a-z0-9]$/.test(r))return i+"end with a letter or digit.";if(!(r.length>=2))return i+"be longer"}return null},e.voiceEvent=function(t,e,r,n,i,o,s,a){a=void 0===a?function(){}:a;var u=function(t,e,r,n,i,o,s,a){var u={p:s,e:r,b:i};n!==e&&(u.a=n),void 0!==o&&(u.d=o),viz.broadcast.custom(t,[],[e],"VE",JSON.stringify(u),function(t,e){a(!t)})};!1!==(s=void 0!==s&&s)?u(t,e,r,n,i,o,s,a):viz.api.getAccount(e,"VE",function(s,f){s?a(!1):u(t,e,r,n,i,o,f.custom_sequence_block_num,a)})},e.voiceText=function(t,e,r,n,i,o,s,a){n=void 0!==n&&n,i=void 0!==i&&i,o=void 0!==o&&o,a=void 0===a?function(){}:a;var u=function(t,e,r,n,i,o,s,a){var u={p:s,d:{t:r}};n?u.d.r=n:i&&(u.d.s=i),o&&(u.d.b=o),viz.broadcast.custom(t,[],[e],"V",JSON.stringify(u),function(t,e){a(!t)})};!1!==(s=void 0!==s&&s)?u(t,e,r,n,i,o,s,a):viz.api.getAccount(e,"V",function(s,f){s?a(!1):u(t,e,r,n,i,o,f.custom_sequence_block_num,a)})},e.voiceEncodedText=function(t,e,r,o,s,a,u,f,c,l){a=void 0!==a&&a,u=void 0!==u&&u,f=void 0!==f&&f,l=void 0===l?function(){}:l;var h=function(t,e,r,o,s,a,u,f,c,l){var h={d:{t:s}};if(a?h.d.r=a:u&&(h.d.s=u),f&&(h.d.b=f),"object"===(void 0===r?"undefined":n(r))){for(var p in r=r.reverse(),"object"===(void 0===o?"undefined":n(o))&&(o=o.reverse()),r){var d=p;h.nt=0==d?"t":"e",console.log("encode object",h,"with passphrase",r[d],"and comment",o[d]),h.d=JSON.stringify(h),h.d=i.Aes.simpleEncoder(h.d,r[d]),"object"===(void 0===o?"undefined":n(o))&&"string"==typeof o[d]&&(h.c=o[d])}delete h.nt}else h.d=JSON.stringify(h),h.d=i.Aes.simpleEncoder(h.d,r),void 0!==o&&(h.c=o);h.t="e",h.p=c,viz.broadcast.custom(t,[],[e],"V",JSON.stringify(h),function(t,e){l(!t)})};!1!==(c=void 0!==c&&c)?h(t,e,r,o,s,a,u,f,c,l):viz.api.getAccount(e,"V",function(n,i){n?l(!1):h(t,e,r,o,s,a,u,f,i.custom_sequence_block_num,l)})},e.voicePublication=function(t,e,r,n,i,o,s,a,u,f,c){i=void 0!==i&&i,o=void 0!==o&&o,s=void 0!==s&&s,a=void 0!==a&&a,u=void 0!==u&&u,c=void 0===c?function(){}:c;var l=function(t,e,r,n,i,o,s,a,u,f,c){var l={p:f,t:"p",d:{t:r,m:n}};i&&(l.d.d=i),o&&(l.d.i=o),s?l.d.r=s:a&&(l.d.s=a),u&&(l.d.b=u),viz.broadcast.custom(t,[],[e],"V",JSON.stringify(l),function(t,e){c(!t)})};!1!==(f=void 0!==f&&f)?l(t,e,r,n,i,o,s,a,u,f,c):viz.api.getAccount(e,"V",function(f,h){f?c(!1):l(t,e,r,n,i,o,s,a,u,h.custom_sequence_block_num,c)})},e.voiceEncodedPublication=function(t,e,r,o,s,a,u,f,c,l,h,p,d){u=void 0!==u&&u,f=void 0!==f&&f,c=void 0!==c&&c,l=void 0!==l&&l,h=void 0!==h&&h,d=void 0===d?function(){}:d;var v=function(t,e,r,o,s,a,u,f,c,l,h,p,d){var v={t:"p",d:{t:s,m:a}};if(u&&(v.d.d=u),f&&(v.d.i=f),c?v.d.r=c:l&&(v.d.s=l),h&&(v.d.b=h),"object"===(void 0===r?"undefined":n(r))){for(var _ in r=r.reverse(),"object"===(void 0===o?"undefined":n(o))&&(o=o.reverse()),r){var y=_;v.nt=0==y?"p":"e",console.log("encode object",v,"with passphrase",r[y],"and comment",o[y]),v.d=JSON.stringify(v),v.d=i.Aes.simpleEncoder(v.d,r[y]),"object"===(void 0===o?"undefined":n(o))&&"string"==typeof o[y]&&(v.c=o[y])}delete v.nt}else v.d.nt=v.t,v.d=JSON.stringify(v),v.d=i.Aes.simpleEncoder(v.d,r),void 0!==o&&(v.c=o);v.t="e",v.p=p,viz.broadcast.custom(t,[],[e],"V",JSON.stringify(v),function(t,e){d(!t)})};!1!==(p=void 0!==p&&p)?v(t,e,r,o,s,a,u,f,c,l,h,p,d):viz.api.getAccount(e,"V",function(n,i){n?d(!1):v(t,e,r,o,s,a,u,f,c,l,h,i.custom_sequence_block_num,d)})};var i=r(175),o=/_([a-z])/g},function(t,e,r){"use strict";t.exports={Address:r(176),Aes:r(227),PrivateKey:r(260),PublicKey:r(250),Signature:r(261),brainKey:r(265),key_utils:r(266),hash:r(185),ecc_config:r(171)}},function(t,e,r){(function(e){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=r(181),o=r(171),s=r(185),a=r(225),u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.addy=e}return n(t,[{key:"toBuffer",value:function(){return this.addy}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.get("address_prefix"),r=s.ripemd160(this.addy),n=e.concat([this.addy,r.slice(0,4)]);return t+a.encode(n)}}],[{key:"fromBuffer",value:function(e){var r=s.sha512(e);return new t(s.ripemd160(r))}},{key:"fromString",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.get("address_prefix"),u=r.slice(0,n.length);i.equal(n,u,"Expecting key to begin with "+n+", instead got "+u);var f=r.slice(n.length),c=(f=new e(a.decode(f),"binary")).slice(-4);f=f.slice(0,-4);var l=s.ripemd160(f);return l=l.slice(0,4),i.deepEqual(c,l,"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=s.sha256(r.toBuffer(n)),a=s.ripemd160(o),u=new e(1);u.writeUInt8(255&i,0);var f=e.concat([u,a]),c=s.sha256(f);c=s.sha256(c);var l=e.concat([f,c.slice(0,4)]);return new t(s.ripemd160(l))}}]),t}();t.exports=u}).call(e,r(177).Buffer)},function(t,e,r){(function(t){
|
|
1
|
+
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={exports:{},id:n,loaded:!1};return t[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=t,r.c=e,r.p="",r(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(273),a=r(283),s=r(286)(i),u=r(300),f=r(227),c={api:i,auth:o,broadcast:a,config:r(171),formatter:s,memo:u,aes:f,utils:r(174)};"undefined"!=typeof window&&(window.viz=c),void 0!==n&&(n.viz=c),e=t.exports=c}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=p(r(2)),o=p(r(3)),a=p(r(42)),s=p(r(154)),u=(p(r(167)),p(r(168))),f=p(r(171)),c=p(r(173)),l=r(174),h=p(r(267));function p(t){return t&&t.__esModule?t:{default:t}}var d=(0,u.default)("viz:emitters"),v=(0,u.default)("viz:protocol"),_=(0,u.default)("viz:setup"),y=(0,u.default)("viz:ws"),g={id:0},m=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return(0,s.default)(t,g),r.options=(0,a.default)(t),r.id=0,r.inFlight=0,r.currentP=o.default.fulfilled(),r.isOpen=!1,r.releases=[],r.requests={},r}return function(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)}(e,i.default),n(e,[{key:"_setTransport",value:function(t){if(t&&t.match("^((http|https)?://)"))this.transport=new h.default.http;else{if(!t||!t.match("^((ws|wss)?://)"))throw Error("unknown transport! ["+t+"]");this.transport=new h.default.ws}}},{key:"setWebSocket",value:function(t){console.warn("viz.api.setWebSocket(url) is now deprecated instead use viz.config.set('websocket',url)"),_("Setting WS",t),f.default.set("websocket",t),this._setTransport(t),this.stop()}},{key:"start",value:function(){var t=f.default.get("websocket");return this._setTransport(t),this.transport.start()}},{key:"stop",value:function(){var t=this.transport.stop();return this.transport=null,t}},{key:"listenTo",value:function(t,e,r){return d("Adding listener for",e,"from",t.constructor.name),t.addEventListener?t.addEventListener(e,r):t.on(e,r),function(){d("Removing listener for",e,"from",t.constructor.name),t.removeEventListener?t.removeEventListener(e,r):t.removeListener(e,r)}}},{key:"onMessage",value:function(t,e){var r=e.api,n=e.data,i=e.resolve,o=e.reject,a=e.start_time;y("-- VIZ.onMessage --\x3e",t.id);var s=t.error;if(s){var u=new Error((s.message||"Failed to complete operation")+" (see err.payload for the full error payload)");return u.payload=t,void o(u)}v("Resolved",r,n,"->",t),this.emit("track-performance",n.method,Date.now()-a),delete this.requests[t.id],i(t.result)}},{key:"send",value:function(t,e,r){this.transport||this.start();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:"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="",a=!0;return function s(){a&&e.getDynamicGlobalPropertiesAsync().then(function(e){var a="irreversible"===t?e.last_irreversible_block_num:e.head_block_number;if(a!==i)if(i)for(var u=i;u<a;u++)u!==i&&r(null,u),i=u;else i=a,r(null,a);o.default.delay(n).then(function(){s()})},function(t){r(t)})}(),function(){a=!1}}},{key:"streamBlock",value:function(){var t=this,e=arguments.length>0&&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,a){if(e)return o(),void r(e);(n=a)!==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){if(t)return r(),void e(t);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){if(t)return r(),void e(t);n.operations.forEach(function(t){e(null,t)})});return r}}]),e}();c.default.forEach(function(t){var e=t.method_name||(0,l.camelCase)(t.method),r=t.params||[];m.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)},m.prototype[e]=function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];var o=r.reduce(function(t,e,r){return t[e]=n[r],t},{}),a=n[r.length];return this[e+"With"](o,a)}}),o.default.promisifyAll(m.prototype);var b=new m;(e=t.exports=b).VIZ=m,e.VIZ.DEFAULTS=g},function(t,e){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function i(t){return"object"==typeof t&&null!==t}function o(t){return void 0===t}t.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(t){if(!function(t){return"number"==typeof t}(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},r.prototype.emit=function(t){var e,r,a,s,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(o(r=this._events[t]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),r.apply(this,s)}else if(i(r))for(s=Array.prototype.slice.call(arguments,1),a=(f=r.slice()).length,u=0;u<a;u++)f[u].apply(this,s);return!0},r.prototype.addListener=function(t,e){var a;if(!n(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,n(e.listener)?e.listener:e),this._events[t]?i(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,i(this._events[t])&&!this._events[t].warned&&(a=o(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&a>0&&this._events[t].length>a&&(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){if(!n(e))throw TypeError("listener must be a function");var r=!1;function i(){this.removeListener(t,i),r||(r=!0,e.apply(this,arguments))}return i.listener=e,this.on(t,i),this},r.prototype.removeListener=function(t,e){var r,o,a,s;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(a=(r=this._events[t]).length,o=-1,r===e||n(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(r)){for(s=a;s-- >0;)if(r[s]===e||r[s].listener&&r[s].listener===e){o=s;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(o,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(n(r=this._events[t]))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){return 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";var n;"undefined"!=typeof Promise&&(n=Promise);var i=r(4)();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(t){}return i},t.exports=i},function(t,e,r){(function(e){"use strict";t.exports=function(){var n=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},i=function(){return new R.PromiseInspection(this._target())},o=function(t){return R.reject(new g(t))};function a(){}var s={},u=r(6);u.setReflectHandler(i);var f=function(){var t=e.domain;return void 0===t?null:t},c=function(){return{domain:f(),async:null}},l=u.isNode&&u.nodeSupportsAsyncResource?r(!function(){var t=new Error('Cannot find module "async_hooks"');throw t.code="MODULE_NOT_FOUND",t}()).AsyncResource:null,h=function(){return{domain:f(),async:new l("Bluebird::Promise")}},p=u.isNode?c:function(){return null};u.notEnumerableProp(R,"_getContext",p);var d=r(7),v=r(8),_=new v;d.defineProperty(R,"_async",{value:_});var y=r(13),g=R.TypeError=y.TypeError;R.RangeError=y.RangeError;var m=R.CancellationError=y.CancellationError;R.TimeoutError=y.TimeoutError,R.OperationalError=y.OperationalError,R.RejectionError=y.OperationalError,R.AggregateError=y.AggregateError;var b=function(){},w={},E={},k=r(14)(R,b),T=r(15)(R,b,k,o,a),x=r(16)(R),B=x.create,S=r(17)(R,x,function(){p=h,u.notEnumerableProp(R,"_getContext",h)},function(){p=c,u.notEnumerableProp(R,"_getContext",c)}),A=(S.CapturedTrace,r(18)(R,k,E)),j=r(19)(E),I=r(20),O=u.errorObj,C=u.tryCatch;function R(t){t!==b&&function(t,e){if(null==t||t.constructor!==R)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof e)throw new g("expecting a function but got "+u.classString(e))}(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 P(t){this.promise._resolveCallback(t)}function U(t){this.promise._rejectCallback(t,!1)}function L(t){var e=new R(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}return R.prototype.toString=function(){return"[object Promise]"},R.prototype.caught=R.prototype.catch=function(t){var e=arguments.length;if(e>1){var r,n=new Array(e-1),i=0;for(r=0;r<e-1;++r){var a=arguments[r];if(!u.isObject(a))return o("Catch statement predicate: expecting an object but got "+u.classString(a));n[i++]=a}if(n.length=i,"function"!=typeof(t=arguments[r]))throw new g("The last argument to .catch() must be a function, got "+u.toString(t));return this.then(void 0,j(n,t,this))}return this.then(void 0,t)},R.prototype.reflect=function(){return this._then(i,i,void 0,this,void 0)},R.prototype.then=function(t,e){if(S.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var r=".then() only accepts functions but was passed: "+u.classString(t);arguments.length>1&&(r+=", "+u.classString(e)),this._warn(r)}return this._then(t,e,void 0,void 0,void 0)},R.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},R.prototype.spread=function(t){return"function"!=typeof t?o("expecting a function but got "+u.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},R.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},R.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new T(this).promise()},R.prototype.error=function(t){return this.caught(u.originatesFromRejection,t)},R.getNewLibraryCopy=t.exports,R.is=function(t){return t instanceof R},R.fromNode=R.fromCallback=function(t){var e=new R(b);e._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=C(t)(I(e,r));return n===O&&e._rejectCallback(n.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},R.all=function(t){return new T(t).promise()},R.cast=function(t){var e=k(t);return e instanceof R||((e=new R(b))._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},R.resolve=R.fulfilled=R.cast,R.reject=R.rejected=function(t){var e=new R(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},R.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+u.classString(t));return _.setScheduler(t)},R.prototype._then=function(t,e,r,n,i){var o=void 0!==i,a=o?i:new R(b),s=this._target(),f=s._bitField;o||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&f)?this._boundValue():s===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var c=p();if(0!=(50397184&f)){var l,h,d=s._settlePromiseCtx;0!=(33554432&f)?(h=s._rejectionHandler0,l=t):0!=(16777216&f)?(h=s._fulfillmentHandler0,l=e,s._unsetRejectionIsUnhandled()):(d=s._settlePromiseLateCancellationObserver,h=new m("late cancellation observer"),s._attachExtraTrace(h),l=e),_.invoke(d,s,{handler:u.contextBind(c,l),promise:a,receiver:n,value:h})}else s._addCallbacks(t,e,a,n,c);return a},R.prototype._length=function(){return 65535&this._bitField},R.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},R.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},R.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},R.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},R.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},R.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},R.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},R.prototype._isFinal=function(){return(4194304&this._bitField)>0},R.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},R.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},R.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},R.prototype._setAsyncGuaranteed=function(){if(!_.hasCustomScheduler()){var t=this._bitField;this._bitField=t|(536870912&t)>>2^134217728}},R.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},R.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];if(e!==s)return void 0===e&&this._isBound()?this._boundValue():e},R.prototype._promiseAt=function(t){return this[4*t-4+2]},R.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},R.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},R.prototype._boundValue=function(){},R.prototype._migrateCallback0=function(t){t._bitField;var e=t._fulfillmentHandler0,r=t._rejectionHandler0,n=t._promise0,i=t._receiverAt(0);void 0===i&&(i=s),this._addCallbacks(e,r,n,i,null)},R.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=s),this._addCallbacks(r,n,i,o,null)},R.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=u.contextBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=u.contextBind(i,e));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof t&&(this[a+0]=u.contextBind(i,t)),"function"==typeof e&&(this[a+1]=u.contextBind(i,e))}return this._setLength(o+1),o},R.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},R.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(n(),!1);var r=k(t,this);if(!(r instanceof R))return this._fulfill(t);e&&this._propagateFrom(r,2);var i=r._target();if(i!==this){var o=i._bitField;if(0==(50397184&o)){var a=this._length();a>0&&i._migrateCallback0(this);for(var s=1;s<a;++s)i._migrateCallbackAt(this,s);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!=(33554432&o))this._fulfill(i._value());else if(0!=(16777216&o))this._reject(i._reason());else{var u=new m("late cancellation observer");i._attachExtraTrace(u),this._reject(u)}}else this._reject(n())}},R.prototype._rejectCallback=function(t,e,r){var n=u.ensureErrorObject(t),i=n===t;if(!i&&!r&&S.warnings()){var o="a promise was rejected with a non-error: "+u.classString(t);this._warn(o,!0)}this._attachExtraTrace(n,!!e&&i),this._reject(t)},R.prototype._resolveFromExecutor=function(t){if(t!==b){var e=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,r)});r=!1,this._popContext(),void 0!==n&&e._rejectCallback(n,!0)}},R.prototype._settlePromiseFromHandler=function(t,e,r,n){var i=n._bitField;if(0==(65536&i)){var o;n._pushContext(),e===w?r&&"number"==typeof r.length?o=C(t).apply(this._boundValue(),r):(o=O).e=new g("cannot .spread() a non-array: "+u.classString(r)):o=C(t).call(e,r);var a=n._popContext();0==(65536&(i=n._bitField))&&(o===E?n._reject(r):o===O?n._rejectCallback(o.e,!1):(S.checkForgottenReturns(o,a,"",n,this),n._resolveCallback(o)))}},R.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},R.prototype._followee=function(){return this._rejectionHandler0},R.prototype._setFollowee=function(t){this._rejectionHandler0=t},R.prototype._settlePromise=function(t,e,r,n){var o=t instanceof R,s=this._bitField,u=0!=(134217728&s);0!=(65536&s)?(o&&t._invokeInternalOnCancel(),r instanceof A&&r.isFinallyHandler()?(r.cancelPromise=t,C(e).call(r,n)===O&&t._reject(O.e)):e===i?t._fulfill(i.call(r)):r instanceof a?r._promiseCancelled(t):o||t instanceof T?t._cancel():r.cancel()):"function"==typeof e?o?(u&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,n,t)):e.call(r,n,t):r instanceof a?r._isResolved()||(0!=(33554432&s)?r._promiseFulfilled(n,t):r._promiseRejected(n,t)):o&&(u&&t._setAsyncGuaranteed(),0!=(33554432&s)?t._fulfill(n):t._reject(n))},R.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,r=t.promise,n=t.receiver,i=t.value;"function"==typeof e?r instanceof R?this._settlePromiseFromHandler(e,n,i,r):e.call(n,i,r):r instanceof R&&r._reject(i)},R.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},R.prototype._settlePromise0=function(t,e,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,t,i,e)},R.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},R.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var r=n();return this._attachExtraTrace(r),this._reject(r)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():_.settlePromises(this),this._dereferenceTrace())}},R.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=t,this._isFinal())return _.fatalError(t,u.isNode);(65535&e)>0?_.settlePromises(this):this._ensurePossibleRejectionHandled()}},R.prototype._fulfillPromises=function(t,e){for(var r=1;r<t;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},R.prototype._rejectPromises=function(t,e){for(var r=1;r<t;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,e)}},R.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){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()},R.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&d.defineProperty(R.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),R.defer=R.pending=function(){return S.deprecated("Promise.defer","new Promise"),{promise:new R(b),resolve:P,reject:U}},u.notEnumerableProp(R,"_makeSelfResolutionError",n),r(21)(R,b,k,o,S),r(22)(R,b,k,S),r(23)(R,T,o,S),r(24)(R),r(25)(R),r(26)(R,T,k,b,_),R.Promise=R,R.version="3.7.2",r(27)(R),r(28)(R,o,b,k,a,S),r(29)(R,T,o,k,b,S),r(30)(R),r(31)(R,b),r(32)(R,T,k,o),r(33)(R,b,k,o),r(34)(R,T,o,k,b,S),r(35)(R,T,S),r(36)(R,T,o),r(37)(R,b,S),r(38)(R,o,k,B,b,S),r(39)(R),r(40)(R,b),r(41)(R,b),u.toFastProperties(R),u.toFastProperties(R.prototype),L({a:1}),L({b:2}),L({c:3}),L(1),L(function(){}),L(void 0),L(!1),L(new R(b)),S.setBounds(v.firstLineError,u.lastLineError),R}}).call(e,r(5))},function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,f=[],c=!1,l=-1;function h(){c&&u&&(c=!1,u.length?f=u.concat(f):l=-1,f.length&&p())}function p(){if(!c){var t=s(h);c=!0;for(var e=f.length;e;){for(u=f,f=[];++l<e;)u&&u[l].run();l=-1,e=f.length}u=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];f.push(new d(t,e)),1!==f.length||c||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,r){(function(e,n){"use strict";var i=r(7),o="undefined"==typeof navigator,a={e:{}},s,u="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:void 0!==this?this:null;function f(){try{var t=s;return s=null,t.apply(this,arguments)}catch(t){return a.e=t,a}}function c(t){return s=t,f}var l=function(t,e){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=t,this.constructor$=e,e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}return n.prototype=e.prototype,t.prototype=new n,t.prototype};function h(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function p(t){return"function"==typeof t||"object"==typeof t&&null!==t}function d(t){return h(t)?new Error(B(t)):t}function v(t,e){var r,n=t.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=t[r];return i[r]=e,i}function _(t,e,r){if(!i.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var n=Object.getOwnPropertyDescriptor(t,e);return null!=n?null==n.get&&null==n.set?n.value:r:void 0}function y(t,e,r){if(h(t))return t;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return i.defineProperty(t,e,n),t}function g(t){throw t}var m=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var r=0;r<t.length;++r)if(t[r]===e)return!0;return!1};if(i.isES5){var r=Object.getOwnPropertyNames;return function(t){for(var n=[],o=Object.create(null);null!=t&&!e(t);){var a;try{a=r(t)}catch(t){return n}for(var s=0;s<a.length;++s){var u=a[s];if(!o[u]){o[u]=!0;var f=Object.getOwnPropertyDescriptor(t,u);null!=f&&null==f.get&&null==f.set&&n.push(u)}}t=i.getPrototypeOf(t)}return n}}var n={}.hasOwnProperty;return function(r){if(e(r))return[];var i=[];t:for(var o in r)if(n.call(r,o))i.push(o);else{for(var a=0;a<t.length;++a)if(n.call(t[a],o))continue t;i.push(o)}return i}}(),b=/this\s*\.\s*\S+\s*=/;function w(t){try{if("function"==typeof t){var e=i.names(t.prototype),r=i.isES5&&e.length>1,n=e.length>0&&!(1===e.length&&"constructor"===e[0]),o=b.test(t+"")&&i.names(t).length>0;if(r||n||o)return!0}return!1}catch(t){return!1}}function E(t){function e(){}e.prototype=t;var r=new e;function n(){return typeof r.foo}return n(),n(),t}var k=/^[a-z$_][a-z$_0-9]*$/i;function T(t){return k.test(t)}function x(t,e,r){for(var n=new Array(t),i=0;i<t;++i)n[i]=e+i+r;return n}function B(t){try{return t+""}catch(t){return"[no string representation]"}}function S(t){return t instanceof Error||null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function A(t){try{y(t,"isOperational",!0)}catch(t){}}function j(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function I(t){return S(t)&&i.propertyIsWritable(t,"stack")}var O="stack"in new Error?function(t){return I(t)?t:new Error(B(t))}:function(t){if(I(t))return t;try{throw new Error(B(t))}catch(t){return t}};function C(t){return{}.toString.call(t)}function R(t,e,r){for(var n=i.names(t),o=0;o<n.length;++o){var a=n[o];if(r(a))try{i.defineProperty(e,a,i.getDescriptor(t,a))}catch(t){}}}var P=function(t){return i.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var U="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,r=[],n=t[Symbol.iterator]();!(e=n.next()).done;)r.push(e.value);return r};P=function(t){return i.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?U(t):null}}var L=void 0!==n&&"[object process]"===C(n).toLowerCase(),F=void 0!==n&&void 0!==n.env,D;function N(t){return F?n.env[t]:void 0}function M(){if("function"==typeof Promise)try{if("[object Promise]"===C(new Promise(function(){})))return Promise}catch(t){}}function q(t,e){if(null===t||"function"!=typeof e||e===D)return e;null!==t.domain&&(e=t.domain.bind(e));var r=t.async;if(null!==r){var n=e;e=function(){for(var t=arguments.length+2,e=new Array(t),i=2;i<t;++i)e[i]=arguments[i-2];return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return e}var z={setReflectHandler:function(t){D=t},isClass:w,isIdentifier:T,inheritedDataKeys:m,getDataPropertyOrDefault:_,thrower:g,isArray:i.isArray,asArray:P,notEnumerableProp:y,isPrimitive:h,isObject:p,isError:S,canEvaluate:o,errorObj:a,tryCatch:c,inherits:l,withAppended:v,maybeWrapAsError:d,toFastProperties:E,filledRange:x,toString:B,canAttachTrace:I,ensureErrorObject:O,originatesFromRejection:j,markAsOriginatingFromRejection:A,classString:C,copyDescriptors:R,isNode:L,hasEnvVariables:F,env:N,global:u,getNativePromise:M,contextBind:q};z.isRecentNode=z.isNode&&function(){var t;return n.versions&&n.versions.node?t=n.versions.node.split(".").map(Number):n.version&&(t=n.version.split(".").map(Number)),0===t[0]&&t[1]>10||t[0]>0}(),z.nodeSupportsAsyncResource=z.isNode&&function(){var t=!1;try{t="function"==typeof r(!function(){var t=new Error('Cannot find module "async_hooks"');throw t.code="MODULE_NOT_FOUND",t}()).AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),z.isNode&&z.toFastProperties(n);try{throw new Error}catch(t){z.lastLineError=t}t.exports=z}).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,a=function(t){var e=[];for(var r in t)n.call(t,r)&&e.push(r);return e};t.exports={isArray:function(t){try{return"[object Array]"===i.call(t)}catch(t){return!1}},keys:a,names:a,defineProperty:function(t,e,r){return t[e]=r.value,t},getDescriptor:function(t,e){return{value:t[e]}},freeze:function(t){return t},getPrototypeOf:function(t){try{return Object(t).constructor.prototype}catch(t){return o}},isES5:r,propertyIsWritable:function(){return!0}}}},function(t,e,r){(function(e){"use strict";var n;try{throw new Error}catch(t){n=t}var i=r(9),o=r(12);function a(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new o(16),this._normalQueue=new o(16),this._haveDrainedQueues=!1;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=i}function s(t){for(;t.length()>0;)u(t)}function u(t){var e=t.shift();if("function"!=typeof e)e._settlePromises();else{var r=t.shift(),n=t.shift();e.call(r,n)}}a.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},a.prototype.hasCustomScheduler=function(){return this._customScheduler},a.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},a.prototype.fatalError=function(t,r){r?(e.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),e.exit(2)):this.throwLater(t)},a.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")}},a.prototype.invokeLater=function(t,e,r){this._lateQueue.push(t,e,r),this._queueTick()},a.prototype.invoke=function(t,e,r){this._normalQueue.push(t,e,r),this._queueTick()},a.prototype.settlePromises=function(t){this._normalQueue._pushOne(t),this._queueTick()},a.prototype._drainQueues=function(){s(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,s(this._lateQueue)},a.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},a.prototype._reset=function(){this._isTickUsed=!1},t.exports=a,t.exports.firstLineError=n}).call(e,r(5))},function(t,e,r){(function(e,n,i){"use strict";var o,a=r(6),s=a.getNativePromise();if(a.isNode&&"undefined"==typeof MutationObserver){var u=e.setImmediate,f=n.nextTick;o=a.isRecentNode?function(t){u.call(e,t)}:function(t){f.call(n,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var c=s.resolve();o=function(t){c.then(t)}}else o="undefined"!=typeof MutationObserver&&("undefined"==typeof window||!window.navigator||!window.navigator.standalone&&!window.cordova)&&"classList"in document.documentElement?function(){var t=document.createElement("div"),e={attributes:!0},r=!1,n=document.createElement("div");new MutationObserver(function(){t.classList.toggle("foo"),r=!1}).observe(n,e);return function(i){var o=new MutationObserver(function(){o.disconnect(),i()});o.observe(t,e),r||(r=!0,n.classList.toggle("foo"))}}():void 0!==i?function(t){i(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")};t.exports=o}).call(e,function(){return this}(),r(5),r(10).setImmediate)},function(t,e,r){var n=Function.prototype.apply;function i(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new i(n.call(setTimeout,window,arguments),clearTimeout)},e.setInterval=function(){return new i(n.call(setInterval,window,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},i.prototype.unref=i.prototype.ref=function(){},i.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";if(!t.setImmediate){var n,i=1,o={},a=!1,s=t.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(t);u=u&&u.setTimeout?u:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick(function(){c(t)})}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?function(){var e="setImmediate$"+Math.random()+"$",r=function(r){r.source===t&&"string"==typeof r.data&&0===r.data.indexOf(e)&&c(+r.data.slice(e.length))};t.addEventListener?t.addEventListener("message",r,!1):t.attachEvent("onmessage",r),n=function(r){t.postMessage(e+r,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){c(t.data)},n=function(e){t.port2.postMessage(e)}}():s&&"onreadystatechange"in s.createElement("script")?function(){var t=s.documentElement;n=function(e){var r=s.createElement("script");r.onreadystatechange=function(){c(e),r.onreadystatechange=null,t.removeChild(r),r=null},t.appendChild(r)}}():n=function(t){setTimeout(c,0,t)},u.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var a={callback:t,args:e};return o[i]=a,n(i),i++},u.clearImmediate=f}function f(t){delete o[t]}function c(t){if(a)setTimeout(c,0,t);else{var e=o[t];if(e){a=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(r,n)}}(e)}finally{f(t),a=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,function(){return this}(),r(5))},function(t,e){"use strict";function r(t){this._capacity=t,this._length=0,this._front=0}r.prototype._willBeOverCapacity=function(t){return this._capacity<t},r.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},r.prototype.push=function(t,e,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(t),this._pushOne(e),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=r,this._length=n},r.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},r.prototype.length=function(){return this._length},r.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},r.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,function(t,e,r,n,i){for(var o=0;o<i;++o)r[o+n]=t[o+e],t[o+e]=void 0}(this,0,this,e,this._front+this._length&e-1)},t.exports=r},function(t,e,r){"use strict";var n,i,o=r(7),a=o.freeze,s=r(6),u=s.inherits,f=s.notEnumerableProp;function c(t,e){function r(n){if(!(this instanceof r))return new r(n);f(this,"message","string"==typeof n?n:e),f(this,"name",t),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(r,Error),r}var l=c("Warning","warning"),h=c("CancellationError","cancellation error"),p=c("TimeoutError","timeout error"),d=c("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(t){n=c("TypeError","type error"),i=c("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),_=0;_<v.length;++_)"function"==typeof Array.prototype[v[_]]&&(d.prototype[v[_]]=Array.prototype[v[_]]);o.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var y=0;function g(t){if(!(this instanceof g))return new g(t);f(this,"name","OperationalError"),f(this,"message",t),this.cause=t,this.isOperational=!0,t instanceof Error?(f(this,"message",t.message),f(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}d.prototype.toString=function(){var t=Array(4*y+1).join(" "),e="\n"+t+"AggregateError of:\n";y++,t=Array(4*y+1).join(" ");for(var r=0;r<this.length;++r){for(var n=this[r]===this?"[Circular AggregateError]":this[r]+"",i=n.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];e+=(n=i.join("\n"))+"\n"}return y--,e},u(g,Error);var m=Error.__BluebirdErrorTypes__;m||(m=a({CancellationError:h,TimeoutError:p,OperationalError:g,RejectionError:g,AggregateError:d}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error:Error,TypeError:n,RangeError:i,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:l}},function(t,e,r){"use strict";t.exports=function(t,e){var n=r(6),i=n.errorObj,o=n.isObject;var a={}.hasOwnProperty;return function(r,s){if(o(r)){if(r instanceof t)return r;var u=function(t){try{return function(t){return t.then}(t)}catch(t){return i.e=t,i}}(r);if(u===i){s&&s._pushContext();var f=t.reject(u.e);return s&&s._popContext(),f}if("function"==typeof u)return function(t){try{return a.call(t,"_promise0")}catch(t){return!1}}(r)?(f=new t(e),r._then(f._fulfill,f._reject,void 0,f,null),f):function(r,o,a){var s=new t(e),u=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var f=!0,c=n.tryCatch(o).call(r,function(t){s&&(s._resolveCallback(t),s=null)},function(t){s&&(s._rejectCallback(t,f,!0),s=null)});return f=!1,s&&c===i&&(s._rejectCallback(c.e,!0,!0),s=null),u}(r,u,s)}return r}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o){var a=r(6);a.isArray;function s(r){var n=this._promise=new t(e);r instanceof t&&(n._propagateFrom(r,3),r.suppressUnhandledRejections()),n._setOnCancel(this),this._values=r,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.inherits(s,o),s.prototype.length=function(){return this._length},s.prototype.promise=function(){return this._promise},s.prototype._init=function e(r,o){var s=n(this._values,this._promise);if(s instanceof t){var u=(s=s._target())._bitField;if(this._values=s,0==(50397184&u))return this._promise._setAsyncGuaranteed(),s._then(e,this._reject,void 0,this,o);if(0==(33554432&u))return 0!=(16777216&u)?this._reject(s._reason()):this._cancel();s=s._value()}if(null!==(s=a.asArray(s)))0!==s.length?this._iterate(s):-5===o?this._resolveEmptyArray():this._resolve(function(t){switch(t){case-2:return[];case-3:return{};case-6:return new Map}}(o));else{var f=i("expecting an array or an iterable object but got "+a.classString(s)).reason();this._promise._rejectCallback(f,!1)}},s.prototype._iterate=function(e){var r=this.getActualLength(e.length);this._length=r,this._values=this.shouldCopyValues()?new Array(r):this._values;for(var i=this._promise,o=!1,a=null,s=0;s<r;++s){var u=n(e[s],i);a=u instanceof t?(u=u._target())._bitField:null,o?null!==a&&u.suppressUnhandledRejections():null!==a?0==(50397184&a)?(u._proxy(this,s),this._values[s]=u):o=0!=(33554432&a)?this._promiseFulfilled(u._value(),s):0!=(16777216&a)?this._promiseRejected(u._reason(),s):this._promiseCancelled(s):o=this._promiseFulfilled(u,s)}o||i._setAsyncGuaranteed()},s.prototype._isResolved=function(){return null===this._values},s.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},s.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},s.prototype._resultCancelled=function(){if(!this._isResolved()){var e=this._values;if(this._cancel(),e instanceof t)e.cancel();else for(var r=0;r<e.length;++r)e[r]instanceof t&&e[r].cancel()}},s.prototype.shouldCopyValues=function(){return!0},s.prototype.getActualLength=function(t){return t},s}},function(t,e){"use strict";t.exports=function(t){var e=!1,r=[];function n(){this._trace=new n.CapturedTrace(i())}function i(){var t=r.length-1;if(t>=0)return r[t]}return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},n.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,r.push(this._trace))},n.prototype._popContext=function(){if(void 0!==this._trace){var t=r.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},n.CapturedTrace=null,n.create=function(){if(e)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=t.prototype._pushContext,o=t.prototype._popContext,a=t._peekContext,s=t.prototype._peekContext,u=t.prototype._promiseCreated;n.deactivateLongStackTraces=function(){t.prototype._pushContext=r,t.prototype._popContext=o,t._peekContext=a,t.prototype._peekContext=s,t.prototype._promiseCreated=u,e=!1},e=!0,t.prototype._pushContext=n.prototype._pushContext,t.prototype._popContext=n.prototype._popContext,t._peekContext=t.prototype._peekContext=i,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},n}},function(t,e,r){(function(e){"use strict";t.exports=function(t,n,i,o){var a,s,u,f,c=t._async,l=r(13).Warning,h=r(6),p=r(7),d=h.canAttachTrace,v=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,_=/\((?:timers\.js):\d+:\d+\)/,y=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,g=null,m=null,b=!1,w=!(0==h.env("BLUEBIRD_DEBUG")||!h.env("BLUEBIRD_DEBUG")&&"development"!==h.env("NODE_ENV")),E=!(0==h.env("BLUEBIRD_WARNINGS")||!w&&!h.env("BLUEBIRD_WARNINGS")),k=!(0==h.env("BLUEBIRD_LONG_STACK_TRACES")||!w&&!h.env("BLUEBIRD_LONG_STACK_TRACES")),T=0!=h.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(E||!!h.env("BLUEBIRD_W_FORGOTTEN_RETURN"));!function(){var e=[];function r(){for(var t=0;t<e.length;++t)e[t]._notifyUnhandledRejection();n()}function n(){e.length=0}f=function(t){e.push(t),setTimeout(r,1)},p.defineProperty(t,"_unhandledRejectionCheck",{value:r}),p.defineProperty(t,"_unhandledRejectionClear",{value:n})}(),t.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),f(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){X("rejectionHandled",a,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(),X("unhandledRejection",s,t,this)}},t.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},t.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},t.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},t.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},t.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},t.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},t.prototype._warn=function(t,e,r){return H(t,e,r||this)},t.onPossiblyUnhandledRejection=function(e){var r=t._getContext();s=h.contextBind(r,e)},t.onUnhandledRejectionHandled=function(e){var r=t._getContext();a=h.contextBind(r,e)};var x=function(){};t.longStackTraces=function(){if(c.haveItemsQueued()&&!rt.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!rt.longStackTraces&&$()){var e=t.prototype._captureStackTrace,r=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;rt.longStackTraces=!0,x=function(){if(c.haveItemsQueued()&&!rt.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,t.prototype._dereferenceTrace=i,n.deactivateLongStackTraces(),rt.longStackTraces=!1},t.prototype._captureStackTrace=q,t.prototype._attachExtraTrace=z,t.prototype._dereferenceTrace=V,n.activateLongStackTraces()}},t.hasLongStackTraces=function(){return rt.longStackTraces&&$()};var B={unhandledrejection:{before:function(){var t=h.global.onunhandledrejection;return h.global.onunhandledrejection=null,t},after:function(t){h.global.onunhandledrejection=t}},rejectionhandled:{before:function(){var t=h.global.onrejectionhandled;return h.global.onrejectionhandled=null,t},after:function(t){h.global.onrejectionhandled=t}}},S=function(){var t=function(t,e){if(!t)return!h.global.dispatchEvent(e);var r;try{return r=t.before(),!h.global.dispatchEvent(e)}finally{t.after(r)}};try{if("function"==typeof CustomEvent){var e=new CustomEvent("CustomEvent");return h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new CustomEvent(e,{detail:r,cancelable:!0});return p.defineProperty(n,"promise",{value:r.promise}),p.defineProperty(n,"reason",{value:r.reason}),t(B[e],n)}}if("function"==typeof Event){e=new Event("CustomEvent");return h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=new Event(e,{cancelable:!0});return n.detail=r,p.defineProperty(n,"promise",{value:r.promise}),p.defineProperty(n,"reason",{value:r.reason}),t(B[e],n)}}return(e=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),h.global.dispatchEvent(e),function(e,r){e=e.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!0,r),t(B[e],n)}}catch(t){}return function(){return!1}}(),A=h.isNode?function(){return e.emit.apply(e,arguments)}:h.global?function(t){var e="on"+t.toLowerCase(),r=h.global[e];return!!r&&(r.apply(h.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function j(t,e){return{promise:e}}var I={promiseCreated:j,promiseFulfilled:j,promiseRejected:j,promiseResolved:j,promiseCancelled:j,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:j},O=function(t){var e=!1;try{e=A.apply(null,arguments)}catch(t){c.throwLater(t),e=!0}var r=!1;try{r=S(t,I[t].apply(null,arguments))}catch(t){c.throwLater(t),r=!0}return r||e};function C(){return!1}function R(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: "+h.toString(t));n._attachCancellationCallback(t)})}catch(t){return t}}function P(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?h.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function U(){return this._onCancelField}function L(t){this._onCancelField=t}function F(){this._cancellationParent=void 0,this._onCancelField=void 0}function D(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)}t.config=function(e){if("longStackTraces"in(e=Object(e))&&(e.longStackTraces?t.longStackTraces():!e.longStackTraces&&t.hasLongStackTraces()&&x()),"warnings"in e){var r=e.warnings;rt.warnings=!!r,T=rt.warnings,h.isObject(r)&&"wForgottenReturn"in r&&(T=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!rt.cancellation){if(c.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=F,t.prototype._propagateFrom=D,t.prototype._onCancel=U,t.prototype._setOnCancel=L,t.prototype._attachCancellationCallback=P,t.prototype._execute=R,N=D,rt.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!rt.monitoring?(rt.monitoring=!0,t.prototype._fireEvent=O):!e.monitoring&&rt.monitoring&&(rt.monitoring=!1,t.prototype._fireEvent=C)),"asyncHooks"in e&&h.nodeSupportsAsyncResource){var n=rt.asyncHooks,a=!!e.asyncHooks;n!==a&&(rt.asyncHooks=a,a?i():o())}return t},t.prototype._fireEvent=C,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._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(t,e){};var N=function(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)};function M(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function q(){this._trace=new tt(this._peekContext())}function z(t,e){if(d(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=Y(t);h.notEnumerableProp(t,"stack",n.message+"\n"+n.stack.join("\n")),h.notEnumerableProp(t,"__stackCleaned__",!0)}}}function V(){this._trace=void 0}function H(e,r,n){if(rt.warnings){var i,o=new l(e);if(r)n._attachExtraTrace(o);else if(rt.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var a=Y(o);o.stack=a.message+"\n"+a.stack.join("\n")}O("warning",o)||G(o,"",!0)}}function W(t){for(var e=[],r=0;r<t.length;++r){var n=t[r],i=" (No stack trace)"===n||g.test(n),o=i&&Q(n);i&&!o&&(b&&" "!==n.charAt(0)&&(n=" "+n),e.push(n))}return e}function Y(t){var e=t.stack,r=t.toString();return e="string"==typeof e&&e.length>0?function(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),r=0;r<e.length;++r){var n=e[r];if(" (No stack trace)"===n||g.test(n))break}return r>0&&"SyntaxError"!=t.name&&(e=e.slice(r)),e}(t):[" (No stack trace)"],{message:r,stack:"SyntaxError"==t.name?e:W(e)}}function G(t,e,r){if("undefined"!=typeof console){var n;if(h.isObject(t)){var i=t.stack;n=e+m(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 X(t,e,r,n){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(n):e(r,n))}catch(t){c.throwLater(t)}"unhandledRejection"===t?O(t,r,n)||i||G(r,"Unhandled rejection "):O(t,n)}function Z(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():h.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+function(t){if(t.length<41)return t;return t.substr(0,38)+"..."}(e)+">, no stack trace)"}function $(){return"function"==typeof et}var Q=function(){return!1},K=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function J(t){var e=t.match(K);if(e)return{fileName:e[1],line:parseInt(e[2],10)}}function tt(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);et(this,tt),e>32&&this.uncycle()}h.inherits(tt,Error),n.CapturedTrace=tt,tt.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;for(n=(t=this._length=n)-1;n>=0;--n){var o=e[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<t;++n){var a=r[e[n].stack];if(void 0!==a&&a!==n){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[n]._parent=void 0,e[n]._length=1;var s=n>0?e[n-1]:this;a<t-1?(s._parent=e[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var u=s._length+1,f=n-2;f>=0;--f)e[f]._length=u,u++;return}}}},tt.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=Y(t),r=e.message,n=[e.stack],i=this;void 0!==i;)n.push(W(i.stack.split("\n"))),i=i._parent;!function(t){for(var e=t[0],r=1;r<t.length;++r){for(var n=t[r],i=e.length-1,o=e[i],a=-1,s=n.length-1;s>=0;--s)if(n[s]===o){a=s;break}for(s=a;s>=0;--s){var u=n[s];if(e[i]!==u)break;e.pop(),i--}e=n}}(n),function(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}(n),h.notEnumerableProp(t,"stack",function(t,e){for(var r=0;r<e.length-1;++r)e[r].push("From previous event:"),e[r]=e[r].join("\n");return r<e.length&&(e[r]=e[r].join("\n")),t+"\n"+e.join("\n")}(r,n)),h.notEnumerableProp(t,"__stackCleaned__",!0)}};var et=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():Z(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,g=t,m=e;var r=Error.captureStackTrace;return Q=function(t){return v.test(t)},function(t,e){Error.stackTraceLimit+=6,r(t,e),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return g=/@/,m=e,b=!0,function(t){t.stack=(new Error).stack};try{throw new Error}catch(t){n="stack"in t}return"stack"in i||!n||"number"!=typeof Error.stackTraceLimit?(m=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?Z(e):e.toString()},null):(g=t,m=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(u=function(t){console.warn(t)},h.isNode&&e.stderr.isTTY?u=function(t,e){var r=e?"[33m":"[31m";console.warn(r+t+"[0m\n")}:h.isNode||"string"!=typeof(new Error).stack||(u=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var rt={warnings:E,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return k&&t.longStackTraces(),{asyncHooks:function(){return rt.asyncHooks},longStackTraces:function(){return rt.longStackTraces},warnings:function(){return rt.warnings},cancellation:function(){return rt.cancellation},monitoring:function(){return rt.monitoring},propagateFromFunction:function(){return N},boundValueFunction:function(){return M},checkForgottenReturns:function(t,e,r,n,i){if(void 0===t&&null!==e&&T){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(e._trace){for(var s=e._trace.stack.split("\n"),u=W(s),f=u.length-1;f>=0;--f){var c=u[f];if(!_.test(c)){var l=c.match(y);l&&(o="at "+l[1]+":"+l[2]+":"+l[3]+" ");break}}if(u.length>0){var h=u[0];for(f=0;f<s.length;++f)if(s[f]===h){f>0&&(a="\n"+s[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"+a;n._warn(p,!0,e)}},setBounds:function(t,e){if($()){for(var r,n,i=(t.stack||"").split("\n"),o=(e.stack||"").split("\n"),a=-1,s=-1,u=0;u<i.length;++u)if(f=J(i[u])){r=f.fileName,a=f.line;break}for(u=0;u<o.length;++u){var f;if(f=J(o[u])){n=f.fileName,s=f.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(Q=function(t){if(v.test(t))return!0;var e=J(t);return!!(e&&e.fileName===r&&a<=e.line&&e.line<=s)})}},warn:H,deprecated:function(t,e){var r=t+" is deprecated and will be removed in a future version.";return e&&(r+=" Use "+e+" instead."),H(r)},CapturedTrace:tt,fireDomEvent:S,fireGlobalEvent:A}}}).call(e,r(5))},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=r(6),o=t.CancellationError,a=i.errorObj,s=r(19)(n);function u(t,e,r){this.promise=t,this.type=e,this.handler=r,this.called=!1,this.cancelPromise=null}function f(t){this.finallyHandler=t}function c(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function l(){return p.call(this,this.promise._target()._settledValue())}function h(t){if(!c(this,t))return a.e=t,a}function p(r){var i=this.promise,s=this.handler;if(!this.called){this.called=!0;var u=this.isFinallyHandler()?s.call(i._boundValue()):s.call(i._boundValue(),r);if(u===n)return u;if(void 0!==u){i._setReturnedNonUndefined();var p=e(u,i);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var d=new o("late cancellation observer");return i._attachExtraTrace(d),a.e=d,a}p.isPending()&&p._attachCancellationCallback(new f(this))}return p._then(l,h,void 0,this,void 0)}}}return i.isRejected()?(c(this),a.e=r,a):(c(this),r)}return u.prototype.isFinallyHandler=function(){return 0===this.type},f.prototype._resultCancelled=function(){c(this.finallyHandler)},t.prototype._passThrough=function(t,e,r,n){return"function"!=typeof t?this.then():this._then(r,n,void 0,new u(this,e,t),void 0)},t.prototype.lastly=t.prototype.finally=function(t){return this._passThrough(t,0,p,p)},t.prototype.tap=function(t){return this._passThrough(t,1,p)},t.prototype.tapCatch=function(e){var r=arguments.length;if(1===r)return this._passThrough(e,1,void 0,p);var n,o=new Array(r-1),a=0;for(n=0;n<r-1;++n){var u=arguments[n];if(!i.isObject(u))return t.reject(new TypeError("tapCatch statement predicate: expecting an object but got "+i.classString(u)));o[a++]=u}o.length=a;var f=arguments[n];return this._passThrough(s(o,f,this),1,void 0,p)},u}},function(t,e,r){"use strict";t.exports=function(t){var e=r(6),n=r(7).keys,i=e.tryCatch,o=e.errorObj;return function(r,a,s){return function(u){var f=s._boundValue();t:for(var c=0;c<r.length;++c){var l=r[c];if(l===Error||null!=l&&l.prototype instanceof Error){if(u instanceof l)return i(a).call(f,u)}else if("function"==typeof l){var h=i(l).call(f,u);if(h===o)return h;if(h)return i(a).call(f,u)}else if(e.isObject(u)){for(var p=n(l),d=0;d<p.length;++d){var v=p[d];if(l[v]!=u[v])continue t}return i(a).call(f,u)}}return t}}}},function(t,e,r){"use strict";var n=r(6),i=n.maybeWrapAsError,o=r(13).OperationalError,a=r(7);var s=/^(?:name|message|stack|cause)$/;function u(t){var e;if(function(t){return t instanceof Error&&a.getPrototypeOf(t)===Error.prototype}(t)){(e=new o(t)).name=t.name,e.message=t.message,e.stack=t.stack;for(var r=a.keys(t),i=0;i<r.length;++i){var u=r[i];s.test(u)||(e[u]=t[u])}return e}return n.markAsOriginatingFromRejection(t),t}t.exports=function(t,e){return function(r,n){if(null!==t){if(r){var o=u(i(r));t._attachExtraTrace(o),t._reject(o)}else if(e){for(var a=arguments.length,s=new Array(Math.max(a-1,0)),f=1;f<a;++f)s[f-1]=arguments[f];t._fulfill(s)}else t._fulfill(n);t=null}}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o){var a=r(6),s=a.tryCatch;t.method=function(r){if("function"!=typeof r)throw new t.TypeError("expecting a function but got "+a.classString(r));return function(){var n=new t(e);n._captureStackTrace(),n._pushContext();var i=s(r).apply(this,arguments),a=n._popContext();return o.checkForgottenReturns(i,a,"Promise.method",n),n._resolveFromSyncValue(i),n}},t.attempt=t.try=function(r){if("function"!=typeof r)return i("expecting a function but got "+a.classString(r));var n,u=new t(e);if(u._captureStackTrace(),u._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var f=arguments[1],c=arguments[2];n=a.isArray(f)?s(r).apply(c,f):s(r).call(c,f)}else n=s(r)();var l=u._popContext();return o.checkForgottenReturns(n,l,"Promise.try",u),u._resolveFromSyncValue(n),u},t.prototype._resolveFromSyncValue=function(t){t===a.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)},a=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},s=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 l=this._target();if(c._setBoundTo(f),f instanceof t){var h={promiseRejectionQueued:!1,promise:c,target:l,bindingPromise:f};l._then(e,a,void 0,c,h),f._then(s,u,void 0,c,h),c._setOnCancel(f)}else c._resolveCallback(l);return c},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},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),a=o.tryCatch,s=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;r<t.length;++r)this._doInvokeOnCancel(t[r],e);else if(void 0!==t)if("function"==typeof t){if(!e){var n=a(t).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else t._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,t)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},function(t,e){"use strict";t.exports=function(t){function e(){return this.value}function r(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(r){return r instanceof t&&r.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:r},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(r,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:t},void 0);var e=arguments[1];return this.caught(t,function(){throw e})},t.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof t&&r.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:r},void 0);var n=arguments[1];n instanceof t&&n.suppressUnhandledRejections();return this.caught(r,function(){return n})}}},function(t,e){"use strict";t.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var r=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},n=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return a.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return s.call(this._target())},t.prototype.value=function(){return r.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),n.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o){var a,s=r(6),u=s.canEvaluate,f=s.tryCatch,c=s.errorObj;if(u){for(var l=function(t){return new Function("value","holder"," \n\t 'use strict'; \n\t holder.pIndex = value; \n\t holder.checkFulfillment(this); \n\t ".replace(/Index/g,t))},h=function(t){return new Function("promise","holder"," \n\t 'use strict'; \n\t holder.pIndex = promise; \n\t ".replace(/Index/g,t))},p=function(e){for(var r=new Array(e),n=0;n<r.length;++n)r[n]="this.p"+(n+1);var i=r.join(" = ")+" = null;",a="var promise;\n"+r.map(function(t){return" \n\t promise = "+t+"; \n\t if (promise instanceof Promise) { \n\t promise.cancel(); \n\t } \n\t "}).join("\n"),s=r.join(", "),u="Holder$"+e,l="return function(tryCatch, errorObj, Promise, async) { \n\t 'use strict'; \n\t function [TheName](fn) { \n\t [TheProperties] \n\t this.fn = fn; \n\t this.asyncNeeded = true; \n\t this.now = 0; \n\t } \n\t \n\t [TheName].prototype._callFunction = function(promise) { \n\t promise._pushContext(); \n\t var ret = tryCatch(this.fn)([ThePassedArguments]); \n\t promise._popContext(); \n\t if (ret === errorObj) { \n\t promise._rejectCallback(ret.e, false); \n\t } else { \n\t promise._resolveCallback(ret); \n\t } \n\t }; \n\t \n\t [TheName].prototype.checkFulfillment = function(promise) { \n\t var now = ++this.now; \n\t if (now === [TheTotal]) { \n\t if (this.asyncNeeded) { \n\t async.invoke(this._callFunction, this, promise); \n\t } else { \n\t this._callFunction(promise); \n\t } \n\t \n\t } \n\t }; \n\t \n\t [TheName].prototype._resultCancelled = function() { \n\t [CancellationCode] \n\t }; \n\t \n\t return [TheName]; \n\t }(tryCatch, errorObj, Promise, async); \n\t ";return l=l.replace(/\[TheName\]/g,u).replace(/\[TheTotal\]/g,e).replace(/\[ThePassedArguments\]/g,s).replace(/\[TheProperties\]/g,i).replace(/\[CancellationCode\]/g,a),new Function("tryCatch","errorObj","Promise","async",l)(f,c,t,o)},d=[],v=[],_=[],y=0;y<8;++y)d.push(p(y+1)),v.push(l(y+1)),_.push(h(y+1));a=function(t){this._reject(t)}}t.join=function(){var r,o=arguments.length-1;if(o>0&&"function"==typeof arguments[o]&&(r=arguments[o],o<=8&&u)){(w=new t(i))._captureStackTrace();for(var f=new(0,d[o-1])(r),c=v,l=0;l<o;++l){var h=n(arguments[l],w);if(h instanceof t){var p=(h=h._target())._bitField;0==(50397184&p)?(h._then(c[l],a,void 0,w,f),_[l](h,f),f.asyncNeeded=!1):0!=(33554432&p)?c[l].call(w,h._value(),f):0!=(16777216&p)?w._reject(h._reason()):w._cancel()}else c[l].call(w,h,f)}if(!w._isFateSealed()){if(f.asyncNeeded){var y=t._getContext();f.fn=s.contextBind(y,f.fn)}w._setAsyncGuaranteed(),w._setOnCancel(f)}return w}for(var g=arguments.length,m=new Array(g),b=0;b<g;++b)m[b]=arguments[b];r&&m.pop();var w=new e(m).promise();return void 0!==r?w.spread(r):w}}},function(t,e,r){"use strict";var n=Object.create;if(n){var i=n(null),o=n(null);i[" size"]=o[" size"]=0}t.exports=function(t){var e,n,a=r(6),s=a.canEvaluate,u=a.isIdentifier,f=function(t){return new Function("ensureMethod"," \n\t return function(obj) { \n\t 'use strict' \n\t var len = this.length; \n\t ensureMethod(obj, 'methodName'); \n\t switch(len) { \n\t case 1: return obj.methodName(this[0]); \n\t case 2: return obj.methodName(this[0], this[1]); \n\t case 3: return obj.methodName(this[0], this[1], this[2]); \n\t case 0: return obj.methodName(); \n\t default: \n\t return obj.methodName.apply(obj, this); \n\t } \n\t }; \n\t ".replace(/methodName/g,t))(h)},c=function(t){return new Function("obj"," \n\t 'use strict'; \n\t return obj.propertyName; \n\t ".replace("propertyName",t))},l=function(t,e,r){var n=r[t];if("function"!=typeof n){if(!u(t))return null;if(n=e(t),r[t]=n,r[" size"]++,r[" size"]>512){for(var i=Object.keys(r),o=0;o<256;++o)delete r[i[o]];r[" size"]=i.length-256}}return n};function h(e,r){var n;if(null!=e&&(n=e[r]),"function"!=typeof n){var i="Object "+a.classString(e)+" has no method '"+a.toString(r)+"'";throw new t.TypeError(i)}return n}function p(t){return h(t,this.pop()).apply(t,this)}function d(t){return t[this]}function v(t){var e=+this;return e<0&&(e=Math.max(0,e+t.length)),t[e]}e=function(t){return l(t,f,i)},n=function(t){return l(t,c,o)},t.prototype.call=function(t){for(var r=arguments.length,n=new Array(Math.max(r-1,0)),i=1;i<r;++i)n[i-1]=arguments[i];if(s){var o=e(t);if(null!==o)return this._then(o,void 0,void 0,n,void 0)}return n.push(t),this._then(p,void 0,void 0,n,void 0)},t.prototype.get=function(t){var e;if("number"==typeof t)e=v;else if(s){var r=n(t);e=null!==r?r:d}else e=d;return this._then(e,void 0,void 0,t,void 0)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,a){var s=r(13).TypeError,u=r(6),f=u.errorObj,c=u.tryCatch,l=[];function h(e,r,i,o){if(a.cancellation()){var s=new t(n),u=this._finallyPromise=new t(n);this._promise=s.lastly(function(){return u}),s._captureStackTrace(),s._setOnCancel(this)}else{(this._promise=new t(n))._captureStackTrace()}this._stack=o,this._generatorFunction=e,this._receiver=r,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(l):l,this._yieldedPromise=null,this._cancellationPhase=!1}u.inherits(h,o),h.prototype._isResolved=function(){return null===this._promise},h.prototype._cleanup=function(){this._promise=this._generator=null,a.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},h.prototype._promiseCancelled=function(){if(!this._isResolved()){var e;if(void 0!==this._generator.return)this._promise._pushContext(),e=c(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var r=new t.CancellationError("generator .return() sentinel");t.coroutine.returnSentinel=r,this._promise._attachExtraTrace(r),this._promise._pushContext(),e=c(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},h.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=c(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},h.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=c(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},h.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof t){var e=this._yieldedPromise;this._yieldedPromise=null,e.cancel()}},h.prototype.promise=function(){return this._promise},h.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},h.prototype._continue=function(e){var r=this._promise;if(e===f)return this._cleanup(),this._cancellationPhase?r.cancel():r._rejectCallback(e.e,!1);var n=e.value;if(!0===e.done)return this._cleanup(),this._cancellationPhase?r.cancel():r._resolveCallback(n);var o=i(n,this._promise);if(o instanceof t||null!==(o=function(e,r,n){for(var o=0;o<r.length;++o){n._pushContext();var a=c(r[o])(e);if(n._popContext(),a===f){n._pushContext();var s=t.reject(f.e);return n._popContext(),s}var u=i(a,n);if(u instanceof t)return u}return null}(o,this._yieldHandlers,this._promise))){var a=(o=o._target())._bitField;0==(50397184&a)?(this._yieldedPromise=o,o._proxy(this,null)):0!=(33554432&a)?t._async.invoke(this._promiseFulfilled,this,o._value()):0!=(16777216&a)?t._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()}else this._promiseRejected(new s("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",String(n))+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")))},t.coroutine=function(t,e){if("function"!=typeof t)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(e).yieldHandler,n=h,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new n(void 0,void 0,r,i),a=o.promise();return o._generator=e,o._promiseFulfilled(void 0),a}},t.coroutine.addYieldHandler=function(t){if("function"!=typeof t)throw new s("expecting a function but got "+u.classString(t));l.push(t)},t.spawn=function(r){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof r)return e("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new h(r,this),i=n.promise();return n._run(t.spawn),i}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,a){var s=r(6),u=s.tryCatch,f=s.errorObj,c=t._async;function l(e,r,n,i){this.constructor$(e),this._promise._captureStackTrace();var a=t._getContext();if(this._callback=s.contextBind(a,r),this._preservedValues=i===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],c.invoke(this._asyncInit,this,void 0),s.isArray(e))for(var u=0;u<e.length;++u){var f=e[u];f instanceof t&&f.suppressUnhandledRejections()}}function h(e,r,i,o){if("function"!=typeof r)return n("expecting a function but got "+s.classString(r));var a=0;if(void 0!==i){if("object"!=typeof i||null===i)return t.reject(new TypeError("options argument must be an object but it is "+s.classString(i)));if("number"!=typeof i.concurrency)return t.reject(new TypeError("'concurrency' must be a number but it is "+s.classString(i.concurrency)));a=i.concurrency}return new l(e,r,a="number"==typeof a&&isFinite(a)&&a>=1?a:0,o).promise()}s.inherits(l,e),l.prototype._asyncInit=function(){this._init$(void 0,-2)},l.prototype._init=function(){},l.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),s=this._preservedValues,c=this._limit;if(r<0){if(n[r=-1*r-1]=e,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return n[r]=e,this._queue.push(r),!1;null!==s&&(s[r]=e);var l=this._promise,h=this._callback,p=l._boundValue();l._pushContext();var d=u(h).call(p,e,r,o),v=l._popContext();if(a.checkForgottenReturns(d,v,null!==s?"Promise.filter":"Promise.map",l),d===f)return this._reject(d.e),!0;var _=i(d,this._promise);if(_ instanceof t){var y=(_=_._target())._bitField;if(0==(50397184&y))return c>=1&&this._inFlight++,n[r]=_,_._proxy(this,-1*(r+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(_._reason()),!0):(this._cancel(),!0);d=_._value()}n[r]=d}return++this._totalResolved>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},l.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,r=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var n=t.pop();this._promiseFulfilled(r[n],n)}},l.prototype._filter=function(t,e){for(var r=e.length,n=new Array(r),i=0,o=0;o<r;++o)t[o]&&(n[i++]=e[o]);n.length=i,this._resolve(n)},l.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(t,e){return h(this,t,e,null)},t.map=function(t,e,r,n){return h(t,e,r,n)}}},function(t,e,r){"use strict";t.exports=function(t){var e=r(6),n=t._async,i=e.tryCatch,o=e.errorObj;function a(t,r){if(!e.isArray(t))return s.call(this,t,r);var a=i(r).apply(this._boundValue(),[null].concat(t));a===o&&n.throwLater(a.e)}function s(t,e){var r=this._boundValue(),a=void 0===t?i(e).call(r,null):i(e).call(r,null,t);a===o&&n.throwLater(a.e)}function u(t,e){if(!t){var r=new Error(t+"");r.cause=t,t=r}var a=i(e).call(this._boundValue(),t);a===o&&n.throwLater(a.e)}t.prototype.asCallback=t.prototype.nodeify=function(t,e){if("function"==typeof t){var r=s;void 0!==e&&Object(e).spread&&(r=a),this._then(r,u,void 0,this,t)}return this}}},function(t,e,r){"use strict";t.exports=function(t,e){var n={},i=r(6),o=r(20),a=i.withAppended,s=i.maybeWrapAsError,u=i.canEvaluate,f=r(13).TypeError,c={__isPromisified__:!0},l=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),h=function(t){return i.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t};function p(t){return!l.test(t)}function d(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function v(t,e,r){var n=i.getDataPropertyOrDefault(t,e+r,c);return!!n&&d(n)}function _(t,e,r,n){for(var o=i.inheritedDataKeys(t),a=[],s=0;s<o.length;++s){var u=o[s],c=t[u],l=n===h||h(u,c,t);"function"!=typeof c||d(c)||v(t,u,e)||!n(u,c,t,l)||a.push(u,c)}return function(t,e,r){for(var n=0;n<t.length;n+=2){var i=t[n];if(r.test(i))for(var o=i.replace(r,""),a=0;a<t.length;a+=2)if(t[a]===o)throw new f("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}(a,e,r),a}var y=function(t){return t.replace(/([$])/,"\\$")},g=function(t){return i.filledRange(t,"_arg","")};var m=u?function(r,u,f,c,l,h){var p=Math.max(0,function(t){return"number"==typeof t.length?Math.max(Math.min(t.length,1024),0):0}(c)-1),d=function(t){for(var e=[t],r=Math.max(0,t-1-3),n=t-1;n>=r;--n)e.push(n);for(n=t+1;n<=3;++n)e.push(n);return e}(p),v="string"==typeof r||u===n;function _(t){var e=g(t).join(", "),r=t>0?", ":"";return(v?"ret = callback.call(this, {{args}}, nodeback); break;\n":void 0===u?"ret = callback({{args}}, nodeback); break;\n":"ret = callback.call(receiver, {{args}}, nodeback); break;\n").replace("{{args}}",e).replace(", ",r)}var y="string"==typeof r?"this != null ? this['"+r+"'] : fn":"fn",m="'use strict'; \n\t var ret = function (Parameters) { \n\t 'use strict'; \n\t var len = arguments.length; \n\t var promise = new Promise(INTERNAL); \n\t promise._captureStackTrace(); \n\t var nodeback = nodebackForPromise(promise, "+h+"); \n\t var ret; \n\t var callback = tryCatch([GetFunctionCode]); \n\t switch(len) { \n\t [CodeForSwitchCase] \n\t } \n\t if (ret === errorObj) { \n\t promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n\t } \n\t if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n\t return promise; \n\t }; \n\t notEnumerableProp(ret, '__isPromisified__', true); \n\t return ret; \n\t ".replace("[CodeForSwitchCase]",function(){for(var t="",e=0;e<d.length;++e)t+="case "+d[e]+":"+_(d[e]);return t+=" \n\t default: \n\t var args = new Array(len + 1); \n\t var i = 0; \n\t for (var i = 0; i < len; ++i) { \n\t args[i] = arguments[i]; \n\t } \n\t args[i] = nodeback; \n\t [CodeForCall] \n\t break; \n\t ".replace("[CodeForCall]",v?"ret = callback.apply(this, args);\n":"ret = callback.apply(receiver, args);\n")}()).replace("[GetFunctionCode]",y);return m=m.replace("Parameters",function(t){return i.filledRange(Math.max(t,3),"_arg","")}(p)),new Function("Promise","fn","receiver","withAppended","maybeWrapAsError","nodebackForPromise","tryCatch","errorObj","notEnumerableProp","INTERNAL",m)(t,c,u,a,s,o,i.tryCatch,i.errorObj,i.notEnumerableProp,e)}:function(r,u,f,c,l,h){var p=function(){return this}(),d=r;function v(){var i=u;u===n&&(i=this);var f=new t(e);f._captureStackTrace();var c="string"==typeof d&&this!==p?this[d]:r,l=o(f,h);try{c.apply(i,a(arguments,l))}catch(t){f._rejectCallback(s(t),!0,!0)}return f._isFateSealed()||f._setAsyncGuaranteed(),f}return"string"==typeof d&&(r=c),i.notEnumerableProp(v,"__isPromisified__",!0),v};function b(t,e,r,o,a){for(var s=new RegExp(y(e)+"$"),u=_(t,e,s,r),f=0,c=u.length;f<c;f+=2){var l=u[f],h=u[f+1],p=l+e;if(o===m)t[p]=m(l,n,l,h,e,a);else{var d=o(h,function(){return m(l,n,l,h,e,a)});i.notEnumerableProp(d,"__isPromisified__",!0),t[p]=d}}return i.toFastProperties(t),t}t.promisify=function(t,e){if("function"!=typeof t)throw new f("expecting a function but got "+i.classString(t));if(d(t))return t;var r=function(t,e,r){return m(t,e,void 0,t,null,r)}(t,void 0===(e=Object(e)).context?n:e.context,!!e.multiArgs);return i.copyDescriptors(t,r,p),r},t.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new f("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(e=Object(e)).multiArgs,n=e.suffix;"string"!=typeof n&&(n="Async");var o=e.filter;"function"!=typeof o&&(o=h);var a=e.promisifier;if("function"!=typeof a&&(a=m),!i.isIdentifier(n))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=i.inheritedDataKeys(t),u=0;u<s.length;++u){var c=t[s[u]];"constructor"!==s[u]&&i.isClass(c)&&(b(c.prototype,n,o,a,r),b(c,n,o,a,r))}return b(t,n,o,a,r)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){var o,a=r(6),s=a.isObject,u=r(7);"function"==typeof Map&&(o=Map);var f=function(){var t=0,e=0;function r(r,n){this[t]=r,this[t+e]=n,t++}return function(n){e=n.size,t=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}();function c(t){var e,r=!1;if(void 0!==o&&t instanceof o)e=f(t),r=!0;else{var n=u.keys(t),i=n.length;e=new Array(2*i);for(var a=0;a<i;++a){var s=n[a];e[a]=t[s],e[a+i]=s}}this.constructor$(e),this._isMap=r,this._init$(void 0,r?-6:-3)}function l(e){var r,o=n(e);return s(o)?(r=o instanceof t?o._then(t.props,void 0,void 0,void 0,void 0):new c(o).promise(),o instanceof t&&r._propagateFrom(o,2),r):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}a.inherits(c,e),c.prototype._init=function(){},c.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var r;if(this._isMap)r=function(t){for(var e=new o,r=t.length/2|0,n=0;n<r;++n){var i=t[r+n],a=t[n];e.set(i,a)}return e}(this._values);else{r={};for(var n=this.length(),i=0,a=this.length();i<a;++i)r[this._values[i+n]]=this._values[i]}return this._resolve(r),!0}return!1},c.prototype.shouldCopyValues=function(){return!1},c.prototype.getActualLength=function(t){return t>>1},t.prototype.props=function(){return l(this)},t.props=function(t){return l(t)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i){var o=r(6),a=function(t){return t.then(function(e){return s(e,t)})};function s(r,s){var u=n(r);if(u instanceof t)return a(u);if(null===(r=o.asArray(r)))return i("expecting an array or an iterable object but got "+o.classString(r));var f=new t(e);void 0!==s&&f._propagateFrom(s,3);for(var c=f._fulfill,l=f._reject,h=0,p=r.length;h<p;++h){var d=r[h];(void 0!==d||h in r)&&t.cast(d)._then(c,l,void 0,f,null)}return f}t.race=function(t){return s(t,void 0)},t.prototype.race=function(){return s(this,void 0)}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,a){var s=r(6),u=s.tryCatch;function f(e,r,n,i){this.constructor$(e);var a=t._getContext();this._fn=s.contextBind(a,r),void 0!==n&&(n=t.resolve(n))._attachCancellationCallback(this),this._initialValue=n,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,r,i){return"function"!=typeof e?n("expecting a function but got "+s.classString(e)):new f(t,e,r,i).promise()}function h(e){this.accum=e,this.array._gotAccum(e);var r=i(this.value,this.array._promise);return r instanceof t?(this.array._currentCancellable=r,r._then(p,void 0,void 0,this,void 0)):p.call(this,r)}function p(e){var r,n=this.array,i=n._promise,o=u(n._fn);i._pushContext(),(r=void 0!==n._eachValues?o.call(i._boundValue(),e,this.index,this.length):o.call(i._boundValue(),this.accum,e,this.index,this.length))instanceof t&&(n._currentCancellable=r);var s=i._popContext();return a.checkForgottenReturns(r,s,void 0!==n._eachValues?"Promise.each":"Promise.reduce",i),r}s.inherits(f,e),f.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},f.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},f.prototype._init=function(){},f.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},f.prototype.shouldCopyValues=function(){return!1},f.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},f.prototype._resultCancelled=function(e){if(e===this._initialValue)return this._cancel();this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof t&&this._currentCancellable.cancel(),this._initialValue instanceof t&&this._initialValue.cancel())},f.prototype._iterate=function(e){var r,n;this._values=e;var i=e.length;void 0!==this._initialValue?(r=this._initialValue,n=0):(r=t.resolve(e[0]),n=1),this._currentCancellable=r;for(var o=n;o<i;++o){var a=e[o];a instanceof t&&a.suppressUnhandledRejections()}if(!r.isRejected())for(;n<i;++n){var s={accum:null,value:e[n],index:n,length:i,array:this};r=r._then(h,void 0,void 0,s,void 0),0==(127&n)&&r._setNoAsyncGuarantee()}void 0!==this._eachValues&&(r=r._then(this._eachComplete,void 0,void 0,this,void 0)),r._then(c,c,void 0,r,this)},t.prototype.reduce=function(t,e){return l(this,t,e,null)},t.reduce=function(t,e,r,n){return l(t,e,r,n)}}},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=t.PromiseInspection;function o(t){this.constructor$(t)}r(6).inherits(o,e),o.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(t,e){var r=new i;return r._bitField=33554432,r._settledValueField=t,this._promiseResolved(e,r)},o.prototype._promiseRejected=function(t,e){var r=new i;return r._bitField=16777216,r._settledValueField=t,this._promiseResolved(e,r)},t.settle=function(t){return n.deprecated(".settle()",".reflect()"),new o(t).promise()},t.allSettled=function(t){return new o(t).promise()},t.prototype.settle=function(){return t.settle(this)}}},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=r(6),o=r(13).RangeError,a=r(13).AggregateError,s=i.isArray,u={};function f(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function c(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 f(t),i=r.promise();return r.setHowMany(e),r.init(),i}i.inherits(f,e),f.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var t=s(this._values);!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},f.prototype.init=function(){this._initialized=!0,this._init()},f.prototype.setUnwrap=function(){this._unwrap=!0},f.prototype.howMany=function(){return this._howMany},f.prototype.setHowMany=function(t){this._howMany=t},f.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)},f.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},f.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},f.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new a,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},f.prototype._fulfilled=function(){return this._totalResolved},f.prototype._rejected=function(){return this._values.length-this.length()},f.prototype._addRejected=function(t){this._values.push(t)},f.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},f.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},f.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new o(e)},f.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(t,e){return c(t,e)},t.prototype.some=function(t){return c(this,t)},t._SomePromiseArray=f}},function(t,e,r){"use strict";t.exports=function(t,e,n){var i=r(6),o=t.TimeoutError;function a(t){this.handle=t}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(t){return u(+this).thenReturn(t)},u=t.delay=function(r,i){var o,u;return void 0!==i?(o=t.resolve(i)._then(s,null,null,r,void 0),n.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(e),u=setTimeout(function(){o._fulfill()},+r),n.cancellation()&&o._setOnCancel(new a(u)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};t.prototype.delay=function(t){return u(t,this)};function f(t){return clearTimeout(this.handle),t}function c(t){throw clearTimeout(this.handle),t}t.prototype.timeout=function(t,e){var r,s;t=+t;var u=new a(setTimeout(function(){r.isPending()&&function(t,e,r){var n;n="string"!=typeof e?e instanceof Error?e:new o("operation timed out"):new o(e),i.markAsOriginatingFromRejection(n),t._attachExtraTrace(n),t._reject(n),null!=r&&r.cancel()}(r,e,s)},t));return n.cancellation()?(s=this.then(),(r=s._then(f,c,void 0,u,void 0))._setOnCancel(u)):r=this._then(f,c,void 0,u,void 0),r}}},function(t,e,r){"use strict";t.exports=function(t,e,n,i,o,a){var s=r(6),u=r(13).TypeError,f=r(6).inherits,c=s.errorObj,l=s.tryCatch,h={};function p(t){setTimeout(function(){throw t},0)}function d(e,r){var i=0,a=e.length,s=new t(o);return function o(){if(i>=a)return s._fulfill();var u=function(t){var e=n(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}(e[i++]);if(u instanceof t&&u._isDisposable()){try{u=n(u._getDisposer().tryDispose(r),e.promise)}catch(t){return p(t)}if(u instanceof t)return u._then(o,p,null,null,null)}o()}(),s}function v(t,e,r){this._data=t,this._promise=e,this._context=r}function _(t,e,r){this.constructor$(t,e,r)}function y(t){return v.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function g(t){this.length=t,this.promise=null,this[t-1]=null}v.prototype.data=function(){return this._data},v.prototype.promise=function(){return this._promise},v.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},v.prototype.tryDispose=function(t){var e=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=e!==h?this.doDispose(e,t):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},v.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},f(_,v),_.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},g.prototype._resultCancelled=function(){for(var e=this.length,r=0;r<e;++r){var n=this[r];n instanceof t&&n.cancel()}},t.using=function(){var r=arguments.length;if(r<2)return e("you must pass at least 2 arguments to Promise.using");var i,o=arguments[r-1];if("function"!=typeof o)return e("expecting a function but got "+s.classString(o));var u=!0;2===r&&Array.isArray(arguments[0])?(r=(i=arguments[0]).length,u=!1):(i=arguments,r--);for(var f=new g(r),h=0;h<r;++h){var p=i[h];if(v.isDisposer(p)){var _=p;(p=p.promise())._setDisposable(_)}else{var m=n(p);m instanceof t&&(p=m._then(y,null,null,{resources:f,index:h},void 0))}f[h]=p}var b=new Array(f.length);for(h=0;h<b.length;++h)b[h]=t.resolve(f[h]).reflect();var w=t.all(b).then(function(t){for(var e=0;e<t.length;++e){var r=t[e];if(r.isRejected())return c.e=r.error(),c;if(!r.isFulfilled())return void w.cancel();t[e]=r.value()}E._pushContext(),o=l(o);var n=u?o.apply(void 0,t):o(t),i=E._popContext();return a.checkForgottenReturns(n,i,"Promise.using",E),n}),E=w.lastly(function(){var e=new t.PromiseInspection(w);return d(f,e)});return f.promise=E,E._setOnCancel(f),E},t.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},t.prototype._isDisposable=function(){return(131072&this._bitField)>0},t.prototype._getDisposer=function(){return this._disposer},t.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},t.prototype.disposer=function(t){if("function"==typeof t)return new _(t,this,i());throw new u}}},function(t,e){"use strict";t.exports=function(t){var e=t._SomePromiseArray;function r(t){var r=new e(t),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}t.any=function(t){return r(t)},t.prototype.any=function(){return r(this)}}},function(t,e){"use strict";t.exports=function(t,e){var r=t.reduce,n=t.all;function i(){return n(this)}t.prototype.each=function(t){return r(this,t,e,0)._then(i,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return r(this,t,e,e)},t.each=function(t,n){return r(t,n,e,0)._then(i,void 0,void 0,t,void 0)},t.mapSeries=function(t,n){return r(t,n,e,e)}}},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,r){var n=r(43),i=1,o=4;t.exports=function(t){return n(t,i|o)}},function(t,e,r){var n=r(44),i=r(88),o=r(89),a=r(92),s=r(115),u=r(119),f=r(120),c=r(121),l=r(125),h=r(129),p=r(131),d=r(132),v=r(137),_=r(138),y=r(152),g=r(100),m=r(101),b=r(68),w=r(94),E=1,k=2,T=4,x="[object Arguments]",B="[object Function]",S="[object GeneratorFunction]",A="[object Object]",j={};j[x]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j[A]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j[B]=j["[object WeakMap]"]=!1,t.exports=function t(e,r,I,O,C,R){var P,U=r&E,L=r&k,F=r&T;if(I&&(P=C?I(e,O,C,R):I(e)),void 0!==P)return P;if(!b(e))return e;var D=g(e);if(D){if(P=v(e),!U)return f(e,P)}else{var N=d(e),M=N==B||N==S;if(m(e))return u(e,U);if(N==A||N==x||M&&!C){if(P=L||M?{}:y(e),!U)return L?l(e,s(P,e)):c(e,a(P,e))}else{if(!j[N])return C?e:{};P=_(e,N,t,U)}}R||(R=new n);var q=R.get(e);if(q)return q;R.set(e,P);var z=F?L?p:h:L?keysIn:w,V=D?void 0:z(e);return i(V||e,function(n,i){V&&(n=e[i=n]),o(P,i,t(n,r,I,i,e,R))}),P}},function(t,e,r){var n=r(45),i=r(53),o=r(54),a=r(55),s=r(56),u=r(57);function f(t){var e=this.__data__=new n(t);this.size=e.size}f.prototype.clear=i,f.prototype.delete=o,f.prototype.get=a,f.prototype.has=s,f.prototype.set=u,t.exports=f},function(t,e,r){var n=r(46),i=r(47),o=r(50),a=r(51),s=r(52);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,r){var n=r(48),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():i.call(e,r,1),--this.size,0))}},function(t,e,r){var n=r(49);t.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,r){var n=r(48);t.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},function(t,e,r){var n=r(48);t.exports=function(t){return n(this.__data__,t)>-1}},function(t,e,r){var n=r(48);t.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},function(t,e,r){var n=r(45);t.exports=function(){this.__data__=new n,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,r){var n=r(45),i=r(58),o=r(73),a=200;t.exports=function(t,e){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<a-1)return s.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(t,e),this.size=r.size,this}},function(t,e,r){var n=r(59)(r(64),"Map");t.exports=n},function(t,e,r){var n=r(60),i=r(72);t.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},function(t,e,r){var n=r(61),i=r(69),o=r(68),a=r(71),s=/^\[object .+?Constructor\]$/,u=Function.prototype,f=Object.prototype,c=u.toString,l=f.hasOwnProperty,h=RegExp("^"+c.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(n(t)?h:s).test(a(t))}},function(t,e,r){var n=r(62),i=r(68),o="[object AsyncFunction]",a="[object Function]",s="[object GeneratorFunction]",u="[object Proxy]";t.exports=function(t){if(!i(t))return!1;var e=n(t);return e==a||e==s||e==o||e==u}},function(t,e,r){var n=r(63),i=r(66),o=r(67),a="[object Null]",s="[object Undefined]",u=n?n.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?s:a:u&&u in Object(t)?i(t):o(t)}},function(t,e,r){var n=r(64).Symbol;t.exports=n},function(t,e,r){var n=r(65),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();t.exports=o},function(t,e){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e;t.exports=r}).call(e,function(){return this}())},function(t,e,r){var n=r(63),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;t.exports=function(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var n=!0}catch(t){}var i=a.call(t);return n&&(e?t[s]=r:delete t[s]),i}},function(t,e){var r=Object.prototype.toString;t.exports=function(t){return r.call(t)}},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,r){var n=r(70),i=function(){var t=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();t.exports=function(t){return!!i&&i in t}},function(t,e,r){var n=r(64)["__core-js_shared__"];t.exports=n},function(t,e){var r=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return r.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,r){var n=r(74),i=r(82),o=r(85),a=r(86),s=r(87);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,r){var n=r(75),i=r(45),o=r(58);t.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},function(t,e,r){var n=r(76),i=r(78),o=r(79),a=r(80),s=r(81);function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,t.exports=u},function(t,e,r){var n=r(77);t.exports=function(){this.__data__=n?n(null):{},this.size=0}},function(t,e,r){var n=r(59)(Object,"create");t.exports=n},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,r){var n=r(77),i="__lodash_hash_undefined__",o=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(n){var r=e[t];return r===i?void 0:r}return o.call(e,t)?e[t]:void 0}},function(t,e,r){var n=r(77),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},function(t,e,r){var n=r(77),i="__lodash_hash_undefined__";t.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?i:e,this}},function(t,e,r){var n=r(83);t.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e,r){var n=r(84);t.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,r){var n=r(83);t.exports=function(t){return n(this,t).get(t)}},function(t,e,r){var n=r(83);t.exports=function(t){return n(this,t).has(t)}},function(t,e,r){var n=r(83);t.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},function(t,e,r){var n=r(90),i=r(49),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){var a=t[e];o.call(t,e)&&i(a,r)&&(void 0!==r||e in t)||n(t,e,r)}},function(t,e,r){var n=r(91);t.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},function(t,e,r){var n=r(59),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,r){var n=r(93),i=r(94);t.exports=function(t,e){return t&&n(e,i(e),t)}},function(t,e,r){var n=r(89),i=r(90);t.exports=function(t,e,r,o){var a=!r;r||(r={});for(var s=-1,u=e.length;++s<u;){var f=e[s],c=o?o(r[f],t[f],f,r,t):void 0;void 0===c&&(c=t[f]),a?i(r,f,c):n(r,f,c)}return r}},function(t,e,r){var n=r(95),i=r(110),o=r(114);t.exports=function(t){return o(t)?n(t):i(t)}},function(t,e,r){var n=r(96),i=r(97),o=r(100),a=r(101),s=r(104),u=r(105),f=Object.prototype.hasOwnProperty;t.exports=function(t,e){var r=o(t),c=!r&&i(t),l=!r&&!c&&a(t),h=!r&&!c&&!l&&u(t),p=r||c||l||h,d=p?n(t.length,String):[],v=d.length;for(var _ in t)!e&&!f.call(t,_)||p&&("length"==_||l&&("offset"==_||"parent"==_)||h&&("buffer"==_||"byteLength"==_||"byteOffset"==_)||s(_,v))||d.push(_);return d}},function(t,e){t.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},function(t,e,r){var n=r(98),i=r(99),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&a.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,r){var n=r(62),i=r(99),o="[object Arguments]";t.exports=function(t){return i(t)&&n(t)==o}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){var r=Array.isArray;t.exports=r},function(t,e,r){(function(t){var n=r(64),i=r(103),o="object"==typeof e&&e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,s=a&&a.exports===o?n.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(e,r(102)(t))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){t.exports=function(){return!1}},function(t,e){var r=9007199254740991,n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){return!!(e=null==e?r:e)&&("number"==typeof t||n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e,r){var n=r(106),i=r(108),o=r(109),a=o&&o.isTypedArray,s=a?i(a):n;t.exports=s},function(t,e,r){var n=r(62),i=r(107),o=r(99),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[n(t)]}},function(t,e){var r=9007199254740991;t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=r}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e,r){(function(t){var n=r(65),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&n.process,s=function(){try{return a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}).call(e,r(102)(t))},function(t,e,r){var n=r(111),i=r(112),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},function(t,e){var r=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},function(t,e,r){var n=r(113)(Object.keys,Object);t.exports=n},function(t,e){t.exports=function(t,e){return function(r){return t(e(r))}}},function(t,e,r){var n=r(61),i=r(107);t.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},function(t,e,r){var n=r(93),i=r(116);t.exports=function(t,e){return t&&n(e,i(e),t)}},function(t,e,r){var n=r(95),i=r(117),o=r(114);t.exports=function(t){return o(t)?n(t,!0):i(t)}},function(t,e,r){var n=r(68),i=r(111),o=r(118),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!n(t))return o(t);var e=i(t),r=[];for(var s in t)("constructor"!=s||!e&&a.call(t,s))&&r.push(s);return r}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},function(t,e,r){(function(t){var n=r(64),i="object"==typeof e&&e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=s?s(r):new t.constructor(r);return t.copy(n),n}}).call(e,r(102)(t))},function(t,e){t.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},function(t,e,r){var n=r(93),i=r(122);t.exports=function(t,e){return n(t,i(t),e)}},function(t,e,r){var n=r(123),i=r(124),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(t){return null==t?[]:(t=Object(t),n(a(t),function(e){return o.call(t,e)}))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var a=t[r];e(a,r,t)&&(o[i++]=a)}return o}},function(t,e){t.exports=function(){return[]}},function(t,e,r){var n=r(93),i=r(126);t.exports=function(t,e){return n(t,i(t),e)}},function(t,e,r){var n=r(127),i=r(128),o=r(122),a=r(124),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,o(t)),t=i(t);return e}:a;t.exports=s},function(t,e){t.exports=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},function(t,e,r){var n=r(113)(Object.getPrototypeOf,Object);t.exports=n},function(t,e,r){var n=r(130),i=r(122),o=r(94);t.exports=function(t){return n(t,o,i)}},function(t,e,r){var n=r(127),i=r(100);t.exports=function(t,e,r){var o=e(t);return i(t)?o:n(o,r(t))}},function(t,e,r){var n=r(130),i=r(126),o=r(116);t.exports=function(t){return n(t,o,i)}},function(t,e,r){var n=r(133),i=r(58),o=r(134),a=r(135),s=r(136),u=r(62),f=r(71),c=f(n),l=f(i),h=f(o),p=f(a),d=f(s),v=u;(n&&"[object DataView]"!=v(new n(new ArrayBuffer(1)))||i&&"[object Map]"!=v(new i)||o&&"[object Promise]"!=v(o.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(t){var e=u(t),r="[object Object]"==e?t.constructor:void 0,n=r?f(r):"";if(n)switch(n){case c:return"[object DataView]";case l:return"[object Map]";case h:return"[object Promise]";case p:return"[object Set]";case d:return"[object WeakMap]"}return e}),t.exports=v},function(t,e,r){var n=r(59)(r(64),"DataView");t.exports=n},function(t,e,r){var n=r(59)(r(64),"Promise");t.exports=n},function(t,e,r){var n=r(59)(r(64),"Set");t.exports=n},function(t,e,r){var n=r(59)(r(64),"WeakMap");t.exports=n},function(t,e){var r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&r.call(t,"index")&&(n.index=t.index,n.input=t.input),n}},function(t,e,r){var n=r(139),i=r(141),o=r(142),a=r(146),s=r(147),u=r(150),f=r(151),c="[object Boolean]",l="[object Date]",h="[object Map]",p="[object Number]",d="[object RegExp]",v="[object Set]",_="[object String]",y="[object Symbol]",g="[object ArrayBuffer]",m="[object DataView]",b="[object Float32Array]",w="[object Float64Array]",E="[object Int8Array]",k="[object Int16Array]",T="[object Int32Array]",x="[object Uint8Array]",B="[object Uint8ClampedArray]",S="[object Uint16Array]",A="[object Uint32Array]";t.exports=function(t,e,r,j){var I=t.constructor;switch(e){case g:return n(t);case c:case l:return new I(+t);case m:return i(t,j);case b:case w:case E:case k:case T:case x:case B:case S:case A:return f(t,j);case h:return o(t,j,r);case p:case _:return new I(t);case d:return a(t);case v:return s(t,j,r);case y:return u(t)}}},function(t,e,r){var n=r(140);t.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},function(t,e,r){var n=r(64).Uint8Array;t.exports=n},function(t,e,r){var n=r(139);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}},function(t,e,r){var n=r(143),i=r(144),o=r(145),a=1;t.exports=function(t,e,r){var s=e?r(o(t),a):o(t);return i(s,n,new t.constructor)}},function(t,e){t.exports=function(t,e){return t.set(e[0],e[1]),t}},function(t,e){t.exports=function(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,n){r[++e]=[n,t]}),r}},function(t,e){var r=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,r.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,r){var n=r(148),i=r(144),o=r(149),a=1;t.exports=function(t,e,r){var s=e?r(o(t),a):o(t);return i(s,n,new t.constructor)}},function(t,e){t.exports=function(t,e){return t.add(e),t}},function(t,e){t.exports=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},function(t,e,r){var n=r(63),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e,r){var n=r(139);t.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},function(t,e,r){var n=r(153),i=r(128),o=r(111);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:n(i(t))}},function(t,e,r){var n=r(68),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();t.exports=o},function(t,e,r){var n=r(155),i=r(156),o=r(158),a=r(166),s=o(function(t){return t.push(void 0,a),n(i,void 0,t)});t.exports=s},function(t,e){t.exports=function(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)}},function(t,e,r){var n=r(93),i=r(157),o=r(116),a=i(function(t,e,r,i){n(e,o(e),t,i)});t.exports=a},function(t,e,r){var n=r(158),i=r(165);t.exports=function(t){return n(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&i(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var u=r[n];u&&t(e,u,n,a)}return e})}},function(t,e,r){var n=r(159),i=r(160),o=r(161);t.exports=function(t,e){return o(i(t,e,n),t+"")}},function(t,e){t.exports=function(t){return t}},function(t,e,r){var n=r(155),i=Math.max;t.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,s=i(o.length-e,0),u=Array(s);++a<s;)u[a]=o[e+a];a=-1;for(var f=Array(e+1);++a<e;)f[a]=o[a];return f[e]=r(u),n(t,this,f)}}},function(t,e,r){var n=r(162),i=r(164)(n);t.exports=i},function(t,e,r){var n=r(163),i=r(91),o=r(159),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;t.exports=a},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e){var r=800,n=16,i=Date.now;t.exports=function(t){var e=0,o=0;return function(){var a=i(),s=n-(a-o);if(o=a,s>0){if(++e>=r)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,r){var n=r(49),i=r(114),o=r(104),a=r(68);t.exports=function(t,e,r){if(!a(r))return!1;var s=typeof e;return!!("number"==s?i(r)&&o(e,r.length):"string"==s&&e in r)&&n(r[e],t)}},function(t,e,r){var n=r(49),i=Object.prototype,o=i.hasOwnProperty;t.exports=function(t,e,r,a){return void 0===t||n(t,i[r])&&!o.call(a,r)?e:t}},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,r){(function(n){function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t}(e=t.exports=r(169)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),!r)return;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&&"%c"===t&&(o=++i)}),t.splice(o,0,n)},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"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+)/)},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),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(i())}).call(e,r(5))},function(t,e,r){var n;function i(t){function r(){if(r.enabled){var t=r,i=+new Date,o=i-(n||i);t.diff=o,t.prev=n,t.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=e.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var u=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(r,n){if("%%"===r)return r;u++;var i=e.formatters[n];if("function"==typeof i){var o=a[u];r=i.call(t,o),a.splice(u,1),u--}return r}),e.formatArgs.call(t,a),(r.log||e.log||console.log.bind(console)).apply(t,a)}}return r.namespace=t,r.enabled=e.enabled(t),r.useColors=e.useColors(),r.color=function(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]}(t),"function"==typeof e.init&&e.init(r),r}(e=t.exports=i.debug=i.default=i).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){e.save(t),e.names=[],e.skips=[];for(var r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&("-"===(t=r[i].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))},e.enabled=function(t){var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(170),e.names=[],e.skips=[],e.formatters={}},function(t,e){var r=1e3,n=60*r,i=60*n,o=24*i,a=365.25*o;function s(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}t.exports=function(t,e){e=e||{};var u=typeof t;if("string"===u&&t.length>0)return function(t){if((t=String(t)).length>100)return;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)return;var s=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return s*a;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*n;case"seconds":case"second":case"secs":case"sec":case"s":return s*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(t);if("number"===u&&!1===isNaN(t))return e.long?function(t){return s(t,o,"day")||s(t,i,"hour")||s(t,n,"minute")||s(t,r,"second")||t+" ms"}(t):function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=i)return Math.round(t/i)+"h";if(t>=n)return Math.round(t/n)+"m";if(t>=r)return Math.round(t/r)+"s";return t+"ms"}(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";var n=r(172);t.exports=function(){var t=n;return{get:function(e){return t[e]},set:function(e,r){t[e]=r}}}()},function(t,e){t.exports={websocket:"",address_prefix:"VIZ",chain_id:"2040effda178d4fffff5eab7a915d4019879f5205cc5392e4bcced2b6edda0cd",broadcast_transaction_with_callback:!1,reference_irreversible_block:!1,tx_expiration_seconds:60}},function(t,e){"use strict";t.exports=[{api:"validator_api",method:"get_miner_queue"},{api:"validator_api",method:"get_validator_schedule"},{api:"validator_api",method:"get_witness_schedule"},{api:"validator_api",method:"get_validators",params:["validatorIds"]},{api:"validator_api",method:"get_witnesses",params:["witnessIds"]},{api:"validator_api",method:"get_validator_by_account",params:["accountName"]},{api:"validator_api",method:"get_witness_by_account",params:["accountName"]},{api:"validator_api",method:"get_validators_by_vote",params:["from","limit"]},{api:"validator_api",method:"get_witnesses_by_vote",params:["from","limit"]},{api:"validator_api",method:"get_validators_by_counted_vote",params:["from","limit"]},{api:"validator_api",method:"get_witnesses_by_counted_vote",params:["from","limit"]},{api:"validator_api",method:"get_validator_count"},{api:"validator_api",method:"get_witness_count"},{api:"validator_api",method:"lookup_validator_accounts",params:["lowerBoundName","limit"]},{api:"validator_api",method:"lookup_witness_accounts",params:["lowerBoundName","limit"]},{api:"validator_api",method:"get_active_validators"},{api:"validator_api",method:"get_active_witnesses"},{api:"account_history",method:"get_account_history",params:["account","from","limit"]},{api:"operation_history",method:"get_ops_in_block",params:["blockNum","onlyVirtual"]},{api:"operation_history",method:"get_transaction",params:["trxId"]},{api:"tags",method:"get_trending_tags",params:["afterTag","limit"]},{api:"tags",method:"get_tags_used_by_author",params:["author"]},{api:"tags",method:"get_discussions_by_payout",params:["query"]},{api:"tags",method:"get_discussions_by_trending",params:["query"]},{api:"tags",method:"get_discussions_by_created",params:["query"]},{api:"tags",method:"get_discussions_by_active",params:["query"]},{api:"tags",method:"get_discussions_by_cashout",params:["query"]},{api:"tags",method:"get_discussions_by_votes",params:["query"]},{api:"tags",method:"get_discussions_by_children",params:["query"]},{api:"tags",method:"get_discussions_by_hot",params:["query"]},{api:"tags",method:"get_discussions_by_feed",params:["query"]},{api:"tags",method:"get_discussions_by_blog",params:["query"]},{api:"tags",method:"get_discussions_by_contents",params:["query"]},{api:"tags",method:"get_discussions_by_author_before_date",params:["author","startPermlink","beforeDate","limit"]},{api:"tags",method:"get_languages"},{api:"social_network",method:"get_replies_by_last_update",params:["startAuthor","startPermlink","limit","voteLimit"]},{api:"social_network",method:"get_content",params:["author","permlink","voteLimit"]},{api:"social_network",method:"get_content_replies",params:["parent","parentPermlink","voteLimit"]},{api:"social_network",method:"get_all_content_replies",params:["parent","parentPermlink","voteLimit"]},{api:"social_network",method:"get_active_votes",params:["author","permlink","voteLimit"]},{api:"social_network",method:"get_account_votes",params:["voter","from","voteLimit"]},{api:"database_api",method:"get_block_header",params:["blockNum"]},{api:"database_api",method:"get_block",params:["blockNum"]},{api:"database_api",method:"get_irreversible_block_header",params:["blockNum"]},{api:"database_api",method:"get_irreversible_block",params:["blockNum"]},{api:"database_api",method:"get_config"},{api:"database_api",method:"get_dynamic_global_properties"},{api:"database_api",method:"get_chain_properties"},{api:"database_api",method:"get_hardfork_version"},{api:"database_api",method:"get_next_scheduled_hardfork"},{api:"database_api",method:"get_account_count"},{api:"database_api",method:"get_owner_history",params:["account"]},{api:"database_api",method:"get_master_history",params:["account"]},{api:"database_api",method:"set_block_applied_callback",params:["callback"]},{api:"database_api",method:"get_recovery_request",params:["account"]},{api:"database_api",method:"get_escrow",params:["from","escrowId"]},{api:"database_api",method:"get_withdraw_routes",params:["account","withdrawRouteType"]},{api:"database_api",method:"get_transaction_hex",params:["trx"]},{api:"database_api",method:"get_required_signatures",params:["trx","availableKeys"]},{api:"database_api",method:"get_potential_signatures",params:["trx"]},{api:"database_api",method:"verify_authority",params:["trx"]},{api:"database_api",method:"verify_account_authority",params:["name","signers"]},{api:"database_api",method:"get_accounts",params:["accountNames"]},{api:"database_api",method:"lookup_account_names",params:["accountNames"]},{api:"database_api",method:"lookup_accounts",params:["lowerBoundName","limit"]},{api:"database_api",method:"get_proposed_transaction",params:["account"]},{api:"database_api",method:"get_database_info"},{api:"database_api",method:"get_vesting_delegations",params:["account","from","limit","type"]},{api:"database_api",method:"get_expiring_vesting_delegations",params:["account","from","limit"]},{api:"database_api",method:"get_proposed_transactions",params:["account","from","limit"]},{api:"database_api",method:"get_accounts_on_sale",params:["from","limit"]},{api:"database_api",method:"get_accounts_on_auction",params:["from","limit"]},{api:"database_api",method:"get_subaccounts_on_sale",params:["from","limit"]},{api:"follow",method:"get_followers",params:["following","startFollower","followType","limit"]},{api:"follow",method:"get_following",params:["follower","startFollowing","followType","limit"]},{api:"follow",method:"get_follow_count",params:["account"]},{api:"follow",method:"get_feed_entries",params:["account","entryId","limit"]},{api:"follow",method:"get_feed",params:["account","entryId","limit"]},{api:"follow",method:"get_blog_entries",params:["account","entryId","limit"]},{api:"follow",method:"get_blog",params:["account","entryId","limit"]},{api:"follow",method:"get_reblogged_by",params:["author","permlink"]},{api:"follow",method:"get_blog_authors",params:["blogAccount"]},{api:"account_by_key",method:"get_key_references",params:["account_name_type"]},{api:"network_broadcast_api",method:"broadcast_transaction",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_transaction_with_callback",params:["confirmationCallback","trx"]},{api:"network_broadcast_api",method:"broadcast_transaction_synchronous",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_block",params:["block"]},{api:"committee_api",method:"get_committee_request",params:["request_id","votes_count"]},{api:"committee_api",method:"get_committee_request_votes",params:["request_id"]},{api:"committee_api",method:"get_committee_requests_list",params:["status"]},{api:"invite_api",method:"get_invites_list",params:["status"]},{api:"invite_api",method:"get_invite_by_id",params:["id"]},{api:"invite_api",method:"get_invite_by_key",params:["invite_key"]},{api:"paid_subscription_api",method:"get_paid_subscriptions",params:["from","limit"]},{api:"paid_subscription_api",method:"get_paid_subscription_options",params:["account"]},{api:"paid_subscription_api",method:"get_paid_subscription_status",params:["subscriber","account"]},{api:"paid_subscription_api",method:"get_active_paid_subscriptions",params:["subscriber"]},{api:"paid_subscription_api",method:"get_inactive_paid_subscriptions",params:["subscriber"]},{api:"custom_protocol_api",method:"get_account",params:["account","custom_protocol_id"]},{api:"auth_util",method:"check_authority_signature",params:["account_name","level","signatures"]},{api:"block_info",method:"get_block_info",params:["start_block_num","count"]},{api:"block_info",method:"get_blocks_with_info",params:["start_block_num","count"]},{api:"raw_block",method:"get_raw_block",params:["block_num"]}]},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="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};e.camelCase=function(t){return t.replace(o,function(t,e){return e.toUpperCase()})},e.validateAccountName=function(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<2)return i+"be longer.";if(o>25)return i+"be shorter.";/\./.test(t)&&(i="Each account segment should ");var a=t.split(".");for(e=0,n=a.length;e<n;e++){if(r=a[e],!/^[a-z]/.test(r))return i+"start with a letter.";if(!/^[a-z0-9-]*$/.test(r))return i+"have only letters, digits, or dashes.";if(/--/.test(r))return i+"have only one dash in a row.";if(!/[a-z0-9]$/.test(r))return i+"end with a letter or digit.";if(!(r.length>=2))return i+"be longer"}return null},e.voiceEvent=function(t,e,r,n,i,o,a,s){s=void 0===s?function(){}:s;var u=function(t,e,r,n,i,o,a,s){var u={p:a,e:r,b:i};n!==e&&(u.a=n),void 0!==o&&(u.d=o),viz.broadcast.custom(t,[],[e],"VE",JSON.stringify(u),function(t,e){s(!t)})};!1!==(a=void 0!==a&&a)?u(t,e,r,n,i,o,a,s):viz.api.getAccount(e,"VE",function(a,f){a?s(!1):u(t,e,r,n,i,o,f.custom_sequence_block_num,s)})},e.voiceText=function(t,e,r,n,i,o,a,s){n=void 0!==n&&n,i=void 0!==i&&i,o=void 0!==o&&o,s=void 0===s?function(){}:s;var u=function(t,e,r,n,i,o,a,s){var u={p:a,d:{t:r}};n?u.d.r=n:i&&(u.d.s=i),o&&(u.d.b=o),viz.broadcast.custom(t,[],[e],"V",JSON.stringify(u),function(t,e){s(!t)})};!1!==(a=void 0!==a&&a)?u(t,e,r,n,i,o,a,s):viz.api.getAccount(e,"V",function(a,f){a?s(!1):u(t,e,r,n,i,o,f.custom_sequence_block_num,s)})},e.voiceEncodedText=function(t,e,r,o,a,s,u,f,c,l){s=void 0!==s&&s,u=void 0!==u&&u,f=void 0!==f&&f,l=void 0===l?function(){}:l;var h=function(t,e,r,o,a,s,u,f,c,l){var h={d:{t:a}};if(s?h.d.r=s:u&&(h.d.s=u),f&&(h.d.b=f),"object"===(void 0===r?"undefined":n(r))){for(var p in r=r.reverse(),"object"===(void 0===o?"undefined":n(o))&&(o=o.reverse()),r){var d=p;h.nt=0==d?"t":"e",console.log("encode object",h,"with passphrase",r[d],"and comment",o[d]),h.d=JSON.stringify(h),h.d=i.Aes.simpleEncoder(h.d,r[d]),"object"===(void 0===o?"undefined":n(o))&&"string"==typeof o[d]&&(h.c=o[d])}delete h.nt}else h.d=JSON.stringify(h),h.d=i.Aes.simpleEncoder(h.d,r),void 0!==o&&(h.c=o);h.t="e",h.p=c,viz.broadcast.custom(t,[],[e],"V",JSON.stringify(h),function(t,e){l(!t)})};!1!==(c=void 0!==c&&c)?h(t,e,r,o,a,s,u,f,c,l):viz.api.getAccount(e,"V",function(n,i){n?l(!1):h(t,e,r,o,a,s,u,f,i.custom_sequence_block_num,l)})},e.voicePublication=function(t,e,r,n,i,o,a,s,u,f,c){i=void 0!==i&&i,o=void 0!==o&&o,a=void 0!==a&&a,s=void 0!==s&&s,u=void 0!==u&&u,c=void 0===c?function(){}:c;var l=function(t,e,r,n,i,o,a,s,u,f,c){var l={p:f,t:"p",d:{t:r,m:n}};i&&(l.d.d=i),o&&(l.d.i=o),a?l.d.r=a:s&&(l.d.s=s),u&&(l.d.b=u),viz.broadcast.custom(t,[],[e],"V",JSON.stringify(l),function(t,e){c(!t)})};!1!==(f=void 0!==f&&f)?l(t,e,r,n,i,o,a,s,u,f,c):viz.api.getAccount(e,"V",function(f,h){f?c(!1):l(t,e,r,n,i,o,a,s,u,h.custom_sequence_block_num,c)})},e.voiceEncodedPublication=function(t,e,r,o,a,s,u,f,c,l,h,p,d){u=void 0!==u&&u,f=void 0!==f&&f,c=void 0!==c&&c,l=void 0!==l&&l,h=void 0!==h&&h,d=void 0===d?function(){}:d;var v=function(t,e,r,o,a,s,u,f,c,l,h,p,d){var v={t:"p",d:{t:a,m:s}};if(u&&(v.d.d=u),f&&(v.d.i=f),c?v.d.r=c:l&&(v.d.s=l),h&&(v.d.b=h),"object"===(void 0===r?"undefined":n(r))){for(var _ in r=r.reverse(),"object"===(void 0===o?"undefined":n(o))&&(o=o.reverse()),r){var y=_;v.nt=0==y?"p":"e",console.log("encode object",v,"with passphrase",r[y],"and comment",o[y]),v.d=JSON.stringify(v),v.d=i.Aes.simpleEncoder(v.d,r[y]),"object"===(void 0===o?"undefined":n(o))&&"string"==typeof o[y]&&(v.c=o[y])}delete v.nt}else v.d.nt=v.t,v.d=JSON.stringify(v),v.d=i.Aes.simpleEncoder(v.d,r),void 0!==o&&(v.c=o);v.t="e",v.p=p,viz.broadcast.custom(t,[],[e],"V",JSON.stringify(v),function(t,e){d(!t)})};!1!==(p=void 0!==p&&p)?v(t,e,r,o,a,s,u,f,c,l,h,p,d):viz.api.getAccount(e,"V",function(n,i){n?d(!1):v(t,e,r,o,a,s,u,f,c,l,h,i.custom_sequence_block_num,d)})};var i=r(175),o=/_([a-z])/g},function(t,e,r){"use strict";t.exports={Address:r(176),Aes:r(227),PrivateKey:r(260),PublicKey:r(250),Signature:r(261),brainKey:r(265),key_utils:r(266),hash:r(185),ecc_config:r(171)}},function(t,e,r){(function(e){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=r(181),o=r(171),a=r(185),s=r(225),u=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.addy=e}return n(t,[{key:"toBuffer",value:function(){return this.addy}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.get("address_prefix"),r=a.ripemd160(this.addy),n=e.concat([this.addy,r.slice(0,4)]);return t+s.encode(n)}}],[{key:"fromBuffer",value:function(e){var r=a.sha512(e);return new t(a.ripemd160(r))}},{key:"fromString",value:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.get("address_prefix"),u=r.slice(0,n.length);i.equal(n,u,"Expecting key to begin with "+n+", instead got "+u);var f=r.slice(n.length),c=(f=new e(s.decode(f),"binary")).slice(-4);f=f.slice(0,-4);var l=a.ripemd160(f);return l=l.slice(0,4),i.deepEqual(c,l,"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 l=e.concat([f,c.slice(0,4)]);return new t(a.ripemd160(l))}}]),t}();t.exports=u}).call(e,r(177).Buffer)},function(t,e,r){(function(t){
|
|
2
2
|
/*!
|
|
3
3
|
* The buffer module from node.js, for the browser.
|
|
4
4
|
*
|
|
5
5
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/
|
|
8
|
-
"use strict";var n=r(178),i=r(179),o=r(180);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(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 l(this,t)}return f(this,t,e,r)}function f(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|p(e.length);return 0===(t=a(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?a(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(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 l(t,e){if(c(e),t=a(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|p(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.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 N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(t).length;default:if(n)return N(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(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=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"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}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;o<a;o++)if(f(t,o)===f(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(f(t,o+h)!==f(e,h)){l=!1;break}if(l)return o}return-1}function g(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(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;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function m(t,e,r,n){return z(N(e,t.length-r),t,r,n)}function b(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return b(t,e,r,n)}function E(t,e,r,n){return z(q(e),t,r,n)}function k(t,e,r,n){return z(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function B(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,f=t[i],c=null,l=f>239?4:f>223?3:f>191?2:1;if(i+l<=r)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=S));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){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}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return f(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return c(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.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);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?B(this,0,t):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))return"";for(t||(t="utf8");;)switch(t){case"hex":return j(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return A(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.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(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),f=this.slice(n,i),c=t.slice(e,r),l=0;l<a;++l)if(f[l]!==c[l]){o=f[l],s=c[l];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=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 g(this,t,e,r);case"utf8":case"utf-8":return m(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function j(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=M(t[o]);return i}function I(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function O(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function R(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function P(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}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 L(t,e,r,n,o){return o||U(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,o){return o||U(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||O(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||O(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(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},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},u.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<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:N(new u(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function M(t){return t<16?"0"+t.toString(16):t.toString(16)}function N(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&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=65536+(i-55296<<10|r-56320)}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){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(e,function(){return this}())},function(t,e){"use strict";e.byteLength=function(t){return 3*t.length/4-u(t)},e.toByteArray=function(t){var e,r,o,s,a,f,c=t.length;a=u(t),f=new i(3*c/4-a),o=a>0?c-4:c;var l=0;for(e=0,r=0;e<o;e+=4,r+=3)s=n[t.charCodeAt(e)]<<18|n[t.charCodeAt(e+1)]<<12|n[t.charCodeAt(e+2)]<<6|n[t.charCodeAt(e+3)],f[l++]=s>>16&255,f[l++]=s>>8&255,f[l++]=255&s;2===a?(s=n[t.charCodeAt(e)]<<2|n[t.charCodeAt(e+1)]>>4,f[l++]=255&s):1===a&&(s=n[t.charCodeAt(e)]<<10|n[t.charCodeAt(e+1)]<<4|n[t.charCodeAt(e+2)]>>2,f[l++]=s>>8&255,f[l++]=255&s);return f},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o="",s=[],a=0,u=n-i;a<u;a+=16383)s.push(c(t,a,a+16383>u?u:a+16383));1===i?(e=t[n-1],o+=r[e>>2],o+=r[e<<4&63],o+="=="):2===i&&(e=(t[n-2]<<8)+t[n-1],o+=r[e>>10],o+=r[e>>4&63],o+=r[e<<2&63],o+="=");return s.push(o),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function c(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(f(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>1,c=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+l],l+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(p?-1:1);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<<f)-1,l=c>>1,h=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+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=c?(a=0,s=c):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,f+=i;f>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";
|
|
8
|
+
"use strict";var n=r(178),i=r(179),o=r(180);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(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 l(this,t)}return f(this,t,e,r)}function f(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=h(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|p(e.length);return 0===(t=s(t,r)).length?t:(e.copy(t,0,0,r),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||function(t){return t!=t}(e.length)?s(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function c(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 l(t,e){if(c(e),t=s(t,e<0?0:0|p(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function h(t,e){var r=e.length<0?0:0|p(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function p(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.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 M(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(t).length;default:if(n)return M(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(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=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function f(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=r;o<s;o++)if(f(t,o)===f(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(f(t,o+h)!==f(e,h)){l=!1;break}if(l)return o}return-1}function g(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(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 a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(isNaN(s))return a;t[r+a]=s}return a}function m(t,e,r,n){return z(M(e,t.length-r),t,r,n)}function b(t,e,r,n){return z(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function w(t,e,r,n){return b(t,e,r,n)}function E(t,e,r,n){return z(q(e),t,r,n)}function k(t,e,r,n){return z(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function x(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,f=t[i],c=null,l=f>239?4:f>223?3:f>191?2:1;if(i+l<=r)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(t){var e=t.length;if(e<=B)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=B));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){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}}(),e.kMaxLength=a(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return f(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return c(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return l(null,t)},u.allocUnsafeSlow=function(t){return l(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.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);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var a=t[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)v(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)v(this,e,e+3),v(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)v(this,e,e+7),v(this,e+1,e+6),v(this,e+2,e+5),v(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?x(this,0,t):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))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 S(this,e,r);case"latin1":case"binary":return A(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.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(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),f=this.slice(n,i),c=t.slice(e,r),l=0;l<s;++l)if(f[l]!==c[l]){o=f[l],a=c[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=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 g(this,t,e,r);case"utf8":case"utf-8":return m(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var B=4096;function S(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function j(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=N(t[o]);return i}function I(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function O(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function R(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function P(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}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 L(t,e,r,n,o){return o||U(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,o){return o||U(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||O(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||O(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||O(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||O(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||O(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||O(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||O(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||O(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},u.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<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=u.isBuffer(t)?t:M(new u(t,n).toString()),s=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%s]}return this};var D=/[^+\/0-9A-Za-z-_]/g;function N(t){return t<16?"0"+t.toString(16):t.toString(16)}function M(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+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=65536+(i-55296<<10|r-56320)}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){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(e,function(){return this}())},function(t,e){"use strict";e.byteLength=function(t){return 3*t.length/4-u(t)},e.toByteArray=function(t){var e,r,o,a,s,f,c=t.length;s=u(t),f=new i(3*c/4-s),o=s>0?c-4:c;var l=0;for(e=0,r=0;e<o;e+=4,r+=3)a=n[t.charCodeAt(e)]<<18|n[t.charCodeAt(e+1)]<<12|n[t.charCodeAt(e+2)]<<6|n[t.charCodeAt(e+3)],f[l++]=a>>16&255,f[l++]=a>>8&255,f[l++]=255&a;2===s?(a=n[t.charCodeAt(e)]<<2|n[t.charCodeAt(e+1)]>>4,f[l++]=255&a):1===s&&(a=n[t.charCodeAt(e)]<<10|n[t.charCodeAt(e+1)]<<4|n[t.charCodeAt(e+2)]>>2,f[l++]=a>>8&255,f[l++]=255&a);return f},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o="",a=[],s=0,u=n-i;s<u;s+=16383)a.push(c(t,s,s+16383>u?u:s+16383));1===i?(e=t[n-1],o+=r[e>>2],o+=r[e<<4&63],o+="=="):2===i&&(e=(t[n-2]<<8)+t[n-1],o+=r[e>>10],o+=r[e>>4&63],o+=r[e<<2&63],o+="=");return a.push(o),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function c(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(f(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,c=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+l],l+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=f}return(p?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,f=8*o-i-1,c=(1<<f)-1,l=c>>1,h=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?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=c?(s=0,a=c):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;t[r+p]=255&a,p+=d,a/=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";
|
|
9
9
|
/*!
|
|
10
10
|
* The buffer module from node.js, for the browser.
|
|
11
11
|
*
|
|
12
12
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
13
13
|
* @license MIT
|
|
14
|
-
*/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<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=r(182),s=Object.prototype.hasOwnProperty,a=Array.prototype.slice,u="foo"===function(){}.name;function f(t){return Object.prototype.toString.call(t)}function c(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var l=t.exports=y,h=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString().match(h);return e&&e[1]}}function d(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function v(t){if(u||!o.isFunction(t))return o.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function _(t,e,r,n,i){throw new l.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function y(t,e){t||_(t,!0,e,"==",l.ok)}function g(t,e,r,s){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(c(t)&&c(e)&&f(t)===f(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var u=(s=s||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===s.expected.indexOf(e)||(s.actual.push(t),s.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=m(t),s=m(e);if(i&&!s||!i&&s)return!1;if(i)return t=a.call(t),e=a.call(e),g(t,e,r);var u,f,c=E(t),l=E(e);if(c.length!==l.length)return!1;for(c.sort(),l.sort(),f=c.length-1;f>=0;f--)if(c[f]!==l[f])return!1;for(f=c.length-1;f>=0;f--)if(u=c[f],!g(t[u],e[u],r,n))return!1;return!0}(t,e,r,s))}return r?t===e:t==e}function m(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function b(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)&&!0===e.call({},t)}function w(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=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&_(i,r,"Missing expected exception"+n);var s="string"==typeof n,a=!t&&i&&!r;if((!t&&o.isError(i)&&s&&b(i,r)||a)&&_(i,r,"Got unwanted exception"+n),t&&i&&r&&!b(i,r)||!t&&i)throw i}l.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=function(t){return d(v(t.actual),128)+" "+t.operator+" "+d(v(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||_;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},o.inherits(l.AssertionError,Error),l.fail=_,l.ok=y,l.equal=function(t,e,r){t!=e&&_(t,e,r,"==",l.equal)},l.notEqual=function(t,e,r){t==e&&_(t,e,r,"!=",l.notEqual)},l.deepEqual=function(t,e,r){g(t,e,!1)||_(t,e,r,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(t,e,r){g(t,e,!0)||_(t,e,r,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(t,e,r){g(t,e,!1)&&_(t,e,r,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function t(e,r,n){g(e,r,!0)&&_(e,r,n,"notDeepStrictEqual",t)},l.strictEqual=function(t,e,r){t!==e&&_(t,e,r,"===",l.strictEqual)},l.notStrictEqual=function(t,e,r){t===e&&_(t,e,r,"!==",l.notStrictEqual)},l.throws=function(t,e,r){w(!0,t,e,r)},l.doesNotThrow=function(t,e,r){w(!1,t,e,r)},l.ifError=function(t){if(t)throw t};var E=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(e,function(){return this}())},function(t,e,r){(function(t,n){var i=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,function(t){if("%%"===t)return"%";if(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}}),u=n[r];r<o;u=n[++r])v(u)||!b(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(r,i){if(g(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(!0===n.noDeprecation)return r;var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),o=!0}return r.apply(this,arguments)}};var o,s={};function a(t,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),c(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function f(t,e){return t}function c(t,r,n){if(t.customInspect&&r&&k(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(_(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(v(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return l(r);if(0===s.length){if(k(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(m(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var f,b="",T=!1,B=["{","}"];(p(r)&&(T=!0,B=["[","]"]),k(r))&&(b=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(b=" "+RegExp.prototype.toString.call(r)),w(r)&&(b=" "+Date.prototype.toUTCString.call(r)),E(r)&&(b=" "+l(r)),0!==s.length||T&&0!=r.length?n<0?m(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),f=T?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)x(e,String(s))?o.push(h(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(t,e,r,n,i,!0))}),o}(t,r,n,a,s):s.map(function(e){return h(t,r,n,a,e,T)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(f,b,B)):B[0]+b+B[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),x(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=v(r)?c(t,u.value,null):c(t,u.value,r-1)).indexOf("\n")>-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")),g(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function v(t){return null===t}function _(t){return"number"==typeof t}function y(t){return"string"==typeof t}function g(t){return void 0===t}function m(t){return b(t)&&"[object RegExp]"===T(t)}function b(t){return"object"==typeof t&&null!==t}function w(t){return b(t)&&"[object Date]"===T(t)}function E(t){return b(t)&&("[object Error]"===T(t)||t instanceof Error)}function k(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function B(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(g(o)&&(o=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=_,e.isString=y,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=m,e.isObject=b,e.isDate=w,e.isError=E,e.isFunction=k,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(183);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",function(){var t=new Date,e=[B(t.getHours()),B(t.getMinutes()),B(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=r(184),e._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(5))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";var n=o(r(186)),i=o(r(223));function o(t){return t&&t.__esModule?t:{default:t}}t.exports={sha1:function(t,e){return(0,n.default)("sha1").update(t).digest(e)},sha256:function(t,e){return(0,n.default)("sha256").update(t).digest(e)},sha512:function(t,e){return(0,n.default)("sha512").update(t).digest(e)},HmacSHA256:function(t,e){return(0,i.default)("sha256",e).update(t).digest()},ripemd160:function(t){return(0,n.default)("rmd160").update(t).digest()}}},function(t,e,r){(function(e){"use strict";var n=r(187),i=r(188),o=r(190),s=r(214),a=r(222);function u(t){a.call(this,"digest"),this._hash=t,this.buffers=[]}function f(t){a.call(this,"digest"),this._hash=t}n(u,a),u.prototype._update=function(t){this.buffers.push(t)},u.prototype._final=function(){var t=e.concat(this.buffers),r=this._hash(t);return this.buffers=null,r},n(f,a),f.prototype._update=function(t){this._hash.update(t)},f.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new u(i):new f("rmd160"===t||"ripemd160"===t?new o:s(t))}}).call(e,r(177).Buffer)},184,function(t,e,r){"use strict";var n=r(189);function i(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,l=0;l<t.length;l+=16){var h=r,p=n,d=i,v=o;n=f(n=f(n=f(n=f(n=u(n=u(n=u(n=u(n=a(n=a(n=a(n=a(n=s(n=s(n=s(n=s(n,i=s(i,o=s(o,r=s(r,n,i,o,t[l+0],7,-680876936),n,i,t[l+1],12,-389564586),r,n,t[l+2],17,606105819),o,r,t[l+3],22,-1044525330),i=s(i,o=s(o,r=s(r,n,i,o,t[l+4],7,-176418897),n,i,t[l+5],12,1200080426),r,n,t[l+6],17,-1473231341),o,r,t[l+7],22,-45705983),i=s(i,o=s(o,r=s(r,n,i,o,t[l+8],7,1770035416),n,i,t[l+9],12,-1958414417),r,n,t[l+10],17,-42063),o,r,t[l+11],22,-1990404162),i=s(i,o=s(o,r=s(r,n,i,o,t[l+12],7,1804603682),n,i,t[l+13],12,-40341101),r,n,t[l+14],17,-1502002290),o,r,t[l+15],22,1236535329),i=a(i,o=a(o,r=a(r,n,i,o,t[l+1],5,-165796510),n,i,t[l+6],9,-1069501632),r,n,t[l+11],14,643717713),o,r,t[l+0],20,-373897302),i=a(i,o=a(o,r=a(r,n,i,o,t[l+5],5,-701558691),n,i,t[l+10],9,38016083),r,n,t[l+15],14,-660478335),o,r,t[l+4],20,-405537848),i=a(i,o=a(o,r=a(r,n,i,o,t[l+9],5,568446438),n,i,t[l+14],9,-1019803690),r,n,t[l+3],14,-187363961),o,r,t[l+8],20,1163531501),i=a(i,o=a(o,r=a(r,n,i,o,t[l+13],5,-1444681467),n,i,t[l+2],9,-51403784),r,n,t[l+7],14,1735328473),o,r,t[l+12],20,-1926607734),i=u(i,o=u(o,r=u(r,n,i,o,t[l+5],4,-378558),n,i,t[l+8],11,-2022574463),r,n,t[l+11],16,1839030562),o,r,t[l+14],23,-35309556),i=u(i,o=u(o,r=u(r,n,i,o,t[l+1],4,-1530992060),n,i,t[l+4],11,1272893353),r,n,t[l+7],16,-155497632),o,r,t[l+10],23,-1094730640),i=u(i,o=u(o,r=u(r,n,i,o,t[l+13],4,681279174),n,i,t[l+0],11,-358537222),r,n,t[l+3],16,-722521979),o,r,t[l+6],23,76029189),i=u(i,o=u(o,r=u(r,n,i,o,t[l+9],4,-640364487),n,i,t[l+12],11,-421815835),r,n,t[l+15],16,530742520),o,r,t[l+2],23,-995338651),i=f(i,o=f(o,r=f(r,n,i,o,t[l+0],6,-198630844),n,i,t[l+7],10,1126891415),r,n,t[l+14],15,-1416354905),o,r,t[l+5],21,-57434055),i=f(i,o=f(o,r=f(r,n,i,o,t[l+12],6,1700485571),n,i,t[l+3],10,-1894986606),r,n,t[l+10],15,-1051523),o,r,t[l+1],21,-2054922799),i=f(i,o=f(o,r=f(r,n,i,o,t[l+8],6,1873313359),n,i,t[l+15],10,-30611744),r,n,t[l+6],15,-1560198380),o,r,t[l+13],21,1309151649),i=f(i,o=f(o,r=f(r,n,i,o,t[l+4],6,-145523070),n,i,t[l+11],10,-1120210379),r,n,t[l+2],15,718787259),o,r,t[l+9],21,-343485551),r=c(r,h),n=c(n,p),i=c(i,d),o=c(o,v)}return[r,n,i,o]}function o(t,e,r,n,i,o){return c(function(t,e){return t<<e|t>>>32-e}(c(c(e,t),c(n,o)),i),r)}function s(t,e,r,n,i,s,a){return o(e&r|~e&n,t,e,i,s,a)}function a(t,e,r,n,i,s,a){return o(e&n|r&~n,t,e,i,s,a)}function u(t,e,r,n,i,s,a){return o(e^r^n,t,e,i,s,a)}function f(t,e,r,n,i,s,a){return o(r^(e|~n),t,e,i,s,a)}function c(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}t.exports=function(t){return n(t,i)}},function(t,e,r){(function(e){"use strict";var r=4,n=new e(r);n.fill(0);t.exports=function(t,i){var o=i(function(t){if(t.length%r!=0){var i=t.length+(r-t.length%r);t=e.concat([t,n],i)}for(var o=new Array(t.length>>>2),s=0,a=0;s<t.length;s+=r,a++)o[a]=t.readInt32LE(s);return o}(t),8*t.length);t=new e(16);for(var s=0;s<o.length;s++)t.writeInt32LE(o[s],s<<2,!0);return t}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(187),i=r(191);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function s(t,e){return t<<e|t>>>32-e}function a(t,e,r,n,i,o,a,u){return s(t+(e^r^n)+o+a|0,u)+i|0}function u(t,e,r,n,i,o,a,u){return s(t+(e&r|~e&n)+o+a|0,u)+i|0}function f(t,e,r,n,i,o,a,u){return s(t+((e|~r)^n)+o+a|0,u)+i|0}function c(t,e,r,n,i,o,a,u){return s(t+(e&n|r&~n)+o+a|0,u)+i|0}function l(t,e,r,n,i,o,a,u){return s(t+(e^(r|~n))+o+a|0,u)+i|0}n(o,i),o.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,i=this._c,o=this._d,h=this._e;h=a(h,r=a(r,n,i,o,h,t[0],0,11),n,i=s(i,10),o,t[1],0,14),n=a(n=s(n,10),i=a(i,o=a(o,h,r,n,i,t[2],0,15),h,r=s(r,10),n,t[3],0,12),o,h=s(h,10),r,t[4],0,5),o=a(o=s(o,10),h=a(h,r=a(r,n,i,o,h,t[5],0,8),n,i=s(i,10),o,t[6],0,7),r,n=s(n,10),i,t[7],0,9),r=a(r=s(r,10),n=a(n,i=a(i,o,h,r,n,t[8],0,11),o,h=s(h,10),r,t[9],0,13),i,o=s(o,10),h,t[10],0,14),i=a(i=s(i,10),o=a(o,h=a(h,r,n,i,o,t[11],0,15),r,n=s(n,10),i,t[12],0,6),h,r=s(r,10),n,t[13],0,7),h=u(h=s(h,10),r=a(r,n=a(n,i,o,h,r,t[14],0,9),i,o=s(o,10),h,t[15],0,8),n,i=s(i,10),o,t[7],1518500249,7),n=u(n=s(n,10),i=u(i,o=u(o,h,r,n,i,t[4],1518500249,6),h,r=s(r,10),n,t[13],1518500249,8),o,h=s(h,10),r,t[1],1518500249,13),o=u(o=s(o,10),h=u(h,r=u(r,n,i,o,h,t[10],1518500249,11),n,i=s(i,10),o,t[6],1518500249,9),r,n=s(n,10),i,t[15],1518500249,7),r=u(r=s(r,10),n=u(n,i=u(i,o,h,r,n,t[3],1518500249,15),o,h=s(h,10),r,t[12],1518500249,7),i,o=s(o,10),h,t[0],1518500249,12),i=u(i=s(i,10),o=u(o,h=u(h,r,n,i,o,t[9],1518500249,15),r,n=s(n,10),i,t[5],1518500249,9),h,r=s(r,10),n,t[2],1518500249,11),h=u(h=s(h,10),r=u(r,n=u(n,i,o,h,r,t[14],1518500249,7),i,o=s(o,10),h,t[11],1518500249,13),n,i=s(i,10),o,t[8],1518500249,12),n=f(n=s(n,10),i=f(i,o=f(o,h,r,n,i,t[3],1859775393,11),h,r=s(r,10),n,t[10],1859775393,13),o,h=s(h,10),r,t[14],1859775393,6),o=f(o=s(o,10),h=f(h,r=f(r,n,i,o,h,t[4],1859775393,7),n,i=s(i,10),o,t[9],1859775393,14),r,n=s(n,10),i,t[15],1859775393,9),r=f(r=s(r,10),n=f(n,i=f(i,o,h,r,n,t[8],1859775393,13),o,h=s(h,10),r,t[1],1859775393,15),i,o=s(o,10),h,t[2],1859775393,14),i=f(i=s(i,10),o=f(o,h=f(h,r,n,i,o,t[7],1859775393,8),r,n=s(n,10),i,t[0],1859775393,13),h,r=s(r,10),n,t[6],1859775393,6),h=f(h=s(h,10),r=f(r,n=f(n,i,o,h,r,t[13],1859775393,5),i,o=s(o,10),h,t[11],1859775393,12),n,i=s(i,10),o,t[5],1859775393,7),n=c(n=s(n,10),i=c(i,o=f(o,h,r,n,i,t[12],1859775393,5),h,r=s(r,10),n,t[1],2400959708,11),o,h=s(h,10),r,t[9],2400959708,12),o=c(o=s(o,10),h=c(h,r=c(r,n,i,o,h,t[11],2400959708,14),n,i=s(i,10),o,t[10],2400959708,15),r,n=s(n,10),i,t[0],2400959708,14),r=c(r=s(r,10),n=c(n,i=c(i,o,h,r,n,t[8],2400959708,15),o,h=s(h,10),r,t[12],2400959708,9),i,o=s(o,10),h,t[4],2400959708,8),i=c(i=s(i,10),o=c(o,h=c(h,r,n,i,o,t[13],2400959708,9),r,n=s(n,10),i,t[3],2400959708,14),h,r=s(r,10),n,t[7],2400959708,5),h=c(h=s(h,10),r=c(r,n=c(n,i,o,h,r,t[15],2400959708,6),i,o=s(o,10),h,t[14],2400959708,8),n,i=s(i,10),o,t[5],2400959708,6),n=l(n=s(n,10),i=c(i,o=c(o,h,r,n,i,t[6],2400959708,5),h,r=s(r,10),n,t[2],2400959708,12),o,h=s(h,10),r,t[4],2840853838,9),o=l(o=s(o,10),h=l(h,r=l(r,n,i,o,h,t[0],2840853838,15),n,i=s(i,10),o,t[5],2840853838,5),r,n=s(n,10),i,t[9],2840853838,11),r=l(r=s(r,10),n=l(n,i=l(i,o,h,r,n,t[7],2840853838,6),o,h=s(h,10),r,t[12],2840853838,8),i,o=s(o,10),h,t[2],2840853838,13),i=l(i=s(i,10),o=l(o,h=l(h,r,n,i,o,t[10],2840853838,12),r,n=s(n,10),i,t[14],2840853838,5),h,r=s(r,10),n,t[1],2840853838,12),h=l(h=s(h,10),r=l(r,n=l(n,i,o,h,r,t[3],2840853838,13),i,o=s(o,10),h,t[8],2840853838,14),n,i=s(i,10),o,t[11],2840853838,11),n=l(n=s(n,10),i=l(i,o=l(o,h,r,n,i,t[6],2840853838,8),h,r=s(r,10),n,t[15],2840853838,5),o,h=s(h,10),r,t[13],2840853838,6),o=s(o,10);var p=this._a,d=this._b,v=this._c,_=this._d,y=this._e;y=l(y,p=l(p,d,v,_,y,t[5],1352829926,8),d,v=s(v,10),_,t[14],1352829926,9),d=l(d=s(d,10),v=l(v,_=l(_,y,p,d,v,t[7],1352829926,9),y,p=s(p,10),d,t[0],1352829926,11),_,y=s(y,10),p,t[9],1352829926,13),_=l(_=s(_,10),y=l(y,p=l(p,d,v,_,y,t[2],1352829926,15),d,v=s(v,10),_,t[11],1352829926,15),p,d=s(d,10),v,t[4],1352829926,5),p=l(p=s(p,10),d=l(d,v=l(v,_,y,p,d,t[13],1352829926,7),_,y=s(y,10),p,t[6],1352829926,7),v,_=s(_,10),y,t[15],1352829926,8),v=l(v=s(v,10),_=l(_,y=l(y,p,d,v,_,t[8],1352829926,11),p,d=s(d,10),v,t[1],1352829926,14),y,p=s(p,10),d,t[10],1352829926,14),y=c(y=s(y,10),p=l(p,d=l(d,v,_,y,p,t[3],1352829926,12),v,_=s(_,10),y,t[12],1352829926,6),d,v=s(v,10),_,t[6],1548603684,9),d=c(d=s(d,10),v=c(v,_=c(_,y,p,d,v,t[11],1548603684,13),y,p=s(p,10),d,t[3],1548603684,15),_,y=s(y,10),p,t[7],1548603684,7),_=c(_=s(_,10),y=c(y,p=c(p,d,v,_,y,t[0],1548603684,12),d,v=s(v,10),_,t[13],1548603684,8),p,d=s(d,10),v,t[5],1548603684,9),p=c(p=s(p,10),d=c(d,v=c(v,_,y,p,d,t[10],1548603684,11),_,y=s(y,10),p,t[14],1548603684,7),v,_=s(_,10),y,t[15],1548603684,7),v=c(v=s(v,10),_=c(_,y=c(y,p,d,v,_,t[8],1548603684,12),p,d=s(d,10),v,t[12],1548603684,7),y,p=s(p,10),d,t[4],1548603684,6),y=c(y=s(y,10),p=c(p,d=c(d,v,_,y,p,t[9],1548603684,15),v,_=s(_,10),y,t[1],1548603684,13),d,v=s(v,10),_,t[2],1548603684,11),d=f(d=s(d,10),v=f(v,_=f(_,y,p,d,v,t[15],1836072691,9),y,p=s(p,10),d,t[5],1836072691,7),_,y=s(y,10),p,t[1],1836072691,15),_=f(_=s(_,10),y=f(y,p=f(p,d,v,_,y,t[3],1836072691,11),d,v=s(v,10),_,t[7],1836072691,8),p,d=s(d,10),v,t[14],1836072691,6),p=f(p=s(p,10),d=f(d,v=f(v,_,y,p,d,t[6],1836072691,6),_,y=s(y,10),p,t[9],1836072691,14),v,_=s(_,10),y,t[11],1836072691,12),v=f(v=s(v,10),_=f(_,y=f(y,p,d,v,_,t[8],1836072691,13),p,d=s(d,10),v,t[12],1836072691,5),y,p=s(p,10),d,t[2],1836072691,14),y=f(y=s(y,10),p=f(p,d=f(d,v,_,y,p,t[10],1836072691,13),v,_=s(_,10),y,t[0],1836072691,13),d,v=s(v,10),_,t[4],1836072691,7),d=u(d=s(d,10),v=u(v,_=f(_,y,p,d,v,t[13],1836072691,5),y,p=s(p,10),d,t[8],2053994217,15),_,y=s(y,10),p,t[6],2053994217,5),_=u(_=s(_,10),y=u(y,p=u(p,d,v,_,y,t[4],2053994217,8),d,v=s(v,10),_,t[1],2053994217,11),p,d=s(d,10),v,t[3],2053994217,14),p=u(p=s(p,10),d=u(d,v=u(v,_,y,p,d,t[11],2053994217,14),_,y=s(y,10),p,t[15],2053994217,6),v,_=s(_,10),y,t[0],2053994217,14),v=u(v=s(v,10),_=u(_,y=u(y,p,d,v,_,t[5],2053994217,6),p,d=s(d,10),v,t[12],2053994217,9),y,p=s(p,10),d,t[2],2053994217,12),y=u(y=s(y,10),p=u(p,d=u(d,v,_,y,p,t[13],2053994217,9),v,_=s(_,10),y,t[9],2053994217,12),d,v=s(v,10),_,t[7],2053994217,5),d=a(d=s(d,10),v=u(v,_=u(_,y,p,d,v,t[10],2053994217,15),y,p=s(p,10),d,t[14],2053994217,8),_,y=s(y,10),p,t[12],0,8),_=a(_=s(_,10),y=a(y,p=a(p,d,v,_,y,t[15],0,5),d,v=s(v,10),_,t[10],0,12),p,d=s(d,10),v,t[4],0,9),p=a(p=s(p,10),d=a(d,v=a(v,_,y,p,d,t[1],0,12),_,y=s(y,10),p,t[5],0,5),v,_=s(_,10),y,t[8],0,14),v=a(v=s(v,10),_=a(_,y=a(y,p,d,v,_,t[7],0,6),p,d=s(d,10),v,t[6],0,8),y,p=s(p,10),d,t[2],0,13),y=a(y=s(y,10),p=a(p,d=a(d,v,_,y,p,t[13],0,6),v,_=s(_,10),y,t[14],0,5),d,v=s(v,10),_,t[0],0,15),d=a(d=s(d,10),v=a(v,_=a(_,y,p,d,v,t[3],0,13),y,p=s(p,10),d,t[9],0,11),_,y=s(y,10),p,t[11],0,11),_=s(_,10);var g=this._b+i+_|0;this._b=this._c+o+y|0,this._c=this._d+h+p|0,this._d=this._e+r+d|0,this._e=this._a+n+v|0,this._a=g},o.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=o}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(192).Transform;function i(t){n.call(this),this._block=new e(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(187)(i,n),i.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)},i.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},i.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;o<this._blockSize;)n[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},i.prototype._update=function(t){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();return void 0!==t&&(e=e.toString(t)),e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i}).call(e,r(177).Buffer)},function(t,e,r){t.exports=i;var n=r(2).EventEmitter;function i(){n.call(this)}r(187)(i,n),i.Readable=r(193),i.Writable=r(210),i.Duplex=r(211),i.Transform=r(212),i.PassThrough=r(213),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",f),t.on("error",f),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},function(t,e,r){(e=t.exports=r(194)).Stream=e,e.Readable=e,e.Writable=r(205),e.Duplex=r(204),e.Transform=r(208),e.PassThrough=r(209)},function(t,e,r){(function(e,n){"use strict";var i=r(195);t.exports=m;var o,s=r(180);m.ReadableState=g;r(2).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(196),f=r(197).Buffer,c=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l=Object.create(r(199));l.inherits=r(187);var h=r(200),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,v=r(201),_=r(203);l.inherits(m,u);var y=["error","close","destroy","pause","resume"];function g(t,e){t=t||{};var n=e instanceof(o=o||r(204));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,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&&(d||(d=r(207).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function m(t){if(o=o||r(204),!(this instanceof m))return new m(t);this._readableState=new g(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function b(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;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,T(t)}(t,s)):(i||(o=function(t,e){var r;(function(t){return f.isBuffer(t)||t instanceof c})(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===f.prototype||(e=function(t){return f.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(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?w(t,s,e,!1):S(t,s)):w(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function w(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&&T(t)),S(t,e)}Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),m.prototype.destroy=_.destroy,m.prototype._undestroy=_.undestroy,m.prototype._destroy=function(t,e){this.push(null),e(t)},m.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=f.from(t,e),e=""),r=!0),b(this,t,e,!1,r)},m.prototype.unshift=function(t){return b(this,t,null,!0,!1)},m.prototype.isPaused=function(){return!1===this._readableState.flowing},m.prototype.setEncoding=function(t){return d||(d=r(207).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};var E=8388608;function k(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=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(B,t):B(t))}function B(t){p("emit readable"),t.emit("readable"),I(t)}function S(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(x,t,e))}function x(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function A(t){p("readable nexttick read 0"),t.read(0)}function j(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),I(t),e.flowing&&!e.reading&&t.read(0)}function I(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function O(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=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=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){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}(t,e):function(t,e){var r=f.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){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}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function C(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function P(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}m.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):T(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&C(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=k(r,e))),null===(n=t>0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&C(this)),null!==n&&this.emit("data",n),n},m.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:m;function f(e,n){p("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),t.removeListener("close",y),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",_),t.removeListener("unpipe",f),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",v),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function c(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",f);var l=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,I(t))}}(r);t.on("drain",l);var h=!1;var d=!1;function v(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==P(o.pipes,t))&&!h&&(p("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),r.pause())}function _(e){p("onerror",e),m(),t.removeListener("error",_),0===a(t,"error")&&t.emit("error",e)}function y(){t.removeListener("finish",g),m()}function g(){p("onfinish"),t.removeListener("close",y),m()}function m(){p("unpipe"),r.unpipe(t)}return r.on("data",v),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",_),t.once("close",y),t.once("finish",g),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},m.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;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=P(e.pipes,t);return-1===s?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},m.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&T(this):i.nextTick(A,this))}return r},m.prototype.addListener=m.prototype.on,m.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(j,t,e))}(this,t)),this},m.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},m.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(p("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<y.length;o++)t.on(y[o],this.emit.bind(this,y[o]));return this._read=function(e){p("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),m._fromList=O}).call(e,function(){return this}(),r(5))},function(t,e,r){(function(e){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(e,r(5))},function(t,e,r){t.exports=r(2).EventEmitter},function(t,e,r){var n=r(198),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){(function(t){
|
|
14
|
+
*/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<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=r(182),a=Object.prototype.hasOwnProperty,s=Array.prototype.slice,u="foo"===function(){}.name;function f(t){return Object.prototype.toString.call(t)}function c(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var l=t.exports=y,h=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString().match(h);return e&&e[1]}}function d(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function v(t){if(u||!o.isFunction(t))return o.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function _(t,e,r,n,i){throw new l.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function y(t,e){t||_(t,!0,e,"==",l.ok)}function g(t,e,r,a){if(t===e)return!0;if(i(t)&&i(e))return 0===n(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(c(t)&&c(e)&&f(t)===f(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===n(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var u=(a=a||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===a.expected.indexOf(e)||(a.actual.push(t),a.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=m(t),a=m(e);if(i&&!a||!i&&a)return!1;if(i)return t=s.call(t),e=s.call(e),g(t,e,r);var u,f,c=E(t),l=E(e);if(c.length!==l.length)return!1;for(c.sort(),l.sort(),f=c.length-1;f>=0;f--)if(c[f]!==l[f])return!1;for(f=c.length-1;f>=0;f--)if(u=c[f],!g(t[u],e[u],r,n))return!1;return!0}(t,e,r,a))}return r?t===e:t==e}function m(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function b(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)&&!0===e.call({},t)}function w(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=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&_(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!t&&i&&!r;if((!t&&o.isError(i)&&a&&b(i,r)||s)&&_(i,r,"Got unwanted exception"+n),t&&i&&r&&!b(i,r)||!t&&i)throw i}l.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=function(t){return d(v(t.actual),128)+" "+t.operator+" "+d(v(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||_;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},o.inherits(l.AssertionError,Error),l.fail=_,l.ok=y,l.equal=function(t,e,r){t!=e&&_(t,e,r,"==",l.equal)},l.notEqual=function(t,e,r){t==e&&_(t,e,r,"!=",l.notEqual)},l.deepEqual=function(t,e,r){g(t,e,!1)||_(t,e,r,"deepEqual",l.deepEqual)},l.deepStrictEqual=function(t,e,r){g(t,e,!0)||_(t,e,r,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=function(t,e,r){g(t,e,!1)&&_(t,e,r,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=function t(e,r,n){g(e,r,!0)&&_(e,r,n,"notDeepStrictEqual",t)},l.strictEqual=function(t,e,r){t!==e&&_(t,e,r,"===",l.strictEqual)},l.notStrictEqual=function(t,e,r){t===e&&_(t,e,r,"!==",l.notStrictEqual)},l.throws=function(t,e,r){w(!0,t,e,r)},l.doesNotThrow=function(t,e,r){w(!1,t,e,r)},l.ifError=function(t){if(t)throw t};var E=Object.keys||function(t){var e=[];for(var r in t)a.call(t,r)&&e.push(r);return e}}).call(e,function(){return this}())},function(t,e,r){(function(t,n){var i=/%[sdj%]/g;e.format=function(t){if(!y(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(s(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,a=String(t).replace(i,function(t){if("%%"===t)return"%";if(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}}),u=n[r];r<o;u=n[++r])v(u)||!b(u)?a+=" "+u:a+=" "+s(u);return a},e.deprecate=function(r,i){if(g(t.process))return function(){return e.deprecate(r,i).apply(this,arguments)};if(!0===n.noDeprecation)return r;var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),o=!0}return r.apply(this,arguments)}};var o,a={};function s(t,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(r)?n.showHidden=r:r&&e._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),c(n,t,n.depth)}function u(t,e){var r=s.styles[e];return r?"["+s.colors[r][0]+"m"+t+"["+s.colors[r][1]+"m":t}function f(t,e){return t}function c(t,r,n){if(t.customInspect&&r&&k(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return y(i)||(i=c(t,i,n)),i}var o=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(y(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(_(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(v(e))return t.stylize("null","null")}(t,r);if(o)return o;var a=Object.keys(r),s=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),E(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(k(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(m(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var f,b="",T=!1,x=["{","}"];(p(r)&&(T=!0,x=["[","]"]),k(r))&&(b=" [Function"+(r.name?": "+r.name:"")+"]");return m(r)&&(b=" "+RegExp.prototype.toString.call(r)),w(r)&&(b=" "+Date.prototype.toUTCString.call(r)),E(r)&&(b=" "+l(r)),0!==a.length||T&&0!=r.length?n<0?m(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),f=T?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a<s;++a)S(e,String(a))?o.push(h(t,e,r,n,String(a),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(h(t,e,r,n,i,!0))}),o}(t,r,n,s,a):a.map(function(e){return h(t,r,n,s,e,T)}),t.seen.pop(),function(t,e,r){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(f,b,x)):x[0]+b+x[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),S(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=v(r)?c(t,u.value,null):c(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),g(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function v(t){return null===t}function _(t){return"number"==typeof t}function y(t){return"string"==typeof t}function g(t){return void 0===t}function m(t){return b(t)&&"[object RegExp]"===T(t)}function b(t){return"object"==typeof t&&null!==t}function w(t){return b(t)&&"[object Date]"===T(t)}function E(t){return b(t)&&("[object Error]"===T(t)||t instanceof Error)}function k(t){return"function"==typeof t}function T(t){return Object.prototype.toString.call(t)}function x(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(g(o)&&(o=n.env.NODE_DEBUG||""),t=t.toUpperCase(),!a[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var r=n.pid;a[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else a[t]=function(){};return a[t]},e.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=p,e.isBoolean=d,e.isNull=v,e.isNullOrUndefined=function(t){return null==t},e.isNumber=_,e.isString=y,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=g,e.isRegExp=m,e.isObject=b,e.isDate=w,e.isError=E,e.isFunction=k,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(183);var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",function(){var t=new Date,e=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(":");return[t.getDate(),B[t.getMonth()],e].join(" ")}(),e.format.apply(e,arguments))},e.inherits=r(184),e._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(e,function(){return this}(),r(5))},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";var n=o(r(186)),i=o(r(223));function o(t){return t&&t.__esModule?t:{default:t}}t.exports={sha1:function(t,e){return(0,n.default)("sha1").update(t).digest(e)},sha256:function(t,e){return(0,n.default)("sha256").update(t).digest(e)},sha512:function(t,e){return(0,n.default)("sha512").update(t).digest(e)},HmacSHA256:function(t,e){return(0,i.default)("sha256",e).update(t).digest()},ripemd160:function(t){return(0,n.default)("rmd160").update(t).digest()}}},function(t,e,r){(function(e){"use strict";var n=r(187),i=r(188),o=r(190),a=r(214),s=r(222);function u(t){s.call(this,"digest"),this._hash=t,this.buffers=[]}function f(t){s.call(this,"digest"),this._hash=t}n(u,s),u.prototype._update=function(t){this.buffers.push(t)},u.prototype._final=function(){var t=e.concat(this.buffers),r=this._hash(t);return this.buffers=null,r},n(f,s),f.prototype._update=function(t){this._hash.update(t)},f.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new u(i):new f("rmd160"===t||"ripemd160"===t?new o:a(t))}}).call(e,r(177).Buffer)},184,function(t,e,r){"use strict";var n=r(189);function i(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;for(var r=1732584193,n=-271733879,i=-1732584194,o=271733878,l=0;l<t.length;l+=16){var h=r,p=n,d=i,v=o;n=f(n=f(n=f(n=f(n=u(n=u(n=u(n=u(n=s(n=s(n=s(n=s(n=a(n=a(n=a(n=a(n,i=a(i,o=a(o,r=a(r,n,i,o,t[l+0],7,-680876936),n,i,t[l+1],12,-389564586),r,n,t[l+2],17,606105819),o,r,t[l+3],22,-1044525330),i=a(i,o=a(o,r=a(r,n,i,o,t[l+4],7,-176418897),n,i,t[l+5],12,1200080426),r,n,t[l+6],17,-1473231341),o,r,t[l+7],22,-45705983),i=a(i,o=a(o,r=a(r,n,i,o,t[l+8],7,1770035416),n,i,t[l+9],12,-1958414417),r,n,t[l+10],17,-42063),o,r,t[l+11],22,-1990404162),i=a(i,o=a(o,r=a(r,n,i,o,t[l+12],7,1804603682),n,i,t[l+13],12,-40341101),r,n,t[l+14],17,-1502002290),o,r,t[l+15],22,1236535329),i=s(i,o=s(o,r=s(r,n,i,o,t[l+1],5,-165796510),n,i,t[l+6],9,-1069501632),r,n,t[l+11],14,643717713),o,r,t[l+0],20,-373897302),i=s(i,o=s(o,r=s(r,n,i,o,t[l+5],5,-701558691),n,i,t[l+10],9,38016083),r,n,t[l+15],14,-660478335),o,r,t[l+4],20,-405537848),i=s(i,o=s(o,r=s(r,n,i,o,t[l+9],5,568446438),n,i,t[l+14],9,-1019803690),r,n,t[l+3],14,-187363961),o,r,t[l+8],20,1163531501),i=s(i,o=s(o,r=s(r,n,i,o,t[l+13],5,-1444681467),n,i,t[l+2],9,-51403784),r,n,t[l+7],14,1735328473),o,r,t[l+12],20,-1926607734),i=u(i,o=u(o,r=u(r,n,i,o,t[l+5],4,-378558),n,i,t[l+8],11,-2022574463),r,n,t[l+11],16,1839030562),o,r,t[l+14],23,-35309556),i=u(i,o=u(o,r=u(r,n,i,o,t[l+1],4,-1530992060),n,i,t[l+4],11,1272893353),r,n,t[l+7],16,-155497632),o,r,t[l+10],23,-1094730640),i=u(i,o=u(o,r=u(r,n,i,o,t[l+13],4,681279174),n,i,t[l+0],11,-358537222),r,n,t[l+3],16,-722521979),o,r,t[l+6],23,76029189),i=u(i,o=u(o,r=u(r,n,i,o,t[l+9],4,-640364487),n,i,t[l+12],11,-421815835),r,n,t[l+15],16,530742520),o,r,t[l+2],23,-995338651),i=f(i,o=f(o,r=f(r,n,i,o,t[l+0],6,-198630844),n,i,t[l+7],10,1126891415),r,n,t[l+14],15,-1416354905),o,r,t[l+5],21,-57434055),i=f(i,o=f(o,r=f(r,n,i,o,t[l+12],6,1700485571),n,i,t[l+3],10,-1894986606),r,n,t[l+10],15,-1051523),o,r,t[l+1],21,-2054922799),i=f(i,o=f(o,r=f(r,n,i,o,t[l+8],6,1873313359),n,i,t[l+15],10,-30611744),r,n,t[l+6],15,-1560198380),o,r,t[l+13],21,1309151649),i=f(i,o=f(o,r=f(r,n,i,o,t[l+4],6,-145523070),n,i,t[l+11],10,-1120210379),r,n,t[l+2],15,718787259),o,r,t[l+9],21,-343485551),r=c(r,h),n=c(n,p),i=c(i,d),o=c(o,v)}return[r,n,i,o]}function o(t,e,r,n,i,o){return c(function(t,e){return t<<e|t>>>32-e}(c(c(e,t),c(n,o)),i),r)}function a(t,e,r,n,i,a,s){return o(e&r|~e&n,t,e,i,a,s)}function s(t,e,r,n,i,a,s){return o(e&n|r&~n,t,e,i,a,s)}function u(t,e,r,n,i,a,s){return o(e^r^n,t,e,i,a,s)}function f(t,e,r,n,i,a,s){return o(r^(e|~n),t,e,i,a,s)}function c(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}t.exports=function(t){return n(t,i)}},function(t,e,r){(function(e){"use strict";var r=4,n=new e(r);n.fill(0);t.exports=function(t,i){var o=i(function(t){if(t.length%r!=0){var i=t.length+(r-t.length%r);t=e.concat([t,n],i)}for(var o=new Array(t.length>>>2),a=0,s=0;a<t.length;a+=r,s++)o[s]=t.readInt32LE(a);return o}(t),8*t.length);t=new e(16);for(var a=0;a<o.length;a++)t.writeInt32LE(o[a],a<<2,!0);return t}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(187),i=r(191);function o(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function a(t,e){return t<<e|t>>>32-e}function s(t,e,r,n,i,o,s,u){return a(t+(e^r^n)+o+s|0,u)+i|0}function u(t,e,r,n,i,o,s,u){return a(t+(e&r|~e&n)+o+s|0,u)+i|0}function f(t,e,r,n,i,o,s,u){return a(t+((e|~r)^n)+o+s|0,u)+i|0}function c(t,e,r,n,i,o,s,u){return a(t+(e&n|r&~n)+o+s|0,u)+i|0}function l(t,e,r,n,i,o,s,u){return a(t+(e^(r|~n))+o+s|0,u)+i|0}n(o,i),o.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,i=this._c,o=this._d,h=this._e;h=s(h,r=s(r,n,i,o,h,t[0],0,11),n,i=a(i,10),o,t[1],0,14),n=s(n=a(n,10),i=s(i,o=s(o,h,r,n,i,t[2],0,15),h,r=a(r,10),n,t[3],0,12),o,h=a(h,10),r,t[4],0,5),o=s(o=a(o,10),h=s(h,r=s(r,n,i,o,h,t[5],0,8),n,i=a(i,10),o,t[6],0,7),r,n=a(n,10),i,t[7],0,9),r=s(r=a(r,10),n=s(n,i=s(i,o,h,r,n,t[8],0,11),o,h=a(h,10),r,t[9],0,13),i,o=a(o,10),h,t[10],0,14),i=s(i=a(i,10),o=s(o,h=s(h,r,n,i,o,t[11],0,15),r,n=a(n,10),i,t[12],0,6),h,r=a(r,10),n,t[13],0,7),h=u(h=a(h,10),r=s(r,n=s(n,i,o,h,r,t[14],0,9),i,o=a(o,10),h,t[15],0,8),n,i=a(i,10),o,t[7],1518500249,7),n=u(n=a(n,10),i=u(i,o=u(o,h,r,n,i,t[4],1518500249,6),h,r=a(r,10),n,t[13],1518500249,8),o,h=a(h,10),r,t[1],1518500249,13),o=u(o=a(o,10),h=u(h,r=u(r,n,i,o,h,t[10],1518500249,11),n,i=a(i,10),o,t[6],1518500249,9),r,n=a(n,10),i,t[15],1518500249,7),r=u(r=a(r,10),n=u(n,i=u(i,o,h,r,n,t[3],1518500249,15),o,h=a(h,10),r,t[12],1518500249,7),i,o=a(o,10),h,t[0],1518500249,12),i=u(i=a(i,10),o=u(o,h=u(h,r,n,i,o,t[9],1518500249,15),r,n=a(n,10),i,t[5],1518500249,9),h,r=a(r,10),n,t[2],1518500249,11),h=u(h=a(h,10),r=u(r,n=u(n,i,o,h,r,t[14],1518500249,7),i,o=a(o,10),h,t[11],1518500249,13),n,i=a(i,10),o,t[8],1518500249,12),n=f(n=a(n,10),i=f(i,o=f(o,h,r,n,i,t[3],1859775393,11),h,r=a(r,10),n,t[10],1859775393,13),o,h=a(h,10),r,t[14],1859775393,6),o=f(o=a(o,10),h=f(h,r=f(r,n,i,o,h,t[4],1859775393,7),n,i=a(i,10),o,t[9],1859775393,14),r,n=a(n,10),i,t[15],1859775393,9),r=f(r=a(r,10),n=f(n,i=f(i,o,h,r,n,t[8],1859775393,13),o,h=a(h,10),r,t[1],1859775393,15),i,o=a(o,10),h,t[2],1859775393,14),i=f(i=a(i,10),o=f(o,h=f(h,r,n,i,o,t[7],1859775393,8),r,n=a(n,10),i,t[0],1859775393,13),h,r=a(r,10),n,t[6],1859775393,6),h=f(h=a(h,10),r=f(r,n=f(n,i,o,h,r,t[13],1859775393,5),i,o=a(o,10),h,t[11],1859775393,12),n,i=a(i,10),o,t[5],1859775393,7),n=c(n=a(n,10),i=c(i,o=f(o,h,r,n,i,t[12],1859775393,5),h,r=a(r,10),n,t[1],2400959708,11),o,h=a(h,10),r,t[9],2400959708,12),o=c(o=a(o,10),h=c(h,r=c(r,n,i,o,h,t[11],2400959708,14),n,i=a(i,10),o,t[10],2400959708,15),r,n=a(n,10),i,t[0],2400959708,14),r=c(r=a(r,10),n=c(n,i=c(i,o,h,r,n,t[8],2400959708,15),o,h=a(h,10),r,t[12],2400959708,9),i,o=a(o,10),h,t[4],2400959708,8),i=c(i=a(i,10),o=c(o,h=c(h,r,n,i,o,t[13],2400959708,9),r,n=a(n,10),i,t[3],2400959708,14),h,r=a(r,10),n,t[7],2400959708,5),h=c(h=a(h,10),r=c(r,n=c(n,i,o,h,r,t[15],2400959708,6),i,o=a(o,10),h,t[14],2400959708,8),n,i=a(i,10),o,t[5],2400959708,6),n=l(n=a(n,10),i=c(i,o=c(o,h,r,n,i,t[6],2400959708,5),h,r=a(r,10),n,t[2],2400959708,12),o,h=a(h,10),r,t[4],2840853838,9),o=l(o=a(o,10),h=l(h,r=l(r,n,i,o,h,t[0],2840853838,15),n,i=a(i,10),o,t[5],2840853838,5),r,n=a(n,10),i,t[9],2840853838,11),r=l(r=a(r,10),n=l(n,i=l(i,o,h,r,n,t[7],2840853838,6),o,h=a(h,10),r,t[12],2840853838,8),i,o=a(o,10),h,t[2],2840853838,13),i=l(i=a(i,10),o=l(o,h=l(h,r,n,i,o,t[10],2840853838,12),r,n=a(n,10),i,t[14],2840853838,5),h,r=a(r,10),n,t[1],2840853838,12),h=l(h=a(h,10),r=l(r,n=l(n,i,o,h,r,t[3],2840853838,13),i,o=a(o,10),h,t[8],2840853838,14),n,i=a(i,10),o,t[11],2840853838,11),n=l(n=a(n,10),i=l(i,o=l(o,h,r,n,i,t[6],2840853838,8),h,r=a(r,10),n,t[15],2840853838,5),o,h=a(h,10),r,t[13],2840853838,6),o=a(o,10);var p=this._a,d=this._b,v=this._c,_=this._d,y=this._e;y=l(y,p=l(p,d,v,_,y,t[5],1352829926,8),d,v=a(v,10),_,t[14],1352829926,9),d=l(d=a(d,10),v=l(v,_=l(_,y,p,d,v,t[7],1352829926,9),y,p=a(p,10),d,t[0],1352829926,11),_,y=a(y,10),p,t[9],1352829926,13),_=l(_=a(_,10),y=l(y,p=l(p,d,v,_,y,t[2],1352829926,15),d,v=a(v,10),_,t[11],1352829926,15),p,d=a(d,10),v,t[4],1352829926,5),p=l(p=a(p,10),d=l(d,v=l(v,_,y,p,d,t[13],1352829926,7),_,y=a(y,10),p,t[6],1352829926,7),v,_=a(_,10),y,t[15],1352829926,8),v=l(v=a(v,10),_=l(_,y=l(y,p,d,v,_,t[8],1352829926,11),p,d=a(d,10),v,t[1],1352829926,14),y,p=a(p,10),d,t[10],1352829926,14),y=c(y=a(y,10),p=l(p,d=l(d,v,_,y,p,t[3],1352829926,12),v,_=a(_,10),y,t[12],1352829926,6),d,v=a(v,10),_,t[6],1548603684,9),d=c(d=a(d,10),v=c(v,_=c(_,y,p,d,v,t[11],1548603684,13),y,p=a(p,10),d,t[3],1548603684,15),_,y=a(y,10),p,t[7],1548603684,7),_=c(_=a(_,10),y=c(y,p=c(p,d,v,_,y,t[0],1548603684,12),d,v=a(v,10),_,t[13],1548603684,8),p,d=a(d,10),v,t[5],1548603684,9),p=c(p=a(p,10),d=c(d,v=c(v,_,y,p,d,t[10],1548603684,11),_,y=a(y,10),p,t[14],1548603684,7),v,_=a(_,10),y,t[15],1548603684,7),v=c(v=a(v,10),_=c(_,y=c(y,p,d,v,_,t[8],1548603684,12),p,d=a(d,10),v,t[12],1548603684,7),y,p=a(p,10),d,t[4],1548603684,6),y=c(y=a(y,10),p=c(p,d=c(d,v,_,y,p,t[9],1548603684,15),v,_=a(_,10),y,t[1],1548603684,13),d,v=a(v,10),_,t[2],1548603684,11),d=f(d=a(d,10),v=f(v,_=f(_,y,p,d,v,t[15],1836072691,9),y,p=a(p,10),d,t[5],1836072691,7),_,y=a(y,10),p,t[1],1836072691,15),_=f(_=a(_,10),y=f(y,p=f(p,d,v,_,y,t[3],1836072691,11),d,v=a(v,10),_,t[7],1836072691,8),p,d=a(d,10),v,t[14],1836072691,6),p=f(p=a(p,10),d=f(d,v=f(v,_,y,p,d,t[6],1836072691,6),_,y=a(y,10),p,t[9],1836072691,14),v,_=a(_,10),y,t[11],1836072691,12),v=f(v=a(v,10),_=f(_,y=f(y,p,d,v,_,t[8],1836072691,13),p,d=a(d,10),v,t[12],1836072691,5),y,p=a(p,10),d,t[2],1836072691,14),y=f(y=a(y,10),p=f(p,d=f(d,v,_,y,p,t[10],1836072691,13),v,_=a(_,10),y,t[0],1836072691,13),d,v=a(v,10),_,t[4],1836072691,7),d=u(d=a(d,10),v=u(v,_=f(_,y,p,d,v,t[13],1836072691,5),y,p=a(p,10),d,t[8],2053994217,15),_,y=a(y,10),p,t[6],2053994217,5),_=u(_=a(_,10),y=u(y,p=u(p,d,v,_,y,t[4],2053994217,8),d,v=a(v,10),_,t[1],2053994217,11),p,d=a(d,10),v,t[3],2053994217,14),p=u(p=a(p,10),d=u(d,v=u(v,_,y,p,d,t[11],2053994217,14),_,y=a(y,10),p,t[15],2053994217,6),v,_=a(_,10),y,t[0],2053994217,14),v=u(v=a(v,10),_=u(_,y=u(y,p,d,v,_,t[5],2053994217,6),p,d=a(d,10),v,t[12],2053994217,9),y,p=a(p,10),d,t[2],2053994217,12),y=u(y=a(y,10),p=u(p,d=u(d,v,_,y,p,t[13],2053994217,9),v,_=a(_,10),y,t[9],2053994217,12),d,v=a(v,10),_,t[7],2053994217,5),d=s(d=a(d,10),v=u(v,_=u(_,y,p,d,v,t[10],2053994217,15),y,p=a(p,10),d,t[14],2053994217,8),_,y=a(y,10),p,t[12],0,8),_=s(_=a(_,10),y=s(y,p=s(p,d,v,_,y,t[15],0,5),d,v=a(v,10),_,t[10],0,12),p,d=a(d,10),v,t[4],0,9),p=s(p=a(p,10),d=s(d,v=s(v,_,y,p,d,t[1],0,12),_,y=a(y,10),p,t[5],0,5),v,_=a(_,10),y,t[8],0,14),v=s(v=a(v,10),_=s(_,y=s(y,p,d,v,_,t[7],0,6),p,d=a(d,10),v,t[6],0,8),y,p=a(p,10),d,t[2],0,13),y=s(y=a(y,10),p=s(p,d=s(d,v,_,y,p,t[13],0,6),v,_=a(_,10),y,t[14],0,5),d,v=a(v,10),_,t[0],0,15),d=s(d=a(d,10),v=s(v,_=s(_,y,p,d,v,t[3],0,13),y,p=a(p,10),d,t[9],0,11),_,y=a(y,10),p,t[11],0,11),_=a(_,10);var g=this._b+i+_|0;this._b=this._c+o+y|0,this._c=this._d+h+p|0,this._d=this._e+r+d|0,this._e=this._a+n+v|0,this._a=g},o.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=o}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(192).Transform;function i(t){n.call(this),this._block=new e(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(187)(i,n),i.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)},i.prototype._flush=function(t){var e=null;try{this.push(this._digest())}catch(t){e=t}t(e)},i.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;o<this._blockSize;)n[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var a=0,s=8*t.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},i.prototype._update=function(t){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();return void 0!==t&&(e=e.toString(t)),e},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i}).call(e,r(177).Buffer)},function(t,e,r){t.exports=i;var n=r(2).EventEmitter;function i(){n.call(this)}r(187)(i,n),i.Readable=r(193),i.Writable=r(210),i.Duplex=r(211),i.Transform=r(212),i.PassThrough=r(213),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(c(),0===n.listenerCount(this,"error"))throw t}function c(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",c),r.removeListener("close",c),t.removeListener("close",c)}return r.on("error",f),t.on("error",f),r.on("end",c),r.on("close",c),t.on("close",c),t.emit("pipe",r),t}},function(t,e,r){(e=t.exports=r(194)).Stream=e,e.Readable=e,e.Writable=r(205),e.Duplex=r(204),e.Transform=r(208),e.PassThrough=r(209)},function(t,e,r){(function(e,n){"use strict";var i=r(195);t.exports=m;var o,a=r(180);m.ReadableState=g;r(2).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=r(196),f=r(197).Buffer,c=(void 0!==e?e:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l=Object.create(r(199));l.inherits=r(187);var h=r(200),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,v=r(201),_=r(203);l.inherits(m,u);var y=["error","close","destroy","pause","resume"];function g(t,e){t=t||{};var n=e instanceof(o=o||r(204));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,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&&(d||(d=r(207).StringDecoder),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function m(t){if(o=o||r(204),!(this instanceof m))return new m(t);this._readableState=new g(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function b(t,e,r,n,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;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,T(t)}(t,a)):(i||(o=function(t,e){var r;(function(t){return f.isBuffer(t)||t instanceof c})(e)||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===f.prototype||(e=function(t){return f.from(t)}(e)),n?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?w(t,a,e,!1):B(t,a)):w(t,a,e,!1))):n||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(a)}function w(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&&T(t)),B(t,e)}Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),m.prototype.destroy=_.destroy,m.prototype._undestroy=_.undestroy,m.prototype._destroy=function(t,e){this.push(null),e(t)},m.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=f.from(t,e),e=""),r=!0),b(this,t,e,!1,r)},m.prototype.unshift=function(t){return b(this,t,null,!0,!1)},m.prototype.isPaused=function(){return!1===this._readableState.flowing},m.prototype.setEncoding=function(t){return d||(d=r(207).StringDecoder),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};var E=8388608;function k(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=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(x,t):x(t))}function x(t){p("emit readable"),t.emit("readable"),I(t)}function B(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(S,t,e))}function S(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function A(t){p("readable nexttick read 0"),t.read(0)}function j(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),I(t),e.flowing&&!e.reading&&t.read(0)}function I(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function O(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=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=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=f.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function C(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(R,e,t))}function R(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function P(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}m.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):T(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&C(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=k(r,e))),null===(n=t>0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&C(this)),null!==n&&this.emit("data",n),n},m.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:m;function f(e,n){p("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),t.removeListener("close",y),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",_),t.removeListener("unpipe",f),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",v),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function c(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",f);var l=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,I(t))}}(r);t.on("drain",l);var h=!1;var d=!1;function v(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==P(o.pipes,t))&&!h&&(p("false write response, pause",o.awaitDrain),o.awaitDrain++,d=!0),r.pause())}function _(e){p("onerror",e),m(),t.removeListener("error",_),0===s(t,"error")&&t.emit("error",e)}function y(){t.removeListener("finish",g),m()}function g(){p("onfinish"),t.removeListener("close",y),m()}function m(){p("unpipe"),r.unpipe(t)}return r.on("data",v),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",_),t.once("close",y),t.once("finish",g),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},m.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;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=P(e.pipes,t);return-1===a?this:(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},m.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&T(this):i.nextTick(A,this))}return r},m.prototype.addListener=m.prototype.on,m.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(j,t,e))}(this,t)),this},m.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},m.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(p("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<y.length;o++)t.on(y[o],this.emit.bind(this,y[o]));return this._read=function(e){p("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),m._fromList=O}).call(e,function(){return this}(),r(5))},function(t,e,r){(function(e){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick(function(){t.apply(null,o)})}}}:t.exports=e}).call(e,r(5))},function(t,e,r){t.exports=r(2).EventEmitter},function(t,e,r){var n=r(198),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=a),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){(function(t){
|
|
15
15
|
/*!
|
|
16
16
|
* The buffer module from node.js, for the browser.
|
|
17
17
|
*
|
|
18
18
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
19
19
|
* @license MIT
|
|
20
20
|
*/
|
|
21
|
-
"use strict";var n=r(178),i=r(179);e.Buffer=t,e.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},e.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)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 f(t)}return a(t,e,r)}function a(e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?function(e,r,n){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");var i;i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);return i.__proto__=t.prototype,i}(e,r,n):"string"==typeof e?function(e,r){"string"==typeof r&&""!==r||(r="utf8");if(!t.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|h(e,r),i=s(n),o=i.write(e,r);o!==n&&(i=i.slice(0,o));return i}(e,r):function(e){if(t.isBuffer(e)){var r=0|l(e.length),n=s(r);return 0===n.length?n:(e.copy(n,0,0,r),n)}if(e){if(M(e)||"length"in e)return"number"!=typeof e.length||N(e.length)?s(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e)}function u(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 f(t){return u(t),s(t<0?0:0|l(t))}function c(t){for(var e=t.length<0?0:0|l(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function l(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function h(e,r){if(t.isBuffer(e))return e.length;if(M(e)||e instanceof ArrayBuffer)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 L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(i)return L(e).length;r=(""+r).toLowerCase(),i=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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=+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:v(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):v(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"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}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var c=-1;for(o=r;o<a;o++)if(f(t,o)===f(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*s}else-1!==c&&(o-=o-c),c=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(f(t,o+h)!==f(e,h)){l=!1;break}if(l)return o}return-1}function _(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(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;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(N(a))return s;t[r+s]=a}return s}function y(t,e,r,n){return D(L(e,t.length-r),t,r,n)}function g(t,e,r,n){return D(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function m(t,e,r,n){return g(t,e,r,n)}function b(t,e,r,n){return D(F(e),t,r,n)}function w(t,e,r,n){return D(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,f=t[i],c=null,l=f>239?4:f>223?3:f>191?2:1;if(i+l<=r)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=T));return r}(n)}e.kMaxLength=o,t.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),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 a(t,e,r)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},t.allocUnsafe=function(t){return f(t)},t.allocUnsafeSlow=function(t){return f(t)},t.isBuffer=function(t){return null!=t&&!0===t._isBuffer},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);o<s;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var s=e[n];if(!t.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},t.byteLength=h,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)p(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)p(this,e,e+3),p(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},t.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):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))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return B(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+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(this===e)return 0;for(var s=(o>>>=0)-(i>>>=0),a=(n>>>=0)-(r>>>=0),u=Math.min(s,a),f=this.slice(i,o),c=e.slice(r,n),l=0;l<u;++l)if(f[l]!==c[l]){s=f[l],a=c[l];break}return s<a?-1:a<s?1:0},t.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},t.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return d(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=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 _(this,t,e,r);case"utf8":case"utf-8":return y(this,t,e,r);case"ascii":return g(this,t,e,r);case"latin1":case"binary":return m(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(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 T=4096;function B(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function S(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function x(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=U(t[o]);return i}function A(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function j(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function I(e,r,n,i,o,s){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function O(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 C(t,e,r,n,o){return e=+e,r>>>=0,o||O(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function R(t,e,r,n,o){return e=+e,r>>>=0,o||O(t,0,r,8),i.write(t,e,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<e&&(r=e);var i=this.subarray(e,r);return i.__proto__=t.prototype,i},t.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(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||j(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return t>>>=0,e||j(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||j(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||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){t>>>=0,e||j(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||j(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||j(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||j(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||j(t,4,this.length),i.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return t>>>=0,e||j(t,4,this.length),i.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return t>>>=0,e||j(t,8,this.length),i.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return t>>>=0,e||j(t,8,this.length),i.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||I(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||I(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||I(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||I(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||I(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);I(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(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.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);I(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||I(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||I(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||I(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||I(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||I(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 C(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return R(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<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var s;if(r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=r;s<n;++s)this[s]=e;else{var a=t.isBuffer(e)?e:new t(e,i),u=a.length;for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var P=/[^+/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&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=65536+(i-55296<<10|r-56320)}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 F(t){return n.toByteArray(function(t){if((t=t.trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function D(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function M(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function N(t){return t!=t}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(e,r(177).Buffer)},function(t,e){},function(t,e,r){"use strict";var n=r(197).Buffer,i=r(202);function o(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?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 n.alloc(0);for(var e=n.allocUnsafe(t>>>0),r=this.head,i=0;r;)o(r.data,e,i),i+=r.data.length,r=r.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},200,function(t,e,r){"use strict";var n=r(195);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,t)):n.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e&&e(t)}),this)},undestroy:function(){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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";var n=r(195),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var o=Object.create(r(199));o.inherits=r(187);var s=r(194),a=r(205);o.inherits(l,s);for(var u=i(a.prototype),f=0;f<u.length;f++){var c=u[f];l.prototype[c]||(l.prototype[c]=a.prototype[c])}function l(t){if(!(this instanceof l))return new l(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e,r){(function(e,n,i){"use strict";var o=r(195);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=g;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;g.WritableState=y;var f=Object.create(r(199));f.inherits=r(187);var c={deprecate:r(206)},l=r(196),h=r(197).Buffer,p=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,v=r(203);function _(){}function y(t,e){a=a||r(204),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,f=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(f||0===f)?f:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(T,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),T(t,e))}(t,r,n,e,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?u(b,t,r,s,i):b(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function g(t){if(a=a||r(204),!(d.call(g,this)||this instanceof a))return new g(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function m(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function b(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),T(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,m(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,c=r.encoding,l=r.callback;if(m(t,e,!1,e.objectMode?1:f.length,f,c,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),T(t,e)})}function T(t,e){var r=E(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(k,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}f.inherits(g,l),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===g&&(t&&t._writableState instanceof y)}})):d=function(t){return t instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(t,e,r){var n=this._writableState,i=!1,s=!n.objectMode&&function(t){return h.isBuffer(t)||t instanceof p}(t);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=_),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,n,t,r))&&(n.pendingcb++,i=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else m(t,e,!1,a,n,i,o);return u}(this,n,s,t,e,r)),i},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||w(this,t))},g.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},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.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&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,T(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),g.prototype.destroy=v.destroy,g.prototype._undestroy=v.undestroy,g.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){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(197).Buffer,i=n.isEncoding||function(t){switch((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}};function o(t){var e;switch(this.encoding=function(t){var e=function(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}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=c,this.end=l,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);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 u(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 f(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 c(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 l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(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)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";t.exports=o;var n=r(204),i=Object.create(r(199));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",s)}function s(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){a(t,e,r)}):a(this,null,null)}function a(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(187),i.inherits(o,n),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},function(t,e,r){"use strict";t.exports=o;var n=r(208),i=Object.create(r(199));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(187),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(205)},function(t,e,r){t.exports=r(204)},function(t,e,r){t.exports=r(193).Transform},function(t,e,r){t.exports=r(193).PassThrough},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(215),e.sha1=r(217),e.sha224=r(218),e.sha256=r(219),e.sha384=r(220),e.sha512=r(221)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function a(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function c(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(a,i),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,a=0|this._e,l=0;l<16;++l)e[l]=t.readInt32BE(4*l);for(;l<80;++l)e[l]=e[l-3]^e[l-8]^e[l-14]^e[l-16];for(var h=0;h<80;++h){var p=~~(h/20),d=u(r)+c(p,n,i,s)+a+e[h]+o[p]|0;a=s,s=i,i=f(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},a.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=a}).call(e,r(177).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&&(t=new e(t,r=r||"utf8"));for(var n=this._len+=t.length,i=this._s||0,o=0,s=this._block;i<n;){for(var a=Math.min(t.length,o+this._blockSize-i%this._blockSize)-o,u=0;u<a;u++)s[i%this._blockSize+u]=t[u+o];o+=a,(i+=a)%this._blockSize==0&&this._update(s)}return this._s=i,this},r.prototype.digest=function(t){var e=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),e%(8*this._blockSize)>=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(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function a(){this.init(),this._w=s,i.call(this,64,56)}function u(t){return t<<1|t>>>31}function f(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(a,i),a.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},a.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,a=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=u(e[h-3]^e[h-8]^e[h-14]^e[h-16]);for(var p=0;p<80;++p){var d=~~(p/20),v=f(r)+l(d,n,i,s)+a+e[p]+o[d]|0;a=s,s=i,i=c(n),n=r,r=v}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},a.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=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(219),o=r(216),s=new Array(64);function a(){this.init(),this._w=s,o.call(this,64,56)}n(a,i),a.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},a.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=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[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],s=new Array(64);function a(){this.init(),this._w=s,i.call(this,64,56)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function h(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}n(a,i),a.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},a.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,a=0|this._e,d=0|this._f,v=0|this._g,_=0|this._h,y=0;y<16;++y)e[y]=t.readInt32BE(4*y);for(;y<64;++y)e[y]=p(e[y-2])+e[y-7]+h(e[y-15])+e[y-16]|0;for(var g=0;g<64;++g){var m=_+l(a)+u(a,d,v)+o[g]+e[g]|0,b=c(r)+f(r,n,i)|0;_=v,v=d,d=a,a=s+m|0,s=i,i=n,n=r,r=m+b|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0,this._f=d+this._f|0,this._g=v+this._g|0,this._h=_+this._h|0},a.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=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(221),o=r(216),s=new Array(160);function a(){this.init(),this._w=s,o.call(this,128,112)}n(a,i),a.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},a.prototype._hash=function(){var t=new e(48);function r(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return r(this._ah,this._al,0),r(this._bh,this._bl,8),r(this._ch,this._cl,16),r(this._dh,this._dl,24),r(this._eh,this._el,32),r(this._fh,this._fl,40),t},t.exports=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[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],s=new Array(160);function a(){this.init(),this._w=s,i.call(this,128,112)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function h(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function d(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function v(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function _(t,e){return t>>>0<e>>>0?1:0}n(a,i),a.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},a.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,s=0|this._dh,a=0|this._eh,y=0|this._fh,g=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 j=e[A-30],I=e[A-30+1],O=h(j,I),C=p(I,j),R=d(j=e[A-4],I=e[A-4+1]),P=v(I,j),U=e[A-14],L=e[A-14+1],F=e[A-32],D=e[A-32+1],M=C+L|0,N=O+U+_(M,C)|0;N=(N=N+R+_(M=M+P|0,P)|0)+F+_(M=M+D|0,D)|0,e[A]=N,e[A+1]=M}for(var q=0;q<160;q+=2){N=e[q],M=e[q+1];var z=f(r,n,i),V=f(b,w,E),H=c(r,b),W=c(b,r),Y=l(a,T),G=l(T,a),X=o[q],Z=o[q+1],$=u(a,y,g),Q=u(T,B,S),K=x+G|0,J=m+Y+_(K,x)|0;J=(J=(J=J+$+_(K=K+Q|0,Q)|0)+X+_(K=K+Z|0,Z)|0)+N+_(K=K+M|0,M)|0;var tt=W+V|0,et=H+z+_(tt,W)|0;m=g,x=S,g=y,S=B,y=a,B=T,a=s+J+_(T=k+K|0,k)|0,s=i,k=E,i=n,E=w,n=r,w=b,r=J+et+_(b=K+tt|0,K)|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+_(this._al,b)|0,this._bh=this._bh+n+_(this._bl,w)|0,this._ch=this._ch+i+_(this._cl,E)|0,this._dh=this._dh+s+_(this._dl,k)|0,this._eh=this._eh+a+_(this._el,T)|0,this._fh=this._fh+y+_(this._fl,B)|0,this._gh=this._gh+g+_(this._gl,S)|0,this._hh=this._hh+m+_(this._hl,x)|0},a.prototype._hash=function(){var t=new e(64);function r(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return r(this._ah,this._al,0),r(this._bh,this._bl,8),r(this._ch,this._cl,16),r(this._dh,this._dl,24),r(this._eh,this._el,32),r(this._fh,this._fl,40),r(this._gh,this._gl,48),r(this._hh,this._hl,56),t},t.exports=a}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(192).Transform,i=r(187),o=r(207).StringDecoder;function s(t){n.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}t.exports=s,i(s,n),s.prototype.update=function(t,r,n){"string"==typeof t&&(t=new e(t,r));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.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)}},s.prototype._flush=function(t){var e;try{this.push(this._final())}catch(t){e=t}finally{t(e)}},s.prototype._finalOrDigest=function(t){var r=this._final()||new e("");return t&&(r=this._toString(r,t,!0)),r},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(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}}).call(e,r(177).Buffer)},function(t,e,r){"use strict";var n=r(187),i=r(224),o=r(222),s=r(197).Buffer,a=r(188),u=r(190),f=r(214),c=s.alloc(128);function l(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:f(t)).update(e).digest():e.length<r&&(e=s.concat([e,c],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new u:f(t),this._hash.update(n)}n(l,o),l.prototype._update=function(t){this._hash.update(t)},l.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:f(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new l("rmd160",e):"md5"===t?new i(a,e):new l(t,e)}},function(t,e,r){"use strict";var n=r(187),i=r(197).Buffer,o=r(222),s=i.alloc(128),a=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length<a&&(e=i.concat([e,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),u=0;u<a;u++)r[u]=54^e[u],n[u]=92^e[u];this._hash=[r]}n(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},function(t,e,r){var n=r(226);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,r){var n=r(197).Buffer;t.exports=function(t){for(var e={},r=t.length,i=t.charAt(0),o=0;o<t.length;o++){var s=t.charAt(o);if(void 0!==e[s])throw new TypeError(s+" is ambiguous");e[s]=o}function a(t){if(0===t.length)return n.allocUnsafe(0);for(var o=[0],s=0;s<t.length;s++){var a=e[t[s]];if(void 0===a)return;for(var u=0,f=a;u<o.length;++u)f+=o[u]*r,o[u]=255&f,f>>=8;for(;f>0;)o.push(255&f),f>>=8}for(var c=0;t[c]===i&&c<t.length-1;++c)o.push(0);return n.from(o.reverse())}return{encode:function(e){if(0===e.length)return"";for(var n=[0],i=0;i<e.length;++i){for(var o=0,s=e[i];o<n.length;++o)s+=n[o]<<8,n[o]=s%r,s=s/r|0;for(;s>0;)n.push(s%r),s=s/r|0}for(var a="",u=0;0===e[u]&&u<e.length-1;++u)a+=t[0];for(var f=n.length-1;f>=0;--f)a+=t[n[f]];return a},decodeUnsafe:a,decode:function(t){var e=a(t);if(e)return e;throw new Error("Non-base"+r+" character")}}}},function(t,e,r){(function(t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encrypt=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){if(null===p){var t=n.default.randomUint8Array(2);p=parseInt(t[0]<<8|t[1],10)}var e=l.fromNumber(Date.now()),r=++p%65535;return(e=e.shiftLeft(16).or(l.fromNumber(r))).toString()}();return h(t,e,i,r)},e.decrypt=function(t,e,r,n,i){return h(t,e,r,n,i).message},e.simpleDecoder=function(e,r){var n=new t(e,"base64"),i=f.default.sha512(r),s=i.slice(0,32),a=i.slice(32,48),u=o.default.createDecipheriv("aes-256-cbc",s,a),c=t.concat([u.update(n),u.final()]);return new TextDecoder("utf-8",{fatal:!0}).decode(c)},e.simpleEncoder=function(e,r){var n=f.default.sha512(r),i=n.slice(0,32),s=n.slice(32,48),a=new t(e,"utf-8"),u=o.default.createCipheriv("aes-256-cbc",i,s);return t.concat([u.update(a),u.final()]).toString("base64")};var n=c(r(228)),i=c(r(230)),o=c(r(233)),s=c(r(181)),a=c(r(250)),u=c(r(260)),f=c(r(185));function c(t){return t&&t.__esModule?t:{default:t}}var l=i.default.Long;function h(e,r,n,a,u){if(!(e=d(e)))throw new TypeError("private_key is required");if(!(r=v(r)))throw new TypeError("public_key is required");if(!(n=_(n)))throw new TypeError("nonce is required");if(!t.isBuffer(a)){if("string"!=typeof a)throw new TypeError("message should be buffer or string");a=new t(a,"binary")}if(u&&"number"!=typeof u)throw new TypeError("checksum should be a number");var c=e.get_shared_secret(r),l=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);l.writeUint64(n),l.append(c.toString("binary"),"binary"),l=new t(l.copy(0,l.offset).toBinary(),"binary");var h=f.default.sha512(l),p=h.slice(32,48),g=h.slice(0,32),m=f.default.sha256(h);if(m=m.slice(0,4),m=i.default.fromBinary(m.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN).readUint32(),u){if(m!==u)throw new Error("Invalid key");a=function(e,r,n){(0,s.default)(e,"Missing cipher text"),e=y(e);var i=o.default.createDecipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}(a,g,p)}else a=function(e,r,n){(0,s.default)(e,"Missing plain text"),e=y(e);var i=o.default.createCipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}(a,g,p);return{nonce:n,message:a,checksum:m}}var p=null,d=function(t){return t?t.d?t:u.default.fromWif(t):t},v=function(t){return t?t.Q?t:a.default.fromString(t):t},_=function(t){return t?l.isLong(t)?t:l.fromString(t):t},y=function(e){return e?t.isBuffer(e)?e:new t(e,"binary"):e}}).call(e,r(177).Buffer)},function(t,e,r){var n;(function(i,o){!function(s){"use strict";function a(t,e){if(e=e||{type:"Array"},void 0!==i&&"number"==typeof i.pid)return function(t,e){var n=r(229).randomBytes(t);switch(e.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(t),o=0;o<t;++o)i[o]=n.readUInt8(o);return i;default:throw new Error(e.type+" is unsupported.")}}(t,e);if(!(window.crypto||window.msCrypto))throw new Error("Your browser does not support window.crypto.");return function(t,e){var r=new Uint8Array(t);switch((window.crypto||window.msCrypto).getRandomValues(r),e.type){case"Array":return[].slice.call(r);case"Buffer":try{new o(1)}catch(t){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new o(r);case"Uint8Array":return r;default:throw new Error(e.type+" is unsupported.")}}(t,e)}void 0===(n=function(){return a}.apply(e,[]))||(t.exports=n),a.randomArray=function(t){return a(t,{type:"Array"})},a.randomUint8Array=function(t){return a(t,{type:"Uint8Array"})},a.randomBuffer=function(t){return a(t,{type:"Buffer"})}}()}).call(e,r(5),r(177).Buffer)},200,function(t,e,r){var n,i,o;(function(t){
|
|
21
|
+
"use strict";var n=r(178),i=r(179);e.Buffer=t,e.SlowBuffer=function(e){+e!=e&&(e=0);return t.alloc(+e)},e.INSPECT_MAX_BYTES=50;var o=2147483647;function a(e){if(e>o)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 f(t)}return s(t,e,r)}function s(e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return e instanceof ArrayBuffer?function(e,r,n){if(r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");var i;i=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);return i.__proto__=t.prototype,i}(e,r,n):"string"==typeof e?function(e,r){"string"==typeof r&&""!==r||(r="utf8");if(!t.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|h(e,r),i=a(n),o=i.write(e,r);o!==n&&(i=i.slice(0,o));return i}(e,r):function(e){if(t.isBuffer(e)){var r=0|l(e.length),n=a(r);return 0===n.length?n:(e.copy(n,0,0,r),n)}if(e){if(N(e)||"length"in e)return"number"!=typeof e.length||M(e.length)?a(0):c(e);if("Buffer"===e.type&&Array.isArray(e.data))return c(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e)}function u(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 f(t){return u(t),a(t<0?0:0|l(t))}function c(t){for(var e=t.length<0?0:0|l(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function l(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function h(e,r){if(t.isBuffer(e))return e.length;if(N(e)||e instanceof ArrayBuffer)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 L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(i)return L(e).length;r=(""+r).toLowerCase(),i=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(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),M(n=+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:v(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):v(e,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function f(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=r;o<s;o++)if(f(t,o)===f(e,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;h<u;h++)if(f(t,o+h)!==f(e,h)){l=!1;break}if(l)return o}return-1}function _(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(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 a=0;a<n;++a){var s=parseInt(e.substr(2*a,2),16);if(M(s))return a;t[r+a]=s}return a}function y(t,e,r,n){return D(L(e,t.length-r),t,r,n)}function g(t,e,r,n){return D(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function m(t,e,r,n){return g(t,e,r,n)}function b(t,e,r,n){return D(F(e),t,r,n)}function w(t,e,r,n){return D(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=t.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function E(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,s,u,f=t[i],c=null,l=f>239?4:f>223?3:f>191?2:1;if(i+l<=r)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=T));return r}(n)}e.kMaxLength=o,t.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),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 s(t,e,r)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},t.allocUnsafe=function(t){return f(t)},t.allocUnsafeSlow=function(t){return f(t)},t.isBuffer=function(t){return null!=t&&!0===t._isBuffer},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,a=Math.min(n,i);o<a;++o)if(e[o]!==r[o]){n=e[o],i=r[o];break}return n<i?-1:i<n?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<e.length;++n)r+=e[n].length;var i=t.allocUnsafe(r),o=0;for(n=0;n<e.length;++n){var a=e[n];if(!t.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(i,o),o+=a.length}return i},t.byteLength=h,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)p(this,e,e+1);return this},t.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)p(this,e,e+3),p(this,e+1,e+2);return this},t.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)p(this,e,e+7),p(this,e+1,e+6),p(this,e+2,e+5),p(this,e+3,e+4);return this},t.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):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))return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return B(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+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(this===e)return 0;for(var a=(o>>>=0)-(i>>>=0),s=(n>>>=0)-(r>>>=0),u=Math.min(a,s),f=this.slice(i,o),c=e.slice(r,n),l=0;l<u;++l)if(f[l]!==c[l]){a=f[l],s=c[l];break}return a<s?-1:s<a?1:0},t.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},t.prototype.indexOf=function(t,e,r){return d(this,t,e,r,!0)},t.prototype.lastIndexOf=function(t,e,r){return d(this,t,e,r,!1)},t.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=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 _(this,t,e,r);case"utf8":case"utf-8":return y(this,t,e,r);case"ascii":return g(this,t,e,r);case"latin1":case"binary":return m(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(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 T=4096;function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function B(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function S(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=U(t[o]);return i}function A(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function j(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function I(e,r,n,i,o,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<a)throw new RangeError('"value" argument is out of bounds');if(n+i>e.length)throw new RangeError("Index out of range")}function O(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 C(t,e,r,n,o){return e=+e,r>>>=0,o||O(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function R(t,e,r,n,o){return e=+e,r>>>=0,o||O(t,0,r,8),i.write(t,e,r,n,52,8),r+8}t.prototype.slice=function(e,r){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<e&&(r=e);var i=this.subarray(e,r);return i.__proto__=t.prototype,i},t.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},t.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(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||j(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return t>>>=0,e||j(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||j(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||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},t.prototype.readInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,e){t>>>=0,e||j(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||j(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||j(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||j(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||j(t,4,this.length),i.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return t>>>=0,e||j(t,4,this.length),i.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return t>>>=0,e||j(t,8,this.length),i.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return t>>>=0,e||j(t,8,this.length),i.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},t.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||I(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},t.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||I(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||I(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||I(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||I(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||I(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);I(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===s&&0!==this[e+o-1]&&(s=1),this[e+o]=(t/a>>0)-s&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);I(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},t.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||I(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||I(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||I(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||I(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||I(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 C(this,t,e,!0,r)},t.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},t.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},t.prototype.writeDoubleBE=function(t,e,r){return R(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<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},t.prototype.fill=function(e,r,n,i){if("string"==typeof e){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else"number"==typeof e&&(e&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var a;if(r>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=r;a<n;++a)this[a]=e;else{var s=t.isBuffer(e)?e:new t(e,i),u=s.length;for(a=0;a<n-r;++a)this[a+r]=s[a%u]}return this};var P=/[^+/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+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=65536+(i-55296<<10|r-56320)}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 F(t){return n.toByteArray(function(t){if((t=t.trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function D(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function N(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function M(t){return t!=t}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(e,r(177).Buffer)},function(t,e){},function(t,e,r){"use strict";var n=r(197).Buffer,i=r(202);function o(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?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 n.alloc(0);for(var e=n.allocUnsafe(t>>>0),r=this.head,i=0;r;)o(r.data,e,i),i+=r.data.length,r=r.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},200,function(t,e,r){"use strict";var n=r(195);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,t)):n.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e&&e(t)}),this)},undestroy:function(){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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";var n=r(195),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var o=Object.create(r(199));o.inherits=r(187);var a=r(194),s=r(205);o.inherits(l,a);for(var u=i(s.prototype),f=0;f<u.length;f++){var c=u[f];l.prototype[c]||(l.prototype[c]=s.prototype[c])}function l(t){if(!(this instanceof l))return new l(t);a.call(this,t),s.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e,r){(function(e,n,i){"use strict";var o=r(195);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=g;var s,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;g.WritableState=y;var f=Object.create(r(199));f.inherits=r(187);var c={deprecate:r(206)},l=r(196),h=r(197).Buffer,p=(void 0!==i?i:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,v=r(203);function _(){}function y(t,e){s=s||r(204),t=t||{};var n=e instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,f=t.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(f||0===f)?f:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(T,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),T(t,e))}(t,r,n,e,i);else{var a=E(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?u(b,t,r,a,i):b(t,r,a,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function g(t){if(s=s||r(204),!(d.call(g,this)||this instanceof s))return new g(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function m(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function b(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),T(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,m(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,c=r.encoding,l=r.callback;if(m(t,e,!1,e.objectMode?1:f.length,f,c,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),T(t,e)})}function T(t,e){var r=E(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(k,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}f.inherits(g,l),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===g&&(t&&t._writableState instanceof y)}})):d=function(t){return t instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(t,e,r){var n=this._writableState,i=!1,a=!n.objectMode&&function(t){return h.isBuffer(t)||t instanceof p}(t);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=n.defaultEncoding),"function"!=typeof r&&(r=_),n.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,a=!1;return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(n,a),i=!1),i}(this,n,t,r))&&(n.pendingcb++,i=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else m(t,e,!1,s,n,i,o);return u}(this,n,a,t,e,r)),i},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||w(this,t))},g.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},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.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&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,T(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),g.prototype.destroy=v.destroy,g.prototype._undestroy=v.undestroy,g.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){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(e,function(){return this}())},function(t,e,r){"use strict";var n=r(197).Buffer,i=n.isEncoding||function(t){switch((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}};function o(t){var e;switch(this.encoding=function(t){var e=function(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}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=c,this.end=l,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);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 u(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 f(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 c(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 l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=a(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=a(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=a(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(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)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";t.exports=o;var n=r(204),i=Object.create(r(199));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:function(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){s(t,e,r)}):s(this,null,null)}function s(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(187),i.inherits(o,n),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},function(t,e,r){"use strict";t.exports=o;var n=r(208),i=Object.create(r(199));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(187),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(205)},function(t,e,r){t.exports=r(204)},function(t,e,r){t.exports=r(193).Transform},function(t,e,r){t.exports=r(193).PassThrough},function(t,e,r){(e=t.exports=function(t){t=t.toLowerCase();var r=e[t];if(!r)throw new Error(t+" is not supported (we accept pull requests)");return new r}).sha=r(215),e.sha1=r(217),e.sha224=r(218),e.sha256=r(219),e.sha384=r(220),e.sha512=r(221)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,i.call(this,64,56)}function u(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function c(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,s=0|this._e,l=0;l<16;++l)e[l]=t.readInt32BE(4*l);for(;l<80;++l)e[l]=e[l-3]^e[l-8]^e[l-14]^e[l-16];for(var h=0;h<80;++h){var p=~~(h/20),d=u(r)+c(p,n,i,a)+s+e[h]+o[p]|0;s=a,a=i,i=f(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},s.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=s}).call(e,r(177).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&&(t=new e(t,r=r||"utf8"));for(var n=this._len+=t.length,i=this._s||0,o=0,a=this._block;i<n;){for(var s=Math.min(t.length,o+this._blockSize-i%this._blockSize)-o,u=0;u<s;u++)a[i%this._blockSize+u]=t[u+o];o+=s,(i+=s)%this._blockSize==0&&this._update(a)}return this._s=i,this},r.prototype.digest=function(t){var e=8*this._len;this._block[this._len%this._blockSize]=128,this._block.fill(0,this._len%this._blockSize+1),e%(8*this._blockSize)>=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(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,i.call(this,64,56)}function u(t){return t<<1|t>>>31}function f(t){return t<<5|t>>>27}function c(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,s=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=u(e[h-3]^e[h-8]^e[h-14]^e[h-16]);for(var p=0;p<80;++p){var d=~~(p/20),v=f(r)+l(d,n,i,a)+s+e[p]+o[d]|0;s=a,a=i,i=c(n),n=r,r=v}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},s.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=s}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(219),o=r(216),a=new Array(64);function s(){this.init(),this._w=a,o.call(this,64,56)}n(s,i),s.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},s.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=s}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[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],a=new Array(64);function s(){this.init(),this._w=a,i.call(this,64,56)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function h(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}n(s,i),s.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},s.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,s=0|this._e,d=0|this._f,v=0|this._g,_=0|this._h,y=0;y<16;++y)e[y]=t.readInt32BE(4*y);for(;y<64;++y)e[y]=p(e[y-2])+e[y-7]+h(e[y-15])+e[y-16]|0;for(var g=0;g<64;++g){var m=_+l(s)+u(s,d,v)+o[g]+e[g]|0,b=c(r)+f(r,n,i)|0;_=v,v=d,d=s,s=a+m|0,a=i,i=n,n=r,r=m+b|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0,this._f=d+this._f|0,this._g=v+this._g|0,this._h=_+this._h|0},s.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=s}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(221),o=r(216),a=new Array(160);function s(){this.init(),this._w=a,o.call(this,128,112)}n(s,i),s.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},s.prototype._hash=function(){var t=new e(48);function r(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return r(this._ah,this._al,0),r(this._bh,this._bl,8),r(this._ch,this._cl,16),r(this._dh,this._dl,24),r(this._eh,this._el,32),r(this._fh,this._fl,40),t},t.exports=s}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(187),i=r(216),o=[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],a=new Array(160);function s(){this.init(),this._w=a,i.call(this,128,112)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function c(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function h(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function d(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function v(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function _(t,e){return t>>>0<e>>>0?1:0}n(s,i),s.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},s.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,s=0|this._eh,y=0|this._fh,g=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,x=0|this._fl,B=0|this._gl,S=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 j=e[A-30],I=e[A-30+1],O=h(j,I),C=p(I,j),R=d(j=e[A-4],I=e[A-4+1]),P=v(I,j),U=e[A-14],L=e[A-14+1],F=e[A-32],D=e[A-32+1],N=C+L|0,M=O+U+_(N,C)|0;M=(M=M+R+_(N=N+P|0,P)|0)+F+_(N=N+D|0,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=f(r,n,i),V=f(b,w,E),H=c(r,b),W=c(b,r),Y=l(s,T),G=l(T,s),X=o[q],Z=o[q+1],$=u(s,y,g),Q=u(T,x,B),K=S+G|0,J=m+Y+_(K,S)|0;J=(J=(J=J+$+_(K=K+Q|0,Q)|0)+X+_(K=K+Z|0,Z)|0)+M+_(K=K+N|0,N)|0;var tt=W+V|0,et=H+z+_(tt,W)|0;m=g,S=B,g=y,B=x,y=s,x=T,s=a+J+_(T=k+K|0,k)|0,a=i,k=E,i=n,E=w,n=r,w=b,r=J+et+_(b=K+tt|0,K)|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+x|0,this._gl=this._gl+B|0,this._hl=this._hl+S|0,this._ah=this._ah+r+_(this._al,b)|0,this._bh=this._bh+n+_(this._bl,w)|0,this._ch=this._ch+i+_(this._cl,E)|0,this._dh=this._dh+a+_(this._dl,k)|0,this._eh=this._eh+s+_(this._el,T)|0,this._fh=this._fh+y+_(this._fl,x)|0,this._gh=this._gh+g+_(this._gl,B)|0,this._hh=this._hh+m+_(this._hl,S)|0},s.prototype._hash=function(){var t=new e(64);function r(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return r(this._ah,this._al,0),r(this._bh,this._bl,8),r(this._ch,this._cl,16),r(this._dh,this._dl,24),r(this._eh,this._el,32),r(this._fh,this._fl,40),r(this._gh,this._gl,48),r(this._hh,this._hl,56),t},t.exports=s}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(192).Transform,i=r(187),o=r(207).StringDecoder;function a(t){n.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}t.exports=a,i(a,n),a.prototype.update=function(t,r,n){"string"==typeof t&&(t=new e(t,r));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.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)}},a.prototype._flush=function(t){var e;try{this.push(this._final())}catch(t){e=t}finally{t(e)}},a.prototype._finalOrDigest=function(t){var r=this._final()||new e("");return t&&(r=this._toString(r,t,!0)),r},a.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(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}}).call(e,r(177).Buffer)},function(t,e,r){"use strict";var n=r(187),i=r(224),o=r(222),a=r(197).Buffer,s=r(188),u=r(190),f=r(214),c=a.alloc(128);function l(t,e){o.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new u:f(t)).update(e).digest():e.length<r&&(e=a.concat([e,c],r));for(var n=this._ipad=a.allocUnsafe(r),i=this._opad=a.allocUnsafe(r),s=0;s<r;s++)n[s]=54^e[s],i[s]=92^e[s];this._hash="rmd160"===t?new u:f(t),this._hash.update(n)}n(l,o),l.prototype._update=function(t){this._hash.update(t)},l.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:f(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new l("rmd160",e):"md5"===t?new i(s,e):new l(t,e)}},function(t,e,r){"use strict";var n=r(187),i=r(197).Buffer,o=r(222),a=i.alloc(128),s=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>s?e=t(e):e.length<s&&(e=i.concat([e,a],s));for(var r=this._ipad=i.allocUnsafe(s),n=this._opad=i.allocUnsafe(s),u=0;u<s;u++)r[u]=54^e[u],n[u]=92^e[u];this._hash=[r]}n(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},function(t,e,r){var n=r(226);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},function(t,e,r){var n=r(197).Buffer;t.exports=function(t){for(var e={},r=t.length,i=t.charAt(0),o=0;o<t.length;o++){var a=t.charAt(o);if(void 0!==e[a])throw new TypeError(a+" is ambiguous");e[a]=o}function s(t){if(0===t.length)return n.allocUnsafe(0);for(var o=[0],a=0;a<t.length;a++){var s=e[t[a]];if(void 0===s)return;for(var u=0,f=s;u<o.length;++u)f+=o[u]*r,o[u]=255&f,f>>=8;for(;f>0;)o.push(255&f),f>>=8}for(var c=0;t[c]===i&&c<t.length-1;++c)o.push(0);return n.from(o.reverse())}return{encode:function(e){if(0===e.length)return"";for(var n=[0],i=0;i<e.length;++i){for(var o=0,a=e[i];o<n.length;++o)a+=n[o]<<8,n[o]=a%r,a=a/r|0;for(;a>0;)n.push(a%r),a=a/r|0}for(var s="",u=0;0===e[u]&&u<e.length-1;++u)s+=t[0];for(var f=n.length-1;f>=0;--f)s+=t[n[f]];return s},decodeUnsafe:s,decode:function(t){var e=s(t);if(e)return e;throw new Error("Non-base"+r+" character")}}}},function(t,e,r){(function(t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encrypt=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){if(null===p){var t=n.default.randomUint8Array(2);p=parseInt(t[0]<<8|t[1],10)}var e=l.fromNumber(Date.now()),r=++p%65535;return(e=e.shiftLeft(16).or(l.fromNumber(r))).toString()}();return h(t,e,i,r)},e.decrypt=function(t,e,r,n,i){return h(t,e,r,n,i).message},e.simpleDecoder=function(e,r){var n=new t(e,"base64"),i=f.default.sha512(r),a=i.slice(0,32),s=i.slice(32,48),u=o.default.createDecipheriv("aes-256-cbc",a,s),c=t.concat([u.update(n),u.final()]);return new TextDecoder("utf-8",{fatal:!0}).decode(c)},e.simpleEncoder=function(e,r){var n=f.default.sha512(r),i=n.slice(0,32),a=n.slice(32,48),s=new t(e,"utf-8"),u=o.default.createCipheriv("aes-256-cbc",i,a);return t.concat([u.update(s),u.final()]).toString("base64")};var n=c(r(228)),i=c(r(230)),o=c(r(233)),a=c(r(181)),s=c(r(250)),u=c(r(260)),f=c(r(185));function c(t){return t&&t.__esModule?t:{default:t}}var l=i.default.Long;function h(e,r,n,s,u){if(!(e=d(e)))throw new TypeError("private_key is required");if(!(r=v(r)))throw new TypeError("public_key is required");if(!(n=_(n)))throw new TypeError("nonce is required");if(!t.isBuffer(s)){if("string"!=typeof s)throw new TypeError("message should be buffer or string");s=new t(s,"binary")}if(u&&"number"!=typeof u)throw new TypeError("checksum should be a number");var c=e.get_shared_secret(r),l=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);l.writeUint64(n),l.append(c.toString("binary"),"binary"),l=new t(l.copy(0,l.offset).toBinary(),"binary");var h=f.default.sha512(l),p=h.slice(32,48),g=h.slice(0,32),m=f.default.sha256(h);if(m=m.slice(0,4),m=i.default.fromBinary(m.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN).readUint32(),u){if(m!==u)throw new Error("Invalid key");s=function(e,r,n){(0,a.default)(e,"Missing cipher text"),e=y(e);var i=o.default.createDecipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}(s,g,p)}else s=function(e,r,n){(0,a.default)(e,"Missing plain text"),e=y(e);var i=o.default.createCipheriv("aes-256-cbc",r,n);return e=t.concat([i.update(e),i.final()])}(s,g,p);return{nonce:n,message:s,checksum:m}}var p=null,d=function(t){return t?t.d?t:u.default.fromWif(t):t},v=function(t){return t?t.Q?t:s.default.fromString(t):t},_=function(t){return t?l.isLong(t)?t:l.fromString(t):t},y=function(e){return e?t.isBuffer(e)?e:new t(e,"binary"):e}}).call(e,r(177).Buffer)},function(t,e,r){var n;(function(i,o){!function(a){"use strict";function s(t,e){if(e=e||{type:"Array"},void 0!==i&&"number"==typeof i.pid)return function(t,e){var n=r(229).randomBytes(t);switch(e.type){case"Array":return[].slice.call(n);case"Buffer":return n;case"Uint8Array":for(var i=new Uint8Array(t),o=0;o<t;++o)i[o]=n.readUInt8(o);return i;default:throw new Error(e.type+" is unsupported.")}}(t,e);if(!(window.crypto||window.msCrypto))throw new Error("Your browser does not support window.crypto.");return function(t,e){var r=new Uint8Array(t);switch((window.crypto||window.msCrypto).getRandomValues(r),e.type){case"Array":return[].slice.call(r);case"Buffer":try{new o(1)}catch(t){throw new Error("Buffer not supported in this environment. Use Node.js or Browserify for browser support.")}return new o(r);case"Uint8Array":return r;default:throw new Error(e.type+" is unsupported.")}}(t,e)}void 0===(n=function(){return s}.apply(e,[]))||(t.exports=n),s.randomArray=function(t){return s(t,{type:"Array"})},s.randomUint8Array=function(t){return s(t,{type:"Uint8Array"})},s.randomBuffer=function(t){return s(t,{type:"Buffer"})}}()}).call(e,r(5),r(177).Buffer)},200,function(t,e,r){var n,i,o;(function(t){
|
|
22
22
|
/**
|
|
23
23
|
* @license bytebuffer.js (c) 2015 Daniel Wirtz <dcode@dcode.io>
|
|
24
24
|
* Backing buffer: ArrayBuffer, Accessor: Uint8Array
|
|
25
25
|
* Released under the Apache License, Version 2.0
|
|
26
26
|
* see: https://github.com/dcodeIO/bytebuffer.js for details
|
|
27
27
|
*/
|
|
28
|
-
!function(s,a){r(231).amd?(i=[r(232)],void 0===(o="function"==typeof(n=a)?n.apply(e,i):n)||(t.exports=o)):"object"==typeof t&&t&&t.exports?t.exports=function(){var t;try{t=r(232)}catch(t){}return a(t)}():(s.dcodeIO=s.dcodeIO||{}).ByteBuffer=a(s.dcodeIO.Long)}(this,function(t){"use strict";var e=function(t,r,i){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===r&&(r=e.DEFAULT_ENDIAN),void 0===i&&(i=e.DEFAULT_NOASSERT),!i){if((t|=0)<0)throw RangeError("Illegal capacity");r=!!r,i=!!i}this.buffer=0===t?n:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=r,this.noAssert=i};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var r=e.prototype;r.__isByteBuffer__,Object.defineProperty(r,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var n=new ArrayBuffer(0),i=String.fromCharCode;function o(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function s(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+i.apply(String,t);t.length+arguments.length>1024&&(e.push(i.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function a(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>1,c=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-c)-1,p>>=-c,c+=a;c>0;o=256*o+t[e+l],l+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)}function u(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,c=(1<<f)-1,l=c>>1,h=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+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(s++,u/=2),s+l>=c?(a=0,s=c):s+l>=1?(a=(e*u-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*v}e.accessor=function(){return Uint8Array},e.allocate=function(t,r,n){return new e(t,r,n)},e.concat=function(t,r,n,i){"boolean"!=typeof r&&"string"==typeof r||(i=n,n=r,r=void 0);for(var o,s=0,a=0,u=t.length;a<u;++a)e.isByteBuffer(t[a])||(t[a]=e.wrap(t[a],r)),(o=t[a].limit-t[a].offset)>0&&(s+=o);if(0===s)return new e(0,n,i);var f,c=new e(s,n,i);for(a=0;a<u;)(o=(f=t[a++]).limit-f.offset)<=0||(c.view.set(f.view.subarray(f.offset,f.limit),c.offset),c.offset+=o);return c.limit=c.offset,c.offset=0,c},e.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},e.type=function(){return ArrayBuffer},e.wrap=function(t,n,i,o){if("string"!=typeof n&&(o=i,i=n,n=void 0),"string"==typeof t)switch(void 0===n&&(n="utf8"),n){case"base64":return e.fromBase64(t,i);case"hex":return e.fromHex(t,i);case"binary":return e.fromBinary(t,i);case"utf8":return e.fromUTF8(t,i);case"debug":return e.fromDebug(t,i);default:throw Error("Unsupported encoding: "+n)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var s;if(e.isByteBuffer(t))return(s=r.clone.call(t)).markedOffset=-1,s;if(t instanceof Uint8Array)s=new e(0,i,o),t.length>0&&(s.buffer=t.buffer,s.offset=t.byteOffset,s.limit=t.byteOffset+t.byteLength,s.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)s=new e(0,i,o),t.byteLength>0&&(s.buffer=t,s.offset=0,s.limit=t.byteLength,s.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(s=new e(t.length,i,o)).limit=t.length;for(var a=0;a<t.length;++a)s.view[a]=t[a]}return s},r.writeBitSet=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if(!(t instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<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<o){var u=0;for(n=0;a<o;)n|=(1&!!t[a++])<<u++;this.writeByte(n,e++)}return r?(this.offset=e,this):e-i},r.readBitSet=function(t){var e=void 0===t;e&&(t=this.offset);var r,n=this.readVarint32(t),i=n.value,o=i>>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<i){var u=0;for(r=this.readByte(t++);s<i;)a[s++]=!!(r>>u++&1)}return e&&(this.offset=t),a},r.readBytes=function(t,e){var r=void 0===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)<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},r.writeBytes=r.append,r.writeInt8=function(t,e){var r=void 0===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)<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},r.writeByte=r.writeInt8,r.readInt8=function(t){var e=void 0===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)<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},r.readByte=r.readInt8,r.writeUint8=function(t,e){var r=void 0===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)<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},r.writeUInt8=r.writeUint8,r.readUint8=function(t){var e=void 0===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)<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},r.readUInt8=r.readUint8,r.writeInt16=function(t,e){var r=void 0===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)<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},r.writeShort=r.writeInt16,r.readInt16=function(t){var e=void 0===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)<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},r.readShort=r.readInt16,r.writeUint16=function(t,e){var r=void 0===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)<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},r.writeUInt16=r.writeUint16,r.readUint16=function(t){var e=void 0===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)<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},r.readUInt16=r.readUint16,r.writeInt32=function(t,e){var r=void 0===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)<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},r.writeInt=r.writeInt32,r.readInt32=function(t){var e=void 0===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)<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},r.readInt=r.readInt32,r.writeUint32=function(t,e){var r=void 0===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)<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},r.writeUInt32=r.writeUint32,r.readUint32=function(t){var e=void 0===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)<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},r.readUInt32=r.readUint32,t&&(r.writeInt64=function(e,r){var n=void 0===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)<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},r.writeLong=r.writeInt64,r.readInt64=function(e){var r=void 0===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)<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},r.readLong=r.readInt64,r.writeUint64=function(e,r){var n=void 0===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)<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},r.writeUInt64=r.writeUint64,r.readUint64=function(e){var r=void 0===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)<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},r.readUInt64=r.readUint64),r.writeFloat32=function(t,e){var r=void 0===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)<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,u(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},r.writeFloat=r.writeFloat32,r.readFloat32=function(t){var e=void 0===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)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=a(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},r.readFloat=r.readFloat32,r.writeFloat64=function(t,e){var r=void 0===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)<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,u(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},r.writeDouble=r.writeFloat64,r.readFloat64=function(t){var e=void 0===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)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=a(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},r.readDouble=r.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},r.writeVarint32=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=e.calculateVarint32(t);r+=o;var s=this.buffer.byteLength;for(r>s&&this.resize((s*=2)>r?s:r),r-=o,t>>>=0;t>=128;)i=127&t|128,this.view[r++]=i,t>>>=7;return this.view[r++]=t,n?(this.offset=r,this):o},r.writeVarint32ZigZag=function(t,r){return this.writeVarint32(e.zigZagEncode32(t),r)},r.readVarint32=function(t){var e=void 0===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)<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}},r.readVarint32ZigZag=function(t){var r=this.readVarint32(t);return"object"==typeof r?r.value=e.zigZagDecode32(r.value):r=e.zigZagDecode32(r),r},t&&(e.MAX_VARINT64_BYTES=10,e.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},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},r.writeVarint64=function(r,n){var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof r)r=t.fromNumber(r);else if("string"==typeof r)r=t.fromString(r);else if(!(r&&r instanceof t))throw TypeError("Illegal value: "+r+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof r?r=t.fromNumber(r,!1):"string"==typeof r?r=t.fromString(r,!1):!1!==r.unsigned&&(r=r.toSigned());var o=e.calculateVarint64(r),s=r.toInt()>>>0,a=r.shiftRightUnsigned(28).toInt()>>>0,u=r.shiftRightUnsigned(56).toInt()>>>0;n+=o;var f=this.buffer.byteLength;switch(n>f&&this.resize((f*=2)>n?f:n),n-=o,o){case 10:this.view[n+9]=u>>>7&1;case 9:this.view[n+8]=9!==o?128|u:127&u;case 8:this.view[n+7]=8!==o?a>>>21|128:a>>>21&127;case 7:this.view[n+6]=7!==o?a>>>14|128:a>>>14&127;case 6:this.view[n+5]=6!==o?a>>>7|128:a>>>7&127;case 5:this.view[n+4]=5!==o?128|a:127&a;case 4:this.view[n+3]=4!==o?s>>>21|128:s>>>21&127;case 3:this.view[n+2]=3!==o?s>>>14|128:s>>>14&127;case 2:this.view[n+1]=2!==o?s>>>7|128:s>>>7&127;case 1:this.view[n]=1!==o?128|s:127&s}return i?(this.offset+=o,this):o},r.writeVarint64ZigZag=function(t,r){return this.writeVarint64(e.zigZagEncode64(t),r)},r.readVarint64=function(e){var r=void 0===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)<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(i=127&(a=this.view[e++]),128&a&&(i|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&void 0===a)&&(i|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&void 0===a)&&(i|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&void 0===a)&&(o=127&(a=this.view[e++]),(128&a||this.noAssert&&void 0===a)&&(o|=(127&(a=this.view[e++]))<<7,(128&a||this.noAssert&&void 0===a)&&(o|=(127&(a=this.view[e++]))<<14,(128&a||this.noAssert&&void 0===a)&&(o|=(127&(a=this.view[e++]))<<21,(128&a||this.noAssert&&void 0===a)&&(s=127&(a=this.view[e++]),(128&a||this.noAssert&&void 0===a)&&(s|=(127&(a=this.view[e++]))<<7,128&a||this.noAssert&&void 0===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}},r.readVarint64ZigZag=function(r){var n=this.readVarint64(r);return n&&n.value instanceof t?n.value=e.zigZagDecode64(n.value):n=e.zigZagDecode64(n),n}),r.writeCString=function(t,e){var r=void 0===e;r&&(e=this.offset);var n,i=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(n=0;n<i;++n)if(0===t.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}i=c.calculateUTF16asUTF8(o(t))[1],e+=i+1;var s=this.buffer.byteLength;return e>s&&this.resize((s*=2)>e?s:e),e-=i+1,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,r?(this.offset=e,this):i},r.readCString=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=t,i=-1;return c.decodeUTF8toUTF16(function(){if(0===i)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(i=this.view[t++])?null:i}.bind(this),r=s(),!0),e?(this.offset=t,r()):{string:r(),length:t-n}},r.writeIString=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e;n=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],e+=4+n;var s=this.buffer.byteLength;if(e>s&&this.resize((s*=2)>e?s:e),e-=4+n,this.littleEndian?(this.view[e+3]=n>>>24&255,this.view[e+2]=n>>>16&255,this.view[e+1]=n>>>8&255,this.view[e]=255&n):(this.view[e]=n>>>24&255,this.view[e+1]=n>>>16&255,this.view[e+2]=n>>>8&255,this.view[e+3]=255&n),e+=4,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),e!==i+4+n)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+n));return r?(this.offset=e,this):e-i},r.readIString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=t,i=this.readUint32(t),o=this.readUTF8String(i,e.METRICS_BYTES,t+=4);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",r.writeUTF8String=function(t,e){var r,n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var i=e;r=c.calculateUTF16asUTF8(o(t))[1],e+=r;var s=this.buffer.byteLength;return e>s&&this.resize((s*=2)>e?s:e),e-=r,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),n?(this.offset=e,this):e-i},r.writeString=r.writeUTF8String,e.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(o(t))[0]},e.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(o(t))[1]},e.calculateString=e.calculateUTF8Bytes,r.readUTF8String=function(t,r,n){"number"==typeof r&&(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),void 0===r&&(r=e.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)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var o,a=0,u=n;if(r===e.METRICS_CHARS){if(o=s(),c.decodeUTF8(function(){return a<t&&n<this.limit?this.view[n++]:null}.bind(this),function(t){++a,c.UTF8toUTF16(t,o)}),a!==t)throw RangeError("Illegal range: Truncated data, "+a+" == "+t);return i?(this.offset=n,o()):{string:o(),length:n-u}}if(r===e.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<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<f?this.view[n++]:null}.bind(this),o=s(),this.noAssert),n!==f)throw RangeError("Illegal range: Truncated data, "+n+" == "+f);return i?(this.offset=n,o()):{string:o(),length:n-u}}throw TypeError("Unsupported metrics: "+r)},r.readString=r.readUTF8String,r.writeVString=function(t,r){var n=void 0===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)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,s,a=r;i=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],s=e.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(o(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},r.readVString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=t,i=this.readVarint32(t),o=this.readUTF8String(i.value,e.METRICS_BYTES,t+=i.length);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},r.append=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;n+=o;var s=this.buffer.byteLength;return n>s&&this.resize((s*=2)>n?s:n),n-=o,this.view.set(t.view.subarray(t.offset,t.limit),n),t.offset+=o,i&&(this.offset+=o),this},r.appendTo=function(t,e){return t.append(this,e),this},r.assert=function(t){return this.noAssert=!t,this},r.capacity=function(){return this.buffer.byteLength},r.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},r.clone=function(t){var r=new e(0,this.littleEndian,this.noAssert);return t?(r.buffer=new ArrayBuffer(this.buffer.byteLength),r.view=new Uint8Array(r.buffer)):(r.buffer=this.buffer,r.view=this.view),r.offset=this.offset,r.markedOffset=this.markedOffset,r.limit=this.limit,r},r.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===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=n,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(r),o=new Uint8Array(i);return o.set(this.view.subarray(t,e)),this.buffer=i,this.view=o,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},r.copy=function(t,r){if(void 0===t&&(t=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,t<0||t>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+r+" <= "+this.buffer.byteLength)}if(t===r)return new e(0,this.littleEndian,this.noAssert);var n=r-t,i=new e(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,i.markedOffset>=0&&(i.markedOffset-=t),this.copyTo(i,0,t,r),i},r.copyTo=function(t,r,n,i){var o,s;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(r=(s=void 0===r)?t.offset:0|r,n=(o=void 0===n)?this.offset:0|n,i=void 0===i?this.limit:0|i,r<0||r>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+r+" <= "+t.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var a=i-n;return 0===a?t:(t.ensureCapacity(r+a),t.view.set(this.view.subarray(n,i),r),o&&(this.offset+=a),s&&(t.offset+=a),this)},r.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},r.fill=function(t,e,r){var n=void 0===e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===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<r;)this.view[e++]=t;return n&&(this.offset=e),this},r.flip=function(){return this.limit=this.offset,this.offset=0,this},r.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},r.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},r.LE=function(t){return this.littleEndian=void 0===t||!!t,this},r.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},r.prepend=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;var s=o-n;if(s>0){var a=new ArrayBuffer(this.buffer.byteLength+s),u=new Uint8Array(a);u.set(this.view.subarray(n,this.buffer.byteLength),o),this.buffer=a,this.view=u,this.offset+=s,this.markedOffset>=0&&(this.markedOffset+=s),this.limit+=s,n+=s}else new Uint8Array(this.buffer);return this.view.set(t.view.subarray(t.offset,t.limit),n-o),t.offset=t.limit,i&&(this.offset-=o),this},r.prependTo=function(t,e){return t.prepend(this,e),this},r.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},r.remaining=function(){return this.limit-this.offset},r.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},r.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),r=new Uint8Array(e);r.set(this.view),this.buffer=e,this.view=r}return this},r.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===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)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},r.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},r.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===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},r.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 n;var i=new ArrayBuffer(r-e);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(e,r),0),i},r.toArrayBuffer=r.toBuffer,r.toString=function(t,e,r){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(r=e=t="utf8"),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<i;++n)r[e[n]]=n;return t.encode=function(t,r){for(var n,i;null!==(n=t());)r(e[n>>2&63]),i=(3&n)<<4,null!==(n=t())?(r(e[63&((i|=n>>4&15)|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){var n,i,o;function s(t){throw Error("Illegal character code: "+t)}for(;null!==(n=t());)if(void 0===(i=r[n])&&s(n),null!==(n=t())&&(void 0===(o=r[n])&&s(n),e(i<<2>>>0|(48&o)>>4),null!==(n=t()))){if(void 0===(i=r[n])){if(61===n)break;s(n)}if(e((15&o)<<4>>>0|(60&i)>>2),null!==(n=t())){if(void 0===(o=r[n])){if(61===n)break;s(n)}e((3&i)<<6>>>0|o)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();r.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return f.encode(function(){return t<e?this.view[t++]:null}.bind(this),r=s()),r()},e.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new e(t.length/4*3,r),i=0;return f.decode(o(t),function(t){n.view[i++]=t}),n.limit=i,n},e.btoa=function(t){return e.fromBinary(t).toBase64()},e.atob=function(t){return e.fromBase64(t).toBinary()},r.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var r=[],n=[];t<e;)r.push(this.view[t++]),r.length>=1024&&(n.push(String.fromCharCode.apply(String,r)),r=[]);return n.join("")+String.fromCharCode.apply(String,r)},e.fromBinary=function(t,r){if("string"!=typeof t)throw TypeError("str");for(var n,i=0,o=t.length,s=new e(o,r);i<o;){if((n=t.charCodeAt(i))>255)throw RangeError("illegal char code: "+n);s.view[i++]=n}return s.limit=o,s},r.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",s="";r<n;){if(-1!==r&&(i+=(e=this.view[r])<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(o+=e>32&&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=""}r===this.offset&&r===this.limit?i+=r===this.markedOffset?"!":"|":r===this.offset?i+=r===this.markedOffset?"[":"<":r===this.limit?i+=r===this.markedOffset?"]":">":i+=r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";s+=i+o+"\n"}return t?s:i},e.fromDebug=function(t,r,n){for(var i,o,s=t.length,a=new e((s+1)/3|0,r,n),u=0,f=0,c=!1,l=!1,h=!1,p=!1,d=!1;u<s;){switch(i=t.charAt(u++)){case"!":if(!n){if(l||h||p){d=!0;break}l=h=p=!0}a.offset=a.markedOffset=a.limit=f,c=!1;break;case"|":if(!n){if(l||p){d=!0;break}l=p=!0}a.offset=a.limit=f,c=!1;break;case"[":if(!n){if(l||h){d=!0;break}l=h=!0}a.offset=a.markedOffset=f,c=!1;break;case"<":if(!n){if(l){d=!0;break}l=!0}a.offset=f,c=!1;break;case"]":if(!n){if(p||h){d=!0;break}p=h=!0}a.limit=a.markedOffset=f,c=!1;break;case">":if(!n){if(p){d=!0;break}p=!0}a.limit=f,c=!1;break;case"'":if(!n){if(h){d=!0;break}h=!0}a.markedOffset=f,c=!1;break;case" ":c=!1;break;default:if(!n&&c){d=!0;break}if(o=parseInt(i+t.charAt(u++),16),!n&&(isNaN(o)||o<0||o>255))throw TypeError("Illegal str: Not a debug encoded string");a.view[f++]=o,c=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!n){if(!l||!p)throw TypeError("Illegal str: Missing offset or limit");if(f<a.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+f+" < "+s)}return a},r.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===e?this.limit:e,!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)}for(var r,n=new Array(e-t);t<e;)(r=this.view[t++])<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},e.fromHex=function(t,r,n){if(!n){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if(t.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var i,o=t.length,s=new e(o/2|0,r),a=0,u=0;a<o;a+=2){if(i=parseInt(t.substring(a,a+2),16),!n&&(!isFinite(i)||i<0||i>255))throw TypeError("Illegal str: Contains non-hex characters");s.view[u++]=i}return s.limit=u,s};var c=function(){var t={MAX_CODEPOINT:1114111,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},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)}},UTF16toUTF8:function(t,e){for(var r,n=null;null!==(r=null!==n?n:t());)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)},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):(e(55296+((r-=65536)>>10)),e(r%1024+56320)),r=null},encodeUTF16toUTF8:function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},decodeUTF8toUTF16:function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},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]}};return t}();return r.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===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;try{c.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),r=s())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return r()},e.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new e(c.calculateUTF16asUTF8(o(t),!0)[1],r,n),s=0;return c.encodeUTF16toUTF8(o(t),function(t){i.view[s++]=t}),i.limit=s,i},e})}).call(e,r(102)(t))},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,r){var n,i,o;(function(t){
|
|
28
|
+
!function(a,s){r(231).amd?(i=[r(232)],void 0===(o="function"==typeof(n=s)?n.apply(e,i):n)||(t.exports=o)):"object"==typeof t&&t&&t.exports?t.exports=function(){var t;try{t=r(232)}catch(t){}return s(t)}():(a.dcodeIO=a.dcodeIO||{}).ByteBuffer=s(a.dcodeIO.Long)}(this,function(t){"use strict";var e=function(t,r,i){if(void 0===t&&(t=e.DEFAULT_CAPACITY),void 0===r&&(r=e.DEFAULT_ENDIAN),void 0===i&&(i=e.DEFAULT_NOASSERT),!i){if((t|=0)<0)throw RangeError("Illegal capacity");r=!!r,i=!!i}this.buffer=0===t?n:new ArrayBuffer(t),this.view=0===t?null:new Uint8Array(this.buffer),this.offset=0,this.markedOffset=-1,this.limit=t,this.littleEndian=r,this.noAssert=i};e.VERSION="5.0.1",e.LITTLE_ENDIAN=!0,e.BIG_ENDIAN=!1,e.DEFAULT_CAPACITY=16,e.DEFAULT_ENDIAN=e.BIG_ENDIAN,e.DEFAULT_NOASSERT=!1,e.Long=t||null;var r=e.prototype;r.__isByteBuffer__,Object.defineProperty(r,"__isByteBuffer__",{value:!0,enumerable:!1,configurable:!1});var n=new ArrayBuffer(0),i=String.fromCharCode;function o(t){var e=0;return function(){return e<t.length?t.charCodeAt(e++):null}}function a(){var t=[],e=[];return function(){if(0===arguments.length)return e.join("")+i.apply(String,t);t.length+arguments.length>1024&&(e.push(i.apply(String,t)),t.length=0),Array.prototype.push.apply(t,arguments)}}function s(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,c=-7,l=r?i-1:0,h=r?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-c)-1,p>>=-c,c+=s;c>0;o=256*o+t[e+l],l+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=f}return(p?-1:1)*a*Math.pow(2,o-n)}function u(t,e,r,n,i,o){var a,s,u,f=8*o-i-1,c=(1<<f)-1,l=c>>1,h=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?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=c?(s=0,a=c):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;t[r+p]=255&a,p+=d,a/=256,f-=8);t[r+p-d]|=128*v}e.accessor=function(){return Uint8Array},e.allocate=function(t,r,n){return new e(t,r,n)},e.concat=function(t,r,n,i){"boolean"!=typeof r&&"string"==typeof r||(i=n,n=r,r=void 0);for(var o,a=0,s=0,u=t.length;s<u;++s)e.isByteBuffer(t[s])||(t[s]=e.wrap(t[s],r)),(o=t[s].limit-t[s].offset)>0&&(a+=o);if(0===a)return new e(0,n,i);var f,c=new e(a,n,i);for(s=0;s<u;)(o=(f=t[s++]).limit-f.offset)<=0||(c.view.set(f.view.subarray(f.offset,f.limit),c.offset),c.offset+=o);return c.limit=c.offset,c.offset=0,c},e.isByteBuffer=function(t){return!0===(t&&t.__isByteBuffer__)},e.type=function(){return ArrayBuffer},e.wrap=function(t,n,i,o){if("string"!=typeof n&&(o=i,i=n,n=void 0),"string"==typeof t)switch(void 0===n&&(n="utf8"),n){case"base64":return e.fromBase64(t,i);case"hex":return e.fromHex(t,i);case"binary":return e.fromBinary(t,i);case"utf8":return e.fromUTF8(t,i);case"debug":return e.fromDebug(t,i);default:throw Error("Unsupported encoding: "+n)}if(null===t||"object"!=typeof t)throw TypeError("Illegal buffer");var a;if(e.isByteBuffer(t))return(a=r.clone.call(t)).markedOffset=-1,a;if(t instanceof Uint8Array)a=new e(0,i,o),t.length>0&&(a.buffer=t.buffer,a.offset=t.byteOffset,a.limit=t.byteOffset+t.byteLength,a.view=new Uint8Array(t.buffer));else if(t instanceof ArrayBuffer)a=new e(0,i,o),t.byteLength>0&&(a.buffer=t,a.offset=0,a.limit=t.byteLength,a.view=t.byteLength>0?new Uint8Array(t):null);else{if("[object Array]"!==Object.prototype.toString.call(t))throw TypeError("Illegal buffer");(a=new e(t.length,i,o)).limit=t.length;for(var s=0;s<t.length;++s)a.view[s]=t[s]}return a},r.writeBitSet=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if(!(t instanceof Array))throw TypeError("Illegal BitSet: Not an array");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e,o=t.length,a=o>>3,s=0;for(e+=this.writeVarint32(o,e);a--;)n=1&!!t[s++]|(1&!!t[s++])<<1|(1&!!t[s++])<<2|(1&!!t[s++])<<3|(1&!!t[s++])<<4|(1&!!t[s++])<<5|(1&!!t[s++])<<6|(1&!!t[s++])<<7,this.writeByte(n,e++);if(s<o){var u=0;for(n=0;s<o;)n|=(1&!!t[s++])<<u++;this.writeByte(n,e++)}return r?(this.offset=e,this):e-i},r.readBitSet=function(t){var e=void 0===t;e&&(t=this.offset);var r,n=this.readVarint32(t),i=n.value,o=i>>3,a=0,s=[];for(t+=n.length;o--;)r=this.readByte(t++),s[a++]=!!(1&r),s[a++]=!!(2&r),s[a++]=!!(4&r),s[a++]=!!(8&r),s[a++]=!!(16&r),s[a++]=!!(32&r),s[a++]=!!(64&r),s[a++]=!!(128&r);if(a<i){var u=0;for(r=this.readByte(t++);a<i;)s[a++]=!!(r>>u++&1)}return e&&(this.offset=t),s},r.readBytes=function(t,e){var r=void 0===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)<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},r.writeBytes=r.append,r.writeInt8=function(t,e){var r=void 0===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)<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},r.writeByte=r.writeInt8,r.readInt8=function(t){var e=void 0===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)<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},r.readByte=r.readInt8,r.writeUint8=function(t,e){var r=void 0===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)<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},r.writeUInt8=r.writeUint8,r.readUint8=function(t){var e=void 0===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)<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},r.readUInt8=r.readUint8,r.writeInt16=function(t,e){var r=void 0===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)<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},r.writeShort=r.writeInt16,r.readInt16=function(t){var e=void 0===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)<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},r.readShort=r.readInt16,r.writeUint16=function(t,e){var r=void 0===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)<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},r.writeUInt16=r.writeUint16,r.readUint16=function(t){var e=void 0===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)<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},r.readUInt16=r.readUint16,r.writeInt32=function(t,e){var r=void 0===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)<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},r.writeInt=r.writeInt32,r.readInt32=function(t){var e=void 0===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)<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},r.readInt=r.readInt32,r.writeUint32=function(t,e){var r=void 0===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)<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},r.writeUInt32=r.writeUint32,r.readUint32=function(t){var e=void 0===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)<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},r.readUInt32=r.readUint32,t&&(r.writeInt64=function(e,r){var n=void 0===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)<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,a=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]=a>>>24&255,this.view[r+2]=a>>>16&255,this.view[r+1]=a>>>8&255,this.view[r]=255&a):(this.view[r]=a>>>24&255,this.view[r+1]=a>>>16&255,this.view[r+2]=a>>>8&255,this.view[r+3]=255&a,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},r.writeLong=r.writeInt64,r.readInt64=function(e){var r=void 0===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)<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},r.readLong=r.readInt64,r.writeUint64=function(e,r){var n=void 0===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)<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,a=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]=a>>>24&255,this.view[r+2]=a>>>16&255,this.view[r+1]=a>>>8&255,this.view[r]=255&a):(this.view[r]=a>>>24&255,this.view[r+1]=a>>>16&255,this.view[r+2]=a>>>8&255,this.view[r+3]=255&a,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},r.writeUInt64=r.writeUint64,r.readUint64=function(e){var r=void 0===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)<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},r.readUInt64=r.readUint64),r.writeFloat32=function(t,e){var r=void 0===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)<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,u(this.view,t,e,this.littleEndian,23,4),r&&(this.offset+=4),this},r.writeFloat=r.writeFloat32,r.readFloat32=function(t){var e=void 0===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)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var r=s(this.view,t,this.littleEndian,23,4);return e&&(this.offset+=4),r},r.readFloat=r.readFloat32,r.writeFloat64=function(t,e){var r=void 0===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)<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,u(this.view,t,e,this.littleEndian,52,8),r&&(this.offset+=8),this},r.writeDouble=r.writeFloat64,r.readFloat64=function(t){var e=void 0===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)<0||t+8>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+8) <= "+this.buffer.byteLength)}var r=s(this.view,t,this.littleEndian,52,8);return e&&(this.offset+=8),r},r.readDouble=r.readFloat64,e.MAX_VARINT32_BYTES=5,e.calculateVarint32=function(t){return(t>>>=0)<128?1:t<16384?2:t<1<<21?3:t<1<<28?4:5},e.zigZagEncode32=function(t){return((t|=0)<<1^t>>31)>>>0},e.zigZagDecode32=function(t){return t>>>1^-(1&t)|0},r.writeVarint32=function(t,r){var n=void 0===r;if(n&&(r=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal value: "+t+" (not an integer)");if(t|=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal offset: "+r+" (not an integer)");if((r>>>=0)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,o=e.calculateVarint32(t);r+=o;var a=this.buffer.byteLength;for(r>a&&this.resize((a*=2)>r?a:r),r-=o,t>>>=0;t>=128;)i=127&t|128,this.view[r++]=i,t>>>=7;return this.view[r++]=t,n?(this.offset=r,this):o},r.writeVarint32ZigZag=function(t,r){return this.writeVarint32(e.zigZagEncode32(t),r)},r.readVarint32=function(t){var e=void 0===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)<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}},r.readVarint32ZigZag=function(t){var r=this.readVarint32(t);return"object"==typeof r?r.value=e.zigZagDecode32(r.value):r=e.zigZagDecode32(r),r},t&&(e.MAX_VARINT64_BYTES=10,e.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},e.zigZagEncode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftLeft(1).xor(e.shiftRight(63)).toUnsigned()},e.zigZagDecode64=function(e){return"number"==typeof e?e=t.fromNumber(e,!1):"string"==typeof e?e=t.fromString(e,!1):!1!==e.unsigned&&(e=e.toSigned()),e.shiftRightUnsigned(1).xor(e.and(t.ONE).toSigned().negate()).toSigned()},r.writeVarint64=function(r,n){var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"==typeof r)r=t.fromNumber(r);else if("string"==typeof r)r=t.fromString(r);else if(!(r&&r instanceof t))throw TypeError("Illegal value: "+r+" (not an integer or Long)");if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}"number"==typeof r?r=t.fromNumber(r,!1):"string"==typeof r?r=t.fromString(r,!1):!1!==r.unsigned&&(r=r.toSigned());var o=e.calculateVarint64(r),a=r.toInt()>>>0,s=r.shiftRightUnsigned(28).toInt()>>>0,u=r.shiftRightUnsigned(56).toInt()>>>0;n+=o;var f=this.buffer.byteLength;switch(n>f&&this.resize((f*=2)>n?f:n),n-=o,o){case 10:this.view[n+9]=u>>>7&1;case 9:this.view[n+8]=9!==o?128|u:127&u;case 8:this.view[n+7]=8!==o?s>>>21|128:s>>>21&127;case 7:this.view[n+6]=7!==o?s>>>14|128:s>>>14&127;case 6:this.view[n+5]=6!==o?s>>>7|128:s>>>7&127;case 5:this.view[n+4]=5!==o?128|s:127&s;case 4:this.view[n+3]=4!==o?a>>>21|128:a>>>21&127;case 3:this.view[n+2]=3!==o?a>>>14|128:a>>>14&127;case 2:this.view[n+1]=2!==o?a>>>7|128:a>>>7&127;case 1:this.view[n]=1!==o?128|a:127&a}return i?(this.offset+=o,this):o},r.writeVarint64ZigZag=function(t,r){return this.writeVarint64(e.zigZagEncode64(t),r)},r.readVarint64=function(e){var r=void 0===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)<0||e+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+1) <= "+this.buffer.byteLength)}var n=e,i=0,o=0,a=0,s=0;if(i=127&(s=this.view[e++]),128&s&&(i|=(127&(s=this.view[e++]))<<7,(128&s||this.noAssert&&void 0===s)&&(i|=(127&(s=this.view[e++]))<<14,(128&s||this.noAssert&&void 0===s)&&(i|=(127&(s=this.view[e++]))<<21,(128&s||this.noAssert&&void 0===s)&&(o=127&(s=this.view[e++]),(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<7,(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<14,(128&s||this.noAssert&&void 0===s)&&(o|=(127&(s=this.view[e++]))<<21,(128&s||this.noAssert&&void 0===s)&&(a=127&(s=this.view[e++]),(128&s||this.noAssert&&void 0===s)&&(a|=(127&(s=this.view[e++]))<<7,128&s||this.noAssert&&void 0===s))))))))))throw Error("Buffer overrun");var u=t.fromBits(i|o<<28,o>>>4|a<<24,!1);return r?(this.offset=e,u):{value:u,length:e-n}},r.readVarint64ZigZag=function(r){var n=this.readVarint64(r);return n&&n.value instanceof t?n.value=e.zigZagDecode64(n.value):n=e.zigZagDecode64(n),n}),r.writeCString=function(t,e){var r=void 0===e;r&&(e=this.offset);var n,i=t.length;if(!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");for(n=0;n<i;++n)if(0===t.charCodeAt(n))throw RangeError("Illegal str: Contains NULL-characters");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}i=c.calculateUTF16asUTF8(o(t))[1],e+=i+1;var a=this.buffer.byteLength;return e>a&&this.resize((a*=2)>e?a:e),e-=i+1,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),this.view[e++]=0,r?(this.offset=e,this):i},r.readCString=function(t){var e=void 0===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)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var r,n=t,i=-1;return c.decodeUTF8toUTF16(function(){if(0===i)return null;if(t>=this.limit)throw RangeError("Illegal range: Truncated data, "+t+" < "+this.limit);return 0===(i=this.view[t++])?null:i}.bind(this),r=a(),!0),e?(this.offset=t,r()):{string:r(),length:t-n}},r.writeIString=function(t,e){var r=void 0===e;if(r&&(e=this.offset),!this.noAssert){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var n,i=e;n=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],e+=4+n;var a=this.buffer.byteLength;if(e>a&&this.resize((a*=2)>e?a:e),e-=4+n,this.littleEndian?(this.view[e+3]=n>>>24&255,this.view[e+2]=n>>>16&255,this.view[e+1]=n>>>8&255,this.view[e]=255&n):(this.view[e]=n>>>24&255,this.view[e+1]=n>>>16&255,this.view[e+2]=n>>>8&255,this.view[e+3]=255&n),e+=4,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),e!==i+4+n)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+4+n));return r?(this.offset=e,this):e-i},r.readIString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+4>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+4) <= "+this.buffer.byteLength)}var n=t,i=this.readUint32(t),o=this.readUTF8String(i,e.METRICS_BYTES,t+=4);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},e.METRICS_CHARS="c",e.METRICS_BYTES="b",r.writeUTF8String=function(t,e){var r,n=void 0===e;if(n&&(e=this.offset),!this.noAssert){if("number"!=typeof e||e%1!=0)throw TypeError("Illegal offset: "+e+" (not an integer)");if((e>>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var i=e;r=c.calculateUTF16asUTF8(o(t))[1],e+=r;var a=this.buffer.byteLength;return e>a&&this.resize((a*=2)>e?a:e),e-=r,c.encodeUTF16toUTF8(o(t),function(t){this.view[e++]=t}.bind(this)),n?(this.offset=e,this):e-i},r.writeString=r.writeUTF8String,e.calculateUTF8Chars=function(t){return c.calculateUTF16asUTF8(o(t))[0]},e.calculateUTF8Bytes=function(t){return c.calculateUTF16asUTF8(o(t))[1]},e.calculateString=e.calculateUTF8Bytes,r.readUTF8String=function(t,r,n){"number"==typeof r&&(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),void 0===r&&(r=e.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)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}var o,s=0,u=n;if(r===e.METRICS_CHARS){if(o=a(),c.decodeUTF8(function(){return s<t&&n<this.limit?this.view[n++]:null}.bind(this),function(t){++s,c.UTF8toUTF16(t,o)}),s!==t)throw RangeError("Illegal range: Truncated data, "+s+" == "+t);return i?(this.offset=n,o()):{string:o(),length:n-u}}if(r===e.METRICS_BYTES){if(!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<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<f?this.view[n++]:null}.bind(this),o=a(),this.noAssert),n!==f)throw RangeError("Illegal range: Truncated data, "+n+" == "+f);return i?(this.offset=n,o()):{string:o(),length:n-u}}throw TypeError("Unsupported metrics: "+r)},r.readString=r.readUTF8String,r.writeVString=function(t,r){var n=void 0===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)<0||r+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+r+" (+0) <= "+this.buffer.byteLength)}var i,a,s=r;i=c.calculateUTF16asUTF8(o(t),this.noAssert)[1],a=e.calculateVarint32(i),r+=a+i;var u=this.buffer.byteLength;if(r>u&&this.resize((u*=2)>r?u:r),r-=a+i,r+=this.writeVarint32(i,r),c.encodeUTF16toUTF8(o(t),function(t){this.view[r++]=t}.bind(this)),r!==s+i+a)throw RangeError("Illegal range: Truncated data, "+r+" == "+(r+i+a));return n?(this.offset=r,this):r-s},r.readVString=function(t){var r=void 0===t;if(r&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+1) <= "+this.buffer.byteLength)}var n=t,i=this.readVarint32(t),o=this.readUTF8String(i.value,e.METRICS_BYTES,t+=i.length);return t+=o.length,r?(this.offset=t,o.string):{string:o.string,length:t-n}},r.append=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;n+=o;var a=this.buffer.byteLength;return n>a&&this.resize((a*=2)>n?a:n),n-=o,this.view.set(t.view.subarray(t.offset,t.limit),n),t.offset+=o,i&&(this.offset+=o),this},r.appendTo=function(t,e){return t.append(this,e),this},r.assert=function(t){return this.noAssert=!t,this},r.capacity=function(){return this.buffer.byteLength},r.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},r.clone=function(t){var r=new e(0,this.littleEndian,this.noAssert);return t?(r.buffer=new ArrayBuffer(this.buffer.byteLength),r.view=new Uint8Array(r.buffer)):(r.buffer=this.buffer,r.view=this.view),r.offset=this.offset,r.markedOffset=this.markedOffset,r.limit=this.limit,r},r.compact=function(t,e){if(void 0===t&&(t=this.offset),void 0===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=n,this.view=null,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=0,this;var i=new ArrayBuffer(r),o=new Uint8Array(i);return o.set(this.view.subarray(t,e)),this.buffer=i,this.view=o,this.markedOffset>=0&&(this.markedOffset-=t),this.offset=0,this.limit=r,this},r.copy=function(t,r){if(void 0===t&&(t=this.offset),void 0===r&&(r=this.limit),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal begin: Not an integer");if(t>>>=0,"number"!=typeof r||r%1!=0)throw TypeError("Illegal end: Not an integer");if(r>>>=0,t<0||t>r||r>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+t+" <= "+r+" <= "+this.buffer.byteLength)}if(t===r)return new e(0,this.littleEndian,this.noAssert);var n=r-t,i=new e(n,this.littleEndian,this.noAssert);return i.offset=0,i.limit=n,i.markedOffset>=0&&(i.markedOffset-=t),this.copyTo(i,0,t,r),i},r.copyTo=function(t,r,n,i){var o,a;if(!this.noAssert&&!e.isByteBuffer(t))throw TypeError("Illegal target: Not a ByteBuffer");if(r=(a=void 0===r)?t.offset:0|r,n=(o=void 0===n)?this.offset:0|n,i=void 0===i?this.limit:0|i,r<0||r>t.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+r+" <= "+t.buffer.byteLength);if(n<0||i>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+n+" <= "+this.buffer.byteLength);var s=i-n;return 0===s?t:(t.ensureCapacity(r+s),t.view.set(this.view.subarray(n,i),r),o&&(this.offset+=s),a&&(t.offset+=s),this)},r.ensureCapacity=function(t){var e=this.buffer.byteLength;return e<t?this.resize((e*=2)>t?e:t):this},r.fill=function(t,e,r){var n=void 0===e;if(n&&(e=this.offset),"string"==typeof t&&t.length>0&&(t=t.charCodeAt(0)),void 0===e&&(e=this.offset),void 0===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<r;)this.view[e++]=t;return n&&(this.offset=e),this},r.flip=function(){return this.limit=this.offset,this.offset=0,this},r.mark=function(t){if(t=void 0===t?this.offset:t,!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}return this.markedOffset=t,this},r.order=function(t){if(!this.noAssert&&"boolean"!=typeof t)throw TypeError("Illegal littleEndian: Not a boolean");return this.littleEndian=!!t,this},r.LE=function(t){return this.littleEndian=void 0===t||!!t,this},r.BE=function(t){return this.littleEndian=void 0!==t&&!t,this},r.prepend=function(t,r,n){"number"!=typeof r&&"string"==typeof r||(n=r,r=void 0);var i=void 0===n;if(i&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+0) <= "+this.buffer.byteLength)}t instanceof e||(t=e.wrap(t,r));var o=t.limit-t.offset;if(o<=0)return this;var a=o-n;if(a>0){var s=new ArrayBuffer(this.buffer.byteLength+a),u=new Uint8Array(s);u.set(this.view.subarray(n,this.buffer.byteLength),o),this.buffer=s,this.view=u,this.offset+=a,this.markedOffset>=0&&(this.markedOffset+=a),this.limit+=a,n+=a}else new Uint8Array(this.buffer);return this.view.set(t.view.subarray(t.offset,t.limit),n-o),t.offset=t.limit,i&&(this.offset-=o),this},r.prependTo=function(t,e){return t.prepend(this,e),this},r.printDebug=function(t){"function"!=typeof t&&(t=console.log.bind(console)),t(this.toString()+"\n-------------------------------------------------------------------\n"+this.toDebug(!0))},r.remaining=function(){return this.limit-this.offset},r.reset=function(){return this.markedOffset>=0?(this.offset=this.markedOffset,this.markedOffset=-1):this.offset=0,this},r.resize=function(t){if(!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal capacity: "+t+" (not an integer)");if((t|=0)<0)throw RangeError("Illegal capacity: 0 <= "+t)}if(this.buffer.byteLength<t){var e=new ArrayBuffer(t),r=new Uint8Array(e);r.set(this.view),this.buffer=e,this.view=r}return this},r.reverse=function(t,e){if(void 0===t&&(t=this.offset),void 0===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)}return t===e?this:(Array.prototype.reverse.call(this.view.subarray(t,e)),this)},r.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},r.slice=function(t,e){if(void 0===t&&(t=this.offset),void 0===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},r.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 n;var i=new ArrayBuffer(r-e);return new Uint8Array(i).set(new Uint8Array(this.buffer).subarray(e,r),0),i},r.toArrayBuffer=r.toBuffer,r.toString=function(t,e,r){if(void 0===t)return"ByteBufferAB(offset="+this.offset+",markedOffset="+this.markedOffset+",limit="+this.limit+",capacity="+this.capacity()+")";switch("number"==typeof t&&(r=e=t="utf8"),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<i;++n)r[e[n]]=n;return t.encode=function(t,r){for(var n,i;null!==(n=t());)r(e[n>>2&63]),i=(3&n)<<4,null!==(n=t())?(r(e[63&((i|=n>>4&15)|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){var n,i,o;function a(t){throw Error("Illegal character code: "+t)}for(;null!==(n=t());)if(void 0===(i=r[n])&&a(n),null!==(n=t())&&(void 0===(o=r[n])&&a(n),e(i<<2>>>0|(48&o)>>4),null!==(n=t()))){if(void 0===(i=r[n])){if(61===n)break;a(n)}if(e((15&o)<<4>>>0|(60&i)>>2),null!==(n=t())){if(void 0===(o=r[n])){if(61===n)break;a(n)}e((3&i)<<6>>>0|o)}}},t.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)},t}();r.toBase64=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity||t>e)throw RangeError("begin, end");var r;return f.encode(function(){return t<e?this.view[t++]:null}.bind(this),r=a()),r()},e.fromBase64=function(t,r){if("string"!=typeof t)throw TypeError("str");var n=new e(t.length/4*3,r),i=0;return f.decode(o(t),function(t){n.view[i++]=t}),n.limit=i,n},e.btoa=function(t){return e.fromBinary(t).toBase64()},e.atob=function(t){return e.fromBase64(t).toBinary()},r.toBinary=function(t,e){if(void 0===t&&(t=this.offset),void 0===e&&(e=this.limit),e|=0,(t|=0)<0||e>this.capacity()||t>e)throw RangeError("begin, end");if(t===e)return"";for(var r=[],n=[];t<e;)r.push(this.view[t++]),r.length>=1024&&(n.push(String.fromCharCode.apply(String,r)),r=[]);return n.join("")+String.fromCharCode.apply(String,r)},e.fromBinary=function(t,r){if("string"!=typeof t)throw TypeError("str");for(var n,i=0,o=t.length,a=new e(o,r);i<o;){if((n=t.charCodeAt(i))>255)throw RangeError("illegal char code: "+n);a.view[i++]=n}return a.limit=o,a},r.toDebug=function(t){for(var e,r=-1,n=this.buffer.byteLength,i="",o="",a="";r<n;){if(-1!==r&&(i+=(e=this.view[r])<16?"0"+e.toString(16).toUpperCase():e.toString(16).toUpperCase(),t&&(o+=e>32&&e<127?String.fromCharCode(e):".")),++r,t&&r>0&&r%16==0&&r!==n){for(;i.length<51;)i+=" ";a+=i+o+"\n",i=o=""}r===this.offset&&r===this.limit?i+=r===this.markedOffset?"!":"|":r===this.offset?i+=r===this.markedOffset?"[":"<":r===this.limit?i+=r===this.markedOffset?"]":">":i+=r===this.markedOffset?"'":t||0!==r&&r!==n?" ":""}if(t&&" "!==i){for(;i.length<51;)i+=" ";a+=i+o+"\n"}return t?a:i},e.fromDebug=function(t,r,n){for(var i,o,a=t.length,s=new e((a+1)/3|0,r,n),u=0,f=0,c=!1,l=!1,h=!1,p=!1,d=!1;u<a;){switch(i=t.charAt(u++)){case"!":if(!n){if(l||h||p){d=!0;break}l=h=p=!0}s.offset=s.markedOffset=s.limit=f,c=!1;break;case"|":if(!n){if(l||p){d=!0;break}l=p=!0}s.offset=s.limit=f,c=!1;break;case"[":if(!n){if(l||h){d=!0;break}l=h=!0}s.offset=s.markedOffset=f,c=!1;break;case"<":if(!n){if(l){d=!0;break}l=!0}s.offset=f,c=!1;break;case"]":if(!n){if(p||h){d=!0;break}p=h=!0}s.limit=s.markedOffset=f,c=!1;break;case">":if(!n){if(p){d=!0;break}p=!0}s.limit=f,c=!1;break;case"'":if(!n){if(h){d=!0;break}h=!0}s.markedOffset=f,c=!1;break;case" ":c=!1;break;default:if(!n&&c){d=!0;break}if(o=parseInt(i+t.charAt(u++),16),!n&&(isNaN(o)||o<0||o>255))throw TypeError("Illegal str: Not a debug encoded string");s.view[f++]=o,c=!0}if(d)throw TypeError("Illegal str: Invalid symbol at "+u)}if(!n){if(!l||!p)throw TypeError("Illegal str: Missing offset or limit");if(f<s.buffer.byteLength)throw TypeError("Illegal str: Not a debug encoded string (is it hex?) "+f+" < "+a)}return s},r.toHex=function(t,e){if(t=void 0===t?this.offset:t,e=void 0===e?this.limit:e,!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)}for(var r,n=new Array(e-t);t<e;)(r=this.view[t++])<16?n.push("0",r.toString(16)):n.push(r.toString(16));return n.join("")},e.fromHex=function(t,r,n){if(!n){if("string"!=typeof t)throw TypeError("Illegal str: Not a string");if(t.length%2!=0)throw TypeError("Illegal str: Length not a multiple of 2")}for(var i,o=t.length,a=new e(o/2|0,r),s=0,u=0;s<o;s+=2){if(i=parseInt(t.substring(s,s+2),16),!n&&(!isFinite(i)||i<0||i>255))throw TypeError("Illegal str: Contains non-hex characters");a.view[u++]=i}return a.limit=u,a};var c=function(){var t={MAX_CODEPOINT:1114111,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},decodeUTF8:function(t,e){for(var r,n,i,o,a=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())&&a([r,n]),e((31&r)<<6|63&n);else if(224==(240&r))(null===(n=t())||null===(i=t()))&&a([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()))&&a([r,n,i,o]),e((7&r)<<18|(63&n)<<12|(63&i)<<6|63&o)}},UTF16toUTF8:function(t,e){for(var r,n=null;null!==(r=null!==n?n:t());)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)},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):(e(55296+((r-=65536)>>10)),e(r%1024+56320)),r=null},encodeUTF16toUTF8:function(e,r){t.UTF16toUTF8(e,function(e){t.encodeUTF8(e,r)})},decodeUTF8toUTF16:function(e,r){t.decodeUTF8(e,function(e){t.UTF8toUTF16(e,r)})},calculateCodePoint:function(t){return t<128?1:t<2048?2:t<65536?3:4},calculateUTF8:function(t){for(var e,r=0;null!==(e=t());)r+=e<128?1:e<2048?2:e<65536?3:4;return r},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]}};return t}();return r.toUTF8=function(t,e){if(void 0===t&&(t=this.offset),void 0===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;try{c.decodeUTF8toUTF16(function(){return t<e?this.view[t++]:null}.bind(this),r=a())}catch(r){if(t!==e)throw RangeError("Illegal range: Truncated data, "+t+" != "+e)}return r()},e.fromUTF8=function(t,r,n){if(!n&&"string"!=typeof t)throw TypeError("Illegal str: Not a string");var i=new e(c.calculateUTF16asUTF8(o(t),!0)[1],r,n),a=0;return c.encodeUTF16toUTF8(o(t),function(t){i.view[a++]=t}),i.limit=a,i},e})}).call(e,r(102)(t))},function(t,e){t.exports=function(){throw new Error("define cannot be used indirect")}},function(t,e,r){var n,i,o;(function(t){
|
|
29
29
|
/**
|
|
30
30
|
* @license long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
|
|
31
31
|
* Released under the Apache License, Version 2.0
|
|
32
32
|
* see: https://github.com/dcodeIO/long.js for details
|
|
33
33
|
*/
|
|
34
|
-
!function(s,a){r(231).amd?(i=[],void 0===(o="function"==typeof(n=a)?n.apply(e,i):n)||(t.exports=o)):"object"==typeof t&&t&&t.exports?t.exports=a():(s.dcodeIO=s.dcodeIO||{}).Long=a()}(this,function(){"use strict";function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var r={},n={};function i(t,e){var i,o,a;return e?(a=0<=(t>>>=0)&&t<256)&&(o=n[t])?o:(i=s(t,(0|t)<0?-1:0,!0),a&&(n[t]=i),i):(a=-128<=(t|=0)&&t<128)&&(o=r[t])?o:(i=s(t,t<0?-1:0,!1),a&&(r[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?v:d;if(e){if(t<0)return v;if(t>=l)return b}else{if(t<=-h)return w;if(t+1>=h)return m}return t<0?o(-t,e).neg():s(t%c|0,t/c|0,e)}function s(e,r,n){return new t(e,r,n)}t.fromInt=i,t.fromNumber=o,t.fromBits=s;var a=Math.pow;function u(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return d;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return u(t.substring(1),e,r).neg();for(var i=o(a(r,8)),s=d,f=0;f<t.length;f+=8){var c=Math.min(8,t.length-f),l=parseInt(t.substring(f,f+c),r);if(c<8){var h=o(a(r,c));s=s.mul(h).add(o(l))}else s=(s=s.mul(i)).add(o(l))}return s.unsigned=e,s}function f(e){return e instanceof t?e:"number"==typeof e?o(e):"string"==typeof e?u(e):s(e.low,e.high,e.unsigned)}t.fromString=u,t.fromValue=f;var c=4294967296,l=c*c,h=l/2,p=i(1<<24),d=i(0);t.ZERO=d;var v=i(0,!0);t.UZERO=v;var _=i(1);t.ONE=_;var y=i(1,!0);t.UONE=y;var g=i(-1);t.NEG_ONE=g;var m=s(-1,2147483647,!1);t.MAX_VALUE=m;var b=s(-1,-1,!0);t.MAX_UNSIGNED_VALUE=b;var w=s(0,-2147483648,!1);t.MIN_VALUE=w;var E=t.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var e=o(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=o(a(t,6),this.unsigned),s=this,u="";;){var f=s.div(i),c=(s.sub(f.mul(i)).toInt()>>>0).toString(t);if((s=f).isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return 1==(1&this.low)},E.isEven=function(){return 0==(1&this.low)},E.equals=function(t){return e(t)||(t=f(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(t){if(e(t)||(t=f(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},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(_)},E.neg=E.negate,E.add=function(t){e(t)||(t=f(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,l=0,h=0,p=0,d=0;return p+=(d+=o+(65535&t.low))>>>16,h+=(p+=i+c)>>>16,l+=(h+=n+u)>>>16,l+=r+a,s((p&=65535)<<16|(d&=65535),(l&=65535)<<16|(h&=65535),this.unsigned)},E.subtract=function(t){return e(t)||(t=f(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return d;if(e(t)||(t=f(t)),t.isZero())return d;if(this.eq(w))return t.isOdd()?w:d;if(t.eq(w))return this.isOdd()?w:d;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(p)&&t.lt(p))return o(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,a=65535&this.low,u=t.high>>>16,c=65535&t.high,l=t.low>>>16,h=65535&t.low,v=0,_=0,y=0,g=0;return y+=(g+=a*h)>>>16,_+=(y+=i*h)>>>16,y&=65535,_+=(y+=a*l)>>>16,v+=(_+=n*h)>>>16,_&=65535,v+=(_+=i*l)>>>16,_&=65535,v+=(_+=a*c)>>>16,v+=r*h+n*l+i*c+a*u,s((y&=65535)<<16|(g&=65535),(v&=65535)<<16|(_&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(e(t)||(t=f(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?v:d;var r,n,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return v;if(t.gt(this.shru(1)))return y;i=v}else{if(this.eq(w))return t.eq(_)||t.eq(g)?w:t.eq(w)?_:(r=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?_:g:(n=this.sub(t.mul(r)),i=r.add(n.div(t)));else if(t.eq(w))return this.unsigned?v:d;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();i=d}for(n=this;n.gte(t);){r=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(r)/Math.LN2),u=s<=48?1:a(2,s-48),c=o(r),l=c.mul(t);l.isNegative()||l.gt(n);)l=(c=o(r-=u,this.unsigned)).mul(t);c.isZero()&&(c=_),i=i.add(c),n=n.sub(l)}return i},E.div=E.divide,E.modulo=function(t){return e(t)||(t=f(t)),this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.not=function(){return s(~this.low,~this.high,this.unsigned)},E.and=function(t){return e(t)||(t=f(t)),s(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return e(t)||(t=f(t)),s(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return e(t)||(t=f(t)),s(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?s(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):s(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?s(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):s(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0===(t&=63))return this;var r=this.high;return t<32?s(this.low>>>t|r<<32-t,r>>>t,this.unsigned):s(32===t?r:r>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?s(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:s(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.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]},E.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(102)(t))},function(t,e,r){var n=r(234);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv;var i=r(249);e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv;var o=r(236);e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){(function(t){var n=r(235),i=r(222),o=r(187),s=r(236),a=r(237),u=r(238),f=r(239);function c(e,r,o){if(!(this instanceof c))return new c(e,r,o);i.call(this),this._cache=new l,this._cipher=new n.AES(r),this._prev=new t(o.length),o.copy(this._prev),this._mode=e,this._autopadding=!0}function l(){if(!(this instanceof l))return new l;this.cache=new t("")}o(c,i),c.prototype._update=function(e){var r,n;this._cache.add(e);for(var i=[];r=this._cache.get();)n=this._mode.encrypt(this,r),i.push(n);return t.concat(i)},c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if("10101010101010101010101010101010"!==t.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(e){this.cache=t.concat([this.cache,e])},l.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},l.prototype.flush=function(){for(var e=16-this.cache.length,r=new t(e),n=-1;++n<e;)r.writeUInt8(e,n);return t.concat([this.cache,r])};var h={ECB:r(242),CBC:r(243),CFB:r(244),CFB8:r(245),CFB1:r(246),OFB:r(247),CTR:r(248),GCM:r(248)};function p(e,r,n){var i=s[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==i.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==i.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===i.type?new u(h[i.mode],r,n):"auth"===i.type?new f(h[i.mode],r,n):new c(h[i.mode],r,n)}e.createCipheriv=p,e.createCipher=function(t,e){var r=s[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=a(e,!1,r.key,r.iv);return p(t,n.key,n.iv)}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var r=Math.pow(2,32);function n(t){var e;return t>r||t<0?(e=Math.abs(t)%r,t<0?r-e:e):t}function i(t){for(;0<t.length;t++)t[0]=0;return!1}function o(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}o.prototype.init=function(){var t,e,r,n,i,o,s,a,u,f;for(t=function(){var t,r;for(r=[],e=t=0;t<256;e=++t)e<128?r.push(e<<1):r.push(e<<1^283);return r}(),i=0,u=0,e=f=0;f<256;e=++f)r=(r=u^u<<1^u<<2^u<<3^u<<4)>>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,a=t[s=t[o=t[i]]],n=257*t[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*a^65537*s^257*o^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=u=1:(i=o^t[t[t[a^o]]],u^=t[t[u]]);return!0};var s=new o;function a(t){for(var e=t.length/4,r=new Array(e),n=-1;++n<e;)r[n]=t.readUInt32BE(4*n);return r}function u(t){this._key=a(t),this._doReset()}u.blockSize=16,u.prototype.blockSize=u.blockSize,u.keySize=32,u.prototype.keySize=u.keySize,u.prototype._doReset=function(){var t,e,r,n,i,o;for(e=(r=this._key).length,this._nRounds=e+6,i=4*(this._nRounds+1),this._keySchedule=[],n=0;n<i;n++)this._keySchedule[n]=n<e?r[n]:(o=this._keySchedule[n-1],n%e==0?(o=o<<8|o>>>24,o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o],o^=s.RCON[n/e|0]<<24):e>6&&n%e==4&&(o=s.SBOX[o>>>24]<<24|s.SBOX[o>>>16&255]<<16|s.SBOX[o>>>8&255]<<8|s.SBOX[255&o]),this._keySchedule[n-e]^o);for(this._invKeySchedule=[],t=0;t<i;t++)n=i-t,o=this._keySchedule[n-(t%4?0:4)],this._invKeySchedule[t]=t<4||n<=4?o:s.INV_SUB_MIX[0][s.SBOX[o>>>24]]^s.INV_SUB_MIX[1][s.SBOX[o>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[o>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&o]];return!0},u.prototype.encryptBlock=function(e){e=a(new t(e));var r=this._doCryptBlock(e,this._keySchedule,s.SUB_MIX,s.SBOX),n=new t(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[1],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[3],12),n},u.prototype.decryptBlock=function(e){var r=[(e=a(new t(e)))[3],e[1]];e[1]=r[0],e[3]=r[1];var n=this._doCryptBlock(e,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX),i=new t(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[3],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[1],12),i},u.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},u.prototype._doCryptBlock=function(t,e,r,i){var o,s,a,u,f,c,l,h,p;s=t[0]^e[0],a=t[1]^e[1],u=t[2]^e[2],f=t[3]^e[3],o=4;for(var d=1;d<this._nRounds;d++)c=r[0][s>>>24]^r[1][a>>>16&255]^r[2][u>>>8&255]^r[3][255&f]^e[o++],l=r[0][a>>>24]^r[1][u>>>16&255]^r[2][f>>>8&255]^r[3][255&s]^e[o++],h=r[0][u>>>24]^r[1][f>>>16&255]^r[2][s>>>8&255]^r[3][255&a]^e[o++],p=r[0][f>>>24]^r[1][s>>>16&255]^r[2][a>>>8&255]^r[3][255&u]^e[o++],s=c,a=l,u=h,f=p;return c=(i[s>>>24]<<24|i[a>>>16&255]<<16|i[u>>>8&255]<<8|i[255&f])^e[o++],l=(i[a>>>24]<<24|i[u>>>16&255]<<16|i[f>>>8&255]<<8|i[255&s])^e[o++],h=(i[u>>>24]<<24|i[f>>>16&255]<<16|i[s>>>8&255]<<8|i[255&a])^e[o++],p=(i[f>>>24]<<24|i[s>>>16&255]<<16|i[a>>>8&255]<<8|i[255&u])^e[o++],[n(c),n(l),n(h),n(p)]},e.AES=u}).call(e,r(177).Buffer)},function(t,e){e["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},e["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},e["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},e["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},e["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},e["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},e.aes128=e["aes-128-cbc"],e.aes192=e["aes-192-cbc"],e.aes256=e["aes-256-cbc"],e["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},e["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},e["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},e["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},e["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},e["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},e["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},e["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},e["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},e["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},e["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},e["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},e["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},e["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},e["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},e["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},e["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},e["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},function(t,e,r){(function(e){var n=r(188);t.exports=function(t,r,i,o){e.isBuffer(t)||(t=new e(t,"binary"));r&&!e.isBuffer(r)&&(r=new e(r,"binary"));o=o||0;var s,a,u=0,f=0,c=new e(i/=8),l=new e(o),h=0,p=[];for(;;){if(h++>0&&p.push(s),p.push(t),r&&p.push(r),s=n(e.concat(p)),p=[],a=0,i>0)for(;0!==i&&a!==s.length;)c[u++]=s[a],i--,a++;if(o>0&&a!==s.length)for(;0!==o&&a!==s.length;)l[f++]=s[a],o--,a++;if(0===i&&0===o)break}for(a=0;a<s.length;a++)s[a]=0;return{key:c,iv:l}}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(235),i=r(222);function o(t,r,s,a){if(!(this instanceof o))return new o(t,r,s);i.call(this),this._cipher=new n.AES(r),this._prev=new e(s.length),this._cache=new e(""),this._secCache=new e(""),this._decrypt=a,s.copy(this._prev),this._mode=t}r(187)(o,i),t.exports=o,o.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(235),i=r(222),o=r(187),s=r(240),a=r(241);function u(t,r,o,a){if(!(this instanceof u))return new u(t,r,o);i.call(this),this._finID=e.concat([o,new e([0,0,0,1])]),o=e.concat([o,new e([0,0,0,2])]),this._cipher=new n.AES(r),this._prev=new e(o.length),this._cache=new e(""),this._secCache=new e(""),this._decrypt=a,this._alen=0,this._len=0,o.copy(this._prev),this._mode=t;var f=new e(4);f.fill(0),this._ghash=new s(this._cipher.encryptBlock(f)),this._authTag=null,this._called=!1}o(u,i),t.exports=u,u.prototype._update=function(t){if(!this._called&&this._alen){var r=16-this._alen%16;r<16&&((r=new e(r)).fill(0),this._ghash.update(r))}this._called=!0;var n=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(n),this._len+=t.length,n},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=a(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(function(t,e){var r=0;t.length!==e.length&&r++;var n=Math.min(t.length,e.length),i=-1;for(;++i<n;)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=t;this._cipher.scrub()},u.prototype.getAuthTag=function(){if(!this._decrypt&&e.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},u.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},u.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var r=new e(16);function n(t){this.h=t,this.state=new e(16),this.state.fill(0),this.cache=new e("")}function i(t){t=t.map(s);var r=new e(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r}r.fill(0),t.exports=n,n.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},n.prototype._multiply=function(){for(var t,e,r=function(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}(this.h),n=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(n=a(n,r)),e=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,e&&(r[0]=r[0]^225<<24)}this.state=i(n)},n.prototype.update=function(t){var r;for(this.cache=e.concat([this.cache,t]);this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},n.prototype.final=function(t,n){return this.cache.length&&this.ghash(e.concat([this.cache,r],16)),this.ghash(i([0,t,0,n])),this.state};var o=Math.pow(2,32);function s(t){var e;return t>o||t<0?(e=Math.abs(t)%o,t<0?o-e:e):t}function a(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;o<n;++o)i[o]=t[o]^r[o];return i}}).call(e,r(177).Buffer)},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){var n=r(241);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},function(t,e,r){(function(t){var n=r(241);function i(e,r,i){var o=r.length,s=n(r,e._cache);return e._cache=e._cache.slice(o),e._prev=t.concat([e._prev,i?r:s]),s}e.encrypt=function(e,r,n){for(var o,s=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){s=t.concat([s,i(e,r,n)]);break}o=e._cache.length,s=t.concat([s,i(e,r.slice(0,o),n)]),r=r.slice(o)}return s}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){function r(e,r,n){var i=e._cipher.encryptBlock(e._prev)[0]^r;return e._prev=t.concat([e._prev.slice(1),new t([n?r:i])]),i}e.encrypt=function(e,n,i){for(var o=n.length,s=new t(o),a=-1;++a<o;)s[a]=r(e,n[a],i);return s}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){function r(t,e,r){for(var i,o,s=-1,a=0;++s<8;)i=e&1<<7-s?128:0,a+=(128&(o=t._cipher.encryptBlock(t._prev)[0]^i))>>s%8,t._prev=n(t._prev,r?i:o);return a}function n(e,r){var n=e.length,i=-1,o=new t(e.length);for(e=t.concat([e,new t([r])]);++i<n;)o[i]=e[i]<<1|e[i+1]>>7;return o}e.encrypt=function(e,n,i){for(var o=n.length,s=new t(o),a=-1;++a<o;)s[a]=r(e,n[a],i);return s}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var n=r(241);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,o)}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var n=r(241);function i(t){var e=t._cipher.encryptBlock(t._prev);return function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}(t._prev),e}e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,o)}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var n=r(235),i=r(222),o=r(187),s=r(236),a=r(238),u=r(239),f=r(237);function c(e,r,o){if(!(this instanceof c))return new c(e,r,o);i.call(this),this._cache=new l,this._last=void 0,this._cipher=new n.AES(r),this._prev=new t(o.length),o.copy(this._prev),this._mode=e,this._autopadding=!0}function l(){if(!(this instanceof l))return new l;this.cache=new t("")}o(c,i),c.prototype._update=function(e){var r,n;this._cache.add(e);for(var i=[];r=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,r),i.push(n);return t.concat(i)},c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15],r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(e){this.cache=t.concat([this.cache,e])},l.prototype.get=function(t){var e;if(t){if(this.cache.length>16)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},l.prototype.flush=function(){if(this.cache.length)return this.cache};var h={ECB:r(242),CBC:r(243),CFB:r(244),CFB8:r(245),CFB1:r(246),OFB:r(247),CTR:r(248),GCM:r(248)};function p(e,r,n){var i=s[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==i.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==i.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===i.type?new a(h[i.mode],r,n,!0):"auth"===i.type?new u(h[i.mode],r,n,!0):new c(h[i.mode],r,n)}e.createDecipher=function(t,e){var r=s[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=f(e,!1,r.key,r.iv);return p(t,n.key,n.iv)},e.createDecipheriv=p}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=r(251),o=r(255),s=o.getCurveByName("secp256k1");i=r(251);var a=r(225),u=r(185),f=r(171),c=r(181),l=s.G,h=s.n,p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.Q=e}return n(t,[{key:"toBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.Q?this.Q.compressed:null;return null===this.Q?e.from("000000000000000000000000000000000000000000000000000000000000000000","hex"):this.Q.getEncoded(t)}},{key:"toUncompressed",value:function(){var e=this.Q.getEncoded(!1),r=o.Point.decodeFrom(s,e);return t.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var t=this.toBuffer(),e=u.sha512(t);return u.ripemd160(e)}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.get("address_prefix");return this.toPublicKeyString(t)}},{key:"toPublicKeyString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.get("address_prefix");if(this.pubdata)return t+this.pubdata;var r=this.toBuffer(),n=u.ripemd160(r),i=e.concat([r,n.slice(0,4)]);return this.pubdata=a.encode(i),t+this.pubdata}},{key:"toAddressString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.get("address_prefix"),r=this.toBuffer(),n=u.sha512(r),i=u.ripemd160(n),o=u.ripemd160(i);return i=e.concat([i,o.slice(0,4)]),t+a.encode(i)}},{key:"toPtsAddy",value:function(){var t=this.toBuffer(),r=u.sha256(t),n=u.ripemd160(r);n=e.concat([new e([56]),n]);var i=u.sha256(n);return i=u.sha256(i),n=e.concat([n,i.slice(0,4)]),a.encode(n)}},{key:"child",value:function(r){c(e.isBuffer(r),"Buffer required: offset"),c.equal(r.length,32,"offset length"),r=e.concat([this.toBuffer(),r]),r=u.sha256(r);var n=i.fromBuffer(r);if(n.compareTo(h)>=0)throw new Error("Child offset went out of bounds, try again");var o=l.multiply(n),a=this.Q.add(o);if(s.isInfinity(a))throw new Error("Child offset derived to an invalid key, try again");return t.fromPoint(a)}},{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"000000000000000000000000000000000000000000000000000000000000000000"===e.toString("hex")?new t(null):new t(o.Point.decodeFrom(s,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]:f.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]:f.get("address_prefix"),i=r.slice(0,n.length);c.equal(n,i,"Expecting key to begin with "+n+", instead got "+i),r=r.slice(n.length);var o=(r=new e(a.decode(r),"binary")).slice(-4);r=r.slice(0,-4);var s=u.ripemd160(r);return s=s.slice(0,4),c.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=p}).call(e,r(177).Buffer)},function(t,e,r){var n=r(252);r(254),t.exports=n},function(t,e,r){function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}var i=n.prototype;i.__bigi=r(253).version,n.isBigInteger=function(t,e){return t&&t.__bigi&&(!e||t.__bigi===i.__bigi)},n.prototype.am=function(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},n.prototype.DB=26,n.prototype.DM=67108863;var o=n.prototype.DV=1<<26;n.prototype.FV=Math.pow(2,52),n.prototype.F1=26,n.prototype.F2=0;var s,a,u="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array;for(s="0".charCodeAt(0),a=0;a<=9;++a)f[s++]=a;for(s="a".charCodeAt(0),a=10;a<36;++a)f[s++]=a;for(s="A".charCodeAt(0),a=10;a<36;++a)f[s++]=a;function c(t){return u.charAt(t)}function l(t,e){var r=f[t.charCodeAt(e)];return null==r?-1:r}function h(t){var e=new n;return e.fromInt(t),e}function p(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 d(t){this.m=t}function v(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function _(t,e){return t&e}function y(t,e){return t|e}function g(t,e){return t^e}function m(t,e){return t&~e}function b(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=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 w(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function E(){}function k(t){return t}function T(t){this.r2=new n,this.q3=new n,n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}d.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},d.prototype.revert=function(t){return t},d.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},d.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},d.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},v.prototype.convert=function(t){var e=new n;return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e},v.prototype.revert=function(t){var e=new n;return t.copyTo(e),this.reduce(e),e},v.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=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)},v.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},v.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},i.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},i.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+o:this.t=0},i.fromString=function(t,e){var r;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 this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var i=t.length,o=!1,s=0;--i>=0;){var a=8==r?255&t[i]:l(t,i);a<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==s?this[this.t++]=a:s+r>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=r)>=this.DB&&(s-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),o&&n.ZERO.subTo(this,this)},i.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},i.dlShiftTo=function(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},i.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},i.lShiftTo=function(t,e){var r,n=t%this.DB,i=this.DB-n,o=(1<<i)-1,s=Math.floor(t/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)e[r+s+1]=this[r]>>i|a,a=(this[r]&o)<<n;for(r=s-1;r>=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},i.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<<n)-1;e[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)e[s-r-1]|=(this[s]&o)<<i,e[s-r]=this[s]>>n;n>0&&(e[this.t-r-1]|=(this.s&o)<<i),e.t=this.t-r,e.clamp()}},i.subTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},i.multiplyTo=function(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<i.t;++o)e[o+r.t]=r.am(0,i[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)},i.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=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()},i.divRemTo=function(t,e,r){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=e&&e.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=new n);var s=new n,a=this.s,u=t.s,f=this.DB-p(i[i.t-1]);f>0?(i.lShiftTo(f,s),o.lShiftTo(f,r)):(i.copyTo(s),o.copyTo(r));var c=s.t,l=s[c-1];if(0!=l){var h=l*(1<<this.F1)+(c>1?s[c-2]>>this.F2:0),d=this.FV/h,v=(1<<this.F1)/h,_=1<<this.F2,y=r.t,g=y-c,m=null==e?new n:e;for(s.dlShiftTo(g,m),r.compareTo(m)>=0&&(r[r.t++]=1,r.subTo(m,r)),n.ONE.dlShiftTo(c,m),m.subTo(s,s);s.t<c;)s[s.t++]=0;for(;--g>=0;){var b=r[--y]==l?this.DM:Math.floor(r[y]*d+(r[y-1]+_)*v);if((r[y]+=s.am(0,b,r,g,0,c))<b)for(s.dlShiftTo(g,m),r.subTo(m,r);r[y]<--b;)r.subTo(m,r)}null!=e&&(r.drShiftTo(c,e),a!=u&&n.ZERO.subTo(e,e)),r.t=c,r.clamp(),f>0&&r.rShiftTo(f,r),a<0&&n.ZERO.subTo(r,r)}}},i.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},i.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},i.exp=function(t,e){if(t>4294967295||t<1)return n.ONE;var r=new n,i=new n,o=e.convert(this),s=p(t)-1;for(o.copyTo(r);--s>=0;)if(e.sqrTo(r,i),(t&1<<s)>0)e.mulTo(i,o,r);else{var a=r;r=i,i=a}return e.revert(r)},i.toString=function(t){var e;if(this.s<0)return"-"+this.negate().toString(t);if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<<e)-1,i=!1,o="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(i=!0,o=c(r));s>=0;)a<e?(r=(this[s]&(1<<a)-1)<<e-a,r|=this[--s]>>(a+=this.DB-e)):(r=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(i=!0),i&&(o+=c(r));return i?o:"0"},i.negate=function(){var t=new n;return n.ZERO.subTo(this,t),t},i.abs=function(){return this.s<0?this.negate():this},i.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},i.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},i.byteLength=function(){return this.bitLength()>>3},i.mod=function(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},i.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new d(e):new v(e),this.exp(t,r)},E.prototype.convert=k,E.prototype.revert=k,E.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},E.prototype.sqrTo=function(t,e){t.squareTo(e)},T.prototype.convert=function(t){if(t.s<0||t.t>2*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},T.prototype.revert=function(t){return t},T.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},T.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},T.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var B=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],S=(1<<26)/B[B.length-1];i.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},i.toRadix=function(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=h(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},i.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),o=!1,s=0,a=0,u=0;u<t.length;++u){var f=l(t,u);f<0?"-"==t.charAt(u)&&0==this.signum()&&(o=!0):(a=e*a+f,++s>=r&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),o&&n.ZERO.subTo(this,this)},i.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(n.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),e.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},i.bitwiseTo=function(t,e,r){var n,i,o=Math.min(t.t,this.t);for(n=0;n<o;++n)r[n]=e(this[n],t[n]);if(t.t<this.t){for(i=t.s&this.DM,n=o;n<this.t;++n)r[n]=e(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},i.changeBit=function(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},i.addTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},i.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},i.dAddOffset=function(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]}},i.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},i.multiplyUpperTo=function(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)},i.modInt=function(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},i.millerRabin=function(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);(t=t+1>>1)>B.length&&(t=B.length);for(var o=new n(null),s=[],a=0;a<t;++a){for(;f=B[Math.floor(Math.random()*B.length)],-1!=s.indexOf(f););s.push(f),o.fromInt(f);var u=o.modPow(i,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(e)){for(var f=1;f++<r&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},i.clone=function(){var t=new n;return this.copyTo(t),t},i.intValue=function(){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)<<this.DB|this[0]},i.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},i.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},i.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},i.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n<this.DB&&(r=this[t]>>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<<this.DB-n);t>=0;)n<8?(r=(this[t]&(1<<n)-1)<<8-n,r|=this[--t]>>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0===i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},i.equals=function(t){return 0==this.compareTo(t)},i.min=function(t){return this.compareTo(t)<0?this:t},i.max=function(t){return this.compareTo(t)>0?this:t},i.and=function(t){var e=new n;return this.bitwiseTo(t,_,e),e},i.or=function(t){var e=new n;return this.bitwiseTo(t,y,e),e},i.xor=function(t){var e=new n;return this.bitwiseTo(t,g,e),e},i.andNot=function(t){var e=new n;return this.bitwiseTo(t,m,e),e},i.not=function(){for(var t=new n,e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},i.shiftLeft=function(t){var e=new n;return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},i.shiftRight=function(t){var e=new n;return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},i.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+b(this[t]);return this.s<0?this.t*this.DB:-1},i.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=w(this[r]^e);return t},i.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},i.setBit=function(t){return this.changeBit(t,y)},i.clearBit=function(t){return this.changeBit(t,m)},i.flipBit=function(t){return this.changeBit(t,g)},i.add=function(t){var e=new n;return this.addTo(t,e),e},i.subtract=function(t){var e=new n;return this.subTo(t,e),e},i.multiply=function(t){var e=new n;return this.multiplyTo(t,e),e},i.divide=function(t){var e=new n;return this.divRemTo(t,e,null),e},i.remainder=function(t){var e=new n;return this.divRemTo(t,null,e),e},i.divideAndRemainder=function(t){var e=new n,r=new n;return this.divRemTo(t,e,r),new Array(e,r)},i.modPow=function(t,e){var r,i,o=t.bitLength(),s=h(1);if(o<=0)return s;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new d(e):e.isEven()?new T(e):new v(e);var a=new Array,u=3,f=r-1,c=(1<<r)-1;if(a[1]=i.convert(this),r>1){var l=new n;for(i.sqrTo(a[1],l);u<=c;)a[u]=new n,i.mulTo(l,a[u-2],a[u]),u+=2}var _,y,g=t.t-1,m=!0,b=new n;for(o=p(t[g])-1;g>=0;){for(o>=f?_=t[g]>>o-f&c:(_=(t[g]&(1<<o+1)-1)<<f-o,g>0&&(_|=t[g-1]>>this.DB+o-f)),u=r;0==(1&_);)_>>=1,--u;if((o-=u)<0&&(o+=this.DB,--g),m)a[_].copyTo(s),m=!1;else{for(;u>1;)i.sqrTo(s,b),i.sqrTo(b,s),u-=2;u>0?i.sqrTo(s,b):(y=s,s=b,b=y),i.mulTo(b,a[_],s)}for(;g>=0&&0==(t[g]&1<<o);)i.sqrTo(s,b),y=s,s=b,b=y,--o<0&&(o=this.DB-1,--g)}return i.revert(s)},i.modInverse=function(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=h(1),s=h(0),a=h(0),u=h(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},i.pow=function(t){return this.exp(t,new E)},i.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>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},i.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=B[B.length-1]){for(e=0;e<B.length;++e)if(r[0]==B[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<B.length;){for(var n=B[e],i=e+1;i<B.length&&n<S;)n*=B[i++];for(n=r.modInt(n);e<i;)if(n%B[e++]==0)return!1}return r.millerRabin(t)},i.square=function(){var t=new n;return this.squareTo(t),t},n.ZERO=h(0),n.ONE=h(1),n.valueOf=h,t.exports=n},function(t,e){t.exports={name:"bigi",version:"1.4.2",description:"Big integers.",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},repository:{url:"https://github.com/cryptocoinjs/bigi",type:"git"},main:"./lib/index.js",scripts:{"browser-test":"./node_modules/.bin/mochify --wd -R spec",test:"./node_modules/.bin/_mocha -- test/*.js",jshint:"./node_modules/.bin/jshint --config jshint.json lib/*.js ; true",unit:"./node_modules/.bin/mocha",coverage:"./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info"},dependencies:{},testling:{files:"test/*.js",harness:"mocha",browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]}}},function(t,e,r){(function(t){var e=r(181),n=r(252);n.fromByteArrayUnsigned=function(t){return 128&t[0]?new n([0].concat(t)):new n(t)},n.prototype.toByteArrayUnsigned=function(){var t=this.toByteArray();return 0===t[0]?t.slice(1):t},n.fromDERInteger=function(t){return new n(t)},n.prototype.toDERInteger=n.prototype.toByteArray,n.fromBuffer=function(t){if(128&t[0]){var e=Array.prototype.slice.call(t);return new n([0].concat(e))}return new n(t)},n.fromHex=function(t){return""===t?n.ZERO:(e.equal(t,t.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),e.equal(t.length%2,0,"Incomplete hex"),new n(t,16))},n.prototype.toBuffer=function(e){for(var r=this.toByteArrayUnsigned(),n=[],i=e-r.length;n.length<i;)n.push(0);return new t(n.concat(r))},n.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")}}).call(e,r(177).Buffer)},function(t,e,r){var n=r(256),i=r(257),o=r(258);t.exports={Curve:i,Point:n,getCurveByName:o}},function(t,e,r){(function(e){var n=r(181),i=r(251),o=i.valueOf(3);function s(t,e,r,i){n.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(s.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(s.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(s.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),s.fromAffine=function(t,e,r){return new s(t,e,r,i.ONE)},s.prototype.equals=function(t){return t===this||(this.curve.isInfinity(this)?this.curve.isInfinity(t):this.curve.isInfinity(t)?this.curve.isInfinity(this):0===t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p).signum()&&0===t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p).signum())},s.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new s(this.curve,this.x,t,this.z)},s.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,r=this.y,n=t.x,i=t.y.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),a=n.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===a.signum())return 0===i.signum()?this.twice():this.curve.infinity;var u=a.square(),f=u.multiply(a),c=e.multiply(u),l=i.square().multiply(this.z),h=l.subtract(c.shiftLeft(1)).multiply(t.z).subtract(f).multiply(a).mod(this.curve.p),p=c.multiply(o).multiply(i).subtract(r.multiply(f)).subtract(l.multiply(i)).multiply(t.z).add(i.multiply(f)).mod(this.curve.p),d=f.multiply(this.z).multiply(t.z).mod(this.curve.p);return new s(this.curve,h,p,d)},s.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.signum())return this.curve.infinity;var t=this.x,e=this.y,r=e.multiply(this.z).mod(this.curve.p),n=r.multiply(e).mod(this.curve.p),i=this.curve.a,a=t.square().multiply(o);0!==i.signum()&&(a=a.add(this.z.square().multiply(i)));var u=(a=a.mod(this.curve.p)).square().subtract(t.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),f=a.multiply(o).multiply(t).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(a.pow(3)).mod(this.curve.p),c=r.pow(3).shiftLeft(3).mod(this.curve.p);return new s(this.curve,u,f,c)},s.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.signum())return this.curve.infinity;for(var e=t,r=e.multiply(o),n=this.negate(),i=this,s=r.bitLength()-2;s>0;--s){var a=r.testBit(s),u=e.testBit(s);i=i.twice(),a!==u&&(i=i.add(a?this:n))}return i},s.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},s.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)).writeUInt8(i.isEven()?2:3,0):((r=new e(1+o+o)).writeUInt8(4,0),i.toBuffer(o).copy(r,1+o)),n.toBuffer(o).copy(r,1),r},s.decodeFrom=function(t,e){var r,o=e.readUInt8(0),a=4!==o,u=Math.floor((t.p.bitLength()+7)/8),f=i.fromBuffer(e.slice(1,1+u));if(a){n.equal(e.length,u+1,"Invalid sequence length"),n(2===o||3===o,"Invalid sequence tag");var c=3===o;r=t.pointFromX(c,f)}else{n.equal(e.length,1+u+u,"Invalid sequence length");var l=i.fromBuffer(e.slice(1+u));r=s.fromAffine(t,f,l)}return r.compressed=a,r},s.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=s}).call(e,r(177).Buffer)},function(t,e,r){var n=r(181),i=r(251),o=r(256);function s(t,e,r,n,s,a,u){this.p=t,this.a=e,this.b=r,this.G=o.fromAffine(this,n,s),this.n=a,this.h=u,this.infinity=new o(this,null,null,i.ZERO),this.pOverFour=t.add(i.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}s.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),n=r;return r.isEven()^!t&&(n=this.p.subtract(n)),o.fromAffine(this,e,n)},s.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},s.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)},s.prototype.validate=function(t){n(!this.isInfinity(t),"Point is at infinity"),n(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return n(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=s},function(t,e,r){var n=r(251),i=r(259),o=r(257);t.exports=function(t){var e=i[t];if(!e)return null;var r=new n(e.p,16),s=new n(e.a,16),a=new n(e.b,16),u=new n(e.n,16),f=new n(e.h,16),c=new n(e.Gx,16),l=new n(e.Gy,16);return new o(r,s,a,c,l,u,f)}},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";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=r(255),o=i.Point,s=i.getCurveByName("secp256k1"),a=r(251),u=r(225),f=r(181),c=r(185),l=r(250),h=(s.G,s.n),p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.d=e}return n(t,[{key:"toWif",value:function(){var t=this.toBuffer();t=e.concat([new e([128]),t]);var r=c.sha256(t);r=(r=c.sha256(r)).slice(0,4);var n=e.concat([t,r]);return u.encode(n)}},{key:"toString",value:function(){return this.toWif()}},{key:"toPublicKeyPoint",value:function(){return s.G.multiply(this.d)}},{key:"toPublic",value:function(){return this.public_key?this.public_key:this.public_key=l.fromPoint(this.toPublicKeyPoint())}},{key:"toBuffer",value:function(){return this.d.toBuffer(32)}},{key:"get_shared_secret",value:function(t){var e=(t=d(t)).toUncompressed().toBuffer(),r=o.fromAffine(s,a.fromBuffer(e.slice(1,33)),a.fromBuffer(e.slice(33,65))),n=this.toBuffer(),i=r.multiply(a.fromBuffer(n)).affineX.toBuffer({size:32});return c.sha512(i)}},{key:"child",value:function(r){r=e.concat([this.toPublicKey().toBuffer(),r]),r=c.sha256(r);var n=a.fromBuffer(r);if(n.compareTo(h)>=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(a.fromBuffer(r))}},{key:"fromSeed",value:function(e){if("string"!=typeof e)throw new Error("seed must be of type string");return t.fromBuffer(c.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(u.decode(r)),i=n.readUInt8(0);f.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),s=n.slice(-4),a=c.sha256(o);if(a=(a=c.sha256(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=p;var d=function(t){return null==t?t:t.Q?t:l.fromStringOrThrow(t)}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=r(262),o=r(185),s=r(255).getCurveByName("secp256k1"),a=r(181),u=r(251),f=r(250),c=r(260),l=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=e,this.s=r,this.i=n,a.equal(null!=this.r,!0,"Missing parameter"),a.equal(null!=this.s,!0,"Missing parameter"),a.equal(null!=this.i,!0,"Missing parameter")}return n(t,[{key:"toBuffer",value:function(){var t;return(t=new e(65)).writeUInt8(this.i,0),this.r.toBuffer(32).copy(t,1),this.s.toBuffer(32).copy(t,33),t}},{key:"recoverPublicKeyFromBuffer",value:function(t){return this.recoverPublicKey(o.sha256(t))}},{key:"recoverPublicKey",value:function(t){var e,r,n=void 0;return r=u.fromBuffer(t),n=this.i,n-=27,n&=3,e=i.recoverPubKey(s,r,this,n),f.fromPoint(e)}},{key:"verifyBuffer",value:function(t,e){var r=o.sha256(t);return this.verifyHash(r,e)}},{key:"verifyHash",value:function(t,e){return a.equal(t.length,32,"A SHA 256 should be 32 bytes long, instead got "+t.length),i.verify(s,t,{r:this.r,s:this.s},e.Q)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"verifyHex",value:function(t,r){var n;return n=new e(t,"hex"),this.verifyBuffer(n,r)}}],[{key:"fromBuffer",value:function(e){var r;return a.equal(e.length,65,"Invalid signature length"),r=e.readUInt8(0),a.equal(r-27,r-27&7,"Invalid signature parameter"),new t(u.fromBuffer(e.slice(1,33)),u.fromBuffer(e.slice(33)),r)}},{key:"signBuffer",value:function(e,r){var n=o.sha256(e);return t.signBufferSha256(n,r)}},{key:"signBufferSha256",value:function(r,n){if(32!==r.length||!e.isBuffer(r))throw new Error("buf_sha256: 32 byte buffer requred");var o,f,c,l,p,d,v;for(n=h(n),a(n,"private_key required"),l=null,v=0,f=u.fromBuffer(r);;){if(d=(o=(c=i.sign(s,r,n.d,v++)).toDER())[5+(p=o[3])],32===p&&32===d){l=i.calcPubKeyRecoveryParam(s,f,c,n.toPublicKey().Q),l+=4,l+=27;break}v%10==0&&console.log("WARN: "+v+" attempts to find canonical signature")}return new t(c.r,c.s,l)}},{key:"sign",value:function(r,n){return t.signBuffer(new e(r),n)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"signHex",value:function(r,n){var i;return i=new e(r,"hex"),t.signBuffer(i,n)}},{key:"verifyData",value:function(t,r,n){var u=new e(t),c=new e(u,"hex"),l=o.sha256(c);a.equal(l.length,32,"A SHA 256 should be 32 bytes long, instead got "+l.length);var h=f.fromString(n);return i.verify(s,l,r,h.Q)}}]),t}(),h=function(t){return t?t.d?t:c.fromWif(t):t};t.exports=l}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(181),i=r(185),o=r(263),s=r(251),a=r(264);function u(t,r,a,u,f){o("Buffer",r),o(s,a),f&&(r=i.sha256(e.concat([r,new e(f)]))),n.equal(r.length,32,"Hash must be 256 bit");var c=a.toBuffer(32),l=new e(32),h=new e(32);h.fill(1),l.fill(0),l=i.HmacSHA256(e.concat([h,new e([0]),c,r]),l),h=i.HmacSHA256(h,l),l=i.HmacSHA256(e.concat([h,new e([1]),c,r]),l),h=i.HmacSHA256(h,l),h=i.HmacSHA256(h,l);for(var p=s.fromBuffer(h);p.signum()<=0||p.compareTo(t.n)>=0||!u(p);)l=i.HmacSHA256(e.concat([h,new e([0])]),l),h=i.HmacSHA256(h,l),h=i.HmacSHA256(h,l),p=s.fromBuffer(h);return p}function f(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),l=o.multiplyTwo(f,n,c);return!t.isInfinity(l)&&l.affineX.mod(i).equals(s)}function c(t,e,r,i){n.strictEqual(3&i,i,"Recovery param is more than two bits");var o=t.n,s=t.G,a=r.r,u=r.s;n(a.signum()>0&&a.compareTo(o)<0,"Invalid r value"),n(u.signum()>0&&u.compareTo(o)<0,"Invalid s value");var f=1&i,c=i>>1?a.add(o):a,l=t.pointFromX(f,c),h=l.multiply(o);n(t.isInfinity(h),"nR is not a valid curve point");var p=e.negate().mod(o),d=a.modInverse(o),v=l.multiplyTwo(u,s,p).multiply(d);return t.validate(v),v}t.exports={calcPubKeyRecoveryParam:function(t,e,r,n){for(var i=0;i<4;i++)if(c(t,e,r,i).equals(n))return i;throw new Error("Unable to find valid recovery factor")},deterministicGenerateK:u,recoverPubKey:c,sign:function(t,e,r,n){var i,o,f=s.fromBuffer(e),c=t.n,l=t.G,h=(u(t,e,r,function(e){var n=l.multiply(e);return!t.isInfinity(n)&&0!==(i=n.affineX.mod(c)).signum()&&0!==(o=e.modInverse(c).multiply(f.add(r.multiply(i))).mod(c)).signum()},n),c.shiftRight(1));return o.compareTo(h)>0&&(o=c.subtract(o)),new a(i,o)},verify:function(t,e,r,n){return f(t,s.fromBuffer(e),r,n)},verifyRaw:f}}).call(e,r(177).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(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(181),i=r(263),o=r(251);function s(t,e){i(o,t),i(o,e),this.r=t,this.s=e}s.parseCompact=function(t){n.equal(t.length,65,"Invalid signature length");var e=t.readUInt8(0)-27;return n.equal(e,7&e,"Invalid signature parameter"),{compressed:!!(4&e),i:e&=3,signature:new s(o.fromBuffer(t.slice(1,33)),o.fromBuffer(t.slice(33)))}},s.fromDER=function(t){n.equal(t.readUInt8(0),48,"Not a DER sequence"),n.equal(t.readUInt8(1),t.length-2,"Invalid sequence length"),n.equal(t.readUInt8(2),2,"Expected a DER integer");var e=t.readUInt8(3);n(e>0,"R length is zero");var r=4+e;n.equal(t.readUInt8(r),2,"Expected a DER integer (2)");var i=t.readUInt8(r+1);n(i>0,"S length is zero");var a=t.slice(4,r),u=t.slice(r+2);r+=2+i,e>1&&0===a.readUInt8(0)&&n(128&a.readUInt8(1),"R value excessively padded"),i>1&&0===u.readUInt8(0)&&n(128&u.readUInt8(1),"S value excessively padded"),n.equal(r,t.length,"Invalid DER encoding");var f=o.fromDERInteger(a),c=o.fromDERInteger(u);return n(f.signum()>=0,"R value is negative"),n(c.signum()>=0,"S value is negative"),new s(f,c)},s.parseScriptSignature=function(t){var e=t.readUInt8(t.length-1),r=-129&e;return n(r>0&&r<4,"Invalid hashType"),{signature:s.fromDER(t.slice(0,-1)),hashType:e}},s.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},s.prototype.toDER=function(){var t=this.r.toDERInteger(),r=this.s.toDERInteger(),n=[];return n.push(2,t.length),(n=n.concat(t)).push(2,r.length),(n=n.concat(r)).unshift(48,n.length),new e(n)},s.prototype.toScriptSignature=function(t){var r=new e(1);return r.writeUInt8(t,0),e.concat([this.toDER(),r])},t.exports=s}).call(e,r(177).Buffer)},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalize=function(t){if("string"!=typeof t)throw new Error("string required for brain_key");return(t=t.trim()).split(/[\t\n\v\f\r ]+/).join(" ")}},function(t,e,r){(function(e){"use strict";var n=r(260),i=r(185),o=r(228),s=0,a=0,u=o.randomBuffer(101);t.exports={addEntropy:function(){a++;for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=!0,i=!1,o=void 0;try{for(var f,c=e[Symbol.iterator]();!(n=(f=c.next()).done);n=!0){var l=f.value,h=s++%101;(u[h]+=l)>9007199254740991&&(u[h]=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()-r<250;)t=i.sha256(t);var n=[];return n.push(t),n.push(o.randomBuffer(32)),i.sha256(e.concat(n))},get_random_key:function(t){return n.fromBuffer(this.random32ByteBuffer(t))},browserEntropy:function(){var t=Array(u).join();try{t+=(new Date).toString()+" "+window.screen.height+" "+window.screen.width+" "+window.screen.colorDepth+" "+window.screen.availHeight+" "+window.screen.availWidth+" "+window.screen.pixelDepth+navigator.language+" "+window.location+" "+window.history.length;for(var r,n=0;n<navigator.mimeTypes.length;n++)t+=(r=navigator.mimeTypes[n]).description+" "+r.type+" "+r.suffixes+" ";console.log("INFO\tbrowserEntropy gathered",a,"events")}catch(e){t+=i.sha256((new Date).toString())}return t+=new e(t).toString("binary")+" "+(new Date).toString()}}}).call(e,r(177).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(r(268)),i=o(r(271));function o(t){return t&&t.__esModule?t:{default:t}}e.default={http:n.default,ws:i.default}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();e.jsonRpc=d;var i=u(r(269)),o=u(r(168)),s=u(r(270)),a=u(r(171));function u(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 l(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 h=(0,o.default)("steem:http"),p=function(t){function e(t){f(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.message));return r.name="RPCError",r.code=t.code,r.data=t.data,r}return l(e,Error),e}();function d(t,e){var r=e.method,n=e.id,o=e.params,s={id:n,jsonrpc:"2.0",method:r,params:o};return(0,i.default)(t,{body:JSON.stringify(s),method:"post",mode:"cors",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json"}}).then(function(t){if(!t.ok)throw new Error("HTTP "+t.status+": "+t.statusText);return t.json()}).then(function(t){if(t.id!==n)throw new Error("Invalid response id: "+t.id);if(t.error)throw new p(t.error);return t.result})}var v=function(t){function e(){return f(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,s.default),n(e,[{key:"send",value:function(t,e,r){h("Steem::send",t,e);var n=e.id||this.id++,i=[t,e.method,e.params];d(a.default.get("websocket"),{method:"call",id:n,params:i}).then(function(t){r(null,t)},function(t){r(t)})}}]),e}();e.default=v},function(t,e){(function(r){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var n=void 0!==t&&t||"undefined"!=typeof self&&self||void 0!==r&&r||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};if(i.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i.iterable&&(e[Symbol.iterator]=function(){return e}),e}function c(t){this.map={},t instanceof c?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function l(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function h(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function p(t){var e=new FileReader,r=h(e);return e.readAsArrayBuffer(t),r}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():i.arrayBuffer&&i.blob&&function(t){return t&&DataView.prototype.isPrototypeOf(t)}(t)?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||s(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=l(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(i.blob)return this.blob().then(p);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=h(e),n=/charset=([A-Za-z0-9_-]+)/.exec(t.type),i=n?n[1]:"utf-8";return e.readAsText(t,i),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,e){t=a(t),e=u(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},c.prototype.delete=function(t){delete this.map[a(t)]},c.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},c.prototype.set=function(t,e){this.map[a(t)]=u(e)},c.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},c.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),f(t)},c.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},c.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),f(t)},i.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var _=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function y(t,e){if(!(this instanceof y))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r=(e=e||{}).body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=function(t){var e=t.toUpperCase();return _.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function g(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 m(t,e){if(!(this instanceof m))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},v.call(y.prototype),v.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},m.error=function(){var t=new m(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var b=[301,302,303,307,308];m.redirect=function(t,e){if(-1===b.indexOf(e))throw new RangeError("Invalid status code");return new m(null,{status:e,headers:{location:t}})},e.DOMException=n.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function w(t,r){return new Promise(function(o,s){var f=new y(t,r);if(f.signal&&f.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function h(){l.abort()}if(l.onload=function(){var t={statusText:l.statusText,headers:function(t){var e=new c;return t.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t}).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{e.append(n,i)}catch(t){console.warn("Response "+t.message)}}}),e}(l.getAllResponseHeaders()||"")};0===f.url.indexOf("file://")&&(l.status<200||l.status>599)?t.status=200:t.status=l.status,t.url="responseURL"in l?l.responseURL:t.headers.get("X-Request-URL");var e="response"in l?l.response:l.responseText;setTimeout(function(){o(new m(e,t))},0)},l.onerror=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},l.ontimeout=function(){setTimeout(function(){s(new TypeError("Network request timed out"))},0)},l.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},l.open(f.method,function(t){try{return""===t&&n.location.href?n.location.href:t}catch(e){return t}}(f.url),!0),"include"===f.credentials?l.withCredentials=!0:"omit"===f.credentials&&(l.withCredentials=!1),"responseType"in l&&(i.blob?l.responseType="blob":i.arrayBuffer&&(l.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof c||n.Headers&&r.headers instanceof n.Headers)){var p=[];Object.getOwnPropertyNames(r.headers).forEach(function(t){p.push(a(t)),l.setRequestHeader(t,u(r.headers[t]))}),f.headers.forEach(function(t,e){-1===p.indexOf(e)&&l.setRequestHeader(e,t)})}else f.headers.forEach(function(t,e){l.setRequestHeader(e,t)});f.signal&&(f.signal.addEventListener("abort",h),l.onreadystatechange=function(){4===l.readyState&&f.signal.removeEventListener("abort",h)}),l.send(void 0===f._bodyInit?null:f._bodyInit)})}w.polyfill=!0,n.fetch||(n.fetch=w,n.Headers=c,n.Request=y,n.Response=m),e.Headers=c,e.Request=y,e.Response=m,e.fetch=w,Object.defineProperty(e,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e}).call(e,function(){return this}())},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=s(r(3)),o=s(r(2));function s(t){return t&&t.__esModule?t:{default:t}}var a=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.options=t,r.id=0,r}return function(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)}(e,o.default),n(e,[{key:"setOptions",value:function(t){Object.assign(this.options,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}();e.default=a,i.default.promisifyAll(a.prototype)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=f(r(3)),o=f(r(167)),s=f(r(168)),a=f(r(171)),u=f(r(270));function f(t){return t&&t.__esModule?t:{default:t}}var c=void 0;if(o.default)c=r(272);else{if("undefined"==typeof window)throw new Error("Couldn't decide on a `WebSocket` class");c=window.WebSocket}var l=(0,s.default)("steem:ws"),h=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Object.assign({id:0},t)));return r._requests=new Map,r.inFlight=0,r.isOpen=!1,r}return function(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)}(e,u.default),n(e,[{key:"start",value:function(){var t=this;return this.startPromise?this.startPromise:(this.startPromise=new i.default(function(e,r){t.ws=new c(a.default.get("websocket")),t.ws.onerror=function(e){t.startPromise=null,r(e)},t.ws.onopen=function(){t.isOpen=!0,t.ws.onerror=t.onError.bind(t),t.ws.onmessage=t.onMessage.bind(t),t.ws.onclose=t.onClose.bind(t),e()}}),this.startPromise)}},{key:"stop",value:function(){l("Stopping..."),this.startPromise=null,this.isOpen=!1,this._requests.clear(),this.ws&&(this.ws.onerror=this.ws.onmessage=this.ws.onclose=null,this.ws.close(),this.ws=null)}},{key:"send",value:function(t,e,r){var n=this;return l("Steem::send",t,e),this.start().then(function(){var o={};new i.default(function(t,e){o.resolve=function(e){t(e),r(null,e)},o.reject=function(t){e(t),r(t)}});var s={deferral:o,startedAt:Date.now(),message:{id:e.id||n.id++,method:"call",jsonrpc:"2.0",params:[t,e.method,e.params]}};return n.inFlight++,n._requests.set(s.message.id,s),n.ws.send(JSON.stringify(s.message)),o})}},{key:"onError",value:function(t){var e=!0,r=!1,n=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){i.value.deferral.reject(t)}}catch(t){r=!0,n=t}finally{try{!e&&o.return&&o.return()}finally{if(r)throw n}}this.stop()}},{key:"onClose",value:function(){var t=new Error("Connection was closed"),e=!0,r=!1,n=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){i.value.deferral.reject(t)}}catch(t){r=!0,n=t}finally{try{!e&&o.return&&o.return()}finally{if(r)throw n}}this._requests.clear()}},{key:"onMessage",value:function(t){var e=JSON.parse(t.data);if(l("-- Steem.onMessage --\x3e",e.id),!this._requests.has(e.id))throw new Error("Panic: no request in queue for message id "+e.id);var r=this._requests.get(e.id);this._requests.delete(e.id);var n=e.error;if(n){var i=new Error((n.message||"Failed to complete operation")+" (see err.payload for the full error payload)");i.payload=e,r.deferral.reject(i)}else this.emit("track-performance",r.message.method,Date.now()-r.startedAt),r.deferral.resolve(e.result)}}]),e}();e.default=h},200,function(t,e,r){(function(e){"use strict";var n=r(251),i=r(225),o=r(255),s=o.Point,a=o.getCurveByName("secp256k1"),u=r(171),f=r(274),c=r(261),l=r(260),h=r(250),p=r(185),d={},v=f.transaction,_=f.signed_transaction;d.signature=c,d.verify=function(t,e,r){var n=!1,i=[];for(var o in r)i.push(o);var s=this.generateKeys(t,e,i);return i.forEach(function(t){r[t][0][0]===s[t]&&(n=!0)}),n},d.generateKeys=function(t,r,o){var f={};return o.forEach(function(o){var c=(t+o+r).trim().split(/[\t\n\v\f\r ]+/).join(" "),l=p.sha256(c),h=n.fromBuffer(l),d=a.G.multiply(h),v=new s(d.curve,d.x,d.y,d.z).getEncoded(d.compressed),_=p.ripemd160(v),y=e.concat([v,_.slice(0,4)]);f[o]=u.get("address_prefix")+i.encode(y)}),f},d.getPrivateKeys=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["master","active","regular","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=(a=p.sha256(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).trim().split(/[\t\n\v\f\r ]+/).join(" "),s=p.sha256(o),a=e.concat([new e([128]),s]),u=p.sha256(a);u=(u=p.sha256(u)).slice(0,4);var f=e.concat([a,u]);return i.encode(f)},d.wifIsValid=function(t,e){return this.wifToPublic(t)==e},d.wifToPublic=function(t){var e=l.fromWif(t);return e=e.toPublic().toString()},d.isPubkey=function(t,e){return null!=h.fromString(t,e)},d.signTransaction=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[];t.signatures&&(i=[].concat(t.signatures));var o=new e(u.get("chain_id"),"hex"),s=v.toBuffer(t);for(var a in n&&(console.log("transaction",v.fromBuffer(s)),console.log("raw transaction",s.toString("hex"))),r){var f=c.signBuffer(e.concat([o,s]),r[a]);i.push(f.toBuffer()),n&&console.log("signature",f.toBuffer().toString("hex"))}return _.toObject(Object.assign(t,{signatures:i}))},t.exports=d}).call(e,r(177).Buffer)},function(t,e,r){"use strict";var n=o(r(275)),i=o(r(281));function o(t){return t&&t.__esModule?t:{default:t}}var s=n.default.int16,a=(n.default.uint8,n.default.uint16),u=n.default.uint32,f=n.default.uint64,c=n.default.string,l=n.default.string_binary,h=n.default.bytes,p=n.default.bool,d=n.default.array,v=n.default.static_variant,_=n.default.map,y=n.default.set,g=n.default.public_key,m=n.default.time_point_sec,b=n.default.optional,w=n.default.asset,E=(n.default.asset_16,n.default.void),k=n.default.void,T=n.default.void,B=v();t.exports.operation=B;var S=function(e,r){var n=new i.default(e,r);return t.exports[e]=n},x=new S("beneficiaries",{account:c,weight:a}),A=new S(0,{beneficiaries:y(x)}),j=(new S("transaction",{ref_block_num:a,ref_block_prefix:u,expiration:m,operations:d(B),extensions:y(E)}),new S("encrypted_memo",{from:g,to:g,nonce:f,check:u,encrypted:l}),new S("signed_transaction",{ref_block_num:a,ref_block_prefix:u,expiration:m,operations:d(B),extensions:y(E),signatures:d(h(65))})),I=(new S("signed_block",{previous:h(20),timestamp:m,witness:c,transaction_merkle_root:h(20),extensions:y(v([E,T,k])),witness_signature:h(65),transactions:d(j)}),new S("block_header",{previous:h(20),timestamp:m,witness:c,transaction_merkle_root:h(20),extensions:y(v([E,T,k]))}),new S("signed_block_header",{previous:h(20),timestamp:m,witness:c,transaction_merkle_root:h(20),extensions:y(v([E,T,k])),witness_signature:h(65)}),new S("vote",{voter:c,author:c,permlink:c,weight:s})),O=new S("content",{parent_author:c,parent_permlink:c,author:c,permlink:c,title:c,body:c,curation_percent:s,json_metadata:c,extensions:y(v([A]))}),C=new S("transfer",{from:c,to:c,amount:w,memo:c}),R=new S("transfer_to_vesting",{from:c,to:c,amount:w}),P=new S("withdraw_vesting",{account:c,vesting_shares:w}),U=new S("authority",{weight_threshold:u,account_auths:_(c,a),key_auths:_(g,a)}),L=new S("account_update",{account:c,master:b(U),active:b(U),regular:b(U),memo_key:g,json_metadata:c}),F=new S("chain_properties_init",{account_creation_fee:w,maximum_block_size:u,create_account_delegation_ratio:u,create_account_delegation_time:u,min_delegation:w,min_curation_percent:s,max_curation_percent:s,bandwidth_reserve_percent:s,bandwidth_reserve_below:w,flag_energy_additional_cost:s,vote_accounting_min_rshares:u,committee_request_approve_min_percent:s}),D=new S("witness_update",{owner:c,url:c,block_signing_key:g}),M=new S("chain_properties_update",{owner:c,props:F}),N=new S("account_witness_vote",{account:c,witness:c,approve:p}),q=new S("account_witness_proxy",{account:c,proxy:c}),z=new S("delete_content",{author:c,permlink:c}),V=new S("custom",{required_active_auths:y(c),required_regular_auths:y(c),id:c,json:c}),H=new S("set_withdraw_vesting_route",{from_account:c,to_account:c,percent:a,auto_vest:p}),W=new S("request_account_recovery",{recovery_account:c,account_to_recover:c,new_master_authority:U,extensions:y(E)}),Y=new S("recover_account",{account_to_recover:c,new_master_authority:U,recent_master_authority:U,extensions:y(E)}),G=new S("change_recovery_account",{account_to_recover:c,new_recovery_account:c,extensions:y(E)}),X=new S("escrow_transfer",{from:c,to:c,token_amount:w,escrow_id:u,agent:c,fee:w,json_metadata:c,ratification_deadline:m,escrow_expiration:m}),Z=new S("escrow_dispute",{from:c,to:c,agent:c,who:c,escrow_id:u}),$=new S("escrow_release",{from:c,to:c,agent:c,who:c,receiver:c,escrow_id:u,token_amount:w}),Q=new S("escrow_approve",{from:c,to:c,agent:c,who:c,escrow_id:u,approve:p}),K=new S("delegate_vesting_shares",{delegator:c,delegatee:c,vesting_shares:w}),J=new S("account_create",{fee:w,delegation:w,creator:c,new_account_name:c,master:U,active:U,regular:U,memo_key:g,json_metadata:c,referrer:c,extensions:y(E)}),tt=new S("account_metadata",{account:c,json_metadata:c}),et=new S("proposal_create",{author:c,title:c,memo:c,expiration_time:m,proposed_operations:d(new S("operation_wrapper",{op:B})),review_period_time:b(m),extensions:y(E)}),rt=new S("proposal_update",{author:c,title:c,active_approvals_to_add:y(c),active_approvals_to_remove:y(c),master_approvals_to_add:y(c),master_approvals_to_remove:y(c),regular_approvals_to_add:y(c),regular_approvals_to_remove:y(c),key_approvals_to_add:y(g),key_approvals_to_remove:y(g),extensions:y(E)}),nt=new S("proposal_delete",{author:c,title:c,requester:c,extensions:y(E)}),it=new S("author_reward",{author:c,permlink:c,payout:w,vesting_payout:w}),ot=new S("curation_reward",{curator:c,reward:w,content_author:c,content_permlink:c}),st=new S("content_reward",{author:c,permlink:c,payout:w}),at=new S("fill_vesting_withdraw",{from_account:c,to_account:c,withdrawn:w,deposited:w}),ut=new S("shutdown_witness",{owner:c}),ft=new S("hardfork",{hardfork_id:u}),ct=new S("content_payout_update",{author:c,permlink:c}),lt=new S("content_benefactor_reward",{benefactor:c,author:c,permlink:c,reward:w}),ht=new S("return_vesting_delegation",{account:c,vesting_shares:w}),pt=new S("committee_worker_create_request",{creator:c,url:c,worker:c,required_amount_min:w,required_amount_max:w,duration:u}),dt=new S("committee_worker_cancel_request",{creator:c,request_id:u}),vt=new S("committee_vote_request",{voter:c,request_id:u,vote_percent:s}),_t=new S("committee_cancel_request",{request_id:u}),yt=new S("committee_approve_request",{request_id:u}),gt=new S("committee_pay_request",{worker:c,request_id:u,tokens:w}),mt=new S("committee_payout_request",{request_id:u}),bt=new S("witness_reward",{witness:c,shares:w}),wt=new S("create_invite",{creator:c,balance:w,invite_key:g}),Et=new S("claim_invite_balance",{initiator:c,receiver:c,invite_secret:c}),kt=new S("invite_registration",{initiator:c,new_account_name:c,invite_secret:c,new_account_key:g}),Tt=new S("award",{initiator:c,receiver:c,energy:a,custom_sequence:f,memo:c,beneficiaries:y(x)}),Bt=new S("fixed_award",{initiator:c,receiver:c,reward_amount:w,max_energy:a,custom_sequence:f,memo:c,beneficiaries:y(x)}),St=new S("versioned_chain_properties_update",{owner:c,props:v([F,new S(1,{account_creation_fee:w,maximum_block_size:u,create_account_delegation_ratio:u,create_account_delegation_time:u,min_delegation:w,min_curation_percent:s,max_curation_percent:s,bandwidth_reserve_percent:s,bandwidth_reserve_below:w,flag_energy_additional_cost:s,vote_accounting_min_rshares:u,committee_request_approve_min_percent:s,inflation_witness_percent:s,inflation_ratio_committee_vs_reward_fund:s,inflation_recalc_period:u}),new S(2,{account_creation_fee:w,maximum_block_size:u,create_account_delegation_ratio:u,create_account_delegation_time:u,min_delegation:w,min_curation_percent:s,max_curation_percent:s,bandwidth_reserve_percent:s,bandwidth_reserve_below:w,flag_energy_additional_cost:s,vote_accounting_min_rshares:u,committee_request_approve_min_percent:s,inflation_witness_percent:s,inflation_ratio_committee_vs_reward_fund:s,inflation_recalc_period:u,data_operations_cost_additional_bandwidth:u,witness_miss_penalty_percent:s,witness_miss_penalty_duration:u}),new S(3,{account_creation_fee:w,maximum_block_size:u,create_account_delegation_ratio:u,create_account_delegation_time:u,min_delegation:w,min_curation_percent:s,max_curation_percent:s,bandwidth_reserve_percent:s,bandwidth_reserve_below:w,flag_energy_additional_cost:s,vote_accounting_min_rshares:u,committee_request_approve_min_percent:s,inflation_witness_percent:s,inflation_ratio_committee_vs_reward_fund:s,inflation_recalc_period:u,data_operations_cost_additional_bandwidth:u,witness_miss_penalty_percent:s,witness_miss_penalty_duration:u,create_invite_min_balance:w,committee_create_request_fee:w,create_paid_subscription_fee:w,account_on_sale_fee:w,subaccount_on_sale_fee:w,witness_declaration_fee:w,withdraw_intervals:a}),new S(4,{account_creation_fee:w,maximum_block_size:u,create_account_delegation_ratio:u,create_account_delegation_time:u,min_delegation:w,min_curation_percent:s,max_curation_percent:s,bandwidth_reserve_percent:s,bandwidth_reserve_below:w,flag_energy_additional_cost:s,vote_accounting_min_rshares:u,committee_request_approve_min_percent:s,inflation_witness_percent:s,inflation_ratio_committee_vs_reward_fund:s,inflation_recalc_period:u,data_operations_cost_additional_bandwidth:u,witness_miss_penalty_percent:s,witness_miss_penalty_duration:u,create_invite_min_balance:w,committee_create_request_fee:w,create_paid_subscription_fee:w,account_on_sale_fee:w,subaccount_on_sale_fee:w,witness_declaration_fee:w,withdraw_intervals:a,distribution_epoch_length:u})])}),xt=new S("receive_award",{receiver:c,custom_sequence:f,memo:c,shares:w}),At=new S("benefactor_award",{benefactor:c,receiver:c,custom_sequence:f,memo:c,shares:w}),jt=new S("set_paid_subscription",{account:c,url:c,levels:a,amount:w,period:a}),It=new S("paid_subscribe",{subscriber:c,account:c,level:a,amount:w,period:a,auto_renewal:p}),Ot=new S("paid_subscription_action",{subscriber:c,account:c,level:a,amount:w,period:a,summary_duration_sec:f,summary_amount:w}),Ct=new S("cancel_paid_subscription",{subscriber:c,account:c}),Rt=new S("set_account_price",{account:c,account_seller:c,account_offer_price:w,account_on_sale:p}),Pt=new S("target_account_sale",{account:c,account_seller:c,target_buyer:c,account_offer_price:w,account_on_sale:p}),Ut=new S("set_subaccount_price",{account:c,subaccount_seller:c,subaccount_offer_price:w,subaccount_on_sale:p}),Lt=new S("buy_account",{buyer:c,account:c,account_offer_price:w,account_authorities_key:g,tokens_to_shares:w}),Ft=new S("account_sale",{account:c,price:w,buyer:c,seller:c}),Dt=new S("use_invite_balance",{initiator:c,receiver:c,invite_secret:c}),Mt=new S("expire_escrow_ratification",{from:c,to:c,agent:c,escrow_id:u,token_amount:w,fee:w,ratification_deadline:m}),Nt=new S("bid",{account:c,bidder:c,bid:w}),qt=new S("outbid",{account:c,bidder:c,bid:w}),zt=new S("set_reward_sharing",{owner:c,sharing_rate:a});B.st_operations=[I,O,C,R,P,L,D,N,q,z,V,H,W,Y,G,X,Z,$,Q,K,J,tt,et,rt,nt,M,it,ot,st,at,ut,ft,ct,lt,ht,pt,dt,vt,_t,yt,gt,mt,bt,wt,Et,kt,St,Tt,xt,At,jt,It,Ot,Ct,Rt,Ut,Lt,Ft,Dt,Mt,Bt,Pt,Nt,qt,zt]},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(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(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}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=r(175),a=r(276),u=r(277),f=r(279),c=r(280),l=r(278),h={};t.exports=h;var p=e.env.npm_config__graphene_serializer_hex_dump;e.env.NODE_ENV;h.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,"");return t.skip(7),(0,a.fromImpliedDecimal)(e,r)+" "+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=-1===a?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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0.000 VIZ":t}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:(u.require_range(0,255,t,"uint8 "+t),parseInt(t))}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:(u.require_range(0,65535,t,"uint16 "+t),parseInt(t))}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).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;h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:(u.require_range(d,v,t,"uint32 "+t),parseInt(t))}},h.int16={fromByteBuffer:function(t){return t.readInt16()},appendByteBuffer:function(t,e){t.writeInt16(e)},fromObject:function(t){return t},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:parseInt(t)}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0":(u.required(t),u.to_long(t).toString())}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0":u.to_long(t).toString()}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"":t.toString("utf8")}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"":t.toString()}},h.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){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e){return function(t){return new Array(t).join("00")}(t)}return u.required(e),e.toString("hex")}}},h.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){return(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default||void 0!==t)&&!!JSON.parse(t)}},h.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){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default||void 0!==t)throw new Error("(void) undefined type")}},h.array=function(t){return{fromByteBuffer:function(e){var r=e.readVarint32();p&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0<r?i<r:i>r;i++)n.push(t.fromByteBuffer(e));return g(n,t)},appendByteBuffer:function(e,r){u.required(r),r=g(r,t),e.writeVarint32(r.length);for(var n,i=0;i<r.length;i++)n=r[i],t.appendByteBuffer(e,n)},fromObject:function(e){u.required(e),e=g(e,t);for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===e)return[t.toObject(e,r)];u.required(e),e=g(e,t);for(var n,i=[],o=0;o<e.length;o++)n=e[o],i.push(t.toObject(n,r));return i}}},h.time_point_sec={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){"number"!=typeof e&&(e=h.time_point_sec.fromObject(e)),t.writeUint32(e)},fromObject:function(t){if(u.required(t),"number"==typeof t)return t;if(t.getTime)return Math.floor(t.getTime()/1e3);if("string"!=typeof t)throw new Error("Unknown date type: "+t);return"string"!=typeof t||/Z$/.test(t)||(t+="Z"),Math.floor(new Date(t).getTime()/1e3)},toObject:function(t){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).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 e=parseInt(t);return u.require_range(0,4294967295,e,"uint32 "+t),new Date(1e3*e).toISOString().split(".")[0]}},h.set=function(t){return{validate:function(e){for(var r,n={},o=0;o<e.length;o++){var s;if(s=void 0===(r=e[o])?"undefined":i(r),["string","number"].indexOf(s)>=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return g(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;0<r?i<r:i>r;i++)n.push(t.fromByteBuffer(e));return n}())},appendByteBuffer:function(e,r){r||(r=[]),e.writeVarint32(r.length);for(var n,i=this.validate(r),o=0;o<i.length;o++)n=i[o],t.appendByteBuffer(e,n)},fromObject:function(e){return e||(e=[]),this.validate(function(){for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n}())},toObject:function(e){var r=arguments.length>1&&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;o<e.length;o++)n=e[o],i.push(t.toObject(n,r));return i}()))}}},h.fixed_array=function(t,e){return{fromByteBuffer:function(r){var n,i,o;for(o=[],n=0,i=t;n<i;n+=1)o.push(e.fromByteBuffer(r));return g(o,e)},appendByteBuffer:function(r,n){var i,o,s;for(0!==t&&(u.required(n),n=g(n,e)),i=o=0,s=t;o<s;i=o+=1)e.appendByteBuffer(r,n[i])},fromObject:function(r){var n,i,o,s;for(0!==t&&u.required(r),s=[],n=i=0,o=t;i<o;n=i+=1)s.push(e.fromObject(r[n]));return s},toObject:function(r,n){var i,o,s,a,f,c,l;if(null==n&&(n={}),n.use_default&&void 0===r){for(c=[],i=o=0,a=t;o<a;i=o+=1)c.push(e.toObject(void 0,n));return c}for(0!==t&&u.required(r),l=[],i=s=0,f=t;s<f;i=s+=1)l.push(e.toObject(r[i],n));return l}}};h.protocol_id_type=function(t){return u.required(t,"name"),function(t,e){return u.required(t,"reserved_spaces"),u.required(e,"object_type"),{fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(r,n){u.required(n),void 0!==n.resolve&&(n=n.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(n)&&(n=u.get_instance(t,e,n)),r.writeVarint32(u.to_number(n))},fromObject:function(r){return u.required(r),void 0!==r.resolve&&(r=r.resolve),u.is_digits(r)?u.to_number(r):u.get_instance(t,e,r)},toObject:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=l.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.reserved_spaces.protocol_ids,t)},h.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)).appendByteBuffer(t)},fromObject:function(t){return u.required(t),void 0!==t.resolve&&(t=t.resolve),f.fromString(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0.0.0":(u.required(t),void 0!==t.resolve&&(t=t.resolve),(t=f.fromString(t)).toString())}},h.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=h.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"===(void 0===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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0:0":(u.required(t),"string"==typeof t&&(t=h.vote_id.fromObject(t)),t.type+":"+t.id)},compare:function(t,e){return"object"!==(void 0===t?"undefined":i(t))&&(t=h.vote_id.fromObject(t)),"object"!==(void 0===e?"undefined":i(e))&&(e=h.vote_id.fromObject(e)),parseInt(t.id)-parseInt(e.id)}},h.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?(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=r.use_default||void 0!==e?t.toObject(e,r):void 0;return r.annotate&&("object"===(void 0===n?"undefined":i(n))?n.__optional="parent is optional":n={__optional:n}),n}}},h.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){if(s.value.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 _(this.opTypeId(t[0]),this.opTypeId(e[0]))}}},h.map=function(t,e){return{validate:function(e){if(!Array.isArray(e))throw new Error("expecting array");for(var r,n={},o=0;o<e.length;o++){var s;if(2!==(r=e[o]).length)throw new Error("expecting two elements");if(s=i(r[0]),["number","string"].indexOf(s)>=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return g(e,t)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0<i?o<i:o>i;o++)n.push([t.fromByteBuffer(r),e.fromByteBuffer(r)]);return this.validate(n)},appendByteBuffer:function(r,n){this.validate(n),r.writeVarint32(n.length);for(var i,o=0;o<n.length;o++)i=n[o],t.appendByteBuffer(r,i[0]),e.appendByteBuffer(r,i[1])},fromObject:function(r){u.required(r);for(var n,i=[],o=0;o<r.length;o++)n=r[o],i.push([t.fromObject(n[0]),e.fromObject(n[1])]);return this.validate(i)},toObject:function(r){var n=arguments.length>1&&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;s<r.length;s++)i=r[s],o.push([t.toObject(i[0],n),e.toObject(i[1],n)]);return o}}},h.public_key={toPublic:function(t){return void 0!==t.resolve&&(t=t.resolve),null==t?t:t.Q?t:s.PublicKey.fromStringOrThrow(t)},fromByteBuffer:function(t){return c.public_key(t)},appendByteBuffer:function(t,e){u.required(e),c.public_key(t,h.public_key.toPublic(e))},fromObject:function(t){return u.required(t),t.Q?t:h.public_key.toPublic(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?s.ecc_config.get("address_prefix")+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(u.required(t),t.toString())},compare:function(t,e){return 1*_(t.toString(),e.toString())}},h.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,h.address._to_address(e).toBuffer())},fromObject:function(t){return h.address._to_address(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?s.ecc_config.get("address_prefix")+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":h.address._to_address(t).toString()},compare:function(t,e){return-1*_(t.toString(),e.toString())}};var _=function(t,e){return t>e?1:t<e?-1:0},y=function(t){return Array.isArray(t)?t[0]:t},g=function(t,e){return e.nosort?t:e.compare?t.sort(function(t,r){return e.compare(y(t),y(r))}):t.sort(function(t,e){return"number"==typeof y(t)&&"number"==typeof y(e)?y(t)-y(e):n.isBuffer(y(t))&&n.isBuffer(y(e))?_(y(t).toString("hex"),y(e).toString("hex")):_(y(t).toString(),y(e).toString())})}}).call(e,r(5),r(177).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(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}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),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};e.toImpliedDecimal=function(t,e){"number"==typeof t?((0,o.default)(t<=9007199254740991,"overflow"),t=""+t):t.toString&&(t=t.toString());(0,o.default)("string"==typeof t,"number should be an actual number or string: "+(void 0===t?"undefined":i(t))),t=t.trim(),(0,o.default)(/^[0-9]*\.?[0-9]*$/.test(t),"Invalid decimal number "+t);var r=t.split("."),s=n(r,2),a=s[0],u=void 0===a?"":a,f=s[1],c=void 0===f?"":f,l=e-c.length;(0,o.default)(l>=0,"Too many decimal digits in "+t+" to create an implied decimal of "+e);for(var h=0;h<l;h++)c+="0";for(;"0"===u.charAt(0);)u=u.substring(1);return u+c},e.fromImpliedDecimal=function(t,e){"number"==typeof t?((0,o.default)(t<=9007199254740991,"overflow"),t=""+t):t.toString&&(t=t.toString());for(;t.length<e+1;)t="0"+t;var r=t.substring(t.length-e);return t.substring(0,t.length-e)+(r?"."+r:"")};var o=function(t){return t&&t.__esModule?t:{default:t}}(r(181))},function(t,e,r){"use strict";var n,i,o,s,a,u="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},f=r(230).Long,c=r(278);t.exports=n={is_empty:i=function(t){return null==t},required:function(t){var e=arguments.length>1&&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(!f.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:function(t){return"numeric"==typeof t||/^[0-9]+$/.test(t)},to_number:o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(t)?t:(n.no_overflow53(t,e),"number"==typeof t?t:parseInt(t))},to_long:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(t)?t:f.isLong(t)?t:(n.no_overflow64(t,e),"number"==typeof t&&(t=""+t),f.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(f.isLong(t))return t.toString();throw"unsupported type "+e+": ("+(void 0===t?"undefined":u(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: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;o(r);if(r<t||r>e)throw new Error("out of range "+r+" "+n+" "+r);return r},require_object_type:s=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=c.object_type[e];if(!o)throw new Error("Unknown object type: "+e+", "+n+", "+r);if(!new RegExp(t+"."+o+".[0-9]+$").test(r))throw new Error("Expecting "+e+" in format "+t+"."+o+".[0-9]+ instead of "+r+" "+n+" "+r);return r},get_instance:function(t,e,r,n){return i(r)?r:(s(t,e,r,n),o(r.split(".")[2]))},require_relative_type:function(t,e,r){return s(0,t,e,r),e},get_relative_instance:function(t,e,r){return i(e)?e:(s(0,t,e,r),o(e.split(".")[2]))},require_protocol_type:function(t,e,r){return s(1,t,e,r),e},get_protocol_instance:function(t,e,r){return i(e)?e:(s(1,t,e,r),o(e.split(".")[2]))},get_protocol_type:a=function(t,e){if(i(t))return t;(void 0)(t,e);var r=t.split(".");return o(r[1])},get_protocol_type_name:function(t,e){if(i(t))return t;var r=a(t,e);return Object.keys(c.object_type)[r]},require_implementation_type:function(t,e,r){return s(2,t,e,r),e},get_implementation_instance:function(t,e,r){return i(e)?e:(s(2,t,e,r),o(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(!f.isLong(t))throw"unsupported type "+e+": ("+(void 0===t?"undefined":u(t))+") "+t;n.no_overflow53(t.toInt(),e)}else{parseInt(t);if(t>9007199254740991||t<-9007199254740991)throw new Error("overflow "+e+" "+t)}else if(t>9007199254740991||t<-9007199254740991)throw new Error("overflow "+e+" "+t)},no_overflow64:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!f.isLong(t))if(void 0===t.t||void 0===t.s)if("string"!=typeof t){if("number"!=typeof t)throw"unsupported type "+e+": ("+(void 0===t?"undefined":u(t))+") "+t;if(t>9007199254740991||t<-9007199254740991)throw new Error("overflow "+e+" "+t)}else{for(t=t.replace(/^0+/,"");/0$/.test(t);)t=t.substring(0,t.length-1);if(/\.$/.test(t)&&(t=t.substring(0,t.length-1)),""===t&&(t="0"),f.fromString(t).toString()!==t.trim())throw new Error("overflow "+e+" "+t)}else n.no_overflow64(t.toString(),e)}}},function(t,e){"use strict";var r;t.exports=r={},r.reserved_spaces={relative_protocol_ids:0,protocol_ids:1,implementation_ids:2},r.operations={vote:0,content:1,transfer:2,transfer_to_vesting:3,withdraw_vesting:4,account_update:5,witness_update:6,account_witness_vote:7,account_witness_proxy:8,delete_content:9,custom:10,set_withdraw_vesting_route:11,request_account_recovery:12,recover_account:13,change_recovery_account:14,escrow_transfer:15,escrow_dispute:16,escrow_release:17,escrow_approve:18,delegate_vesting_shares:19,account_create:20,account_metadata:21,proposal_create:22,proposal_update:23,proposal_delete:24,chain_properties_update:25,author_reward:26,curation_reward:27,content_reward:28,fill_vesting_withdraw:29,shutdown_witness:30,hardfork:31,content_payout_update:32,content_benefactor_reward:33,return_vesting_delegation:34,committee_worker_create_request:35,committee_worker_cancel_request:36,committee_vote_request:37,committee_cancel_request:38,committee_approve_request:39,committee_payout_request:40,committee_pay_request:41,witness_reward:42,create_invite:43,claim_invite_balance:44,invite_registration:45,versioned_chain_properties_update:46,award:47,receive_award:48,benefactor_award:49,set_paid_subscription:50,paid_subscribe:51,paid_subscription_action:52,cancel_paid_subscription:53,set_account_price:54,set_subaccount_price:55,buy_account:56,account_sale:57,use_invite_balance:58,expire_escrow_ratification:59,fixed_award:60,target_account_sale:61,bid:62,outbid:63,set_reward_sharing:64},r.object_type={null:0,base:1}},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=r(230).Long,o=r(277),s=i.fromNumber(Math.pow(2,48)-1),a=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.space=e,this.type=r,this.instance=n;var i=this.instance.toString(),s=this.space+"."+this.type+"."+i;if(!o.is_digits(i))throw new("Invalid object id "+s)}return n(t,[{key:"toLong",value:function(){return i.fromNumber(this.space).shiftLeft(56).or(i.fromNumber(this.type).shiftLeft(48).or(this.instance))}},{key:"appendByteBuffer",value:function(t){return t.writeUint64(this.toLong())}},{key:"toString",value:function(){return this.space+"."+this.type+"."+this.instance.toString()}}],[{key:"fromString",value:function(e){if(void 0!==e.space&&void 0!==e.type&&void 0!==e.instance)return e;var r=o.require_match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/,o.required(e,"object_id"),"object_id");return new t(parseInt(r[1]),parseInt(r[2]),i.fromString(r[3]))}},{key:"fromLong",value:function(e){return new t(e.shiftRight(56).toInt(),255&e.shiftRight(48).toInt(),e.and(s))}},{key:"fromByteBuffer",value:function(e){return t.fromLong(e.readUint64())}}]),t}();t.exports=a},function(t,e,r){(function(e){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(175);var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,null,[{key:"fixed_data",value:function(t,r,n){if(t){if(!n){var i=t.copy(t.offset,t.offset+r);return t.skip(r),new e(i.toBinary(),"binary")}var o=n.slice(0,r).toString("binary");for(t.append(o,"binary");r-- >o.length;)t.writeUint8(0)}}},{key:"public_key",value:function(e,r){if(e){if(!r)return n=t.fixed_data(e,33),i.PublicKey.fromBuffer(n);var n=r.toBuffer();e.append(n.toString("binary"),"binary")}}},{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=o}).call(e,r(177).Buffer)},function(t,e,r){(function(e,n){"use strict";var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var o=r(230),s=r(282),a=e.env.npm_config__graphene_serializer_hex_dump,u=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.operation_name=e,this.types=r,this.types&&(this.keys=Object.keys(this.types)),t.printDebug=!0}return i(t,[{key:"fromByteBuffer",value:function(e){var r={},n=null;try{for(var i=this.keys,o=0;o<i.length;o++){n=i[o];var u=this.types[n];try{if(a)if(u.operation_name)console.error(u.operation_name);else{var f=e.offset;u.fromByteBuffer(e);var c=e.offset;e.offset=f;var l=e.copy(f,c);console.error(this.operation_name+"."+n+"\t",l.toHex())}r[n]=u.fromByteBuffer(e)}catch(r){throw t.printDebug&&(console.error("Error reading "+this.operation_name+"."+n+" in data:"),e.printDebug()),r}}}catch(t){s.throw(this.operation_name+"."+n,t)}return r}},{key:"appendByteBuffer",value:function(t,e){var r=null;try{for(var n=this.keys,i=0;i<n.length;i++){r=n[i],this.types[r].appendByteBuffer(t,e[r])}}catch(t){try{s.throw(this.operation_name+"."+r+" = "+JSON.stringify(e[r]),t)}catch(n){s.throw(this.operation_name+"."+r+" = "+e[r],t)}}}},{key:"fromObject",value:function(t){var e={},r=null;try{for(var n=this.keys,i=0;i<n.length;i++){r=n[i];var o=this.types[r],a=t[r],u=o.fromObject(a);e[r]=u}}catch(t){s.throw(this.operation_name+"."+r,t)}return e}},{key:"toObject",value:function(){var t=arguments.length>0&&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 i=this.keys,u=0;u<i.length;u++){n=i[u];var f=this.types[n],c=f.toObject(null!=t?t[n]:void 0,e);if(r[n]=c,a){var l=new o(o.DEFAULT_CAPACITY,o.LITTLE_ENDIAN);if(null!=t){var h=t[n];h&&f.appendByteBuffer(l,h)}l=l.copy(0,l.offset),console.error(this.operation_name+"."+n,l.toHex())}}}catch(t){s.throw(this.operation_name+"."+n,t)}return r}},{key:"compare",value:function(t,e){var r=this.keys[0],i=this.types[r],o=t[r],s=e[r];if(i.compare)return i.compare(o,s);if("number"==typeof o&&"number"==typeof s)return o-s;var a=void 0;n.isBuffer(o)&&n.isBuffer(s)&&(a="hex");var u=o.toString(a),f=s.toString(a);return u>f?1:u<f?-1:0}},{key:"fromHex",value:function(t){var e=o.fromHex(t,o.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"fromBuffer",value:function(t){var e=o.fromBinary(t.toString("binary"),o.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"toHex",value:function(t){return this.toByteBuffer(t).toHex()}},{key:"toByteBuffer",value:function(t){var e=new o(o.DEFAULT_CAPACITY,o.LITTLE_ENDIAN);return this.appendByteBuffer(e,t),e.copy(0,e.offset)}},{key:"toBuffer",value:function(t){return new n(this.toByteBuffer(t).toBinary(),"binary")}}]),t}();t.exports=u}).call(e,r(5),r(177).Buffer)},function(t,e){"use strict";var r=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var n=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.message=e,(null!=r?r.message:void 0)&&(this.message="cause\t"+r.message+"\t"+this.message);var n="";(null!=r?r.stack:void 0)&&(n="caused by\n\t"+r.stack+"\t"+n),this.stack=this.message+"\n"+n}return r(t,null,[{key:"throw",value:function(t,e){var r=t;throw(null!=e?e.message:void 0)&&(r+="\t cause: "+e.message+" "),(null!=e?e.stack:void 0)&&(r+="\n stack: "+e.stack+" "),new Error(r)}}]),t}();t.exports=n},function(t,e,r){(function(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=v(r(3)),s=v(r(168)),a=v(r(284)),u=v(r(285)),f=v(r(286)),c=v(r(299)),l=v(r(1)),h=v(r(273)),p=r(174),d=v(r(171));function v(t){return t&&t.__esModule?t:{default:t}}var _=(0,s.default)("viz:broadcast"),y=(0,f.default)(l.default),g={send:function(t,e,r){g._prepareTransaction(t).then(function(t){return _("Signing transaction (transaction, transaction.operations)",t,t.operations),o.default.join(t,h.default.signTransaction(t,e))}).spread(function(t,e){return _("Broadcasting transaction (transaction, transaction.operations)",t,t.operations),d.default.get("broadcast_transaction_with_callback")?l.default.broadcastTransactionWithCallbackAsync(function(){},e).then(function(){return e}):l.default.broadcastTransactionAsync(e).then(function(){return e})}).nodeify(r||a.default)},_prepareTransaction:function(t){return l.default.getDynamicGlobalPropertiesAsync().then(function(e){var r=new Date(e.time+"Z"),i=d.default.get("tx_expiration_seconds")||60,o=new Date(r.getTime()+1e3*i);if(d.default.get("reference_irreversible_block")&&void 0!==e.last_irreversible_block_ref_num&&0!==e.last_irreversible_block_ref_num)return Object.assign({ref_block_num:e.last_irreversible_block_ref_num,ref_block_prefix:e.last_irreversible_block_ref_prefix,expiration:o},t);var s=65535&e.head_block_number;if(e.head_block_id){var a=new n(e.head_block_id,"hex").readUInt32LE(4);return Object.assign({ref_block_num:s,ref_block_prefix:a,expiration:o},t)}var u=e.head_block_number-3&65535;return l.default.getBlockAsync(e.head_block_number-2).then(function(e){var r=e.previous;return Object.assign({ref_block_num:u,ref_block_prefix:new n(r,"hex").readUInt32LE(4),expiration:o},t)})})}};c.default.forEach(function(t){var e=(0,p.camelCase)(t.operation),r=t.params||[],n=-1!==r.indexOf("parent_permlink")&&-1!==r.indexOf("parent_permlink");g[e+"With"]=function(r,i,o){_('Sending operation "'+e+'" with',{options:i,callback:o});var s={};return t.roles&&t.roles.length&&(s[t.roles[0]]=r),g.send({extensions:[],operations:[[t.operation,Object.assign({},i,null!=i.json_metadata?{json_metadata:m(i.json_metadata)}:{},n&&null==i.permlink?{permlink:y.contentPermlink(i.parent_author,i.parent_permlink)}:{})]]},s,o)},g[e]=function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];_('Parsing operation "'+e+'" with',{args:i});var s=r.reduce(function(t,e,r){return t[e]=i[r],t},{}),a=i[r.length];return g[e+"With"](t,s,a)}});var m=function(t){return"object"===(void 0===t?"undefined":i(t))?JSON.stringify(t):t};(0,u.default)(g),o.default.promisifyAll(g),e=t.exports=g}).call(e,r(177).Buffer)},function(t,e){t.exports=function(){}},function(t,e,r){"use strict";var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(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}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(t){return t&&t.__esModule?t:{default:t}}(r(1));t.exports=function(t){t.addAccountAuth=function(e,r,o){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"regular",a=arguments[4];i.default.getAccountsAsync([r]).then(function(r){var i=n(r,1)[0],u=i[s];if(-1!==u.account_auths.map(function(t){return t[0]}).indexOf(o))return a(null,null);u.account_auths.push([o,1]);var f="master"===s?u:void 0,c="active"===s?u:void 0,l="regular"===s?u:void 0;t.accountUpdate(e,i.name,f,c,l,i.memo_key,i.json_metadata,a)})},t.removeAccountAuth=function(e,r,o){var s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"regular",a=arguments[4];i.default.getAccountsAsync([r]).then(function(r){for(var i=n(r,1)[0],u=i[s],f=u.account_auths.length,c=0;c<f;c++){if(u.account_auths[c][0]===o){u.account_auths.splice(c,1);break}}if(f===u.account_auths.length)return a(null,null);var l="master"===s?u:void 0,h="active"===s?u:void 0,p="regular"===s?u:void 0;t.accountUpdate(e,i.name,l,h,p,i.memo_key,i.json_metadata,a)})}}},function(t,e,r){"use strict";!function(t){t&&t.__esModule}(r(287));var n=r(175);t.exports=function(t){function e(t,e){var r=parseFloat(t.vesting_shares.split(" ")[0]),n=parseFloat(e.total_vesting_shares.split(" ")[0]);return parseFloat(e.total_vesting_fund.split(" ")[0])*(r/n)}return{sharesToVIZ:function(t,e,r){return parseFloat(r)*(parseFloat(t)/parseFloat(e))},contentPermlink:function(t,e){var r=(new Date).toISOString().replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();return"re-"+t+"-"+(e=e.replace(/(-\d{8}t\d{9}z)/g,""))+"-"+r},amount:function(t,e){return t.toFixed(3)+" "+e},numberWithCommas:function(t){return t.replace(/\B(?=(\d{3})+(?!\d))/g,",")},vestingVIZ:e,estimateAccountValue:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.gprops,o=n.vesting_viz,s=[];return r.name,o||(i?o=e(r,i):s.push(t.getStateAsync("/@{username}").then(function(t){i=t.props,o=e(r,i)}))),Promise.all(s).then(function(){var t=parseFloat(r.balance.split(" ")[0]);return(o+t).toFixed(3)})},createSuggestedPassword:function(){return n.key_utils.get_random_key().toWif().substring(3,35)}}}},function(t,e,r){var n=r(288);t.exports=function(t,e,r){var i=null==t?void 0:n(t,e);return void 0===i?r:i}},function(t,e,r){var n=r(289),i=r(298);t.exports=function(t,e){for(var r=0,o=(e=n(e,t)).length;null!=t&&r<o;)t=t[i(e[r++])];return r&&r==o?t:void 0}},function(t,e,r){var n=r(100),i=r(290),o=r(292),s=r(295);t.exports=function(t,e){return n(t)?t:i(t,e)?[t]:o(s(t))}},function(t,e,r){var n=r(100),i=r(291),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||s.test(t)||!o.test(t)||null!=e&&t in Object(e)}},function(t,e,r){var n=r(62),i=r(99),o="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||i(t)&&n(t)==o}},function(t,e,r){var n=r(293),i=/^\./,o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,s=/\\(\\)?/g,a=n(function(t){var e=[];return i.test(t)&&e.push(""),t.replace(o,function(t,r,n,i){e.push(n?i.replace(s,"$1"):r||t)}),e});t.exports=a},function(t,e,r){var n=r(294),i=500;t.exports=function(t){var e=n(t,function(t){return r.size===i&&r.clear(),t}),r=e.cache;return e}},function(t,e,r){var n=r(73),i="Expected a function";function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(i);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(o.Cache||n),r}o.Cache=n,t.exports=o},function(t,e,r){var n=r(296);t.exports=function(t){return null==t?"":n(t)}},function(t,e,r){var n=r(63),i=r(297),o=r(100),s=r(291),a=1/0,u=n?n.prototype:void 0,f=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(s(e))return f?f.call(e):"";var r=e+"";return"0"==r&&1/e==-a?"-0":r}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},function(t,e,r){var n=r(291),i=1/0;t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}},function(t,e){"use strict";t.exports=[{roles:["regular"],operation:"vote",params:["voter","author","permlink","weight"]},{roles:["regular"],operation:"content",params:["parent_author","parent_permlink","author","permlink","title","body","curation_percent","json_metadata","extensions"]},{roles:["active","master"],operation:"transfer",params:["from","to","amount","memo"]},{roles:["active"],operation:"transfer_to_vesting",params:["from","to","amount"]},{roles:["active"],operation:"withdraw_vesting",params:["account","vesting_shares"]},{roles:["master","active"],operation:"account_update",params:["account","master","active","regular","memo_key","json_metadata"]},{roles:["active"],operation:"witness_update",params:["owner","url","block_signing_key"]},{roles:["active"],operation:"chain_properties_update",params:["owner","props"]},{roles:["regular"],operation:"account_witness_vote",params:["account","witness","approve"]},{roles:["regular"],operation:"account_witness_proxy",params:["account","proxy"]},{roles:["regular"],operation:"delete_content",params:["author","permlink"]},{roles:["regular","active"],operation:"custom",params:["required_active_auths","required_regular_auths","id","json"]},{roles:["active"],operation:"set_withdraw_vesting_route",params:["from_account","to_account","percent","auto_vest"]},{roles:["active"],operation:"request_account_recovery",params:["recovery_account","account_to_recover","new_master_authority","extensions"]},{roles:["master"],operation:"recover_account",params:["account_to_recover","new_master_authority","recent_master_authority","extensions"]},{roles:["master"],operation:"change_recovery_account",params:["account_to_recover","new_recovery_account","extensions"]},{roles:["active"],operation:"escrow_transfer",params:["from","to","token_amount","escrow_id","agent","fee","json_metadata","ratification_deadline","escrow_expiration"]},{roles:["active"],operation:"escrow_dispute",params:["from","to","agent","who","escrow_id"]},{roles:["active"],operation:"escrow_release",params:["from","to","agent","who","receiver","escrow_id","token_amount"]},{roles:["active"],operation:"escrow_approve",params:["from","to","agent","who","escrow_id","approve"]},{roles:["regular"],operation:"claim_reward_balance",params:["account","reward","reward_vests"]},{roles:["regular"],operation:"content_reward",params:["author","permlink","payout"]},{roles:["active"],operation:"fill_vesting_withdraw",params:["from_account","to_account","withdrawn","deposited"]},{roles:["active","master"],operation:"delegate_vesting_shares",params:["delegator","delegatee","vesting_shares"]},{roles:["active","master"],operation:"account_create",params:["fee","delegation","creator","new_account_name","master","active","regular","memo_key","json_metadata","referrer","extensions"]},{roles:["regular"],operation:"account_metadata",params:["account","json_metadata"]},{roles:["active","master"],operation:"proposal_create",params:["author","title","memo","expiration_time","proposed_operations","review_period_time","extensions"]},{roles:["regular","active","master"],operation:"proposal_update",params:["author","title","active_approvals_to_add","active_approvals_to_remove","master_approvals_to_add","master_approvals_to_remove","regular_approvals_to_add","regular_approvals_to_remove","key_approvals_to_add","key_approvals_to_remove","extensions"]},{roles:["active","master"],operation:"proposal_delete",params:["author","title","requester","extensions"]},{roles:["regular"],operation:"committee_worker_create_request",params:["creator","url","worker","required_amount_min","required_amount_max","duration"]},{roles:["regular"],operation:"committee_worker_cancel_request",params:["creator","request_id"]},{roles:["regular"],operation:"committee_vote_request",params:["voter","request_id","vote_percent"]},{roles:["active"],operation:"create_invite",params:["creator","balance","invite_key"]},{roles:["active"],operation:"claim_invite_balance",params:["initiator","receiver","invite_secret"]},{roles:["active"],operation:"invite_registration",params:["initiator","new_account_name","invite_secret","new_account_key"]},{roles:["active"],operation:"versioned_chain_properties_update",params:["owner","props"]},{roles:["regular"],operation:"award",params:["initiator","receiver","energy","custom_sequence","memo","beneficiaries"]},{roles:["regular"],operation:"fixed_award",params:["initiator","receiver","reward_amount","max_energy","custom_sequence","memo","beneficiaries"]},{roles:["active"],operation:"set_paid_subscription",params:["account","url","levels","amount","period"]},{roles:["active"],operation:"paid_subscribe",params:["subscriber","account","level","amount","period","auto_renewal"]},{roles:["master"],operation:"set_account_price",params:["account","account_seller","account_offer_price","account_on_sale"]},{roles:["master"],operation:"target_account_sale",params:["account","account_seller","target_buyer","account_offer_price","account_on_sale"]},{roles:["master"],operation:"set_subaccount_price",params:["account","subaccount_seller","subaccount_offer_price","subaccount_on_sale"]},{roles:["active"],operation:"buy_account",params:["buyer","account","account_offer_price","account_authorities_key","tokens_to_shares"]},{roles:["active"],operation:"use_invite_balance",params:["initiator","receiver","invite_secret"]},{roles:["active"],operation:"set_reward_sharing",params:["owner","sharing_rate"]}]},function(t,e,r){(function(t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="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};e.decode=c,e.encode=l;var i=u(r(230)),o=u(r(181)),s=u(r(225)),a=r(175);function u(t){return t&&t.__esModule?t:{default:t}}var f=r(301).ops.encrypted_memo;function c(e,r){if((0,o.default)(r,"memo is required"),o.default.equal(void 0===r?"undefined":n(r),"string","memo"),!/^#/.test(r))return r;r=r.substring(1),(0,o.default)(e,"private_key is required"),p(),e=d(e),r=s.default.decode(r);var u=r=f.fromBuffer(new t(r,"binary")),c=u.from,l=u.to,h=u.nonce,v=u.check,_=u.encrypted,y=e.toPublicKey().toString()===c.toString()?l.toString():c.toString();r=a.Aes.decrypt(e,y,h,_,v);var g=i.default.fromBinary(r.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);try{return g.mark(),"#"+g.readVString()}catch(e){return g.reset(),"#"+(r=new t(g.toString("binary"),"binary").toString("utf-8"))}}function l(e,r,u,c){if((0,o.default)(u,"memo is required"),o.default.equal(void 0===u?"undefined":n(u),"string","memo"),!/^#/.test(u))return u;u=u.substring(1),(0,o.default)(e,"private_key is required"),(0,o.default)(r,"public_key is required"),p(),e=d(e),r=v(r);var l=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);l.writeVString(u),u=new t(l.copy(0,l.offset).toBinary(),"binary");var h=a.Aes.encrypt(e,r,u,c),_=h.nonce,y=h.message,g=h.checksum;return u=f.fromObject({from:e.toPublicKey(),to:r,nonce:_,check:g,encrypted:y}),u=f.toBuffer(u),"#"+s.default.encode(new t(u,"binary"))}var h=void 0;function p(){if(void 0===h){var t=void 0;h=!0;try{var e="5JdeC9P7Pbd1uGdFVEsJ41EkEnADbbHGq6p1BwFxm6txNBsQnsw";t=c(e,l(e,"VIZ8m5UgaFAAYQRuaNejYdS8FVLVp9Ss3K1qAVk5de6F8s3HnVbvA","#memo爱"))}catch(t){console.error(t)}finally{h="#memo爱"===t}}if(!1===h)throw new Error("This environment does not support encryption.")}var d=function(t){return t?t.d?t:a.PrivateKey.fromWif(t):t},v=function(t){return t?t.Q?t:a.PublicKey.fromString(t):t}}).call(e,r(177).Buffer)},function(t,e,r){"use strict";t.exports={Serializer:r(281),fp:r(280),types:r(275),ops:r(274),template:r(302),number_utils:r(276)}},function(t,e){"use strict";t.exports=function(t){var e=t.toObject(void 0,{use_default:!0,annotate:!0});console.error(JSON.stringify(e,null,4)),e=t.toObject(void 0,{use_default:!0,annotate:!1}),console.error(JSON.stringify(e))}}]));
|
|
34
|
+
!function(a,s){r(231).amd?(i=[],void 0===(o="function"==typeof(n=s)?n.apply(e,i):n)||(t.exports=o)):"object"==typeof t&&t&&t.exports?t.exports=s():(a.dcodeIO=a.dcodeIO||{}).Long=s()}(this,function(){"use strict";function t(t,e,r){this.low=0|t,this.high=0|e,this.unsigned=!!r}function e(t){return!0===(t&&t.__isLong__)}t.prototype.__isLong__,Object.defineProperty(t.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),t.isLong=e;var r={},n={};function i(t,e){var i,o,s;return e?(s=0<=(t>>>=0)&&t<256)&&(o=n[t])?o:(i=a(t,(0|t)<0?-1:0,!0),s&&(n[t]=i),i):(s=-128<=(t|=0)&&t<128)&&(o=r[t])?o:(i=a(t,t<0?-1:0,!1),s&&(r[t]=i),i)}function o(t,e){if(isNaN(t)||!isFinite(t))return e?v:d;if(e){if(t<0)return v;if(t>=l)return b}else{if(t<=-h)return w;if(t+1>=h)return m}return t<0?o(-t,e).neg():a(t%c|0,t/c|0,e)}function a(e,r,n){return new t(e,r,n)}t.fromInt=i,t.fromNumber=o,t.fromBits=a;var s=Math.pow;function u(t,e,r){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return d;if("number"==typeof e?(r=e,e=!1):e=!!e,(r=r||10)<2||36<r)throw RangeError("radix");var n;if((n=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===n)return u(t.substring(1),e,r).neg();for(var i=o(s(r,8)),a=d,f=0;f<t.length;f+=8){var c=Math.min(8,t.length-f),l=parseInt(t.substring(f,f+c),r);if(c<8){var h=o(s(r,c));a=a.mul(h).add(o(l))}else a=(a=a.mul(i)).add(o(l))}return a.unsigned=e,a}function f(e){return e instanceof t?e:"number"==typeof e?o(e):"string"==typeof e?u(e):a(e.low,e.high,e.unsigned)}t.fromString=u,t.fromValue=f;var c=4294967296,l=c*c,h=l/2,p=i(1<<24),d=i(0);t.ZERO=d;var v=i(0,!0);t.UZERO=v;var _=i(1);t.ONE=_;var y=i(1,!0);t.UONE=y;var g=i(-1);t.NEG_ONE=g;var m=a(-1,2147483647,!1);t.MAX_VALUE=m;var b=a(-1,-1,!0);t.MAX_UNSIGNED_VALUE=b;var w=a(0,-2147483648,!1);t.MIN_VALUE=w;var E=t.prototype;return E.toInt=function(){return this.unsigned?this.low>>>0:this.low},E.toNumber=function(){return this.unsigned?(this.high>>>0)*c+(this.low>>>0):this.high*c+(this.low>>>0)},E.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(w)){var e=o(t),r=this.div(e),n=r.mul(e).sub(this);return r.toString(t)+n.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var i=o(s(t,6),this.unsigned),a=this,u="";;){var f=a.div(i),c=(a.sub(f.mul(i)).toInt()>>>0).toString(t);if((a=f).isZero())return c+u;for(;c.length<6;)c="0"+c;u=""+c+u}},E.getHighBits=function(){return this.high},E.getHighBitsUnsigned=function(){return this.high>>>0},E.getLowBits=function(){return this.low},E.getLowBitsUnsigned=function(){return this.low>>>0},E.getNumBitsAbs=function(){if(this.isNegative())return this.eq(w)?64:this.neg().getNumBitsAbs();for(var t=0!=this.high?this.high:this.low,e=31;e>0&&0==(t&1<<e);e--);return 0!=this.high?e+33:e+1},E.isZero=function(){return 0===this.high&&0===this.low},E.isNegative=function(){return!this.unsigned&&this.high<0},E.isPositive=function(){return this.unsigned||this.high>=0},E.isOdd=function(){return 1==(1&this.low)},E.isEven=function(){return 0==(1&this.low)},E.equals=function(t){return e(t)||(t=f(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&(this.high===t.high&&this.low===t.low)},E.eq=E.equals,E.notEquals=function(t){return!this.eq(t)},E.neq=E.notEquals,E.lessThan=function(t){return this.comp(t)<0},E.lt=E.lessThan,E.lessThanOrEqual=function(t){return this.comp(t)<=0},E.lte=E.lessThanOrEqual,E.greaterThan=function(t){return this.comp(t)>0},E.gt=E.greaterThan,E.greaterThanOrEqual=function(t){return this.comp(t)>=0},E.gte=E.greaterThanOrEqual,E.compare=function(t){if(e(t)||(t=f(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},E.comp=E.compare,E.negate=function(){return!this.unsigned&&this.eq(w)?w:this.not().add(_)},E.neg=E.negate,E.add=function(t){e(t)||(t=f(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,u=65535&t.high,c=t.low>>>16,l=0,h=0,p=0,d=0;return p+=(d+=o+(65535&t.low))>>>16,h+=(p+=i+c)>>>16,l+=(h+=n+u)>>>16,l+=r+s,a((p&=65535)<<16|(d&=65535),(l&=65535)<<16|(h&=65535),this.unsigned)},E.subtract=function(t){return e(t)||(t=f(t)),this.add(t.neg())},E.sub=E.subtract,E.multiply=function(t){if(this.isZero())return d;if(e(t)||(t=f(t)),t.isZero())return d;if(this.eq(w))return t.isOdd()?w:d;if(t.eq(w))return this.isOdd()?w:d;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(p)&&t.lt(p))return o(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,s=65535&this.low,u=t.high>>>16,c=65535&t.high,l=t.low>>>16,h=65535&t.low,v=0,_=0,y=0,g=0;return y+=(g+=s*h)>>>16,_+=(y+=i*h)>>>16,y&=65535,_+=(y+=s*l)>>>16,v+=(_+=n*h)>>>16,_&=65535,v+=(_+=i*l)>>>16,_&=65535,v+=(_+=s*c)>>>16,v+=r*h+n*l+i*c+s*u,a((y&=65535)<<16|(g&=65535),(v&=65535)<<16|(_&=65535),this.unsigned)},E.mul=E.multiply,E.divide=function(t){if(e(t)||(t=f(t)),t.isZero())throw Error("division by zero");if(this.isZero())return this.unsigned?v:d;var r,n,i;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return v;if(t.gt(this.shru(1)))return y;i=v}else{if(this.eq(w))return t.eq(_)||t.eq(g)?w:t.eq(w)?_:(r=this.shr(1).div(t).shl(1)).eq(d)?t.isNegative()?_:g:(n=this.sub(t.mul(r)),i=r.add(n.div(t)));else if(t.eq(w))return this.unsigned?v:d;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();i=d}for(n=this;n.gte(t);){r=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(r)/Math.LN2),u=a<=48?1:s(2,a-48),c=o(r),l=c.mul(t);l.isNegative()||l.gt(n);)l=(c=o(r-=u,this.unsigned)).mul(t);c.isZero()&&(c=_),i=i.add(c),n=n.sub(l)}return i},E.div=E.divide,E.modulo=function(t){return e(t)||(t=f(t)),this.sub(this.div(t).mul(t))},E.mod=E.modulo,E.not=function(){return a(~this.low,~this.high,this.unsigned)},E.and=function(t){return e(t)||(t=f(t)),a(this.low&t.low,this.high&t.high,this.unsigned)},E.or=function(t){return e(t)||(t=f(t)),a(this.low|t.low,this.high|t.high,this.unsigned)},E.xor=function(t){return e(t)||(t=f(t)),a(this.low^t.low,this.high^t.high,this.unsigned)},E.shiftLeft=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):a(0,this.low<<t-32,this.unsigned)},E.shl=E.shiftLeft,E.shiftRight=function(t){return e(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?a(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):a(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},E.shr=E.shiftRight,E.shiftRightUnsigned=function(t){if(e(t)&&(t=t.toInt()),0===(t&=63))return this;var r=this.high;return t<32?a(this.low>>>t|r<<32-t,r>>>t,this.unsigned):a(32===t?r:r>>>t-32,0,this.unsigned)},E.shru=E.shiftRightUnsigned,E.toSigned=function(){return this.unsigned?a(this.low,this.high,!1):this},E.toUnsigned=function(){return this.unsigned?this:a(this.low,this.high,!0)},E.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()},E.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]},E.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(102)(t))},function(t,e,r){var n=r(234);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv;var i=r(249);e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv;var o=r(236);e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,r){(function(t){var n=r(235),i=r(222),o=r(187),a=r(236),s=r(237),u=r(238),f=r(239);function c(e,r,o){if(!(this instanceof c))return new c(e,r,o);i.call(this),this._cache=new l,this._cipher=new n.AES(r),this._prev=new t(o.length),o.copy(this._prev),this._mode=e,this._autopadding=!0}function l(){if(!(this instanceof l))return new l;this.cache=new t("")}o(c,i),c.prototype._update=function(e){var r,n;this._cache.add(e);for(var i=[];r=this._cache.get();)n=this._mode.encrypt(this,r),i.push(n);return t.concat(i)},c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if("10101010101010101010101010101010"!==t.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(e){this.cache=t.concat([this.cache,e])},l.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},l.prototype.flush=function(){for(var e=16-this.cache.length,r=new t(e),n=-1;++n<e;)r.writeUInt8(e,n);return t.concat([this.cache,r])};var h={ECB:r(242),CBC:r(243),CFB:r(244),CFB8:r(245),CFB1:r(246),OFB:r(247),CTR:r(248),GCM:r(248)};function p(e,r,n){var i=a[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==i.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==i.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===i.type?new u(h[i.mode],r,n):"auth"===i.type?new f(h[i.mode],r,n):new c(h[i.mode],r,n)}e.createCipheriv=p,e.createCipher=function(t,e){var r=a[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=s(e,!1,r.key,r.iv);return p(t,n.key,n.iv)}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var r=Math.pow(2,32);function n(t){var e;return t>r||t<0?(e=Math.abs(t)%r,t<0?r-e:e):t}function i(t){for(;0<t.length;t++)t[0]=0;return!1}function o(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}o.prototype.init=function(){var t,e,r,n,i,o,a,s,u,f;for(t=function(){var t,r;for(r=[],e=t=0;t<256;e=++t)e<128?r.push(e<<1):r.push(e<<1^283);return r}(),i=0,u=0,e=f=0;f<256;e=++f)r=(r=u^u<<1^u<<2^u<<3^u<<4)>>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,s=t[a=t[o=t[i]]],n=257*t[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*s^65537*a^257*o^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=u=1:(i=o^t[t[t[s^o]]],u^=t[t[u]]);return!0};var a=new o;function s(t){for(var e=t.length/4,r=new Array(e),n=-1;++n<e;)r[n]=t.readUInt32BE(4*n);return r}function u(t){this._key=s(t),this._doReset()}u.blockSize=16,u.prototype.blockSize=u.blockSize,u.keySize=32,u.prototype.keySize=u.keySize,u.prototype._doReset=function(){var t,e,r,n,i,o;for(e=(r=this._key).length,this._nRounds=e+6,i=4*(this._nRounds+1),this._keySchedule=[],n=0;n<i;n++)this._keySchedule[n]=n<e?r[n]:(o=this._keySchedule[n-1],n%e==0?(o=o<<8|o>>>24,o=a.SBOX[o>>>24]<<24|a.SBOX[o>>>16&255]<<16|a.SBOX[o>>>8&255]<<8|a.SBOX[255&o],o^=a.RCON[n/e|0]<<24):e>6&&n%e==4&&(o=a.SBOX[o>>>24]<<24|a.SBOX[o>>>16&255]<<16|a.SBOX[o>>>8&255]<<8|a.SBOX[255&o]),this._keySchedule[n-e]^o);for(this._invKeySchedule=[],t=0;t<i;t++)n=i-t,o=this._keySchedule[n-(t%4?0:4)],this._invKeySchedule[t]=t<4||n<=4?o:a.INV_SUB_MIX[0][a.SBOX[o>>>24]]^a.INV_SUB_MIX[1][a.SBOX[o>>>16&255]]^a.INV_SUB_MIX[2][a.SBOX[o>>>8&255]]^a.INV_SUB_MIX[3][a.SBOX[255&o]];return!0},u.prototype.encryptBlock=function(e){e=s(new t(e));var r=this._doCryptBlock(e,this._keySchedule,a.SUB_MIX,a.SBOX),n=new t(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[1],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[3],12),n},u.prototype.decryptBlock=function(e){var r=[(e=s(new t(e)))[3],e[1]];e[1]=r[0],e[3]=r[1];var n=this._doCryptBlock(e,this._invKeySchedule,a.INV_SUB_MIX,a.INV_SBOX),i=new t(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[3],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[1],12),i},u.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},u.prototype._doCryptBlock=function(t,e,r,i){var o,a,s,u,f,c,l,h,p;a=t[0]^e[0],s=t[1]^e[1],u=t[2]^e[2],f=t[3]^e[3],o=4;for(var d=1;d<this._nRounds;d++)c=r[0][a>>>24]^r[1][s>>>16&255]^r[2][u>>>8&255]^r[3][255&f]^e[o++],l=r[0][s>>>24]^r[1][u>>>16&255]^r[2][f>>>8&255]^r[3][255&a]^e[o++],h=r[0][u>>>24]^r[1][f>>>16&255]^r[2][a>>>8&255]^r[3][255&s]^e[o++],p=r[0][f>>>24]^r[1][a>>>16&255]^r[2][s>>>8&255]^r[3][255&u]^e[o++],a=c,s=l,u=h,f=p;return c=(i[a>>>24]<<24|i[s>>>16&255]<<16|i[u>>>8&255]<<8|i[255&f])^e[o++],l=(i[s>>>24]<<24|i[u>>>16&255]<<16|i[f>>>8&255]<<8|i[255&a])^e[o++],h=(i[u>>>24]<<24|i[f>>>16&255]<<16|i[a>>>8&255]<<8|i[255&s])^e[o++],p=(i[f>>>24]<<24|i[a>>>16&255]<<16|i[s>>>8&255]<<8|i[255&u])^e[o++],[n(c),n(l),n(h),n(p)]},e.AES=u}).call(e,r(177).Buffer)},function(t,e){e["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},e["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},e["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},e["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},e["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},e["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},e.aes128=e["aes-128-cbc"],e.aes192=e["aes-192-cbc"],e.aes256=e["aes-256-cbc"],e["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},e["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},e["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},e["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},e["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},e["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},e["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},e["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},e["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},e["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},e["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},e["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},e["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},e["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},e["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},e["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},e["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},e["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},function(t,e,r){(function(e){var n=r(188);t.exports=function(t,r,i,o){e.isBuffer(t)||(t=new e(t,"binary"));r&&!e.isBuffer(r)&&(r=new e(r,"binary"));o=o||0;var a,s,u=0,f=0,c=new e(i/=8),l=new e(o),h=0,p=[];for(;;){if(h++>0&&p.push(a),p.push(t),r&&p.push(r),a=n(e.concat(p)),p=[],s=0,i>0)for(;0!==i&&s!==a.length;)c[u++]=a[s],i--,s++;if(o>0&&s!==a.length)for(;0!==o&&s!==a.length;)l[f++]=a[s],o--,s++;if(0===i&&0===o)break}for(s=0;s<a.length;s++)a[s]=0;return{key:c,iv:l}}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(235),i=r(222);function o(t,r,a,s){if(!(this instanceof o))return new o(t,r,a);i.call(this),this._cipher=new n.AES(r),this._prev=new e(a.length),this._cache=new e(""),this._secCache=new e(""),this._decrypt=s,a.copy(this._prev),this._mode=t}r(187)(o,i),t.exports=o,o.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var n=r(235),i=r(222),o=r(187),a=r(240),s=r(241);function u(t,r,o,s){if(!(this instanceof u))return new u(t,r,o);i.call(this),this._finID=e.concat([o,new e([0,0,0,1])]),o=e.concat([o,new e([0,0,0,2])]),this._cipher=new n.AES(r),this._prev=new e(o.length),this._cache=new e(""),this._secCache=new e(""),this._decrypt=s,this._alen=0,this._len=0,o.copy(this._prev),this._mode=t;var f=new e(4);f.fill(0),this._ghash=new a(this._cipher.encryptBlock(f)),this._authTag=null,this._called=!1}o(u,i),t.exports=u,u.prototype._update=function(t){if(!this._called&&this._alen){var r=16-this._alen%16;r<16&&((r=new e(r)).fill(0),this._ghash.update(r))}this._called=!0;var n=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(n),this._len+=t.length,n},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=s(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt){if(function(t,e){var r=0;t.length!==e.length&&r++;var n=Math.min(t.length,e.length),i=-1;for(;++i<n;)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=t;this._cipher.scrub()},u.prototype.getAuthTag=function(){if(!this._decrypt&&e.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},u.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},u.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){var r=new e(16);function n(t){this.h=t,this.state=new e(16),this.state.fill(0),this.cache=new e("")}function i(t){t=t.map(a);var r=new e(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r}r.fill(0),t.exports=n,n.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},n.prototype._multiply=function(){for(var t,e,r=function(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}(this.h),n=[0,0,0,0],o=-1;++o<128;){for(0!=(this.state[~~(o/8)]&1<<7-o%8)&&(n=s(n,r)),e=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,e&&(r[0]=r[0]^225<<24)}this.state=i(n)},n.prototype.update=function(t){var r;for(this.cache=e.concat([this.cache,t]);this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},n.prototype.final=function(t,n){return this.cache.length&&this.ghash(e.concat([this.cache,r],16)),this.ghash(i([0,t,0,n])),this.state};var o=Math.pow(2,32);function a(t){var e;return t>o||t<0?(e=Math.abs(t)%o,t<0?o-e:e):t}function s(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),o=0;o<n;++o)i[o]=t[o]^r[o];return i}}).call(e,r(177).Buffer)},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,r){var n=r(241);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},function(t,e,r){(function(t){var n=r(241);function i(e,r,i){var o=r.length,a=n(r,e._cache);return e._cache=e._cache.slice(o),e._prev=t.concat([e._prev,i?r:a]),a}e.encrypt=function(e,r,n){for(var o,a=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){a=t.concat([a,i(e,r,n)]);break}o=e._cache.length,a=t.concat([a,i(e,r.slice(0,o),n)]),r=r.slice(o)}return a}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){function r(e,r,n){var i=e._cipher.encryptBlock(e._prev)[0]^r;return e._prev=t.concat([e._prev.slice(1),new t([n?r:i])]),i}e.encrypt=function(e,n,i){for(var o=n.length,a=new t(o),s=-1;++s<o;)a[s]=r(e,n[s],i);return a}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){function r(t,e,r){for(var i,o,a=-1,s=0;++a<8;)i=e&1<<7-a?128:0,s+=(128&(o=t._cipher.encryptBlock(t._prev)[0]^i))>>a%8,t._prev=n(t._prev,r?i:o);return s}function n(e,r){var n=e.length,i=-1,o=new t(e.length);for(e=t.concat([e,new t([r])]);++i<n;)o[i]=e[i]<<1|e[i+1]>>7;return o}e.encrypt=function(e,n,i){for(var o=n.length,a=new t(o),s=-1;++s<o;)a[s]=r(e,n[s],i);return a}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var n=r(241);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,o)}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var n=r(241);function i(t){var e=t._cipher.encryptBlock(t._prev);return function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}(t._prev),e}e.encrypt=function(e,r){for(;e._cache.length<r.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,r.length);return e._cache=e._cache.slice(r.length),n(r,o)}}).call(e,r(177).Buffer)},function(t,e,r){(function(t){var n=r(235),i=r(222),o=r(187),a=r(236),s=r(238),u=r(239),f=r(237);function c(e,r,o){if(!(this instanceof c))return new c(e,r,o);i.call(this),this._cache=new l,this._last=void 0,this._cipher=new n.AES(r),this._prev=new t(o.length),o.copy(this._prev),this._mode=e,this._autopadding=!0}function l(){if(!(this instanceof l))return new l;this.cache=new t("")}o(c,i),c.prototype._update=function(e){var r,n;this._cache.add(e);for(var i=[];r=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,r),i.push(n);return t.concat(i)},c.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15],r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},c.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(e){this.cache=t.concat([this.cache,e])},l.prototype.get=function(t){var e;if(t){if(this.cache.length>16)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},l.prototype.flush=function(){if(this.cache.length)return this.cache};var h={ECB:r(242),CBC:r(243),CFB:r(244),CFB8:r(245),CFB1:r(246),OFB:r(247),CTR:r(248),GCM:r(248)};function p(e,r,n){var i=a[e.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=new t(n)),"string"==typeof r&&(r=new t(r)),r.length!==i.key/8)throw new TypeError("invalid key length "+r.length);if(n.length!==i.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===i.type?new s(h[i.mode],r,n,!0):"auth"===i.type?new u(h[i.mode],r,n,!0):new c(h[i.mode],r,n)}e.createDecipher=function(t,e){var r=a[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=f(e,!1,r.key,r.iv);return p(t,n.key,n.iv)},e.createDecipheriv=p}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=r(251),o=r(255),a=o.getCurveByName("secp256k1");i=r(251);var s=r(225),u=r(185),f=r(171),c=r(181),l=a.G,h=a.n,p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.Q=e}return n(t,[{key:"toBuffer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.Q?this.Q.compressed:null;return null===this.Q?e.from("000000000000000000000000000000000000000000000000000000000000000000","hex"):this.Q.getEncoded(t)}},{key:"toUncompressed",value:function(){var e=this.Q.getEncoded(!1),r=o.Point.decodeFrom(a,e);return t.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var t=this.toBuffer(),e=u.sha512(t);return u.ripemd160(e)}},{key:"toString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.get("address_prefix");return this.toPublicKeyString(t)}},{key:"toPublicKeyString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.get("address_prefix");if(this.pubdata)return t+this.pubdata;var r=this.toBuffer(),n=u.ripemd160(r),i=e.concat([r,n.slice(0,4)]);return this.pubdata=s.encode(i),t+this.pubdata}},{key:"toAddressString",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f.get("address_prefix"),r=this.toBuffer(),n=u.sha512(r),i=u.ripemd160(n),o=u.ripemd160(i);return i=e.concat([i,o.slice(0,4)]),t+s.encode(i)}},{key:"toPtsAddy",value:function(){var t=this.toBuffer(),r=u.sha256(t),n=u.ripemd160(r);n=e.concat([new e([56]),n]);var i=u.sha256(n);return i=u.sha256(i),n=e.concat([n,i.slice(0,4)]),s.encode(n)}},{key:"child",value:function(r){c(e.isBuffer(r),"Buffer required: offset"),c.equal(r.length,32,"offset length"),r=e.concat([this.toBuffer(),r]),r=u.sha256(r);var n=i.fromBuffer(r);if(n.compareTo(h)>=0)throw new Error("Child offset went out of bounds, try again");var o=l.multiply(n),s=this.Q.add(o);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"000000000000000000000000000000000000000000000000000000000000000000"===e.toString("hex")?new t(null):new t(o.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]:f.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]:f.get("address_prefix"),i=r.slice(0,n.length);c.equal(n,i,"Expecting key to begin with "+n+", instead got "+i),r=r.slice(n.length);var o=(r=new e(s.decode(r),"binary")).slice(-4);r=r.slice(0,-4);var a=u.ripemd160(r);return a=a.slice(0,4),c.deepEqual(o,a,"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=p}).call(e,r(177).Buffer)},function(t,e,r){var n=r(252);r(254),t.exports=n},function(t,e,r){function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}var i=n.prototype;i.__bigi=r(253).version,n.isBigInteger=function(t,e){return t&&t.__bigi&&(!e||t.__bigi===i.__bigi)},n.prototype.am=function(t,e,r,n,i,o){for(;--o>=0;){var a=e*this[t++]+r[n]+i;i=Math.floor(a/67108864),r[n++]=67108863&a}return i},n.prototype.DB=26,n.prototype.DM=67108863;var o=n.prototype.DV=1<<26;n.prototype.FV=Math.pow(2,52),n.prototype.F1=26,n.prototype.F2=0;var a,s,u="0123456789abcdefghijklmnopqrstuvwxyz",f=new Array;for(a="0".charCodeAt(0),s=0;s<=9;++s)f[a++]=s;for(a="a".charCodeAt(0),s=10;s<36;++s)f[a++]=s;for(a="A".charCodeAt(0),s=10;s<36;++s)f[a++]=s;function c(t){return u.charAt(t)}function l(t,e){var r=f[t.charCodeAt(e)];return null==r?-1:r}function h(t){var e=new n;return e.fromInt(t),e}function p(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 d(t){this.m=t}function v(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function _(t,e){return t&e}function y(t,e){return t|e}function g(t,e){return t^e}function m(t,e){return t&~e}function b(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=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 w(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function E(){}function k(t){return t}function T(t){this.r2=new n,this.q3=new n,n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}d.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},d.prototype.revert=function(t){return t},d.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},d.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},d.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},v.prototype.convert=function(t){var e=new n;return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e},v.prototype.revert=function(t){var e=new n;return t.copyTo(e),this.reduce(e),e},v.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=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)},v.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},v.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},i.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},i.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+o:this.t=0},i.fromString=function(t,e){var r;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 this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var i=t.length,o=!1,a=0;--i>=0;){var s=8==r?255&t[i]:l(t,i);s<0?"-"==t.charAt(i)&&(o=!0):(o=!1,0==a?this[this.t++]=s:a+r>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,(a+=r)>=this.DB&&(a-=this.DB))}8==r&&0!=(128&t[0])&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&n.ZERO.subTo(this,this)},i.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},i.dlShiftTo=function(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},i.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},i.lShiftTo=function(t,e){var r,n=t%this.DB,i=this.DB-n,o=(1<<i)-1,a=Math.floor(t/this.DB),s=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)e[r+a+1]=this[r]>>i|s,s=(this[r]&o)<<n;for(r=a-1;r>=0;--r)e[r]=0;e[a]=s,e.t=this.t+a+1,e.s=this.s,e.clamp()},i.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,i=this.DB-n,o=(1<<n)-1;e[0]=this[r]>>n;for(var a=r+1;a<this.t;++a)e[a-r-1]|=(this[a]&o)<<i,e[a-r]=this[a]>>n;n>0&&(e[this.t-r-1]|=(this.s&o)<<i),e.t=this.t-r,e.clamp()}},i.subTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},i.multiplyTo=function(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<i.t;++o)e[o+r.t]=r.am(0,i[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)},i.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=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()},i.divRemTo=function(t,e,r){var i=t.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t)return null!=e&&e.fromInt(0),void(null!=r&&this.copyTo(r));null==r&&(r=new n);var a=new n,s=this.s,u=t.s,f=this.DB-p(i[i.t-1]);f>0?(i.lShiftTo(f,a),o.lShiftTo(f,r)):(i.copyTo(a),o.copyTo(r));var c=a.t,l=a[c-1];if(0!=l){var h=l*(1<<this.F1)+(c>1?a[c-2]>>this.F2:0),d=this.FV/h,v=(1<<this.F1)/h,_=1<<this.F2,y=r.t,g=y-c,m=null==e?new n:e;for(a.dlShiftTo(g,m),r.compareTo(m)>=0&&(r[r.t++]=1,r.subTo(m,r)),n.ONE.dlShiftTo(c,m),m.subTo(a,a);a.t<c;)a[a.t++]=0;for(;--g>=0;){var b=r[--y]==l?this.DM:Math.floor(r[y]*d+(r[y-1]+_)*v);if((r[y]+=a.am(0,b,r,g,0,c))<b)for(a.dlShiftTo(g,m),r.subTo(m,r);r[y]<--b;)r.subTo(m,r)}null!=e&&(r.drShiftTo(c,e),s!=u&&n.ZERO.subTo(e,e)),r.t=c,r.clamp(),f>0&&r.rShiftTo(f,r),s<0&&n.ZERO.subTo(r,r)}}},i.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},i.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},i.exp=function(t,e){if(t>4294967295||t<1)return n.ONE;var r=new n,i=new n,o=e.convert(this),a=p(t)-1;for(o.copyTo(r);--a>=0;)if(e.sqrTo(r,i),(t&1<<a)>0)e.mulTo(i,o,r);else{var s=r;r=i,i=s}return e.revert(r)},i.toString=function(t){var e;if(this.s<0)return"-"+this.negate().toString(t);if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<<e)-1,i=!1,o="",a=this.t,s=this.DB-a*this.DB%e;if(a-- >0)for(s<this.DB&&(r=this[a]>>s)>0&&(i=!0,o=c(r));a>=0;)s<e?(r=(this[a]&(1<<s)-1)<<e-s,r|=this[--a]>>(s+=this.DB-e)):(r=this[a]>>(s-=e)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=c(r));return i?o:"0"},i.negate=function(){var t=new n;return n.ZERO.subTo(this,t),t},i.abs=function(){return this.s<0?this.negate():this},i.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},i.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},i.byteLength=function(){return this.bitLength()>>3},i.mod=function(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},i.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new d(e):new v(e),this.exp(t,r)},E.prototype.convert=k,E.prototype.revert=k,E.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},E.prototype.sqrTo=function(t,e){t.squareTo(e)},T.prototype.convert=function(t){if(t.s<0||t.t>2*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},T.prototype.revert=function(t){return t},T.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},T.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},T.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var x=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],B=(1<<26)/x[x.length-1];i.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},i.toRadix=function(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=h(r),o=new n,a=new n,s="";for(this.divRemTo(i,o,a);o.signum()>0;)s=(r+a.intValue()).toString(t).substr(1)+s,o.divRemTo(i,o,a);return a.intValue().toString(t)+s},i.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),o=!1,a=0,s=0,u=0;u<t.length;++u){var f=l(t,u);f<0?"-"==t.charAt(u)&&0==this.signum()&&(o=!0):(s=e*s+f,++a>=r&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(e,a)),this.dAddOffset(s,0)),o&&n.ZERO.subTo(this,this)},i.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(n.ONE.shiftLeft(t-1),y,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(n.ONE.shiftLeft(t-1),this);else{var i=new Array,o=7&t;i.length=1+(t>>3),e.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},i.bitwiseTo=function(t,e,r){var n,i,o=Math.min(t.t,this.t);for(n=0;n<o;++n)r[n]=e(this[n],t[n]);if(t.t<this.t){for(i=t.s&this.DM,n=o;n<this.t;++n)r[n]=e(this[n],i);r.t=this.t}else{for(i=this.s&this.DM,n=o;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},i.changeBit=function(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},i.addTo=function(t,e){for(var r=0,n=0,i=Math.min(t.t,this.t);r<i;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},i.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},i.dAddOffset=function(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]}},i.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},i.multiplyUpperTo=function(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)},i.modInt=function(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},i.millerRabin=function(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);(t=t+1>>1)>x.length&&(t=x.length);for(var o=new n(null),a=[],s=0;s<t;++s){for(;f=x[Math.floor(Math.random()*x.length)],-1!=a.indexOf(f););a.push(f),o.fromInt(f);var u=o.modPow(i,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(e)){for(var f=1;f++<r&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},i.clone=function(){var t=new n;return this.copyTo(t),t},i.intValue=function(){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)<<this.DB|this[0]},i.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},i.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},i.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},i.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,i=0;if(t-- >0)for(n<this.DB&&(r=this[t]>>n)!=(this.s&this.DM)>>n&&(e[i++]=r|this.s<<this.DB-n);t>=0;)n<8?(r=(this[t]&(1<<n)-1)<<8-n,r|=this[--t]>>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),0!=(128&r)&&(r|=-256),0===i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(e[i++]=r);return e},i.equals=function(t){return 0==this.compareTo(t)},i.min=function(t){return this.compareTo(t)<0?this:t},i.max=function(t){return this.compareTo(t)>0?this:t},i.and=function(t){var e=new n;return this.bitwiseTo(t,_,e),e},i.or=function(t){var e=new n;return this.bitwiseTo(t,y,e),e},i.xor=function(t){var e=new n;return this.bitwiseTo(t,g,e),e},i.andNot=function(t){var e=new n;return this.bitwiseTo(t,m,e),e},i.not=function(){for(var t=new n,e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},i.shiftLeft=function(t){var e=new n;return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},i.shiftRight=function(t){var e=new n;return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},i.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+b(this[t]);return this.s<0?this.t*this.DB:-1},i.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=w(this[r]^e);return t},i.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},i.setBit=function(t){return this.changeBit(t,y)},i.clearBit=function(t){return this.changeBit(t,m)},i.flipBit=function(t){return this.changeBit(t,g)},i.add=function(t){var e=new n;return this.addTo(t,e),e},i.subtract=function(t){var e=new n;return this.subTo(t,e),e},i.multiply=function(t){var e=new n;return this.multiplyTo(t,e),e},i.divide=function(t){var e=new n;return this.divRemTo(t,e,null),e},i.remainder=function(t){var e=new n;return this.divRemTo(t,null,e),e},i.divideAndRemainder=function(t){var e=new n,r=new n;return this.divRemTo(t,e,r),new Array(e,r)},i.modPow=function(t,e){var r,i,o=t.bitLength(),a=h(1);if(o<=0)return a;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new d(e):e.isEven()?new T(e):new v(e);var s=new Array,u=3,f=r-1,c=(1<<r)-1;if(s[1]=i.convert(this),r>1){var l=new n;for(i.sqrTo(s[1],l);u<=c;)s[u]=new n,i.mulTo(l,s[u-2],s[u]),u+=2}var _,y,g=t.t-1,m=!0,b=new n;for(o=p(t[g])-1;g>=0;){for(o>=f?_=t[g]>>o-f&c:(_=(t[g]&(1<<o+1)-1)<<f-o,g>0&&(_|=t[g-1]>>this.DB+o-f)),u=r;0==(1&_);)_>>=1,--u;if((o-=u)<0&&(o+=this.DB,--g),m)s[_].copyTo(a),m=!1;else{for(;u>1;)i.sqrTo(a,b),i.sqrTo(b,a),u-=2;u>0?i.sqrTo(a,b):(y=a,a=b,b=y),i.mulTo(b,s[_],a)}for(;g>=0&&0==(t[g]&1<<o);)i.sqrTo(a,b),y=a,a=b,b=y,--o<0&&(o=this.DB-1,--g)}return i.revert(a)},i.modInverse=function(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=h(1),a=h(0),s=h(0),u=h(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&a.isEven()||(o.addTo(this,o),a.subTo(t,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(t,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),e?(s.isEven()&&u.isEven()||(s.addTo(this,s),u.subTo(t,u)),s.rShiftTo(1,s)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(s,o),a.subTo(u,a)):(i.subTo(r,i),e&&s.subTo(o,s),u.subTo(a,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},i.pow=function(t){return this.exp(t,new E)},i.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>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},i.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=x[x.length-1]){for(e=0;e<x.length;++e)if(r[0]==x[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<x.length;){for(var n=x[e],i=e+1;i<x.length&&n<B;)n*=x[i++];for(n=r.modInt(n);e<i;)if(n%x[e++]==0)return!1}return r.millerRabin(t)},i.square=function(){var t=new n;return this.squareTo(t),t},n.ZERO=h(0),n.ONE=h(1),n.valueOf=h,t.exports=n},function(t,e){t.exports={name:"bigi",version:"1.4.2",description:"Big integers.",keywords:["cryptography","math","bitcoin","arbitrary","precision","arithmetic","big","integer","int","number","biginteger","bigint","bignumber","decimal","float"],devDependencies:{coveralls:"^2.11.2",istanbul:"^0.3.5",jshint:"^2.5.1",mocha:"^2.1.0",mochify:"^2.1.0"},repository:{url:"https://github.com/cryptocoinjs/bigi",type:"git"},main:"./lib/index.js",scripts:{"browser-test":"./node_modules/.bin/mochify --wd -R spec",test:"./node_modules/.bin/_mocha -- test/*.js",jshint:"./node_modules/.bin/jshint --config jshint.json lib/*.js ; true",unit:"./node_modules/.bin/mocha",coverage:"./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js",coveralls:"npm run-script coverage && node ./node_modules/.bin/coveralls < coverage/lcov.info"},dependencies:{},testling:{files:"test/*.js",harness:"mocha",browsers:["ie/9..latest","firefox/latest","chrome/latest","safari/6.0..latest","iphone/6.0..latest","android-browser/4.2..latest"]}}},function(t,e,r){(function(t){var e=r(181),n=r(252);n.fromByteArrayUnsigned=function(t){return 128&t[0]?new n([0].concat(t)):new n(t)},n.prototype.toByteArrayUnsigned=function(){var t=this.toByteArray();return 0===t[0]?t.slice(1):t},n.fromDERInteger=function(t){return new n(t)},n.prototype.toDERInteger=n.prototype.toByteArray,n.fromBuffer=function(t){if(128&t[0]){var e=Array.prototype.slice.call(t);return new n([0].concat(e))}return new n(t)},n.fromHex=function(t){return""===t?n.ZERO:(e.equal(t,t.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),e.equal(t.length%2,0,"Incomplete hex"),new n(t,16))},n.prototype.toBuffer=function(e){for(var r=this.toByteArrayUnsigned(),n=[],i=e-r.length;n.length<i;)n.push(0);return new t(n.concat(r))},n.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")}}).call(e,r(177).Buffer)},function(t,e,r){var n=r(256),i=r(257),o=r(258);t.exports={Curve:i,Point:n,getCurveByName:o}},function(t,e,r){(function(e){var n=r(181),i=r(251),o=i.valueOf(3);function a(t,e,r,i){n.notStrictEqual(i,void 0,"Missing Z coordinate"),this.curve=t,this.x=e,this.y=r,this.z=i,this._zInv=null,this.compressed=!0}Object.defineProperty(a.prototype,"zInv",{get:function(){return null===this._zInv&&(this._zInv=this.z.modInverse(this.curve.p)),this._zInv}}),Object.defineProperty(a.prototype,"affineX",{get:function(){return this.x.multiply(this.zInv).mod(this.curve.p)}}),Object.defineProperty(a.prototype,"affineY",{get:function(){return this.y.multiply(this.zInv).mod(this.curve.p)}}),a.fromAffine=function(t,e,r){return new a(t,e,r,i.ONE)},a.prototype.equals=function(t){return t===this||(this.curve.isInfinity(this)?this.curve.isInfinity(t):this.curve.isInfinity(t)?this.curve.isInfinity(this):0===t.y.multiply(this.z).subtract(this.y.multiply(t.z)).mod(this.curve.p).signum()&&0===t.x.multiply(this.z).subtract(this.x.multiply(t.z)).mod(this.curve.p).signum())},a.prototype.negate=function(){var t=this.curve.p.subtract(this.y);return new a(this.curve,this.x,t,this.z)},a.prototype.add=function(t){if(this.curve.isInfinity(this))return t;if(this.curve.isInfinity(t))return this;var e=this.x,r=this.y,n=t.x,i=t.y.multiply(this.z).subtract(r.multiply(t.z)).mod(this.curve.p),s=n.multiply(this.z).subtract(e.multiply(t.z)).mod(this.curve.p);if(0===s.signum())return 0===i.signum()?this.twice():this.curve.infinity;var u=s.square(),f=u.multiply(s),c=e.multiply(u),l=i.square().multiply(this.z),h=l.subtract(c.shiftLeft(1)).multiply(t.z).subtract(f).multiply(s).mod(this.curve.p),p=c.multiply(o).multiply(i).subtract(r.multiply(f)).subtract(l.multiply(i)).multiply(t.z).add(i.multiply(f)).mod(this.curve.p),d=f.multiply(this.z).multiply(t.z).mod(this.curve.p);return new a(this.curve,h,p,d)},a.prototype.twice=function(){if(this.curve.isInfinity(this))return this;if(0===this.y.signum())return this.curve.infinity;var t=this.x,e=this.y,r=e.multiply(this.z).mod(this.curve.p),n=r.multiply(e).mod(this.curve.p),i=this.curve.a,s=t.square().multiply(o);0!==i.signum()&&(s=s.add(this.z.square().multiply(i)));var u=(s=s.mod(this.curve.p)).square().subtract(t.shiftLeft(3).multiply(n)).shiftLeft(1).multiply(r).mod(this.curve.p),f=s.multiply(o).multiply(t).subtract(n.shiftLeft(1)).shiftLeft(2).multiply(n).subtract(s.pow(3)).mod(this.curve.p),c=r.pow(3).shiftLeft(3).mod(this.curve.p);return new a(this.curve,u,f,c)},a.prototype.multiply=function(t){if(this.curve.isInfinity(this))return this;if(0===t.signum())return this.curve.infinity;for(var e=t,r=e.multiply(o),n=this.negate(),i=this,a=r.bitLength()-2;a>0;--a){var s=r.testBit(a),u=e.testBit(a);i=i.twice(),s!==u&&(i=i.add(s?this:n))}return i},a.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 a=t.testBit(n),s=r.testBit(n);i=i.twice(),a?i=s?i.add(o):i.add(this):s&&(i=i.add(e)),--n}return i},a.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)).writeUInt8(i.isEven()?2:3,0):((r=new e(1+o+o)).writeUInt8(4,0),i.toBuffer(o).copy(r,1+o)),n.toBuffer(o).copy(r,1),r},a.decodeFrom=function(t,e){var r,o=e.readUInt8(0),s=4!==o,u=Math.floor((t.p.bitLength()+7)/8),f=i.fromBuffer(e.slice(1,1+u));if(s){n.equal(e.length,u+1,"Invalid sequence length"),n(2===o||3===o,"Invalid sequence tag");var c=3===o;r=t.pointFromX(c,f)}else{n.equal(e.length,1+u+u,"Invalid sequence length");var l=i.fromBuffer(e.slice(1+u));r=a.fromAffine(t,f,l)}return r.compressed=s,r},a.prototype.toString=function(){return this.curve.isInfinity(this)?"(INFINITY)":"("+this.affineX.toString()+","+this.affineY.toString()+")"},t.exports=a}).call(e,r(177).Buffer)},function(t,e,r){var n=r(181),i=r(251),o=r(256);function a(t,e,r,n,a,s,u){this.p=t,this.a=e,this.b=r,this.G=o.fromAffine(this,n,a),this.n=s,this.h=u,this.infinity=new o(this,null,null,i.ZERO),this.pOverFour=t.add(i.ONE).shiftRight(2),this.pLength=Math.floor((this.p.bitLength()+7)/8)}a.prototype.pointFromX=function(t,e){var r=e.pow(3).add(this.a.multiply(e)).add(this.b).mod(this.p).modPow(this.pOverFour,this.p),n=r;return r.isEven()^!t&&(n=this.p.subtract(n)),o.fromAffine(this,e,n)},a.prototype.isInfinity=function(t){return t===this.infinity||0===t.z.signum()&&0!==t.y.signum()},a.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 a=r.square().mod(o),s=e.pow(3).add(n.multiply(e)).add(i).mod(o);return a.equals(s)},a.prototype.validate=function(t){n(!this.isInfinity(t),"Point is at infinity"),n(this.isOnCurve(t),"Point is not on the curve");var e=t.multiply(this.n);return n(this.isInfinity(e),"Point is not a scalar multiple of G"),!0},t.exports=a},function(t,e,r){var n=r(251),i=r(259),o=r(257);t.exports=function(t){var e=i[t];if(!e)return null;var r=new n(e.p,16),a=new n(e.a,16),s=new n(e.b,16),u=new n(e.n,16),f=new n(e.h,16),c=new n(e.Gx,16),l=new n(e.Gy,16);return new o(r,a,s,c,l,u,f)}},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";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=r(255),o=i.Point,a=i.getCurveByName("secp256k1"),s=r(251),u=r(225),f=r(181),c=r(185),l=r(250),h=(a.G,a.n),p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.d=e}return n(t,[{key:"toWif",value:function(){var t=this.toBuffer();t=e.concat([new e([128]),t]);var r=c.sha256(t);r=(r=c.sha256(r)).slice(0,4);var n=e.concat([t,r]);return u.encode(n)}},{key:"toString",value:function(){return this.toWif()}},{key:"toPublicKeyPoint",value:function(){return a.G.multiply(this.d)}},{key:"toPublic",value:function(){return this.public_key?this.public_key:this.public_key=l.fromPoint(this.toPublicKeyPoint())}},{key:"toBuffer",value:function(){return this.d.toBuffer(32)}},{key:"get_shared_secret",value:function(t){var e=(t=d(t)).toUncompressed().toBuffer(),r=o.fromAffine(a,s.fromBuffer(e.slice(1,33)),s.fromBuffer(e.slice(33,65))),n=this.toBuffer(),i=r.multiply(s.fromBuffer(n)).affineX.toBuffer({size:32});return c.sha512(i)}},{key:"child",value:function(r){r=e.concat([this.toPublicKey().toBuffer(),r]),r=c.sha256(r);var n=s.fromBuffer(r);if(n.compareTo(h)>=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(s.fromBuffer(r))}},{key:"fromSeed",value:function(e){if("string"!=typeof e)throw new Error("seed must be of type string");return t.fromBuffer(c.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(u.decode(r)),i=n.readUInt8(0);f.equal(128,i,"Expected version 128, instead got "+i);var o=n.slice(0,-4),a=n.slice(-4),s=c.sha256(o);if(s=(s=c.sha256(s)).slice(0,4),a.toString()!==s.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=p;var d=function(t){return null==t?t:t.Q?t:l.fromStringOrThrow(t)}}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=r(262),o=r(185),a=r(255).getCurveByName("secp256k1"),s=r(181),u=r(251),f=r(250),c=r(260),l=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=e,this.s=r,this.i=n,s.equal(null!=this.r,!0,"Missing parameter"),s.equal(null!=this.s,!0,"Missing parameter"),s.equal(null!=this.i,!0,"Missing parameter")}return n(t,[{key:"toBuffer",value:function(){var t;return(t=new e(65)).writeUInt8(this.i,0),this.r.toBuffer(32).copy(t,1),this.s.toBuffer(32).copy(t,33),t}},{key:"recoverPublicKeyFromBuffer",value:function(t){return this.recoverPublicKey(o.sha256(t))}},{key:"recoverPublicKey",value:function(t){var e,r,n=void 0;return r=u.fromBuffer(t),n=this.i,n-=27,n&=3,e=i.recoverPubKey(a,r,this,n),f.fromPoint(e)}},{key:"verifyBuffer",value:function(t,e){var r=o.sha256(t);return this.verifyHash(r,e)}},{key:"verifyHash",value:function(t,e){return s.equal(t.length,32,"A SHA 256 should be 32 bytes long, instead got "+t.length),i.verify(a,t,{r:this.r,s:this.s},e.Q)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"verifyHex",value:function(t,r){var n;return n=new e(t,"hex"),this.verifyBuffer(n,r)}}],[{key:"fromBuffer",value:function(e){var r;return s.equal(e.length,65,"Invalid signature length"),r=e.readUInt8(0),s.equal(r-27,r-27&7,"Invalid signature parameter"),new t(u.fromBuffer(e.slice(1,33)),u.fromBuffer(e.slice(33)),r)}},{key:"signBuffer",value:function(e,r){var n=o.sha256(e);return t.signBufferSha256(n,r)}},{key:"signBufferSha256",value:function(r,n){if(32!==r.length||!e.isBuffer(r))throw new Error("buf_sha256: 32 byte buffer requred");var o,f,c,l,p,d,v;for(n=h(n),s(n,"private_key required"),l=null,v=0,f=u.fromBuffer(r);;){if(d=(o=(c=i.sign(a,r,n.d,v++)).toDER())[5+(p=o[3])],32===p&&32===d){l=i.calcPubKeyRecoveryParam(a,f,c,n.toPublicKey().Q),l+=4,l+=27;break}v%10==0&&console.log("WARN: "+v+" attempts to find canonical signature")}return new t(c.r,c.s,l)}},{key:"sign",value:function(r,n){return t.signBuffer(new e(r),n)}},{key:"fromHex",value:function(r){return t.fromBuffer(new e(r,"hex"))}},{key:"signHex",value:function(r,n){var i;return i=new e(r,"hex"),t.signBuffer(i,n)}},{key:"verifyData",value:function(t,r,n){var u=new e(t),c=new e(u,"hex"),l=o.sha256(c);s.equal(l.length,32,"A SHA 256 should be 32 bytes long, instead got "+l.length);var h=f.fromString(n);return i.verify(a,l,r,h.Q)}}]),t}(),h=function(t){return t?t.d?t:c.fromWif(t):t};t.exports=l}).call(e,r(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(181),i=r(185),o=r(263),a=r(251),s=r(264);function u(t,r,s,u,f){o("Buffer",r),o(a,s),f&&(r=i.sha256(e.concat([r,new e(f)]))),n.equal(r.length,32,"Hash must be 256 bit");var c=s.toBuffer(32),l=new e(32),h=new e(32);h.fill(1),l.fill(0),l=i.HmacSHA256(e.concat([h,new e([0]),c,r]),l),h=i.HmacSHA256(h,l),l=i.HmacSHA256(e.concat([h,new e([1]),c,r]),l),h=i.HmacSHA256(h,l),h=i.HmacSHA256(h,l);for(var p=a.fromBuffer(h);p.signum()<=0||p.compareTo(t.n)>=0||!u(p);)l=i.HmacSHA256(e.concat([h,new e([0])]),l),h=i.HmacSHA256(h,l),h=i.HmacSHA256(h,l),p=a.fromBuffer(h);return p}function f(t,e,r,n){var i=t.n,o=t.G,a=r.r,s=r.s;if(a.signum()<=0||a.compareTo(i)>=0)return!1;if(s.signum()<=0||s.compareTo(i)>=0)return!1;var u=s.modInverse(i),f=e.multiply(u).mod(i),c=a.multiply(u).mod(i),l=o.multiplyTwo(f,n,c);return!t.isInfinity(l)&&l.affineX.mod(i).equals(a)}function c(t,e,r,i){n.strictEqual(3&i,i,"Recovery param is more than two bits");var o=t.n,a=t.G,s=r.r,u=r.s;n(s.signum()>0&&s.compareTo(o)<0,"Invalid r value"),n(u.signum()>0&&u.compareTo(o)<0,"Invalid s value");var f=1&i,c=i>>1?s.add(o):s,l=t.pointFromX(f,c),h=l.multiply(o);n(t.isInfinity(h),"nR is not a valid curve point");var p=e.negate().mod(o),d=s.modInverse(o),v=l.multiplyTwo(u,a,p).multiply(d);return t.validate(v),v}t.exports={calcPubKeyRecoveryParam:function(t,e,r,n){for(var i=0;i<4;i++)if(c(t,e,r,i).equals(n))return i;throw new Error("Unable to find valid recovery factor")},deterministicGenerateK:u,recoverPubKey:c,sign:function(t,e,r,n){var i,o,f=a.fromBuffer(e),c=t.n,l=t.G,h=(u(t,e,r,function(e){var n=l.multiply(e);return!t.isInfinity(n)&&0!==(i=n.affineX.mod(c)).signum()&&0!==(o=e.modInverse(c).multiply(f.add(r.multiply(i))).mod(c)).signum()},n),c.shiftRight(1));return o.compareTo(h)>0&&(o=c.subtract(o)),new s(i,o)},verify:function(t,e,r,n){return f(t,a.fromBuffer(e),r,n)},verifyRaw:f}}).call(e,r(177).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(177).Buffer)},function(t,e,r){(function(e){"use strict";var n=r(181),i=r(263),o=r(251);function a(t,e){i(o,t),i(o,e),this.r=t,this.s=e}a.parseCompact=function(t){n.equal(t.length,65,"Invalid signature length");var e=t.readUInt8(0)-27;return n.equal(e,7&e,"Invalid signature parameter"),{compressed:!!(4&e),i:e&=3,signature:new a(o.fromBuffer(t.slice(1,33)),o.fromBuffer(t.slice(33)))}},a.fromDER=function(t){n.equal(t.readUInt8(0),48,"Not a DER sequence"),n.equal(t.readUInt8(1),t.length-2,"Invalid sequence length"),n.equal(t.readUInt8(2),2,"Expected a DER integer");var e=t.readUInt8(3);n(e>0,"R length is zero");var r=4+e;n.equal(t.readUInt8(r),2,"Expected a DER integer (2)");var i=t.readUInt8(r+1);n(i>0,"S length is zero");var s=t.slice(4,r),u=t.slice(r+2);r+=2+i,e>1&&0===s.readUInt8(0)&&n(128&s.readUInt8(1),"R value excessively padded"),i>1&&0===u.readUInt8(0)&&n(128&u.readUInt8(1),"S value excessively padded"),n.equal(r,t.length,"Invalid DER encoding");var f=o.fromDERInteger(s),c=o.fromDERInteger(u);return n(f.signum()>=0,"R value is negative"),n(c.signum()>=0,"S value is negative"),new a(f,c)},a.parseScriptSignature=function(t){var e=t.readUInt8(t.length-1),r=-129&e;return n(r>0&&r<4,"Invalid hashType"),{signature:a.fromDER(t.slice(0,-1)),hashType:e}},a.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},a.prototype.toDER=function(){var t=this.r.toDERInteger(),r=this.s.toDERInteger(),n=[];return n.push(2,t.length),(n=n.concat(t)).push(2,r.length),(n=n.concat(r)).unshift(48,n.length),new e(n)},a.prototype.toScriptSignature=function(t){var r=new e(1);return r.writeUInt8(t,0),e.concat([this.toDER(),r])},t.exports=a}).call(e,r(177).Buffer)},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalize=function(t){if("string"!=typeof t)throw new Error("string required for brain_key");return(t=t.trim()).split(/[\t\n\v\f\r ]+/).join(" ")}},function(t,e,r){(function(e){"use strict";var n=r(260),i=r(185),o=r(228),a=0,s=0,u=o.randomBuffer(101);t.exports={addEntropy:function(){s++;for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=!0,i=!1,o=void 0;try{for(var f,c=e[Symbol.iterator]();!(n=(f=c.next()).done);n=!0){var l=f.value,h=a++%101;(u[h]+=l)>9007199254740991&&(u[h]=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()-r<250;)t=i.sha256(t);var n=[];return n.push(t),n.push(o.randomBuffer(32)),i.sha256(e.concat(n))},get_random_key:function(t){return n.fromBuffer(this.random32ByteBuffer(t))},browserEntropy:function(){var t=Array(u).join();try{t+=(new Date).toString()+" "+window.screen.height+" "+window.screen.width+" "+window.screen.colorDepth+" "+window.screen.availHeight+" "+window.screen.availWidth+" "+window.screen.pixelDepth+navigator.language+" "+window.location+" "+window.history.length;for(var r,n=0;n<navigator.mimeTypes.length;n++)t+=(r=navigator.mimeTypes[n]).description+" "+r.type+" "+r.suffixes+" ";console.log("INFO\tbrowserEntropy gathered",s,"events")}catch(e){t+=i.sha256((new Date).toString())}return t+=new e(t).toString("binary")+" "+(new Date).toString()}}}).call(e,r(177).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(r(268)),i=o(r(271));function o(t){return t&&t.__esModule?t:{default:t}}e.default={http:n.default,ws:i.default}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();e.jsonRpc=d;var i=u(r(269)),o=u(r(168)),a=u(r(270)),s=u(r(171));function u(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(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 l(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 h=(0,o.default)("steem:http"),p=function(t){function e(t){f(this,e);var r=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t.message));return r.name="RPCError",r.code=t.code,r.data=t.data,r}return l(e,Error),e}();function d(t,e){var r=e.method,n=e.id,o=e.params,a={id:n,jsonrpc:"2.0",method:r,params:o};return(0,i.default)(t,{body:JSON.stringify(a),method:"post",mode:"cors",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json"}}).then(function(t){if(!t.ok)throw new Error("HTTP "+t.status+": "+t.statusText);return t.json()}).then(function(t){if(t.id!==n)throw new Error("Invalid response id: "+t.id);if(t.error)throw new p(t.error);return t.result})}var v=function(t){function e(){return f(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return l(e,a.default),n(e,[{key:"send",value:function(t,e,r){h("Steem::send",t,e);var n=e.id||this.id++,i=[t,e.method,e.params];d(s.default.get("websocket"),{method:"call",id:n,params:i}).then(function(t){r(null,t)},function(t){r(t)})}}]),e}();e.default=v},function(t,e){(function(r){var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r&&r,i=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var n=void 0!==t&&t||"undefined"!=typeof self&&self||void 0!==r&&r||{},i={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};if(i.arrayBuffer)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function s(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i.iterable&&(e[Symbol.iterator]=function(){return e}),e}function c(t){this.map={},t instanceof c?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){if(2!=t.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function l(t){if(!t._noBody)return t.bodyUsed?Promise.reject(new TypeError("Already read")):void(t.bodyUsed=!0)}function h(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function p(t){var e=new FileReader,r=h(e);return e.readAsArrayBuffer(t),r}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():i.arrayBuffer&&i.blob&&function(t){return t&&DataView.prototype.isPrototypeOf(t)}(t)?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||a(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=l(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(i.blob)return this.blob().then(p);throw new Error("could not read as ArrayBuffer")},this.text=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=h(e),n=/charset=([A-Za-z0-9_-]+)/.exec(t.type),i=n?n[1]:"utf-8";return e.readAsText(t,i),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n<e.length;n++)r[n]=String.fromCharCode(e[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i.formData&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}c.prototype.append=function(t,e){t=s(t),e=u(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},c.prototype.delete=function(t){delete this.map[s(t)]},c.prototype.get=function(t){return t=s(t),this.has(t)?this.map[t]:null},c.prototype.has=function(t){return this.map.hasOwnProperty(s(t))},c.prototype.set=function(t,e){this.map[s(t)]=u(e)},c.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},c.prototype.keys=function(){var t=[];return this.forEach(function(e,r){t.push(r)}),f(t)},c.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),f(t)},c.prototype.entries=function(){var t=[];return this.forEach(function(e,r){t.push([r,e])}),f(t)},i.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);var _=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function y(t,e){if(!(this instanceof y))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r=(e=e||{}).body;if(t instanceof y){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new c(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new c(e.headers)),this.method=function(t){var e=t.toUpperCase();return _.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in n)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function g(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 m(t,e){if(!(this instanceof m))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new c(e.headers),this.url=e.url||"",this._initBody(t)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},v.call(y.prototype),v.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},m.error=function(){var t=new m(null,{status:200,statusText:""});return t.ok=!1,t.status=0,t.type="error",t};var b=[301,302,303,307,308];m.redirect=function(t,e){if(-1===b.indexOf(e))throw new RangeError("Invalid status code");return new m(null,{status:e,headers:{location:t}})},e.DOMException=n.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function w(t,r){return new Promise(function(o,a){var f=new y(t,r);if(f.signal&&f.signal.aborted)return a(new e.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function h(){l.abort()}if(l.onload=function(){var t={statusText:l.statusText,headers:function(t){var e=new c;return t.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t}).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();try{e.append(n,i)}catch(t){console.warn("Response "+t.message)}}}),e}(l.getAllResponseHeaders()||"")};0===f.url.indexOf("file://")&&(l.status<200||l.status>599)?t.status=200:t.status=l.status,t.url="responseURL"in l?l.responseURL:t.headers.get("X-Request-URL");var e="response"in l?l.response:l.responseText;setTimeout(function(){o(new m(e,t))},0)},l.onerror=function(){setTimeout(function(){a(new TypeError("Network request failed"))},0)},l.ontimeout=function(){setTimeout(function(){a(new TypeError("Network request timed out"))},0)},l.onabort=function(){setTimeout(function(){a(new e.DOMException("Aborted","AbortError"))},0)},l.open(f.method,function(t){try{return""===t&&n.location.href?n.location.href:t}catch(e){return t}}(f.url),!0),"include"===f.credentials?l.withCredentials=!0:"omit"===f.credentials&&(l.withCredentials=!1),"responseType"in l&&(i.blob?l.responseType="blob":i.arrayBuffer&&(l.responseType="arraybuffer")),r&&"object"==typeof r.headers&&!(r.headers instanceof c||n.Headers&&r.headers instanceof n.Headers)){var p=[];Object.getOwnPropertyNames(r.headers).forEach(function(t){p.push(s(t)),l.setRequestHeader(t,u(r.headers[t]))}),f.headers.forEach(function(t,e){-1===p.indexOf(e)&&l.setRequestHeader(e,t)})}else f.headers.forEach(function(t,e){l.setRequestHeader(e,t)});f.signal&&(f.signal.addEventListener("abort",h),l.onreadystatechange=function(){4===l.readyState&&f.signal.removeEventListener("abort",h)}),l.send(void 0===f._bodyInit?null:f._bodyInit)})}w.polyfill=!0,n.fetch||(n.fetch=w,n.Headers=c,n.Request=y,n.Response=m),e.Headers=c,e.Request=y,e.Response=m,e.fetch=w,Object.defineProperty(e,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=n.fetch?n:i;(e=o.fetch).default=o.fetch,e.fetch=o.fetch,e.Headers=o.Headers,e.Request=o.Request,e.Response=o.Response,t.exports=e}).call(e,function(){return this}())},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=a(r(3)),o=a(r(2));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.options=t,r.id=0,r}return function(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)}(e,o.default),n(e,[{key:"setOptions",value:function(t){Object.assign(this.options,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}();e.default=s,i.default.promisifyAll(s.prototype)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=f(r(3)),o=f(r(167)),a=f(r(168)),s=f(r(171)),u=f(r(270));function f(t){return t&&t.__esModule?t:{default:t}}var c=void 0;if(o.default)c=r(272);else{if("undefined"==typeof window)throw new Error("Couldn't decide on a `WebSocket` class");c=window.WebSocket}var l=(0,a.default)("steem:ws"),h=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(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}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,Object.assign({id:0},t)));return r._requests=new Map,r.inFlight=0,r.isOpen=!1,r}return function(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)}(e,u.default),n(e,[{key:"start",value:function(){var t=this;return this.startPromise?this.startPromise:(this.startPromise=new i.default(function(e,r){t.ws=new c(s.default.get("websocket")),t.ws.onerror=function(e){t.startPromise=null,r(e)},t.ws.onopen=function(){t.isOpen=!0,t.ws.onerror=t.onError.bind(t),t.ws.onmessage=t.onMessage.bind(t),t.ws.onclose=t.onClose.bind(t),e()}}),this.startPromise)}},{key:"stop",value:function(){l("Stopping..."),this.startPromise=null,this.isOpen=!1,this._requests.clear(),this.ws&&(this.ws.onerror=this.ws.onmessage=this.ws.onclose=null,this.ws.close(),this.ws=null)}},{key:"send",value:function(t,e,r){var n=this;return l("Steem::send",t,e),this.start().then(function(){var o={};new i.default(function(t,e){o.resolve=function(e){t(e),r(null,e)},o.reject=function(t){e(t),r(t)}});var a={deferral:o,startedAt:Date.now(),message:{id:e.id||n.id++,method:"call",jsonrpc:"2.0",params:[t,e.method,e.params]}};return n.inFlight++,n._requests.set(a.message.id,a),n.ws.send(JSON.stringify(a.message)),o})}},{key:"onError",value:function(t){var e=!0,r=!1,n=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){i.value.deferral.reject(t)}}catch(t){r=!0,n=t}finally{try{!e&&o.return&&o.return()}finally{if(r)throw n}}this.stop()}},{key:"onClose",value:function(){var t=new Error("Connection was closed"),e=!0,r=!1,n=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){i.value.deferral.reject(t)}}catch(t){r=!0,n=t}finally{try{!e&&o.return&&o.return()}finally{if(r)throw n}}this._requests.clear()}},{key:"onMessage",value:function(t){var e=JSON.parse(t.data);if(l("-- Steem.onMessage --\x3e",e.id),!this._requests.has(e.id))throw new Error("Panic: no request in queue for message id "+e.id);var r=this._requests.get(e.id);this._requests.delete(e.id);var n=e.error;if(n){var i=new Error((n.message||"Failed to complete operation")+" (see err.payload for the full error payload)");i.payload=e,r.deferral.reject(i)}else this.emit("track-performance",r.message.method,Date.now()-r.startedAt),r.deferral.resolve(e.result)}}]),e}();e.default=h},200,function(t,e,r){(function(e){"use strict";var n=r(251),i=r(225),o=r(255),a=o.Point,s=o.getCurveByName("secp256k1"),u=r(171),f=r(274),c=r(261),l=r(260),h=r(250),p=r(185),d={},v=f.transaction,_=f.signed_transaction;d.signature=c,d.verify=function(t,e,r){var n=!1,i=[];for(var o in r)i.push(o);var a=this.generateKeys(t,e,i);return i.forEach(function(t){r[t][0][0]===a[t]&&(n=!0)}),n},d.generateKeys=function(t,r,o){var f={};return o.forEach(function(o){var c=(t+o+r).trim().split(/[\t\n\v\f\r ]+/).join(" "),l=p.sha256(c),h=n.fromBuffer(l),d=s.G.multiply(h),v=new a(d.curve,d.x,d.y,d.z).getEncoded(d.compressed),_=p.ripemd160(v),y=e.concat([v,_.slice(0,4)]);f[o]=u.get("address_prefix")+i.encode(y)}),f},d.getPrivateKeys=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["master","active","regular","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),a=n.slice(-4),s=p.sha256(o);s=(s=p.sha256(s)).slice(0,4),a.toString()==s.toString()&&(r=!0)}catch(t){}return r},d.toWif=function(t,r,n){var o=(t+n+r).trim().split(/[\t\n\v\f\r ]+/).join(" "),a=p.sha256(o),s=e.concat([new e([128]),a]),u=p.sha256(s);u=(u=p.sha256(u)).slice(0,4);var f=e.concat([s,u]);return i.encode(f)},d.wifIsValid=function(t,e){return this.wifToPublic(t)==e},d.wifToPublic=function(t){var e=l.fromWif(t);return e=e.toPublic().toString()},d.isPubkey=function(t,e){return null!=h.fromString(t,e)},d.signTransaction=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=[];t.signatures&&(i=[].concat(t.signatures));var o=new e(u.get("chain_id"),"hex"),a=v.toBuffer(t);for(var s in n&&(console.log("transaction",v.fromBuffer(a)),console.log("raw transaction",a.toString("hex"))),r){var f=c.signBuffer(e.concat([o,a]),r[s]);i.push(f.toBuffer()),n&&console.log("signature",f.toBuffer().toString("hex"))}return _.toObject(Object.assign(t,{signatures:i}))},t.exports=d}).call(e,r(177).Buffer)},function(t,e,r){"use strict";var n=o(r(275)),i=o(r(281));function o(t){return t&&t.__esModule?t:{default:t}}var a=n.default.int16,s=(n.default.uint8,n.default.uint16),u=n.default.uint32,f=n.default.uint64,c=n.default.string,l=n.default.string_binary,h=n.default.bytes,p=n.default.bool,d=n.default.array,v=n.default.static_variant,_=n.default.map,y=n.default.set,g=n.default.public_key,m=n.default.time_point_sec,b=n.default.optional,w=n.default.asset,E=(n.default.asset_16,n.default.void),k=n.default.void,T=n.default.void,x=v();t.exports.operation=x;var B=function(e,r){var n=new i.default(e,r);return t.exports[e]=n},S=new B("beneficiaries",{account:c,weight:s}),A=new B(0,{beneficiaries:y(S)}),j=(new B("transaction",{ref_block_num:s,ref_block_prefix:u,expiration:m,operations:d(x),extensions:y(E)}),new B("encrypted_memo",{from:g,to:g,nonce:f,check:u,encrypted:l}),new B("signed_transaction",{ref_block_num:s,ref_block_prefix:u,expiration:m,operations:d(x),extensions:y(E),signatures:d(h(65))})),I=(new B("signed_block",{previous:h(20),timestamp:m,validator:c,transaction_merkle_root:h(20),extensions:y(v([E,T,k])),validator_signature:h(65),transactions:d(j)}),new B("block_header",{previous:h(20),timestamp:m,validator:c,transaction_merkle_root:h(20),extensions:y(v([E,T,k]))}),new B("signed_block_header",{previous:h(20),timestamp:m,validator:c,transaction_merkle_root:h(20),extensions:y(v([E,T,k])),validator_signature:h(65)}),new B("vote",{voter:c,author:c,permlink:c,weight:a})),O=new B("content",{parent_author:c,parent_permlink:c,author:c,permlink:c,title:c,body:c,curation_percent:a,json_metadata:c,extensions:y(v([A]))}),C=new B("transfer",{from:c,to:c,amount:w,memo:c}),R=new B("transfer_to_vesting",{from:c,to:c,amount:w}),P=new B("withdraw_vesting",{account:c,vesting_shares:w}),U=new B("authority",{weight_threshold:u,account_auths:_(c,s),key_auths:_(g,s)}),L=new B("account_update",{account:c,master:b(U),active:b(U),regular:b(U),memo_key:g,json_metadata:c}),F=new B("chain_properties_init",{account_creation_fee:w,maximum_block_size:u,create_account_delegation_ratio:u,create_account_delegation_time:u,min_delegation:w,min_curation_percent:a,max_curation_percent:a,bandwidth_reserve_percent:a,bandwidth_reserve_below:w,flag_energy_additional_cost:a,vote_accounting_min_rshares:u,committee_request_approve_min_percent:a}),D=new B("validator_update",{owner:c,url:c,block_signing_key:g}),N=new B("chain_properties_update",{owner:c,props:F}),M=new B("account_validator_vote",{account:c,validator:c,approve:p}),q=new B("account_validator_proxy",{account:c,proxy:c}),z=new B("delete_content",{author:c,permlink:c}),V=new B("custom",{required_active_auths:y(c),required_regular_auths:y(c),id:c,json:c}),H=new B("set_withdraw_vesting_route",{from_account:c,to_account:c,percent:s,auto_vest:p}),W=new B("request_account_recovery",{recovery_account:c,account_to_recover:c,new_master_authority:U,extensions:y(E)}),Y=new B("recover_account",{account_to_recover:c,new_master_authority:U,recent_master_authority:U,extensions:y(E)}),G=new B("change_recovery_account",{account_to_recover:c,new_recovery_account:c,extensions:y(E)}),X=new B("escrow_transfer",{from:c,to:c,token_amount:w,escrow_id:u,agent:c,fee:w,json_metadata:c,ratification_deadline:m,escrow_expiration:m}),Z=new B("escrow_dispute",{from:c,to:c,agent:c,who:c,escrow_id:u}),$=new B("escrow_release",{from:c,to:c,agent:c,who:c,receiver:c,escrow_id:u,token_amount:w}),Q=new B("escrow_approve",{from:c,to:c,agent:c,who:c,escrow_id:u,approve:p}),K=new B("delegate_vesting_shares",{delegator:c,delegatee:c,vesting_shares:w}),J=new B("account_create",{fee:w,delegation:w,creator:c,new_account_name:c,master:U,active:U,regular:U,memo_key:g,json_metadata:c,referrer:c,extensions:y(E)}),tt=new B("account_metadata",{account:c,json_metadata:c}),et=new B("proposal_create",{author:c,title:c,memo:c,expiration_time:m,proposed_operations:d(new B("operation_wrapper",{op:x})),review_period_time:b(m),extensions:y(E)}),rt=new B("proposal_update",{author:c,title:c,active_approvals_to_add:y(c),active_approvals_to_remove:y(c),master_approvals_to_add:y(c),master_approvals_to_remove:y(c),regular_approvals_to_add:y(c),regular_approvals_to_remove:y(c),key_approvals_to_add:y(g),key_approvals_to_remove:y(g),extensions:y(E)}),nt=new B("proposal_delete",{author:c,title:c,requester:c,extensions:y(E)}),it=new B("author_reward",{author:c,permlink:c,payout:w,vesting_payout:w}),ot=new B("curation_reward",{curator:c,reward:w,content_author:c,content_permlink:c}),at=new B("content_reward",{author:c,permlink:c,payout:w}),st=new B("fill_vesting_withdraw",{from_account:c,to_account:c,withdrawn:w,deposited:w}),ut=new B("shutdown_validator",{owner:c}),ft=new B("hardfork",{hardfork_id:u}),ct=new B("content_payout_update",{author:c,permlink:c}),lt=new B("content_benefactor_reward",{benefactor:c,author:c,permlink:c,reward:w}),ht=new B("return_vesting_delegation",{account:c,vesting_shares:w}),pt=new B("committee_worker_create_request",{creator:c,url:c,worker:c,required_amount_min:w,required_amount_max:w,duration:u}),dt=new B("committee_worker_cancel_request",{creator:c,request_id:u}),vt=new B("committee_vote_request",{voter:c,request_id:u,vote_percent:a}),_t=new B("committee_cancel_request",{request_id:u}),yt=new B("committee_approve_request",{request_id:u}),gt=new B("committee_pay_request",{worker:c,request_id:u,tokens:w}),mt=new B("committee_payout_request",{request_id:u}),bt=new B("validator_reward",{validator:c,shares:w}),wt=new B("create_invite",{creator:c,balance:w,invite_key:g}),Et=new B("claim_invite_balance",{initiator:c,receiver:c,invite_secret:c}),kt=new B("invite_registration",{initiator:c,new_account_name:c,invite_secret:c,new_account_key:g}),Tt=new B("award",{initiator:c,receiver:c,energy:s,custom_sequence:f,memo:c,beneficiaries:y(S)}),xt=new B("fixed_award",{initiator:c,receiver:c,reward_amount:w,max_energy:s,custom_sequence:f,memo:c,beneficiaries:y(S)}),Bt=new B("versioned_chain_properties_update",{owner:c,props:v([F,new B(1,{account_creation_fee:w,maximum_block_size:u,create_account_delegation_ratio:u,create_account_delegation_time:u,min_delegation:w,min_curation_percent:a,max_curation_percent:a,bandwidth_reserve_percent:a,bandwidth_reserve_below:w,flag_energy_additional_cost:a,vote_accounting_min_rshares:u,committee_request_approve_min_percent:a,inflation_validator_percent:a,inflation_ratio_committee_vs_reward_fund:a,inflation_recalc_period:u}),new B(2,{account_creation_fee:w,maximum_block_size:u,create_account_delegation_ratio:u,create_account_delegation_time:u,min_delegation:w,min_curation_percent:a,max_curation_percent:a,bandwidth_reserve_percent:a,bandwidth_reserve_below:w,flag_energy_additional_cost:a,vote_accounting_min_rshares:u,committee_request_approve_min_percent:a,inflation_validator_percent:a,inflation_ratio_committee_vs_reward_fund:a,inflation_recalc_period:u,data_operations_cost_additional_bandwidth:u,validator_miss_penalty_percent:a,validator_miss_penalty_duration:u}),new B(3,{account_creation_fee:w,maximum_block_size:u,create_account_delegation_ratio:u,create_account_delegation_time:u,min_delegation:w,min_curation_percent:a,max_curation_percent:a,bandwidth_reserve_percent:a,bandwidth_reserve_below:w,flag_energy_additional_cost:a,vote_accounting_min_rshares:u,committee_request_approve_min_percent:a,inflation_validator_percent:a,inflation_ratio_committee_vs_reward_fund:a,inflation_recalc_period:u,data_operations_cost_additional_bandwidth:u,validator_miss_penalty_percent:a,validator_miss_penalty_duration:u,create_invite_min_balance:w,committee_create_request_fee:w,create_paid_subscription_fee:w,account_on_sale_fee:w,subaccount_on_sale_fee:w,validator_declaration_fee:w,withdraw_intervals:s}),new B(4,{account_creation_fee:w,maximum_block_size:u,create_account_delegation_ratio:u,create_account_delegation_time:u,min_delegation:w,min_curation_percent:a,max_curation_percent:a,bandwidth_reserve_percent:a,bandwidth_reserve_below:w,flag_energy_additional_cost:a,vote_accounting_min_rshares:u,committee_request_approve_min_percent:a,inflation_validator_percent:a,inflation_ratio_committee_vs_reward_fund:a,inflation_recalc_period:u,data_operations_cost_additional_bandwidth:u,validator_miss_penalty_percent:a,validator_miss_penalty_duration:u,create_invite_min_balance:w,committee_create_request_fee:w,create_paid_subscription_fee:w,account_on_sale_fee:w,subaccount_on_sale_fee:w,validator_declaration_fee:w,withdraw_intervals:s,distribution_epoch_length:u})])}),St=new B("receive_award",{receiver:c,custom_sequence:f,memo:c,shares:w}),At=new B("benefactor_award",{benefactor:c,receiver:c,custom_sequence:f,memo:c,shares:w}),jt=new B("set_paid_subscription",{account:c,url:c,levels:s,amount:w,period:s}),It=new B("paid_subscribe",{subscriber:c,account:c,level:s,amount:w,period:s,auto_renewal:p}),Ot=new B("paid_subscription_action",{subscriber:c,account:c,level:s,amount:w,period:s,summary_duration_sec:f,summary_amount:w}),Ct=new B("cancel_paid_subscription",{subscriber:c,account:c}),Rt=new B("set_account_price",{account:c,account_seller:c,account_offer_price:w,account_on_sale:p}),Pt=new B("target_account_sale",{account:c,account_seller:c,target_buyer:c,account_offer_price:w,account_on_sale:p}),Ut=new B("set_subaccount_price",{account:c,subaccount_seller:c,subaccount_offer_price:w,subaccount_on_sale:p}),Lt=new B("buy_account",{buyer:c,account:c,account_offer_price:w,account_authorities_key:g,tokens_to_shares:w}),Ft=new B("account_sale",{account:c,price:w,buyer:c,seller:c}),Dt=new B("use_invite_balance",{initiator:c,receiver:c,invite_secret:c}),Nt=new B("expire_escrow_ratification",{from:c,to:c,agent:c,escrow_id:u,token_amount:w,fee:w,ratification_deadline:m}),Mt=new B("bid",{account:c,bidder:c,bid:w}),qt=new B("outbid",{account:c,bidder:c,bid:w}),zt=new B("set_reward_sharing",{owner:c,sharing_rate:s});x.st_operations=[I,O,C,R,P,L,D,M,q,z,V,H,W,Y,G,X,Z,$,Q,K,J,tt,et,rt,nt,N,it,ot,at,st,ut,ft,ct,lt,ht,pt,dt,vt,_t,yt,gt,mt,bt,wt,Et,kt,Bt,Tt,St,At,jt,It,Ot,Ct,Rt,Ut,Lt,Ft,Dt,Nt,xt,Pt,Mt,qt,zt],t.exports.witness_update=D,t.exports.account_witness_vote=M,t.exports.account_witness_proxy=q,t.exports.shutdown_witness=ut,t.exports.witness_reward=bt},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(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=r(175),s=r(276),u=r(277),f=r(279),c=r(280),l=r(278),h={};t.exports=h;var p=e.env.npm_config__graphene_serializer_hex_dump;e.env.NODE_ENV;h.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,"");return t.skip(7),(0,s.fromImpliedDecimal)(e,r)+" "+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],a=n[1];if(a.length>6)throw new Error("Symbols are not longer than 6 characters "+a+"-"+a.length);t.writeInt64(u.to_long(i.replace(".","")));var s=i.indexOf("."),f=-1===s?0:i.length-s-1;t.writeUint8(f),t.append(a.toUpperCase(),"binary");for(var c=0;c<7-a.length;c++)t.writeUint8(0)},fromObject:function(t){return t},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0.000 VIZ":t}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:(u.require_range(0,255,t,"uint8 "+t),parseInt(t))}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:(u.require_range(0,65535,t,"uint16 "+t),parseInt(t))}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).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;h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:(u.require_range(d,v,t,"uint32 "+t),parseInt(t))}},h.int16={fromByteBuffer:function(t){return t.readInt16()},appendByteBuffer:function(t,e){t.writeInt16(e)},fromObject:function(t){return t},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?0:parseInt(t)}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0":(u.required(t),u.to_long(t).toString())}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0":u.to_long(t).toString()}},h.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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"":t.toString("utf8")}},h.string_binary={fromByteBuffer:function(t){var e=void 0,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){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"":t.toString()}},h.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){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===e){return function(t){return new Array(t).join("00")}(t)}return u.required(e),e.toString("hex")}}},h.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){return(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default||void 0!==t)&&!!JSON.parse(t)}},h.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){if(!(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default||void 0!==t)throw new Error("(void) undefined type")}},h.array=function(t){return{fromByteBuffer:function(e){var r=e.readVarint32();p&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0<r?i<r:i>r;i++)n.push(t.fromByteBuffer(e));return g(n,t)},appendByteBuffer:function(e,r){u.required(r),r=g(r,t),e.writeVarint32(r.length);for(var n,i=0;i<r.length;i++)n=r[i],t.appendByteBuffer(e,n)},fromObject:function(e){u.required(e),e=g(e,t);for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n},toObject:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===e)return[t.toObject(e,r)];u.required(e),e=g(e,t);for(var n,i=[],o=0;o<e.length;o++)n=e[o],i.push(t.toObject(n,r));return i}}},h.time_point_sec={fromByteBuffer:function(t){return t.readUint32()},appendByteBuffer:function(t,e){"number"!=typeof e&&(e=h.time_point_sec.fromObject(e)),t.writeUint32(e)},fromObject:function(t){if(u.required(t),"number"==typeof t)return t;if(t.getTime)return Math.floor(t.getTime()/1e3);if("string"!=typeof t)throw new Error("Unknown date type: "+t);return"string"!=typeof t||/Z$/.test(t)||(t+="Z"),Math.floor(new Date(t).getTime()/1e3)},toObject:function(t){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).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 e=parseInt(t);return u.require_range(0,4294967295,e,"uint32 "+t),new Date(1e3*e).toISOString().split(".")[0]}},h.set=function(t){return{validate:function(e){for(var r,n={},o=0;o<e.length;o++){var a;if(a=void 0===(r=e[o])?"undefined":i(r),["string","number"].indexOf(a)>=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return g(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;0<r?i<r:i>r;i++)n.push(t.fromByteBuffer(e));return n}())},appendByteBuffer:function(e,r){r||(r=[]),e.writeVarint32(r.length);for(var n,i=this.validate(r),o=0;o<i.length;o++)n=i[o],t.appendByteBuffer(e,n)},fromObject:function(e){return e||(e=[]),this.validate(function(){for(var r,n=[],i=0;i<e.length;i++)r=e[i],n.push(t.fromObject(r));return n}())},toObject:function(e){var r=arguments.length>1&&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;o<e.length;o++)n=e[o],i.push(t.toObject(n,r));return i}()))}}},h.fixed_array=function(t,e){return{fromByteBuffer:function(r){var n,i=void 0,o=void 0;for(o=[],i=0,n=t;i<n;i+=1)o.push(e.fromByteBuffer(r));return g(o,e)},appendByteBuffer:function(r,n){var i,o=void 0,a=void 0;for(0!==t&&(u.required(n),n=g(n,e)),o=a=0,i=t;a<i;o=a+=1)e.appendByteBuffer(r,n[o])},fromObject:function(r){var n,i=void 0,o=void 0,a=void 0;for(0!==t&&u.required(r),a=[],i=o=0,n=t;o<n;i=o+=1)a.push(e.fromObject(r[i]));return a},toObject:function(r,n){var i,o=void 0,a=void 0,s=void 0,f=void 0,c=void 0,l=void 0;if(null==n&&(n={}),n.use_default&&void 0===r){for(c=[],o=a=0,f=t;a<f;o=a+=1)c.push(e.toObject(void 0,n));return c}for(0!==t&&u.required(r),l=[],o=s=0,i=t;s<i;o=s+=1)l.push(e.toObject(r[o],n));return l}}};h.protocol_id_type=function(t){return u.required(t,"name"),function(t,e){return u.required(t,"reserved_spaces"),u.required(e,"object_type"),{fromByteBuffer:function(t){return t.readVarint32()},appendByteBuffer:function(r,n){u.required(n),void 0!==n.resolve&&(n=n.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(n)&&(n=u.get_instance(t,e,n)),r.writeVarint32(u.to_number(n))},fromObject:function(r){return u.required(r),void 0!==r.resolve&&(r=r.resolve),u.is_digits(r)?u.to_number(r):u.get_instance(t,e,r)},toObject:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=l.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.reserved_spaces.protocol_ids,t)},h.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)).appendByteBuffer(t)},fromObject:function(t){return u.required(t),void 0!==t.resolve&&(t=t.resolve),f.fromString(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0.0.0":(u.required(t),void 0!==t.resolve&&(t=t.resolve),(t=f.fromString(t)).toString())}},h.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=h.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"===(void 0===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],a=r[1];return u.require_range(0,255,n,"vote type "+t),u.require_range(0,16777215,a,"vote id "+t),{type:n,id:a}},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?"0:0":(u.required(t),"string"==typeof t&&(t=h.vote_id.fromObject(t)),t.type+":"+t.id)},compare:function(t,e){return"object"!==(void 0===t?"undefined":i(t))&&(t=h.vote_id.fromObject(t)),"object"!==(void 0===e?"undefined":i(e))&&(e=h.vote_id.fromObject(e)),parseInt(t.id)-parseInt(e.id)}},h.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?(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=r.use_default||void 0!==e?t.toObject(e,r):void 0;return r.annotate&&("object"===(void 0===n?"undefined":i(n))?n.__optional="parent is optional":n={__optional:n}),n}}},h.static_variant=function(t){var e={witness_update:"validator_update",account_witness_vote:"account_validator_vote",account_witness_proxy:"account_validator_proxy",shutdown_witness:"shutdown_validator",witness_reward:"validator_reward"};return{nosort:!0,st_operations:t,opTypeId:function(t){var r=0,n=void 0;if("number"==typeof t)n=t;else{var i=!0,o=!1,a=void 0;try{for(var s,u=this.st_operations[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){if(s.value.operation_name===t){n=r;break}r++}}catch(t){o=!0,a=t}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}if(void 0===n&&e[t]){r=0;var f=!0,c=!1,l=void 0;try{for(var h,p=this.st_operations[Symbol.iterator]();!(f=(h=p.next()).done);f=!0){if(h.value.operation_name===e[t]){n=r;break}r++}}catch(t){c=!0,l=t}finally{try{!f&&p.return&&p.return()}finally{if(c)throw l}}}}return n},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 _(this.opTypeId(t[0]),this.opTypeId(e[0]))}}},h.map=function(t,e){return{validate:function(e){if(!Array.isArray(e))throw new Error("expecting array");for(var r,n={},o=0;o<e.length;o++){var a;if(2!==(r=e[o]).length)throw new Error("expecting two elements");if(a=i(r[0]),["number","string"].indexOf(a)>=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return g(e,t)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0<i?o<i:o>i;o++)n.push([t.fromByteBuffer(r),e.fromByteBuffer(r)]);return this.validate(n)},appendByteBuffer:function(r,n){this.validate(n),r.writeVarint32(n.length);for(var i,o=0;o<n.length;o++)i=n[o],t.appendByteBuffer(r,i[0]),e.appendByteBuffer(r,i[1])},fromObject:function(r){u.required(r);for(var n,i=[],o=0;o<r.length;o++)n=r[o],i.push([t.fromObject(n[0]),e.fromObject(n[1])]);return this.validate(i)},toObject:function(r){var n=arguments.length>1&&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=[],a=0;a<r.length;a++)i=r[a],o.push([t.toObject(i[0],n),e.toObject(i[1],n)]);return o}}},h.public_key={toPublic:function(t){return void 0!==t.resolve&&(t=t.resolve),null==t?t:t.Q?t:a.PublicKey.fromStringOrThrow(t)},fromByteBuffer:function(t){return c.public_key(t)},appendByteBuffer:function(t,e){u.required(e),c.public_key(t,h.public_key.toPublic(e))},fromObject:function(t){return u.required(t),t.Q?t:h.public_key.toPublic(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?a.ecc_config.get("address_prefix")+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(u.required(t),t.toString())},compare:function(t,e){return 1*_(t.toString(),e.toString())}},h.address={_to_address:function(t){return u.required(t),t.addy?t:a.Address.fromString(t)},fromByteBuffer:function(t){return new a.Address(c.ripemd160(t))},appendByteBuffer:function(t,e){c.ripemd160(t,h.address._to_address(e).toBuffer())},fromObject:function(t){return h.address._to_address(t)},toObject:function(t){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).use_default&&void 0===t?a.ecc_config.get("address_prefix")+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":h.address._to_address(t).toString()},compare:function(t,e){return-1*_(t.toString(),e.toString())}};var _=function(t,e){return t>e?1:t<e?-1:0},y=function(t){return Array.isArray(t)?t[0]:t},g=function(t,e){return e.nosort?t:e.compare?t.sort(function(t,r){return e.compare(y(t),y(r))}):t.sort(function(t,e){return"number"==typeof y(t)&&"number"==typeof y(e)?y(t)-y(e):n.isBuffer(y(t))&&n.isBuffer(y(e))?_(y(t).toString("hex"),y(e).toString("hex")):_(y(t).toString(),y(e).toString())})}}).call(e,r(5),r(177).Buffer)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),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};e.toImpliedDecimal=function(t,e){"number"==typeof t?((0,o.default)(t<=9007199254740991,"overflow"),t=""+t):t.toString&&(t=t.toString());(0,o.default)("string"==typeof t,"number should be an actual number or string: "+(void 0===t?"undefined":i(t))),t=t.trim(),(0,o.default)(/^[0-9]*\.?[0-9]*$/.test(t),"Invalid decimal number "+t);var r=t.split("."),a=n(r,2),s=a[0],u=void 0===s?"":s,f=a[1],c=void 0===f?"":f,l=e-c.length;(0,o.default)(l>=0,"Too many decimal digits in "+t+" to create an implied decimal of "+e);for(var h=0;h<l;h++)c+="0";for(;"0"===u.charAt(0);)u=u.substring(1);return u+c},e.fromImpliedDecimal=function(t,e){"number"==typeof t?((0,o.default)(t<=9007199254740991,"overflow"),t=""+t):t.toString&&(t=t.toString());for(;t.length<e+1;)t="0"+t;var r=t.substring(t.length-e);return t.substring(0,t.length-e)+(r?"."+r:"")};var o=function(t){return t&&t.__esModule?t:{default:t}}(r(181))},function(t,e,r){"use strict";var n,i,o,a,s,u="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},f=r(230).Long,c=r(278);t.exports=n={is_empty:i=function(t){return null==t},required:function(t){var e=arguments.length>1&&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(!f.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:function(t){return"numeric"==typeof t||/^[0-9]+$/.test(t)},to_number:o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(t)?t:(n.no_overflow53(t,e),"number"==typeof t?t:parseInt(t))},to_long:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(t)?t:f.isLong(t)?t:(n.no_overflow64(t,e),"number"==typeof t&&(t=""+t),f.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(f.isLong(t))return t.toString();throw"unsupported type "+e+": ("+(void 0===t?"undefined":u(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: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;o(r);if(r<t||r>e)throw new Error("out of range "+r+" "+n+" "+r);return r},require_object_type:a=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=c.object_type[e];if(!o)throw new Error("Unknown object type: "+e+", "+n+", "+r);if(!new RegExp(t+"."+o+".[0-9]+$").test(r))throw new Error("Expecting "+e+" in format "+t+"."+o+".[0-9]+ instead of "+r+" "+n+" "+r);return r},get_instance:function(t,e,r,n){return i(r)?r:(a(t,e,r,n),o(r.split(".")[2]))},require_relative_type:function(t,e,r){return a(0,t,e,r),e},get_relative_instance:function(t,e,r){return i(e)?e:(a(0,t,e,r),o(e.split(".")[2]))},require_protocol_type:function(t,e,r){return a(1,t,e,r),e},get_protocol_instance:function(t,e,r){return i(e)?e:(a(1,t,e,r),o(e.split(".")[2]))},get_protocol_type:s=function(t,e){if(i(t))return t;(void 0)(t,e);var r=t.split(".");return o(r[1])},get_protocol_type_name:function(t,e){if(i(t))return t;var r=s(t,e);return Object.keys(c.object_type)[r]},require_implementation_type:function(t,e,r){return a(2,t,e,r),e},get_implementation_instance:function(t,e,r){return i(e)?e:(a(2,t,e,r),o(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(!f.isLong(t))throw"unsupported type "+e+": ("+(void 0===t?"undefined":u(t))+") "+t;n.no_overflow53(t.toInt(),e)}else{parseInt(t);if(t>9007199254740991||t<-9007199254740991)throw new Error("overflow "+e+" "+t)}else if(t>9007199254740991||t<-9007199254740991)throw new Error("overflow "+e+" "+t)},no_overflow64:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!f.isLong(t))if(void 0===t.t||void 0===t.s)if("string"!=typeof t){if("number"!=typeof t)throw"unsupported type "+e+": ("+(void 0===t?"undefined":u(t))+") "+t;if(t>9007199254740991||t<-9007199254740991)throw new Error("overflow "+e+" "+t)}else{for(t=t.replace(/^0+/,"");/0$/.test(t);)t=t.substring(0,t.length-1);if(/\.$/.test(t)&&(t=t.substring(0,t.length-1)),""===t&&(t="0"),f.fromString(t).toString()!==t.trim())throw new Error("overflow "+e+" "+t)}else n.no_overflow64(t.toString(),e)}}},function(t,e){"use strict";var r=void 0;t.exports=r={},r.reserved_spaces={relative_protocol_ids:0,protocol_ids:1,implementation_ids:2},r.operations={vote:0,content:1,transfer:2,transfer_to_vesting:3,withdraw_vesting:4,account_update:5,validator_update:6,account_validator_vote:7,account_validator_proxy:8,delete_content:9,custom:10,set_withdraw_vesting_route:11,request_account_recovery:12,recover_account:13,change_recovery_account:14,escrow_transfer:15,escrow_dispute:16,escrow_release:17,escrow_approve:18,delegate_vesting_shares:19,account_create:20,account_metadata:21,proposal_create:22,proposal_update:23,proposal_delete:24,chain_properties_update:25,author_reward:26,curation_reward:27,content_reward:28,fill_vesting_withdraw:29,shutdown_validator:30,hardfork:31,content_payout_update:32,content_benefactor_reward:33,return_vesting_delegation:34,committee_worker_create_request:35,committee_worker_cancel_request:36,committee_vote_request:37,committee_cancel_request:38,committee_approve_request:39,committee_payout_request:40,committee_pay_request:41,validator_reward:42,create_invite:43,claim_invite_balance:44,invite_registration:45,versioned_chain_properties_update:46,award:47,receive_award:48,benefactor_award:49,set_paid_subscription:50,paid_subscribe:51,paid_subscription_action:52,cancel_paid_subscription:53,set_account_price:54,set_subaccount_price:55,buy_account:56,account_sale:57,use_invite_balance:58,expire_escrow_ratification:59,fixed_award:60,target_account_sale:61,bid:62,outbid:63,set_reward_sharing:64,witness_update:6,account_witness_vote:7,account_witness_proxy:8,shutdown_witness:30,witness_reward:42},r.object_type={null:0,base:1}},function(t,e,r){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var i=r(230).Long,o=r(277),a=i.fromNumber(Math.pow(2,48)-1),s=function(){function t(e,r,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.space=e,this.type=r,this.instance=n;var i=this.instance.toString(),a=this.space+"."+this.type+"."+i;if(!o.is_digits(i))throw new("Invalid object id "+a)}return n(t,[{key:"toLong",value:function(){return i.fromNumber(this.space).shiftLeft(56).or(i.fromNumber(this.type).shiftLeft(48).or(this.instance))}},{key:"appendByteBuffer",value:function(t){return t.writeUint64(this.toLong())}},{key:"toString",value:function(){return this.space+"."+this.type+"."+this.instance.toString()}}],[{key:"fromString",value:function(e){if(void 0!==e.space&&void 0!==e.type&&void 0!==e.instance)return e;var r=o.require_match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/,o.required(e,"object_id"),"object_id");return new t(parseInt(r[1]),parseInt(r[2]),i.fromString(r[3]))}},{key:"fromLong",value:function(e){return new t(e.shiftRight(56).toInt(),255&e.shiftRight(48).toInt(),e.and(a))}},{key:"fromByteBuffer",value:function(e){return t.fromLong(e.readUint64())}}]),t}();t.exports=s},function(t,e,r){(function(e){"use strict";var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),i=r(175);var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return n(t,null,[{key:"fixed_data",value:function(t,r,n){if(t){if(!n){var i=t.copy(t.offset,t.offset+r);return t.skip(r),new e(i.toBinary(),"binary")}var o=n.slice(0,r).toString("binary");for(t.append(o,"binary");r-- >o.length;)t.writeUint8(0)}}},{key:"public_key",value:function(e,r){if(e){if(!r)return n=t.fixed_data(e,33),i.PublicKey.fromBuffer(n);var n=r.toBuffer();e.append(n.toString("binary"),"binary")}}},{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=o}).call(e,r(177).Buffer)},function(t,e,r){(function(e,n){"use strict";var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var o=r(230),a=r(282),s=e.env.npm_config__graphene_serializer_hex_dump,u=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.operation_name=e,this.types=r,this.types&&(this.keys=Object.keys(this.types)),t.printDebug=!0}return i(t,[{key:"fromByteBuffer",value:function(e){var r={},n=null;try{for(var i=this.keys,o=0;o<i.length;o++){n=i[o];var u=this.types[n];try{if(s)if(u.operation_name)console.error(u.operation_name);else{var f=e.offset;u.fromByteBuffer(e);var c=e.offset;e.offset=f;var l=e.copy(f,c);console.error(this.operation_name+"."+n+"\t",l.toHex())}r[n]=u.fromByteBuffer(e)}catch(r){throw t.printDebug&&(console.error("Error reading "+this.operation_name+"."+n+" in data:"),e.printDebug()),r}}}catch(t){a.throw(this.operation_name+"."+n,t)}return r}},{key:"appendByteBuffer",value:function(e,r){var n=null;try{for(var i=this.keys,o=0;o<i.length;o++){n=i[o];var s=this.types[n],u=r[n];void 0===u&&void 0!==t.field_aliases[n]&&(u=r[t.field_aliases[n]]),s.appendByteBuffer(e,u)}}catch(t){try{a.throw(this.operation_name+"."+n+" = "+JSON.stringify(r[n]),t)}catch(e){a.throw(this.operation_name+"."+n+" = "+r[n],t)}}}},{key:"fromObject",value:function(e){var r={},n=null;try{for(var i=this.keys,o=0;o<i.length;o++){n=i[o];var s=this.types[n],u=e[n];void 0===u&&void 0!==t.field_aliases[n]&&(u=e[t.field_aliases[n]]);var f=s.fromObject(u);r[n]=f}}catch(t){a.throw(this.operation_name+"."+n,t)}return r}},{key:"toObject",value:function(){var t=arguments.length>0&&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 i=this.keys,u=0;u<i.length;u++){n=i[u];var f=this.types[n],c=f.toObject(null!=t?t[n]:void 0,e);if(r[n]=c,s){var l=new o(o.DEFAULT_CAPACITY,o.LITTLE_ENDIAN);if(null!=t){var h=t[n];h&&f.appendByteBuffer(l,h)}l=l.copy(0,l.offset),console.error(this.operation_name+"."+n,l.toHex())}}}catch(t){a.throw(this.operation_name+"."+n,t)}return r}},{key:"compare",value:function(t,e){var r=this.keys[0],i=this.types[r],o=t[r],a=e[r];if(i.compare)return i.compare(o,a);if("number"==typeof o&&"number"==typeof a)return o-a;var s=void 0;n.isBuffer(o)&&n.isBuffer(a)&&(s="hex");var u=o.toString(s),f=a.toString(s);return u>f?1:u<f?-1:0}},{key:"fromHex",value:function(t){var e=o.fromHex(t,o.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"fromBuffer",value:function(t){var e=o.fromBinary(t.toString("binary"),o.LITTLE_ENDIAN);return this.fromByteBuffer(e)}},{key:"toHex",value:function(t){return this.toByteBuffer(t).toHex()}},{key:"toByteBuffer",value:function(t){var e=new o(o.DEFAULT_CAPACITY,o.LITTLE_ENDIAN);return this.appendByteBuffer(e,t),e.copy(0,e.offset)}},{key:"toBuffer",value:function(t){return new n(this.toByteBuffer(t).toBinary(),"binary")}}]),t}();u.field_aliases={validator:"witness",validator_signature:"witness_signature",inflation_validator_percent:"inflation_witness_percent",validator_miss_penalty_percent:"witness_miss_penalty_percent",validator_miss_penalty_duration:"witness_miss_penalty_duration",validator_declaration_fee:"witness_declaration_fee"},t.exports=u}).call(e,r(5),r(177).Buffer)},function(t,e){"use strict";var r=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}();var n=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.message=e,(null!=r?r.message:void 0)&&(this.message="cause\t"+r.message+"\t"+this.message);var n="";(null!=r?r.stack:void 0)&&(n="caused by\n\t"+r.stack+"\t"+n),this.stack=this.message+"\n"+n}return r(t,null,[{key:"throw",value:function(t,e){var r=t;throw(null!=e?e.message:void 0)&&(r+="\t cause: "+e.message+" "),(null!=e?e.stack:void 0)&&(r+="\n stack: "+e.stack+" "),new Error(r)}}]),t}();t.exports=n},function(t,e,r){(function(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=v(r(3)),a=v(r(168)),s=v(r(284)),u=v(r(285)),f=v(r(286)),c=v(r(299)),l=v(r(1)),h=v(r(273)),p=r(174),d=v(r(171));function v(t){return t&&t.__esModule?t:{default:t}}var _=(0,a.default)("viz:broadcast"),y=(0,f.default)(l.default),g={send:function(t,e,r){g._prepareTransaction(t).then(function(t){return _("Signing transaction (transaction, transaction.operations)",t,t.operations),o.default.join(t,h.default.signTransaction(t,e))}).spread(function(t,e){return _("Broadcasting transaction (transaction, transaction.operations)",t,t.operations),d.default.get("broadcast_transaction_with_callback")?l.default.broadcastTransactionWithCallbackAsync(function(){},e).then(function(){return e}):l.default.broadcastTransactionAsync(e).then(function(){return e})}).nodeify(r||s.default)},_prepareTransaction:function(t){return l.default.getDynamicGlobalPropertiesAsync().then(function(e){var r=new Date(e.time+"Z"),i=d.default.get("tx_expiration_seconds")||60,o=new Date(r.getTime()+1e3*i);if(d.default.get("reference_irreversible_block")&&void 0!==e.last_irreversible_block_ref_num&&0!==e.last_irreversible_block_ref_num)return Object.assign({ref_block_num:e.last_irreversible_block_ref_num,ref_block_prefix:e.last_irreversible_block_ref_prefix,expiration:o},t);var a=65535&e.head_block_number;if(e.head_block_id){var s=new n(e.head_block_id,"hex").readUInt32LE(4);return Object.assign({ref_block_num:a,ref_block_prefix:s,expiration:o},t)}var u=e.head_block_number-3&65535;return l.default.getBlockAsync(e.head_block_number-2).then(function(e){var r=e.previous;return Object.assign({ref_block_num:u,ref_block_prefix:new n(r,"hex").readUInt32LE(4),expiration:o},t)})})}};c.default.forEach(function(t){var e=(0,p.camelCase)(t.operation),r=t.params||[],n=-1!==r.indexOf("parent_permlink")&&-1!==r.indexOf("parent_permlink");g[e+"With"]=function(r,i,o){_('Sending operation "'+e+'" with',{options:i,callback:o});var a={};return t.roles&&t.roles.length&&(a[t.roles[0]]=r),g.send({extensions:[],operations:[[t.operation,Object.assign({},i,null!=i.json_metadata?{json_metadata:m(i.json_metadata)}:{},n&&null==i.permlink?{permlink:y.contentPermlink(i.parent_author,i.parent_permlink)}:{})]]},a,o)},g[e]=function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];_('Parsing operation "'+e+'" with',{args:i});var a=r.reduce(function(t,e,r){return t[e]=i[r],t},{}),s=i[r.length];return g[e+"With"](t,a,s)}});var m=function(t){return"object"===(void 0===t?"undefined":i(t))?JSON.stringify(t):t};(0,u.default)(g),o.default.promisifyAll(g),e=t.exports=g}).call(e,r(177).Buffer)},function(t,e){t.exports=function(){}},function(t,e,r){"use strict";var n=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(t){return t&&t.__esModule?t:{default:t}}(r(1));t.exports=function(t){t.addAccountAuth=function(e,r,o){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"regular",s=arguments[4];i.default.getAccountsAsync([r]).then(function(r){var i=n(r,1)[0],u=i[a];if(-1!==u.account_auths.map(function(t){return t[0]}).indexOf(o))return s(null,null);u.account_auths.push([o,1]);var f="master"===a?u:void 0,c="active"===a?u:void 0,l="regular"===a?u:void 0;t.accountUpdate(e,i.name,f,c,l,i.memo_key,i.json_metadata,s)})},t.removeAccountAuth=function(e,r,o){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"regular",s=arguments[4];i.default.getAccountsAsync([r]).then(function(r){for(var i=n(r,1)[0],u=i[a],f=u.account_auths.length,c=0;c<f;c++){if(u.account_auths[c][0]===o){u.account_auths.splice(c,1);break}}if(f===u.account_auths.length)return s(null,null);var l="master"===a?u:void 0,h="active"===a?u:void 0,p="regular"===a?u:void 0;t.accountUpdate(e,i.name,l,h,p,i.memo_key,i.json_metadata,s)})}}},function(t,e,r){"use strict";!function(t){t&&t.__esModule}(r(287));var n=r(175);t.exports=function(t){function e(t,e){var r=parseFloat(t.vesting_shares.split(" ")[0]),n=parseFloat(e.total_vesting_shares.split(" ")[0]);return parseFloat(e.total_vesting_fund.split(" ")[0])*(r/n)}return{sharesToVIZ:function(t,e,r){return parseFloat(r)*(parseFloat(t)/parseFloat(e))},contentPermlink:function(t,e){var r=(new Date).toISOString().replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();return"re-"+t+"-"+(e=e.replace(/(-\d{8}t\d{9}z)/g,""))+"-"+r},amount:function(t,e){return t.toFixed(3)+" "+e},numberWithCommas:function(t){return t.replace(/\B(?=(\d{3})+(?!\d))/g,",")},vestingVIZ:e,estimateAccountValue:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n.gprops,o=n.vesting_viz,a=[];return r.name,o||(i?o=e(r,i):a.push(t.getStateAsync("/@{username}").then(function(t){i=t.props,o=e(r,i)}))),Promise.all(a).then(function(){var t=parseFloat(r.balance.split(" ")[0]);return(o+t).toFixed(3)})},createSuggestedPassword:function(){return n.key_utils.get_random_key().toWif().substring(3,35)}}}},function(t,e,r){var n=r(288);t.exports=function(t,e,r){var i=null==t?void 0:n(t,e);return void 0===i?r:i}},function(t,e,r){var n=r(289),i=r(298);t.exports=function(t,e){for(var r=0,o=(e=n(e,t)).length;null!=t&&r<o;)t=t[i(e[r++])];return r&&r==o?t:void 0}},function(t,e,r){var n=r(100),i=r(290),o=r(292),a=r(295);t.exports=function(t,e){return n(t)?t:i(t,e)?[t]:o(a(t))}},function(t,e,r){var n=r(100),i=r(291),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(n(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!i(t))||a.test(t)||!o.test(t)||null!=e&&t in Object(e)}},function(t,e,r){var n=r(62),i=r(99),o="[object Symbol]";t.exports=function(t){return"symbol"==typeof t||i(t)&&n(t)==o}},function(t,e,r){var n=r(293),i=/^\./,o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,s=n(function(t){var e=[];return i.test(t)&&e.push(""),t.replace(o,function(t,r,n,i){e.push(n?i.replace(a,"$1"):r||t)}),e});t.exports=s},function(t,e,r){var n=r(294),i=500;t.exports=function(t){var e=n(t,function(t){return r.size===i&&r.clear(),t}),r=e.cache;return e}},function(t,e,r){var n=r(73),i="Expected a function";function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(i);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=t.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(o.Cache||n),r}o.Cache=n,t.exports=o},function(t,e,r){var n=r(296);t.exports=function(t){return null==t?"":n(t)}},function(t,e,r){var n=r(63),i=r(297),o=r(100),a=r(291),s=1/0,u=n?n.prototype:void 0,f=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return f?f.call(e):"";var r=e+"";return"0"==r&&1/e==-s?"-0":r}},function(t,e){t.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},function(t,e,r){var n=r(291),i=1/0;t.exports=function(t){if("string"==typeof t||n(t))return t;var e=t+"";return"0"==e&&1/t==-i?"-0":e}},function(t,e){"use strict";t.exports=[{roles:["regular"],operation:"vote",params:["voter","author","permlink","weight"]},{roles:["regular"],operation:"content",params:["parent_author","parent_permlink","author","permlink","title","body","curation_percent","json_metadata","extensions"]},{roles:["active","master"],operation:"transfer",params:["from","to","amount","memo"]},{roles:["active"],operation:"transfer_to_vesting",params:["from","to","amount"]},{roles:["active"],operation:"withdraw_vesting",params:["account","vesting_shares"]},{roles:["master","active"],operation:"account_update",params:["account","master","active","regular","memo_key","json_metadata"]},{roles:["active"],operation:"validator_update",params:["owner","url","block_signing_key"]},{roles:["active"],operation:"witness_update",params:["owner","url","block_signing_key"]},{roles:["active"],operation:"chain_properties_update",params:["owner","props"]},{roles:["regular"],operation:"account_validator_vote",params:["account","validator","approve"]},{roles:["regular"],operation:"account_witness_vote",params:["account","witness","approve"]},{roles:["regular"],operation:"account_validator_proxy",params:["account","proxy"]},{roles:["regular"],operation:"account_witness_proxy",params:["account","proxy"]},{roles:["regular"],operation:"delete_content",params:["author","permlink"]},{roles:["regular","active"],operation:"custom",params:["required_active_auths","required_regular_auths","id","json"]},{roles:["active"],operation:"set_withdraw_vesting_route",params:["from_account","to_account","percent","auto_vest"]},{roles:["active"],operation:"request_account_recovery",params:["recovery_account","account_to_recover","new_master_authority","extensions"]},{roles:["master"],operation:"recover_account",params:["account_to_recover","new_master_authority","recent_master_authority","extensions"]},{roles:["master"],operation:"change_recovery_account",params:["account_to_recover","new_recovery_account","extensions"]},{roles:["active"],operation:"escrow_transfer",params:["from","to","token_amount","escrow_id","agent","fee","json_metadata","ratification_deadline","escrow_expiration"]},{roles:["active"],operation:"escrow_dispute",params:["from","to","agent","who","escrow_id"]},{roles:["active"],operation:"escrow_release",params:["from","to","agent","who","receiver","escrow_id","token_amount"]},{roles:["active"],operation:"escrow_approve",params:["from","to","agent","who","escrow_id","approve"]},{roles:["regular"],operation:"claim_reward_balance",params:["account","reward","reward_vests"]},{roles:["regular"],operation:"content_reward",params:["author","permlink","payout"]},{roles:["active"],operation:"fill_vesting_withdraw",params:["from_account","to_account","withdrawn","deposited"]},{roles:["active","master"],operation:"delegate_vesting_shares",params:["delegator","delegatee","vesting_shares"]},{roles:["active","master"],operation:"account_create",params:["fee","delegation","creator","new_account_name","master","active","regular","memo_key","json_metadata","referrer","extensions"]},{roles:["regular"],operation:"account_metadata",params:["account","json_metadata"]},{roles:["active","master"],operation:"proposal_create",params:["author","title","memo","expiration_time","proposed_operations","review_period_time","extensions"]},{roles:["regular","active","master"],operation:"proposal_update",params:["author","title","active_approvals_to_add","active_approvals_to_remove","master_approvals_to_add","master_approvals_to_remove","regular_approvals_to_add","regular_approvals_to_remove","key_approvals_to_add","key_approvals_to_remove","extensions"]},{roles:["active","master"],operation:"proposal_delete",params:["author","title","requester","extensions"]},{roles:["regular"],operation:"committee_worker_create_request",params:["creator","url","worker","required_amount_min","required_amount_max","duration"]},{roles:["regular"],operation:"committee_worker_cancel_request",params:["creator","request_id"]},{roles:["regular"],operation:"committee_vote_request",params:["voter","request_id","vote_percent"]},{roles:["active"],operation:"create_invite",params:["creator","balance","invite_key"]},{roles:["active"],operation:"claim_invite_balance",params:["initiator","receiver","invite_secret"]},{roles:["active"],operation:"invite_registration",params:["initiator","new_account_name","invite_secret","new_account_key"]},{roles:["active"],operation:"versioned_chain_properties_update",params:["owner","props"]},{roles:["regular"],operation:"award",params:["initiator","receiver","energy","custom_sequence","memo","beneficiaries"]},{roles:["regular"],operation:"fixed_award",params:["initiator","receiver","reward_amount","max_energy","custom_sequence","memo","beneficiaries"]},{roles:["active"],operation:"set_paid_subscription",params:["account","url","levels","amount","period"]},{roles:["active"],operation:"paid_subscribe",params:["subscriber","account","level","amount","period","auto_renewal"]},{roles:["master"],operation:"set_account_price",params:["account","account_seller","account_offer_price","account_on_sale"]},{roles:["master"],operation:"target_account_sale",params:["account","account_seller","target_buyer","account_offer_price","account_on_sale"]},{roles:["master"],operation:"set_subaccount_price",params:["account","subaccount_seller","subaccount_offer_price","subaccount_on_sale"]},{roles:["active"],operation:"buy_account",params:["buyer","account","account_offer_price","account_authorities_key","tokens_to_shares"]},{roles:["active"],operation:"use_invite_balance",params:["initiator","receiver","invite_secret"]},{roles:["active"],operation:"set_reward_sharing",params:["owner","sharing_rate"]}]},function(t,e,r){(function(t){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="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};e.decode=c,e.encode=l;var i=u(r(230)),o=u(r(181)),a=u(r(225)),s=r(175);function u(t){return t&&t.__esModule?t:{default:t}}var f=r(301).ops.encrypted_memo;function c(e,r){if((0,o.default)(r,"memo is required"),o.default.equal(void 0===r?"undefined":n(r),"string","memo"),!/^#/.test(r))return r;r=r.substring(1),(0,o.default)(e,"private_key is required"),p(),e=d(e),r=a.default.decode(r);var u=r=f.fromBuffer(new t(r,"binary")),c=u.from,l=u.to,h=u.nonce,v=u.check,_=u.encrypted,y=e.toPublicKey().toString()===c.toString()?l.toString():c.toString();r=s.Aes.decrypt(e,y,h,_,v);var g=i.default.fromBinary(r.toString("binary"),i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);try{return g.mark(),"#"+g.readVString()}catch(e){return g.reset(),"#"+(r=new t(g.toString("binary"),"binary").toString("utf-8"))}}function l(e,r,u,c){if((0,o.default)(u,"memo is required"),o.default.equal(void 0===u?"undefined":n(u),"string","memo"),!/^#/.test(u))return u;u=u.substring(1),(0,o.default)(e,"private_key is required"),(0,o.default)(r,"public_key is required"),p(),e=d(e),r=v(r);var l=new i.default(i.default.DEFAULT_CAPACITY,i.default.LITTLE_ENDIAN);l.writeVString(u),u=new t(l.copy(0,l.offset).toBinary(),"binary");var h=s.Aes.encrypt(e,r,u,c),_=h.nonce,y=h.message,g=h.checksum;return u=f.fromObject({from:e.toPublicKey(),to:r,nonce:_,check:g,encrypted:y}),u=f.toBuffer(u),"#"+a.default.encode(new t(u,"binary"))}var h=void 0;function p(){if(void 0===h){var t=void 0;h=!0;try{var e="5JdeC9P7Pbd1uGdFVEsJ41EkEnADbbHGq6p1BwFxm6txNBsQnsw";t=c(e,l(e,"VIZ8m5UgaFAAYQRuaNejYdS8FVLVp9Ss3K1qAVk5de6F8s3HnVbvA","#memo爱"))}catch(t){console.error(t)}finally{h="#memo爱"===t}}if(!1===h)throw new Error("This environment does not support encryption.")}var d=function(t){return t?t.d?t:s.PrivateKey.fromWif(t):t},v=function(t){return t?t.Q?t:s.PublicKey.fromString(t):t}}).call(e,r(177).Buffer)},function(t,e,r){"use strict";t.exports={Serializer:r(281),fp:r(280),types:r(275),ops:r(274),template:r(302),number_utils:r(276)}},function(t,e){"use strict";t.exports=function(t){var e=t.toObject(void 0,{use_default:!0,annotate:!0});console.error(JSON.stringify(e,null,4)),e=t.toObject(void 0,{use_default:!0,annotate:!1}),console.error(JSON.stringify(e))}}]));
|