-
Notifications
You must be signed in to change notification settings - Fork 1
/
590.bd3163cb1efada87d37d.js
2 lines (2 loc) · 275 KB
/
590.bd3163cb1efada87d37d.js
1
2
/*! For license information please see 590.bd3163cb1efada87d37d.js.LICENSE.txt */
(this.webpackChunkBitShares2_light=this.webpackChunkBitShares2_light||[]).push([[590],{69719:(e,t,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=d(r(17187)),a=d(r(96624)),s=d(r(60457)),u=d(r(24275)),c=d(r(10667)),l=r(16394),f=r(64528),h=r(6631),p=r(38650),_=r(56678);function d(e){return e&&e.__esModule?e:{default:e}}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var g=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};m(this,t);var r=v(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r._setTransport(e),r._setLogger(e),r.options=e,r.seqNo=0,r.error_count=0,r.api_index=0,r.error_threshold=3,r.alternative_api_endpoints=["https://api.hive.blog","https://anyx.io"],u.default.forEach((function(e){var t=e.method_name||(0,f.camelCase)(e.method),n=e.params||[];r[t+"With"]=function(t,i){for(var o={},a=0;a<n.length;a++)o[n[a]]=t[n[a]];return r.send(e.api,{method:e.method,paramsCondenserApi:n.map((function(e){return t[e]})),params:o},i)},r[t]=function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];"getAccountHistory"===t&&i.length<5&&n.length>4&&(n.pop(),n.pop());var a=n.reduce((function(e,t,r){return e[t]=i[r],e}),{}),s=i[n.length];return r[t+"With"](a,s)},r[t+"WithAsync"]=a.default.promisify(r[t+"With"]),r[t+"Async"]=a.default.promisify(r[t])})),r.callAsync=a.default.promisify(r.call),r.signedCallAsync=a.default.promisify(r.signedCall),r.notifyError=r.notifyError.bind(r),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),i(t,[{key:"_setTransport",value:function(e){if(e.url&&e.url.match("^((http|https)?://)"))e.uri=e.url,e.transport="http",this._transportType=e.transport,this.options=e,this.transport=new c.default.http(e);else if(e.url&&e.url.match("^((ws|wss)?://)"))e.websocket=e.url,e.transport="ws",this._transportType=e.transport,this.options=e,this.transport=new c.default.ws(e);else if(e.transport)if(this.transport&&this._transportType!==e.transport&&this.transport.stop(),this._transportType=e.transport,"string"==typeof e.transport){if(!c.default[e.transport])throw new TypeError("Invalid `transport`, valid values are `http`, `ws` or a class");this.transport=new c.default[e.transport](e)}else this.transport=new e.transport(e);else this.transport=new c.default.ws(e)}},{key:"_setLogger",value:function(e){if(e.hasOwnProperty("logger"))switch(n(e.logger)){case"function":this.__logger={log:e.logger};break;case"object":if("function"!=typeof e.logger.log)throw new Error("setOptions({logger:{}}) must have a property .log of type function");this.__logger=e.logger;break;case"undefined":if(this.__logger)break;default:this.__logger=!1}}},{key:"log",value:function(e){if(this.__logger)if(arguments.length>1&&"function"==typeof this.__logger[e]){var t=Array.prototype.slice.call(arguments,1);this.__logger[e].apply(this.__logger,t)}else this.__logger.log.apply(this.__logger,arguments)}},{key:"start",value:function(){return this.transport.start()}},{key:"stop",value:function(){return this.transport.stop()}},{key:"send",value:function(e,t,r){var n=r;if(this.__logger){var i=Math.random(),o=this;this.log("xmit:"+i+":",t),n=function(e,t){e?o.log("error","rsp:"+i+":\n\n",e,t):o.log("rsp:"+i+":",t),r&&r.apply(o,arguments)}}return this.transport.send(e,t,n)}},{key:"call",value:function(e,t,r){var n=this;if("http"===this._transportType){var i=++this.seqNo;(0,l.jsonRpc)(this.options.uri,{method:e,params:t,id:i}).then((function(e){r(null,e)}),(function(e){n.notifyError(e,e instanceof l.RPCError),r(e)}))}else r(new Error("RPC methods can only be called when using http transport"))}},{key:"signedCall",value:function(e,t,r,n,i){var o=this;if("http"===this._transportType){var a=++this.seqNo,s=void 0;try{s=(0,_.sign)({method:e,params:t,id:a},r,[n])}catch(e){return void i(e)}(0,l.jsonRpc)(this.options.uri,s).then((function(e){i(null,e)}),(function(e){i(e),o.notifyError(e)}))}else i(new Error("RPC methods can only be called when using http transport"))}},{key:"setOptions",value:function(e){if(Object.assign(this.options,e),e.hasOwnProperty("useAppbaseApi")&&s.default.set("useAppbaseApi",e.useAppbaseApi),e.hasOwnProperty("failover_threshold")&&(this.failover_threshold=e.failover_threshold),e.hasOwnProperty("alternative_api_endpoints")&&(this.alternative_api_endpoints=e.alternative_api_endpoints),this._setLogger(e),this._setTransport(e),this.transport.setOptions(e),e.hasOwnProperty("useTestNet")&&s.default.set("address_prefix",e.useTestNet?"TST":"STM"),e.hasOwnProperty("url")){for(var t=0,r=0;r<this.alternative_api_endpoints.length;r++)if(this.alternative_api_endpoints[r]===e.url){t=r;break}this.api_index=t,this.alternative_api_endpoints[this.api_index]}}},{key:"setWebSocket",value:function(e){this.setOptions({websocket:e})}},{key:"setUri",value:function(e){this.setOptions({uri:e})}},{key:"streamBlockNumber",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",t=this,r=arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;"function"==typeof e&&(r=e,e="head");var i="",o=!0,s=function s(){o&&t.getDynamicGlobalPropertiesAsync().then((function(t){var o="irreversible"===e?t.last_irreversible_block_num:t.head_block_number;if(o!==i)if(i)for(var u=i;u<o;u++)u!==i&&r(null,u),i=u;else i=o,r(null,o);a.default.delay(n).then((function(){s()}))}),(function(e){r(e)}))};return s(),function(){o=!1}}},{key:"streamBlock",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",r=arguments[1];"function"==typeof t&&(r=t,t="head");var n="",i="",o=this.streamBlockNumber(t,(function(t,a){if(t)return o(),void r(t);(n=a)!==i&&(i=n,e.getBlock(n,r))}));return o}},{key:"streamTransactions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",t=arguments[1];"function"==typeof e&&(t=e,e="head");var r=this.streamBlock(e,(function(e,n){if(e)return r(),void t(e);n&&n.transactions&&n.transactions.forEach((function(e){t(null,e)}))}));return r}},{key:"streamOperations",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"head",t=arguments[1];"function"==typeof e&&(t=e,e="head");var r=this.streamTransactions(e,(function(e,n){if(e)return r(),void t(e);n.operations.forEach((function(e){t(null,e)}))}));return r}},{key:"broadcastTransactionSynchronousWith",value:function(e,t){var r=e.trx;return this.send("network_broadcast_api",{method:"broadcast_transaction_synchronous",params:[r]},(function(e,n){if(e){var i=p.ops.signed_transaction,o=i.toObject(r),a=i.toBuffer(r);e.digest=h.hash.sha256(a).toString("hex"),e.transaction_id=a.toString("hex"),e.transaction=JSON.stringify(o),t(e,"")}else t("",n)}))}},{key:"notifyError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t&&void 0!==this.failover_threshold&&void 0!==this.alternative_api_endpoints&&(!e||!e.toString().includes("overseer"))&&(this.error_count++,this.error_count>=this.failover_threshold)){this.options.url,this.error_count=0,this.api_index++,this.api_index>=this.alternative_api_endpoints.length&&(this.api_index=0);var r=this.alternative_api_endpoints[this.api_index];this.setOptions({url:r})}}}]),t}(o.default),y=new g(s.default);(e.exports=y).Hive=g},24275:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{api:"condenser_api",method:"get_trending_tags",params:["tag","limit"]},{api:"condenser_api",method:"get_tags_used_by_author",params:["account"]},{api:"condenser_api",method:"get_post_discussions_by_payout",params:["query"]},{api:"condenser_api",method:"get_comment_discussions_by_payout",params:["query"]},{api:"condenser_api",method:"get_discussions_by_trending",params:["query"]},{api:"condenser_api",method:"get_discussions_by_created",params:["query"]},{api:"condenser_api",method:"get_discussions_by_active",params:["query"]},{api:"condenser_api",method:"get_discussions_by_cashout",params:["query"]},{api:"condenser_api",method:"get_discussions_by_votes",params:["query"]},{api:"condenser_api",method:"get_discussions_by_children",params:["query"]},{api:"condenser_api",method:"get_discussions_by_hot",params:["query"]},{api:"condenser_api",method:"get_discussions_by_feed",params:["query"]},{api:"condenser_api",method:"get_discussions_by_blog",params:["query"]},{api:"condenser_api",method:"get_discussions_by_comments",params:["query"]},{api:"condenser_api",method:"get_discussions_by_promoted",params:["query"]},{api:"condenser_api",method:"get_block_header",params:["block_num"]},{api:"block_api",method:"get_block",params:["block_num"]},{api:"account_history_api",method:"get_ops_in_block",params:["block_num","only_virtual"]},{api:"condenser_api",method:"get_state",params:["path"]},{api:"database_api",method:"get_config"},{api:"database_api",method:"get_dynamic_global_properties"},{api:"condenser_api",method:"get_chain_properties"},{api:"database_api",method:"get_feed_history"},{api:"condenser_api",method:"get_current_median_history_price"},{api:"database_api",method:"get_witness_schedule"},{api:"condenser_api",method:"get_hardfork_version"},{api:"condenser_api",method:"get_next_scheduled_hardfork"},{api:"account_by_key_api",method:"get_key_references",params:["keys"]},{api:"condenser_api",method:"get_accounts",params:["names"]},{api:"condenser_api",method:"get_account_references",params:["accountId"]},{api:"condenser_api",method:"lookup_account_names",params:["accounts"]},{api:"condenser_api",method:"lookup_accounts",params:["lower_bound_name","limit"]},{api:"condenser_api",method:"get_account_count"},{api:"condenser_api",method:"get_conversion_requests",params:["accountName"]},{api:"account_history_api",method:"get_account_history",params:["account","from","limit","operation_filter_low","operation_filter_high"]},{api:"condenser_api",method:"get_owner_history",params:["account"]},{api:"condenser_api",method:"get_recovery_request",params:["account"]},{api:"condenser_api",method:"get_escrow",params:["from","escrow_id"]},{api:"condenser_api",method:"get_withdraw_routes",params:["account","withdraw_route_type"]},{api:"condenser_api",method:"get_savings_withdraw_from",params:["account"]},{api:"condenser_api",method:"get_savings_withdraw_to",params:["account"]},{api:"condenser_api",method:"get_order_book",params:["limit"]},{api:"condenser_api",method:"get_open_orders",params:["owner"]},{api:"database_api",method:"get_transaction_hex",params:["trx"]},{api:"condenser_api",method:"get_transaction",params:["trx_id"]},{api:"database_api",method:"get_required_signatures",params:["trx","available_keys"]},{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:["account","signers"]},{api:"condenser_api",method:"get_active_votes",params:["author","permlink"]},{api:"database_api",method:"list_votes",params:["voter"]},{api:"condenser_api",method:"get_content",params:["author","permlink"]},{api:"condenser_api",method:"get_content_replies",params:["author","permlink"]},{api:"condenser_api",method:"get_discussions_by_author_before_date",params:["author","start_permlink","before_date","limit"]},{api:"condenser_api",method:"get_replies_by_last_update",params:["start_author","start_permlink","limit"]},{api:"condenser_api",method:"get_witnesses",params:["witnessIds"]},{api:"condenser_api",method:"get_witness_by_account",params:["account"]},{api:"condenser_api",method:"get_witnesses_by_vote",params:["from","limit"]},{api:"condenser_api",method:"lookup_witness_accounts",params:["lower_bound_name","limit"]},{api:"condenser_api",method:"get_witness_count"},{api:"database_api",method:"get_active_witnesses"},{api:"condenser_api",method:"get_reward_fund",params:["name"]},{api:"database_api",method:"get_reward_funds"},{api:"condenser_api",method:"get_vesting_delegations",params:["account","from","limit"]},{api:"database_api",method:"get_version"},{api:"condenser_api",method:"get_followers",params:["account","start","type","limit"]},{api:"condenser_api",method:"get_following",params:["account","start","type","limit"]},{api:"condenser_api",method:"get_follow_count",params:["account"]},{api:"condenser_api",method:"get_feed_entries",params:["account","start_entry_id","limit"]},{api:"condenser_api",method:"get_feed",params:["account","start_entry_id","limit"]},{api:"condenser_api",method:"get_blog_entries",params:["account","start_entry_id","limit"]},{api:"condenser_api",method:"get_blog",params:["account","start_entry_id","limit"]},{api:"condenser_api",method:"get_account_reputations",params:["lower_bound_name","limit"]},{api:"condenser_api",method:"get_reblogged_by",params:["author","permlink"]},{api:"condenser_api",method:"get_blog_authors",params:["account"]},{api:"condenser_api",method:"broadcast_transaction",params:["trx"]},{api:"condenser_api",method:"broadcast_transaction_synchronous",params:["trx"]},{api:"network_broadcast_api",method:"broadcast_block",params:["block"]},{api:"transaction_status_api",method:"find_transaction",params:["transaction_id","expiration"]},{api:"market_history_api",method:"get_ticker",params:[]},{api:"market_history_api",method:"get_volume",params:[]},{api:"market_history_api",method:"get_order_book",method_name:"getMarketOrderBook",params:["limit"]},{api:"market_history_api",method:"get_trade_history",params:["start","end","limit"]},{api:"market_history_api",method:"get_recent_trades",params:["limit"]},{api:"market_history_api",method:"get_market_history",params:["bucket_seconds","start","end"]},{api:"market_history_api",method:"get_market_history_buckets"},{api:"database_api",method:"find_proposals",params:["proposal_ids"]},{api:"database_api",method:"list_proposals",params:["start","limit","order","order_direction","status"]},{api:"database_api",method:"list_proposal_votes",params:["start","limit","order","order_direction","status"]},{api:"database_api",method:"get_nai_pool"},{api:"rc_api",method:"find_rc_accounts",params:["accounts"]},{api:"rc_api",method:"list_rc_accounts",params:["start","limit"]},{api:"rc_api",method:"list_rc_direct_delegations",params:["start","limit"]},{api:"rc_api",method:"get_resource_params"},{api:"rc_api",method:"get_resource_pool"}]},41116:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=o(r(96624));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,t);var r=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.options=e,r.id=0,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"setOptions",value:function(e){Object.assign(this.options,e),this.stop()}},{key:"listenTo",value:function(e,t,r){return e.addEventListener?e.addEventListener(t,r):e.on(t,r),function(){e.removeEventListener?e.removeEventListener(t,r):e.removeListener(t,r)}}},{key:"send",value:function(){}},{key:"start",value:function(){}},{key:"stop",value:function(){}}]),t}(o(r(17187)).default);t.default=u,i.default.promisifyAll(u.prototype)},16394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RPCError=void 0;var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();t.jsonRpc=d;var i=c(r(74077)),o=c(r(9510)),a=c(r(99353)),s=c(r(41116)),u=c(r(60457));function c(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var p=(0,o.default)("steem:http"),_=t.RPCError=function(e){function t(e){l(this,t);var r=f(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e.message));return r.name="RPCError",r.code=e.code,r.data=e.data,r}return h(t,Error),t}();function d(e,t){var r=t.method,n=t.id,o=t.params,a=t.fetchMethod,s=void 0===a?i.default:a,u={id:n,jsonrpc:"2.0",method:r,params:o};return s(e,{body:JSON.stringify(u),method:"post",mode:"cors",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json"}}).then((function(e){if(!e.ok)throw new Error("HTTP "+e.status+": "+e.statusText);return e.json()})).then((function(e){if(e.id!==n)throw new Error("Invalid response id: "+e.id);if(e.error){if(-32602===e.error.code)return'{"id":'+e.id+', "result":[], "jsonrpc":"2.0"}';throw new _(e.error)}return e.result}))}var m=function(e){function t(){return l(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h(t,e),n(t,[{key:"send",value:function(e,t,r){var n=this,i=t.params;(u.default.get("useAppbaseApi")||this.options.useAppbaseApi)&&"transaction_status_api"!==e&&(e="condenser_api"),"condenser_api"===e&&(i=t.paramsCondenserApi),p("Steem::send",e,t);var o=t.id||this.id++,a=e+"."+t.method,s=this.retriable(e,t),c=this.options.fetchMethod;s?s.attempt((function(e){d(n.options.uri,{method:a,id:o,params:i,fetchMethod:c}).then((function(e){r(null,e)}),(function(e){s.retry(e)||r(s.mainError())}))})):d(this.options.uri,{method:a,id:o,params:i,fetchMethod:c}).then((function(e){r(null,e)}),(function(e){r(e)}))}},{key:"retriable",value:function(e,t){return this.nonRetriableOperations.some((function(e){return e===t.method}))?null:Object(this.options.retry)===this.options.retry?a.default.operation(this.options.retry):this.options.retry?a.default.operation():null}},{key:"nonRetriableOperations",get:function(){return this.options.nonRetriableOperations||["broadcast_transaction","broadcast_transaction_with_callback","broadcast_transaction_synchronous","broadcast_block","get_account_history"]}}]),t}(s.default);t.default=m},10667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(r(16394)),i=o(r(79909));function o(e){return e&&e.__esModule?e:{default:e}}t.default={http:n.default,ws:i.default}},79909:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=u(r(96624)),o=u(r(48590)),a=u(r(9510)),s=u(r(41116));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=void 0;if(o.default)f=r(75301);else{if("undefined"==typeof window)throw new Error("Couldn't decide on a `WebSocket` class");f=window.WebSocket}var h=(0,a.default)("steem:ws"),p=function(e){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,t);var r=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,Object.assign({id:0},e)));return r._requests=new Map,r.inFlight=0,r.isOpen=!1,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"start",value:function(){var e=this;return this.startPromise||(this.startPromise=new i.default((function(t,r){e.ws=new f(e.options.websocket),e.ws.onerror=function(t){e.startPromise=null,r(t)},e.ws.onopen=function(){e.isOpen=!0,e.ws.onerror=e.onError.bind(e),e.ws.onmessage=e.onMessage.bind(e),e.ws.onclose=e.onClose.bind(e),t()}}))),this.startPromise}},{key:"stop",value:function(){h("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(e,t,r){var n=this;return h("Steem::send",e,t),this.start().then((function(){var o={};new i.default((function(e,t){o.resolve=function(t){e(t),r(null,t)},o.reject=function(e){t(e),r(e)}})),n.options.useAppbaseApi&&(e="condenser_api");var a={deferral:o,startedAt:Date.now(),message:{id:t.id||n.id++,method:"call",jsonrpc:"2.0",params:[e,t.method,t.params]}};return n.inFlight++,n._requests.set(a.message.id,a),n.ws.send(JSON.stringify(a.message)),o}))}},{key:"onError",value:function(e){var t=!0,r=!1,n=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(t=(i=o.next()).done);t=!0)i.value.deferral.reject(e)}catch(e){r=!0,n=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw n}}this.stop()}},{key:"onClose",value:function(){var e=new Error("Connection was closed"),t=!0,r=!1,n=void 0;try{for(var i,o=this._requests[Symbol.iterator]();!(t=(i=o.next()).done);t=!0)i.value.deferral.reject(e)}catch(e){r=!0,n=e}finally{try{!t&&o.return&&o.return()}finally{if(r)throw n}}this._requests.clear()}},{key:"onMessage",value:function(e){var t=JSON.parse(e.data);if(h("-- Steem.onMessage --\x3e",t.id),!this._requests.has(t.id))throw new Error("Panic: no request in queue for message id "+t.id);var r=this._requests.get(t.id);this._requests.delete(t.id);var n=t.error;if(n){var i=new Error((n.message||"Failed to complete operation")+" (see err.payload for the full error payload)");i.payload=t,r.deferral.reject(i)}else this.emit("track-performance",r.message.method,Date.now()-r.startedAt),r.deferral.resolve(t.result)}}]),t}(s.default);t.default=p},6631:(e,t,r)=>{"use strict";e.exports={Address:r(75431),Aes:r(84115),PrivateKey:r(49060),PublicKey:r(91110),Signature:r(45519),brainKey:r(94892),key_utils:r(30089),hash:r(80797),ecc_config:r(60457)}},75431:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(48583),a=r(60457),s=r(80797),u=r(77191),c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.addy=t}return i(e,[{key:"toBuffer",value:function(){return this.addy}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.get("address_prefix"),t=s.ripemd160(this.addy),r=n.concat([this.addy,t.slice(0,4)]);return e+u.encode(r)}}],[{key:"fromBuffer",value:function(t){var r=s.sha512(t);return new e(s.ripemd160(r))}},{key:"fromString",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.get("address_prefix"),i=t.slice(0,r.length);o.equal(r,i,"Expecting key to begin with "+r+", instead got "+i);var c=t.slice(r.length),l=(c=new n(u.decode(c),"binary")).slice(-4);c=c.slice(0,-4);var f=s.ripemd160(c);return f=f.slice(0,4),o.deepEqual(l,f,"Checksum did not match"),new e(c)}},{key:"fromPublic",value:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:56,o=s.sha256(t.toBuffer(r)),a=s.ripemd160(o),u=new n(1);u.writeUInt8(255&i,0);var c=n.concat([u,a]),l=s.sha256(c);l=s.sha256(l);var f=n.concat([c,l.slice(0,4)]);return new e(s.ripemd160(f))}}]),e}();e.exports=c},84115:(e,t,r)=>{"use strict";var n=r(48764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.encrypt=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_();return p(e,t,n,r)},t.decrypt=function(e,t,r,n,i){return p(e,t,r,n,i).message};var i=f(r(80064)),o=f(r(34779)),a=f(r(44696)),s=f(r(48583)),u=f(r(91110)),c=f(r(49060)),l=f(r(80797));function f(e){return e&&e.__esModule?e:{default:e}}var h=o.default.Long;function p(e,t,r,i,u){if(!(e=m(e)))throw new TypeError("private_key is required");if(!(t=v(t)))throw new TypeError("public_key is required");if(!(r=g(r)))throw new TypeError("nonce is required");if(!n.isBuffer(i)){if("string"!=typeof i)throw new TypeError("message should be buffer or string");i=new n(i,"binary")}if(u&&"number"!=typeof u)throw new TypeError("checksum should be a number");var c=e.get_shared_secret(t),f=new o.default(o.default.DEFAULT_CAPACITY,o.default.LITTLE_ENDIAN);f.writeUint64(r),f.append(c.toString("binary"),"binary"),f=new n(f.copy(0,f.offset).toBinary(),"binary");var h=l.default.sha512(f),p=h.slice(32,48),_=h.slice(0,32),d=l.default.sha256(h);d=d.slice(0,4);var b=o.default.fromBinary(d.toString("binary"),o.default.DEFAULT_CAPACITY,o.default.LITTLE_ENDIAN);if(d=b.readUint32(),u){if(d!==u)throw new Error("Invalid key");i=function(e,t,r){(0,s.default)(e,"Missing cipher text"),e=y(e);var i=a.default.createDecipheriv("aes-256-cbc",t,r);return e=n.concat([i.update(e),i.final()])}(i,_,p)}else i=function(e,t,r){(0,s.default)(e,"Missing plain text"),e=y(e);var i=a.default.createCipheriv("aes-256-cbc",t,r);return e=n.concat([i.update(e),i.final()])}(i,_,p);return{nonce:r,message:i,checksum:d}}function _(){if(null===d){var e=i.default.randomUint8Array(2);d=parseInt(e[0]<<8|e[1],10)}var t=h.fromNumber(Date.now()),r=++d%65535;return(t=t.shiftLeft(16).or(h.fromNumber(r))).toString()}var d=null,m=function(e){return e?e.d?e:c.default.fromWif(e):e},v=function(e){return e?e.Q?e:u.default.fromString(e):e},g=function(e){return e?h.isLong(e)?e:h.fromString(e):e},y=function(e){return e?n.isBuffer(e)?e:new n(e,"binary"):e}},94892:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.normalize=function(e){if("string"!=typeof e)throw new Error("string required for brain_key");return(e=e.trim()).split(/[\t\n\v\f\r ]+/).join(" ")}},15912:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i=r(48583),o=r(80797),a=r(44834),s=r(65109),u=r(32286);function c(e,t,r,u,c){a("Buffer",t),a(s,r),c&&(t=o.sha256(n.concat([t,new n(c)]))),i.equal(t.length,32,"Hash must be 256 bit");var l=r.toBuffer(32),f=new n(32),h=new n(32);h.fill(1),f.fill(0),f=o.HmacSHA256(n.concat([h,new n([0]),l,t]),f),h=o.HmacSHA256(h,f),f=o.HmacSHA256(n.concat([h,new n([1]),l,t]),f),h=o.HmacSHA256(h,f),h=o.HmacSHA256(h,f);for(var p=s.fromBuffer(h);p.signum()<=0||p.compareTo(e.n)>=0||!u(p);)f=o.HmacSHA256(n.concat([h,new n([0])]),f),h=o.HmacSHA256(h,f),h=o.HmacSHA256(h,f),p=s.fromBuffer(h);return p}function l(e,t,r,n){var i=e.n,o=e.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),c=t.multiply(u).mod(i),l=a.multiply(u).mod(i),f=o.multiplyTwo(c,n,l);return!e.isInfinity(f)&&f.affineX.mod(i).equals(a)}function f(e,t,r,n){i.strictEqual(3&n,n,"Recovery param is more than two bits");var o=e.n,a=e.G,s=r.r,u=r.s;i(s.signum()>0&&s.compareTo(o)<0,"Invalid r value"),i(u.signum()>0&&u.compareTo(o)<0,"Invalid s value");var c=1&n,l=n>>1?s.add(o):s,f=e.pointFromX(c,l),h=f.multiply(o);i(e.isInfinity(h),"nR is not a valid curve point");var p=t.negate().mod(o),_=s.modInverse(o),d=f.multiplyTwo(u,a,p).multiply(_);return e.validate(d),d}e.exports={calcPubKeyRecoveryParam:function(e,t,r,n){for(var i=0;i<4;i++)if(f(e,t,r,i).equals(n))return i;throw new Error("Unable to find valid recovery factor")},deterministicGenerateK:c,recoverPubKey:f,sign:function(e,t,r,n){var i,o,a=s.fromBuffer(t),l=e.n,f=e.G,h=(c(e,t,r,(function(t){var n=f.multiply(t);return!e.isInfinity(n)&&0!==(i=n.affineX.mod(l)).signum()&&0!==(o=t.modInverse(l).multiply(a.add(r.multiply(i))).mod(l)).signum()}),n),l.shiftRight(1));return o.compareTo(h)>0&&(o=l.subtract(o)),new u(i,o)},verify:function(e,t,r,n){return l(e,s.fromBuffer(t),r,n)},verifyRaw:l}},32286:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i=r(48583),o=r(44834),a=r(65109);function s(e,t){o(a,e),o(a,t),this.r=e,this.s=t}s.parseCompact=function(e){i.equal(e.length,65,"Invalid signature length");var t=e.readUInt8(0)-27;return i.equal(t,7&t,"Invalid signature parameter"),{compressed:!!(4&t),i:t&=3,signature:new s(a.fromBuffer(e.slice(1,33)),a.fromBuffer(e.slice(33)))}},s.fromDER=function(e){i.equal(e.readUInt8(0),48,"Not a DER sequence"),i.equal(e.readUInt8(1),e.length-2,"Invalid sequence length"),i.equal(e.readUInt8(2),2,"Expected a DER integer");var t=e.readUInt8(3);i(t>0,"R length is zero");var r=4+t;i.equal(e.readUInt8(r),2,"Expected a DER integer (2)");var n=e.readUInt8(r+1);i(n>0,"S length is zero");var o=e.slice(4,r),u=e.slice(r+2);r+=2+n,t>1&&0===o.readUInt8(0)&&i(128&o.readUInt8(1),"R value excessively padded"),n>1&&0===u.readUInt8(0)&&i(128&u.readUInt8(1),"S value excessively padded"),i.equal(r,e.length,"Invalid DER encoding");var c=a.fromDERInteger(o),l=a.fromDERInteger(u);return i(c.signum()>=0,"R value is negative"),i(l.signum()>=0,"S value is negative"),new s(c,l)},s.parseScriptSignature=function(e){var t=e.readUInt8(e.length-1),r=-129&t;return i(r>0&&r<4,"Invalid hashType"),{signature:s.fromDER(e.slice(0,-1)),hashType:t}},s.prototype.toCompact=function(e,t){t&&(e+=4),e+=27;var r=new n(65);return r.writeUInt8(e,0),this.r.toBuffer(32).copy(r,1),this.s.toBuffer(32).copy(r,33),r},s.prototype.toDER=function(){var e=this.r.toDERInteger(),t=this.s.toDERInteger(),r=[];return r.push(2,e.length),(r=r.concat(e)).push(2,t.length),(r=r.concat(t)).unshift(48,r.length),new n(r)},s.prototype.toScriptSignature=function(e){var t=new n(1);return t.writeUInt8(e,0),n.concat([this.toDER(),t])},e.exports=s},44834:(e,t,r)=>{"use strict";var n=r(48764).Buffer;function i(e){var t=e.toString().match(/function (.*?)\(/);return t?t[1]:null}e.exports=function(e,t){switch(e){case"Array":if(Array.isArray(t))return;break;case"Boolean":if("boolean"==typeof t)return;break;case"Buffer":if(n.isBuffer(t))return;break;case"Number":if("number"==typeof t)return;break;case"String":if("string"==typeof t)return;break;default:if(i(t.constructor)===i(e))return}throw new TypeError("Expected "+(i(e)||e)+", got "+t)}},80797:(e,t,r)=>{"use strict";var n=a(r(23482)),i=a(r(58355)),o=a(r(79785));function a(e){return e&&e.__esModule?e:{default:e}}e.exports={sha1:function(e,t){return(0,n.default)("sha1").update(e).digest(t)},sha256:function(e,t){return(0,n.default)("sha256").update(e).digest(t)},sha512:function(e,t){return(0,n.default)("sha512").update(e).digest(t)},HmacSHA256:function(e,t){return(0,i.default)("sha256",t).update(e).digest()},ripemd160:function(e){return(new o.default).update(e).digest()}}},49060:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(46997),a=o.Point,s=o.getCurveByName("secp256k1"),u=r(65109),c=r(77191),l=r(48583),f=r(80797),h=r(91110),p=(s.G,s.n),_=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.d=t}return i(e,[{key:"toWif",value:function(){var e=this.toBuffer();e=n.concat([new n([128]),e]);var t=f.sha256(e);t=(t=f.sha256(t)).slice(0,4);var r=n.concat([e,t]);return c.encode(r)}},{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=h.fromPoint(this.toPublicKeyPoint())}},{key:"toBuffer",value:function(){return this.d.toBuffer(32)}},{key:"get_shared_secret",value:function(e){var t=(e=d(e)).toUncompressed().toBuffer(),r=a.fromAffine(s,u.fromBuffer(t.slice(1,33)),u.fromBuffer(t.slice(33,65))),n=this.toBuffer(),i=r.multiply(u.fromBuffer(n)).affineX.toBuffer({size:32});return f.sha512(i)}},{key:"child",value:function(t){t=n.concat([this.toPublicKey().toBuffer(),t]),t=f.sha256(t);var r=u.fromBuffer(t);if(r.compareTo(p)>=0)throw new Error("Child offset went out of bounds, try again");var i=this.d.add(r);if(0===i.signum())throw new Error("Child offset derived to an invalid key, try again");return new e(i)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"toPublicKey",value:function(){return this.toPublic()}}],[{key:"fromBuffer",value:function(t){if(!n.isBuffer(t))throw new Error("Expecting paramter to be a Buffer type");if(32!==t.length&&console.log("WARN: Expecting 32 bytes, instead got "+t.length+", stack trace:",(new Error).stack),0===t.length)throw new Error("Empty buffer");return new e(u.fromBuffer(t))}},{key:"fromSeed",value:function(t){if("string"!=typeof t)throw new Error("seed must be of type string");return e.fromBuffer(f.sha256(t))}},{key:"isWif",value:function(e){try{return this.fromWif(e),!0}catch(e){return!1}}},{key:"fromWif",value:function(t){var r=new n(c.decode(t)),i=r.readUInt8(0);l.equal(128,i,"Expected version 128, instead got "+i);var o=r.slice(0,-4),a=r.slice(-4),s=f.sha256(o);if(s=(s=f.sha256(s)).slice(0,4),a.toString()!==s.toString())throw new Error("Invalid WIF key (checksum miss-match)");return o=o.slice(1),e.fromBuffer(o)}},{key:"fromHex",value:function(t){return e.fromBuffer(new n(t,"hex"))}}]),e}();e.exports=_;var d=function(e){return null==e||e.Q?e:h.fromStringOrThrow(e)}},91110:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(65109),a=r(46997),s=a.getCurveByName("secp256k1");o=r(65109);var u=r(77191),c=r(80797),l=r(60457),f=r(48583),h=s.G,p=s.n,_=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.Q=t}return i(e,[{key:"toBuffer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.Q?this.Q.compressed:null;return null===this.Q?n.from("000000000000000000000000000000000000000000000000000000000000000000","hex"):this.Q.getEncoded(e)}},{key:"toUncompressed",value:function(){var t=this.Q.getEncoded(!1),r=a.Point.decodeFrom(s,t);return e.fromPoint(r)}},{key:"toBlockchainAddress",value:function(){var e=this.toBuffer(),t=c.sha512(e);return c.ripemd160(t)}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.get("address_prefix");return this.toPublicKeyString(e)}},{key:"toPublicKeyString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.get("address_prefix");if(this.pubdata)return e+this.pubdata;var t=this.toBuffer(),r=c.ripemd160(t),i=n.concat([t,r.slice(0,4)]);return this.pubdata=u.encode(i),e+this.pubdata}},{key:"toAddressString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l.get("address_prefix"),t=this.toBuffer(),r=c.sha512(t),i=c.ripemd160(r),o=c.ripemd160(i);return i=n.concat([i,o.slice(0,4)]),e+u.encode(i)}},{key:"toPtsAddy",value:function(){var e=this.toBuffer(),t=c.sha256(e),r=c.ripemd160(t);r=n.concat([new n([56]),r]);var i=c.sha256(r);return i=c.sha256(i),r=n.concat([r,i.slice(0,4)]),u.encode(r)}},{key:"child",value:function(t){f(n.isBuffer(t),"Buffer required: offset"),f.equal(t.length,32,"offset length"),t=n.concat([this.toBuffer(),t]),t=c.sha256(t);var r=o.fromBuffer(t);if(r.compareTo(p)>=0)throw new Error("Child offset went out of bounds, try again");var i=h.multiply(r),a=this.Q.add(i);if(s.isInfinity(a))throw new Error("Child offset derived to an invalid key, try again");return e.fromPoint(a)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}}],[{key:"fromBinary",value:function(t){return e.fromBuffer(new n(t,"binary"))}},{key:"fromBuffer",value:function(t){return"000000000000000000000000000000000000000000000000000000000000000000"===t.toString("hex")?new e(null):new e(a.Point.decodeFrom(s,t))}},{key:"fromPoint",value:function(t){return new e(t)}},{key:"fromString",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.get("address_prefix");try{return e.fromStringOrThrow(t,r)}catch(e){return null}}},{key:"fromStringOrThrow",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l.get("address_prefix"),i=t.slice(0,r.length);f.equal(r,i,"Expecting key to begin with "+r+", instead got "+i),t=t.slice(r.length);var o=(t=new n(u.decode(t),"binary")).slice(-4);t=t.slice(0,-4);var a=c.ripemd160(t);return a=a.slice(0,4),f.deepEqual(o,a,"Checksum did not match"),e.fromBuffer(t)}},{key:"fromHex",value:function(t){return e.fromBuffer(new n(t,"hex"))}},{key:"fromStringHex",value:function(t){return e.fromString(new n(t,"hex"))}}]),e}();e.exports=_},30089:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i=r(49060),o=r(80797),a=r(80064),s=0,u=0,c=a.randomBuffer(101);e.exports={addEntropy:function(){u++;for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=!0,i=!1,o=void 0;try{for(var a,l=t[Symbol.iterator]();!(n=(a=l.next()).done);n=!0){var f=a.value,h=s++%101,p=c[h]+=f;p>9007199254740991&&(c[h]=0)}}catch(e){i=!0,o=e}finally{try{!n&&l.return&&l.return()}finally{if(i)throw o}}},random32ByteBuffer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.browserEntropy();if("string"!=typeof e)throw new Error("string required for entropy");if(e.length<32)throw new Error("expecting at least 32 bytes of entropy");for(var t=Date.now();Date.now()-t<250;)e=o.sha256(e);var r=[];return r.push(e),r.push(a.randomBuffer(32)),o.sha256(n.concat(r))},get_random_key:function(e){return i.fromBuffer(this.random32ByteBuffer(e))},browserEntropy:function(){var e=Array(c).join();try{e+=(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 t,r=0;r<navigator.mimeTypes.length;r++)e+=(t=navigator.mimeTypes[r]).description+" "+t.type+" "+t.suffixes+" ";console.log("INFO\tbrowserEntropy gathered",u,"events")}catch(t){e+=o.sha256((new Date).toString())}return e+(new n(e).toString("binary")+" ")+(new Date).toString()}}},45519:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(15912),a=r(80797),s=r(46997).getCurveByName("secp256k1"),u=r(48583),c=r(65109),l=r(91110),f=r(49060),h=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.r=t,this.s=r,this.i=n,u.equal(null!=this.r,!0,"Missing parameter"),u.equal(null!=this.s,!0,"Missing parameter"),u.equal(null!=this.i,!0,"Missing parameter")}return i(e,[{key:"toBuffer",value:function(){var e;return(e=new n(65)).writeUInt8(this.i,0),this.r.toBuffer(32).copy(e,1),this.s.toBuffer(32).copy(e,33),e}},{key:"recoverPublicKeyFromBuffer",value:function(e){return this.recoverPublicKey(a.sha256(e))}},{key:"recoverPublicKey",value:function(e){var t,r,n=void 0;return r=c.fromBuffer(e),n=this.i,n-=27,n&=3,t=o.recoverPubKey(s,r,this,n),l.fromPoint(t)}},{key:"verifyBuffer",value:function(e,t){var r=a.sha256(e);return this.verifyHash(r,t)}},{key:"verifyHash",value:function(e,t){return u.equal(e.length,32,"A SHA 256 should be 32 bytes long, instead got "+e.length),o.verify(s,e,{r:this.r,s:this.s},t.Q)}},{key:"toHex",value:function(){return this.toBuffer().toString("hex")}},{key:"verifyHex",value:function(e,t){var r;return r=new n(e,"hex"),this.verifyBuffer(r,t)}}],[{key:"fromBuffer",value:function(t){var r;return u.equal(t.length,65,"Invalid signature length"),r=t.readUInt8(0),u.equal(r-27,r-27&7,"Invalid signature parameter"),new e(c.fromBuffer(t.slice(1,33)),c.fromBuffer(t.slice(33)),r)}},{key:"signBuffer",value:function(t,r){var n=a.sha256(t);return e.signBufferSha256(n,r)}},{key:"signBufferSha256",value:function(t,r){if(32!==t.length||!n.isBuffer(t))throw new Error("buf_sha256: 32 byte buffer requred");var i,a,l,f,h,_,d;for(r=p(r),u(r,"private_key required"),f=null,d=0,a=c.fromBuffer(t);;){if(_=(i=(l=o.sign(s,t,r.d,d++)).toDER())[5+(h=i[3])],32===h&&32===_){f=o.calcPubKeyRecoveryParam(s,a,l,r.toPublicKey().Q),f+=4,f+=27;break}d%10==0&&console.log("WARN: "+d+" attempts to find canonical signature")}return new e(l.r,l.s,f)}},{key:"sign",value:function(t,r){return e.signBuffer(new n(t),r)}},{key:"fromHex",value:function(t){return e.fromBuffer(new n(t,"hex"))}},{key:"signHex",value:function(t,r){var i;return i=new n(t,"hex"),e.signBuffer(i,r)}}]),e}(),p=function(e){return e?e.d?e:f.fromWif(e):e};e.exports=h},19879:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i=r(65109),o=r(77191),a=r(46997),s=a.Point,u=a.getCurveByName("secp256k1"),c=r(60457),l=r(68638),f=r(45519),h=r(49060),p=r(91110),_=r(80797),d={},m=l.transaction,v=l.signed_transaction;d.verify=function(e,t,r){var n=!1,i=[];for(var o in r)i.push(o);var a=this.generateKeys(e,t,i);return i.forEach((function(e){r[e][0][0]===a[e]&&(n=!0)})),n},d.generateKeys=function(e,t,r){var a={};return r.forEach((function(r){var l=(e+r+t).trim().split(/[\t\n\v\f\r ]+/).join(" "),f=_.sha256(l),h=i.fromBuffer(f),p=u.G.multiply(h),d=new s(p.curve,p.x,p.y,p.z).getEncoded(p.compressed),m=_.ripemd160(d),v=n.concat([d,m.slice(0,4)]);a[r]=c.get("address_prefix")+o.encode(v)})),a},d.getPrivateKeys=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["owner","active","posting","memo"],n={};return r.forEach(function(r){n[r]=this.toWif(e,t,r),n[r+"Pubkey"]=this.wifToPublic(n[r])}.bind(this)),n},d.isWif=function(e){var t=!1;try{var r=new n(o.decode(e)),i=r.slice(0,-4),a=r.slice(-4),s=_.sha256(i);s=(s=_.sha256(s)).slice(0,4),a.toString()==s.toString()&&(t=!0)}catch(e){}return t},d.toWif=function(e,t,r){var i=(e+r+t).trim().split(/[\t\n\v\f\r ]+/).join(" "),a=_.sha256(i),s=n.concat([new n([128]),a]),u=_.sha256(s);u=(u=_.sha256(u)).slice(0,4);var c=n.concat([s,u]);return o.encode(c)},d.wifIsValid=function(e,t){return this.wifToPublic(e)==t},d.wifToPublic=function(e){var t=h.fromWif(e);return t.toPublic().toString()},d.isPubkey=function(e,t){return null!=p.fromString(e,t)},d.signTransaction=function(e,t){var r=[];e.signatures&&(r=[].concat(e.signatures));var i=new n(c.get("chain_id"),"hex"),o=m.toBuffer(e);for(var a in t){var s=f.signBuffer(n.concat([i,o]),t[a]);r.push(s.toBuffer())}return v.toObject(Object.assign(e,{signatures:r}))},e.exports=d},76886:(e,t,r)=>{"use strict";var n=r(48764).Buffer;Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.decode=f,t.encode=h,t.getPubKeys=function(e){if((0,a.default)(e,"memo is required"),a.default.equal(void 0===e?"undefined":i(e),"string","memo"),!/^#/.test(e))return[];e=e.substring(1),_(),e=s.default.decode(e);var t=e=l.fromBuffer(new n(e,"binary")),r=t.from,o=t.to;return[r.toString(),o.toString()]};var o=c(r(34779)),a=c(r(48583)),s=c(r(77191)),u=r(6631);function c(e){return e&&e.__esModule?e:{default:e}}var l=r(38650).ops.encrypted_memo;function f(e,t){if((0,a.default)(t,"memo is required"),a.default.equal(void 0===t?"undefined":i(t),"string","memo"),!/^#/.test(t))return t;t=t.substring(1),(0,a.default)(e,"private_key is required"),_(),e=d(e),t=s.default.decode(t);var r=t=l.fromBuffer(new n(t,"binary")),c=r.from,f=r.to,h=r.nonce,p=r.check,m=r.encrypted,v=e.toPublicKey().toString()===c.toString()?f.toString():c.toString();t=u.Aes.decrypt(e,v,h,m,p);var g=o.default.fromBinary(t.toString("binary"),o.default.DEFAULT_CAPACITY,o.default.LITTLE_ENDIAN);try{return g.mark(),"#"+g.readVString()}catch(e){return g.reset(),"#"+(t=new n(g.toString("binary"),"binary").toString("utf-8"))}}function h(e,t,r,c){if((0,a.default)(r,"memo is required"),a.default.equal(void 0===r?"undefined":i(r),"string","memo"),!/^#/.test(r))return r;r=r.substring(1),(0,a.default)(e,"private_key is required"),(0,a.default)(t,"public_key is required"),_(),e=d(e),t=m(t);var f=new o.default(o.default.DEFAULT_CAPACITY,o.default.LITTLE_ENDIAN);f.writeVString(r),r=new n(f.copy(0,f.offset).toBinary(),"binary");var h=u.Aes.encrypt(e,t,r,c),p=h.nonce,v=h.message,g=h.checksum;return r=l.fromObject({from:e.toPublicKey(),to:t,nonce:p,check:g,encrypted:v}),r=l.toBuffer(r),"#"+s.default.encode(new n(r,"binary"))}var p=void 0;function _(){if(void 0===p){var e=void 0;p=!0;try{var t="5JdeC9P7Pbd1uGdFVEsJ41EkEnADbbHGq6p1BwFxm6txNBsQnsw";e=f(t,h(t,"STM8m5UgaFAAYQRuaNejYdS8FVLVp9Ss3K1qAVk5de6F8s3HnVbvA","#memo爱"))}catch(e){console.error(e)}finally{p="#memo爱"===e}}if(!1===p)throw new Error("This environment does not support encryption.")}var d=function(e){return e?e.d?e:u.PrivateKey.fromWif(e):e},m=function(e){return e?e.Q?e:u.PublicKey.fromString(e):e}},38650:(e,t,r)=>{"use strict";e.exports={Serializer:r(13773),fp:r(14517),types:r(22405),ops:r(68638),template:r(26201),number_utils:r(65389),ChainTypes:r(67626),makeBitMaskFilter:r(72252)}},67626:e=>{"use strict";e.exports={reserved_spaces:{relative_protocol_ids:0,protocol_ids:1,implementation_ids:2},operations:{vote:0,comment:1,transfer:2,transfer_to_vesting:3,withdraw_vesting:4,limit_order_create:5,limit_order_cancel:6,feed_publish:7,convert:8,account_create:9,account_update:10,witness_update:11,account_witness_vote:12,account_witness_proxy:13,pow:14,custom:15,report_over_production:16,delete_comment:17,custom_json:18,comment_options:19,set_withdraw_vesting_route:20,limit_order_create2:21,claim_account:22,create_claimed_account:23,request_account_recovery:24,recover_account:25,change_recovery_account:26,escrow_transfer:27,escrow_dispute:28,escrow_release:29,pow2:30,escrow_approve:31,transfer_to_savings:32,transfer_from_savings:33,cancel_transfer_from_savings:34,custom_binary:35,decline_voting_rights:36,reset_account:37,set_reset_account:38,claim_reward_balance:39,delegate_vesting_shares:40,account_create_with_delegation:41,witness_set_properties:42,account_update2:43,create_proposal:44,update_proposal_votes:45,remove_proposal:46,update_proposal:47,collateralized_convert:48,recurrent_transfer:49,fill_convert_request:50,author_reward:51,curation_reward:52,comment_reward:53,liquidity_reward:54,interest:55,fill_vesting_withdraw:56,fill_order:57,shutdown_witness:58,fill_transfer_from_savings:59,hardfork:60,comment_payout_update:61,return_vesting_delegation:62,comment_benefactor_reward:63,producer_reward:64,clear_null_account_balance:65,proposal_pay:66,sps_fund:67,hardfork_hive:68,hardfork_hive_restore:69,delayed_voting:70,consolidate_treasury_balance:71,effective_comment_vote:72,ineffective_delete_comment:73,sps_convert:74,expired_account_notification:75,changed_recovery_account:76,transfer_to_vesting_completed:77,pow_reward:78,vesting_shares_split:79,account_created:80,fill_collateralized_convert_request:81,system_warning:82,fill_recurrent_transfer:83,failed_recurrent_transfer:84},object_type:{null:0,base:1}}},73628:e=>{"use strict";var t=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),r=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.message=t,(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 t(e,null,[{key:"throw",value:function(e,t){var r=e;throw(null!=t?t.message:void 0)&&(r+="\t cause: "+t.message+" "),(null!=t?t.stack:void 0)&&(r+="\n stack: "+t.stack+" "),new Error(r)}}]),e}();e.exports=r},14517:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(6631),a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return i(e,null,[{key:"fixed_data",value:function(e,t,r){if(e){if(!r){var i=e.copy(e.offset,e.offset+t);return e.skip(t),new n(i.toBinary(),"binary")}var o=r.slice(0,t).toString("binary");for(e.append(o,"binary");t-- >o.length;)e.writeUint8(0)}}},{key:"public_key",value:function(t,r){if(t){if(!r)return n=e.fixed_data(t,33),o.PublicKey.fromBuffer(n);var n=r.toBuffer();t.append(n.toString("binary"),"binary")}}},{key:"ripemd160",value:function(t,r){if(t)return r?void e.fixed_data(t,20,r):e.fixed_data(t,20)}},{key:"time_point_sec",value:function(e,t){return t?(t=Math.ceil(t/1e3),void e.writeInt32(t)):(t=e.readInt32(),new Date(1e3*t))}}]),e}();e.exports=a},72252:(e,t,r)=>{"use strict";var n,i=(n=r(76447))&&n.__esModule?n:{default:n};e.exports=function(e){return e.reduce((function(e,t){var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e,2),n=r[0],o=r[1];return t<64?[i.default.bitwiseOr(n,i.default.leftShift(i.default.BigInt(1),i.default.BigInt(t))),o]:[n,i.default.bitwiseOr(o,i.default.leftShift(i.default.BigInt(1),i.default.BigInt(t-64)))]}),[i.default.BigInt(0),i.default.BigInt(0)]).map((function(e){return i.default.notEqual(e,i.default.BigInt(0))?e.toString():null}))}},65389:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.toImpliedDecimal=function(e,t){"number"==typeof e?((0,o.default)(e<=9007199254740991,"overflow"),e=""+e):e.toString&&(e=e.toString()),(0,o.default)("string"==typeof e,"number should be an actual number or string: "+(void 0===e?"undefined":n(e))),e=e.trim(),(0,o.default)(/^[0-9]*\.?[0-9]*$/.test(e),"Invalid decimal number "+e);var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e.split("."),2),i=r[0],a=void 0===i?"":i,s=r[1],u=void 0===s?"":s,c=t-u.length;(0,o.default)(c>=0,"Too many decimal digits in "+e+" to create an implied decimal of "+t);for(var l=0;l<c;l++)u+="0";for(;"0"===a.charAt(0);)a=a.substring(1);return a+u},t.fromImpliedDecimal=function(e,t){for("number"==typeof e?((0,o.default)(e<=9007199254740991,"overflow"),e=""+e):e.toString&&(e=e.toString());e.length<t+1;)e="0"+e;var r=e.substring(e.length-t);return e.substring(0,e.length-t)+(r?"."+r:"")};var i,o=(i=r(48583))&&i.__esModule?i:{default:i}},77743:(e,t,r)=>{"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=r(34779).Long,o=r(55903),a=i.fromNumber(Math.pow(2,48)-1),s=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.space=t,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(e,[{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(e){return e.writeUint64(this.toLong())}},{key:"toString",value:function(){return this.space+"."+this.type+"."+this.instance.toString()}}],[{key:"fromString",value:function(t){if(void 0!==t.space&&void 0!==t.type&&void 0!==t.instance)return t;var r=o.require_match(/^([0-9]+)\.([0-9]+)\.([0-9]+)$/,o.required(t,"object_id"),"object_id");return new e(parseInt(r[1]),parseInt(r[2]),i.fromString(r[3]))}},{key:"fromLong",value:function(t){return new e(t.shiftRight(56).toInt(),255&t.shiftRight(48).toInt(),t.and(a))}},{key:"fromByteBuffer",value:function(t){return e.fromLong(t.readUint64())}}]),e}();e.exports=s},68638:(e,t,r)=>{"use strict";var n=o(r(22405)),i=o(r(13773));function o(e){return e&&e.__esModule?e:{default:e}}o(r(60457));var a=n.default.uint8,s=n.default.uint16,u=n.default.int16,c=n.default.uint32,l=n.default.uint64,f=n.default.int64,h=n.default.uint128,p=n.default.string,_=n.default.string_binary,d=n.default.bytes,m=n.default.bool,v=n.default.array,g=n.default.static_variant,y=n.default.map,b=n.default.set,w=n.default.public_key,k=n.default.time_point_sec,x=n.default.optional,E=n.default.asset,B=n.default.asset_symbol,S=n.default.void,C=n.default.void,j=n.default.void,A=n.default.void,T=n.default.void,O=g();e.exports.operation=O;var P=function(t,r){var n=new i.default(t,r);return e.exports[t]=n},F=new P("beneficiaries",{account:p,weight:s}),D=new P(0,{beneficiaries:b(F)}),R=new P("votable_asset_options",{max_accepted_payout:f,allow_curation_rewards:m,beneficiaries:D}),I=new P(1,{votable_assets:y(B,R)}),q=new P("smt_generation_unit",{hive_unit:y(p,s),token_unit:y(p,s)}),M=new P(0,{generation_unit:q,extensions:b(S)}),L=new P("smt_emissions_unit",{token_unit:y(p,s)}),N=new P(0,{value:m}),U=new P(0,{cashout_window_seconds:c,reverse_auction_window_seconds:c}),z=new P(1,{vote_regeneration_period_seconds:c,votes_per_regeneration_period:c}),H=new P(2,{content_constant:h,percent_curation_rewards:s,author_reward_curve:f,curation_reward_curve:f}),V=new P(3,{value:m}),K=new P(1,{end_date:k}),G=new P("signed_transaction",{ref_block_num:s,ref_block_prefix:c,expiration:k,operations:v(O),extensions:b(S),signatures:v(d(65))}),W=(new P("signed_block",{previous:d(20),timestamp:k,witness:p,transaction_merkle_root:d(20),extensions:b(g([S,j,C,A,T])),witness_signature:d(65),transactions:v(G)}),new P("block_header",{previous:d(20),timestamp:k,witness:p,transaction_merkle_root:d(20),extensions:b(g([S,j,C]))}),new P("signed_block_header",{previous:d(20),timestamp:k,witness:p,transaction_merkle_root:d(20),extensions:b(g([S,j,C,A,T])),witness_signature:d(65)})),Q=new P("vote",{voter:p,author:p,permlink:p,weight:u}),J=new P("comment",{parent_author:p,parent_permlink:p,author:p,permlink:p,title:p,body:p,json_metadata:p}),$=new P("transfer",{from:p,to:p,amount:E,memo:p}),X=new P("transfer_to_vesting",{from:p,to:p,amount:E}),Y=new P("withdraw_vesting",{account:p,vesting_shares:E}),Z=new P("limit_order_create",{owner:p,orderid:c,amount_to_sell:E,min_to_receive:E,fill_or_kill:m,expiration:k}),ee=new P("limit_order_cancel",{owner:p,orderid:c}),te=new P("price",{base:E,quote:E}),re=new P("feed_publish",{publisher:p,exchange_rate:te}),ne=new P("convert",{owner:p,requestid:c,amount:E}),ie=new P("collateralized_convert",{owner:p,requestid:c,amount:E}),oe=new P("authority",{weight_threshold:c,account_auths:y(p,s),key_auths:y(w,s)}),ae=new P("account_create",{fee:E,creator:p,new_account_name:p,owner:oe,active:oe,posting:oe,memo_key:w,json_metadata:p}),se=new P("account_update",{account:p,owner:x(oe),active:x(oe),posting:x(oe),memo_key:w,json_metadata:p}),ue=new P("chain_properties",{account_creation_fee:E,maximum_block_size:c,hbd_interest_rate:s}),ce=new P("witness_update",{owner:p,url:p,block_signing_key:w,props:ue,fee:E}),le=new P("account_witness_vote",{account:p,witness:p,approve:m}),fe=new P("account_witness_proxy",{account:p,proxy:p}),he=new P("pow",{worker:w,input:d(32),signature:d(65),work:d(32)}),pe=new P("custom",{required_auths:b(p),id:s,data:d()}),_e=new P("report_over_production",{reporter:p,first_block:W,second_block:W}),de=new P("delete_comment",{author:p,permlink:p}),me=new P("custom_json",{required_auths:b(p),required_posting_auths:b(p),id:p,json:p}),ve=new P("comment_options",{author:p,permlink:p,max_accepted_payout:E,percent_hbd:s,allow_votes:m,allow_curation_rewards:m,extensions:b(g([D,I]))}),ge=new P("set_withdraw_vesting_route",{from_account:p,to_account:p,percent:s,auto_vest:m}),ye=new P("limit_order_create2",{owner:p,orderid:c,amount_to_sell:E,exchange_rate:te,fill_or_kill:m,expiration:k}),be=new P("claim_account",{creator:p,fee:E,extensions:b(S)}),we=new P("create_claimed_account",{creator:p,new_account_name:p,owner:oe,active:oe,posting:oe,memo_key:w,json_metadata:p,extensions:b(S)}),ke=new P("request_account_recovery",{recovery_account:p,account_to_recover:p,new_owner_authority:oe,extensions:b(S)}),xe=new P("recover_account",{account_to_recover:p,new_owner_authority:oe,recent_owner_authority:oe,extensions:b(S)}),Ee=new P("change_recovery_account",{account_to_recover:p,new_recovery_account:p,extensions:b(S)}),Be=new P("escrow_transfer",{from:p,to:p,hbd_amount:E,hive_amount:E,escrow_id:c,agent:p,fee:E,json_meta:p,ratification_deadline:k,escrow_expiration:k}),Se=new P("escrow_dispute",{from:p,to:p,agent:p,who:p,escrow_id:c}),Ce=new P("escrow_release",{from:p,to:p,agent:p,who:p,receiver:p,escrow_id:c,hbd_amount:E,hive_amount:E}),je=new P("pow2_input",{worker_account:p,prev_block:d(20),nonce:l}),Ae=new P("pow2",{input:je,pow_summary:c}),Te=new P("equihash_proof",{n:c,k:c,seed:d(32),inputs:v(c)}),Oe=(new P("equihash_pow",{input:je,proof:Te,prev_block:d(20),pow_summary:c}),new P("escrow_approve",{from:p,to:p,agent:p,who:p,escrow_id:c,approve:m})),Pe=new P("transfer_to_savings",{from:p,to:p,amount:E,memo:p}),Fe=new P("transfer_from_savings",{from:p,request_id:c,to:p,amount:E,memo:p}),De=new P("cancel_transfer_from_savings",{from:p,request_id:c}),Re=new P("custom_binary",{required_owner_auths:b(p),required_active_auths:b(p),required_posting_auths:b(p),required_auths:v(oe),id:p,data:d()}),Ie=new P("decline_voting_rights",{account:p,decline:m}),qe=new P("reset_account",{reset_account:p,account_to_reset:p,new_owner_authority:oe}),Me=new P("set_reset_account",{account:p,current_reset_account:p,reset_account:p}),Le=new P("claim_reward_balance",{account:p,reward_hive:E,reward_hbd:E,reward_vests:E}),Ne=new P("delegate_vesting_shares",{delegator:p,delegatee:p,vesting_shares:E}),Ue=new P("account_create_with_delegation",{fee:E,delegation:E,creator:p,new_account_name:p,owner:oe,active:oe,posting:oe,memo_key:w,json_metadata:p,extensions:b(S)}),ze=new P("witness_set_properties",{owner:p,props:y(p,d()),extensions:b(S)}),He=new P("account_update2",{account:p,owner:x(oe),active:x(oe),posting:x(oe),memo_key:x(w),json_metadata:p,posting_json_metadata:p,extensions:b(S)}),Ve=new P("create_proposal",{creator:p,receiver:p,start_date:k,end_date:k,daily_pay:E,subject:p,permlink:p,extensions:b(S)}),Ke=new P("update_proposal_votes",{voter:p,proposal_ids:v(l),approve:m,extensions:b(S)}),Ge=new P("remove_proposal",{proposal_owner:p,proposal_ids:v(l),extensions:b(S)}),We=new P("update_proposal",{proposal_id:l,creator:p,daily_pay:E,subject:p,permlink:p,extensions:b(g([S,K]))}),Qe=new P("recurrent_transfer",{from:p,to:p,amount:E,memo:p,recurrence:s,executions:s,extensions:b(S)}),Je=new P("claim_reward_balance2",{account:p,reward_tokens:v(E),extensions:b(S)}),$e=new P("vote2",{voter:p,author:p,permlink:p,rshares:y(B,f),extensions:b(S)}),Xe=new P("smt_create",{control_account:p,symbol:B,smt_creation_fee:E,precision:a,extensions:b(S)}),Ye=new P("smt_setup",{control_account:p,symbol:B,max_supply:f,contribution_begin_time:k,contribution_end_time:k,launch_time:k,hive_units_min:f,min_unit_ratio:c,max_unit_ratio:c,extensions:b(S)}),Ze=new P("smt_setup_emissions",{control_account:p,symbol:B,schedule_time:k,emissions_unit:L,interval_seconds:c,emission_count:c,lep_time:k,rep_time:k,lep_abs_amount:f,rep_abs_amount:f,lep_rel_amount_numerator:c,rep_rel_amount_numerator:c,rel_amount_denom_bits:a,remove:m,floor_emissions:m,extensions:b(S)}),et=new P("smt_setup_ico_tier",{control_account:p,symbol:B,hive_units_cap:f,generation_policy:g([M]),remove:m,extensions:b(S)}),tt=new P("smt_set_setup_parameters",{control_account:p,symbol:B,setup_parameters:b(g([N])),extensions:b(S)}),rt=new P("smt_set_runtime_parameters",{control_account:p,symbol:B,runtime_parameters:b(g([U,z,H,V])),extensions:b(S)}),nt=new P("smt_contribute",{contributor:p,symbol:B,contribution_id:c,contribution:E,extensions:b(S)}),it=new P("fill_convert_request",{owner:p,requestid:c,amount_in:E,amount_out:E}),ot=new P("author_reward",{author:p,permlink:p,hbd_payout:E,hive_payout:E,vesting_payout:E}),at=new P("curation_reward",{curator:p,reward:E,comment_author:p,comment_permlink:p}),st=new P("comment_reward",{author:p,permlink:p,payout:E}),ut=new P("liquidity_reward",{owner:p,payout:E}),ct=new P("interest",{owner:p,interest:E}),lt=new P("fill_vesting_withdraw",{from_account:p,to_account:p,withdrawn:E,deposited:E}),ft=new P("fill_order",{current_owner:p,current_orderid:c,current_pays:E,open_owner:p,open_orderid:c,open_pays:E}),ht=new P("shutdown_witness",{owner:p}),pt=new P("fill_transfer_from_savings",{from:p,to:p,amount:E,request_id:c,memo:p}),_t=new P("hardfork",{hardfork_id:c}),dt=new P("comment_payout_update",{author:p,permlink:p}),mt=new P("return_vesting_delegation",{account:p,vesting_shares:E}),vt=new P("comment_benefactor_reward",{benefactor:p,author:p,permlink:p,reward:E});O.st_operations=[Q,J,$,X,Y,Z,ee,re,ne,ae,se,ce,le,fe,he,pe,_e,de,me,ve,ge,ye,be,we,ke,xe,Ee,Be,Se,Ce,Ae,Oe,Pe,Fe,De,Re,Ie,qe,Me,Le,Ne,Ue,ze,He,Ve,Ke,Ge,We,ie,Qe,Je,$e,Ye,Ze,et,tt,rt,Xe,nt,it,ot,at,st,ut,ct,lt,ft,ht,pt,_t,dt,mt,vt],new P("transaction",{ref_block_num:s,ref_block_prefix:c,expiration:k,operations:v(O),extensions:b(S)}),new P("encrypted_memo",{from:w,to:w,nonce:l,check:c,encrypted:_})},13773:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(34779),a=r(73628),s={NODE_ENV:"production"}.npm_config__graphene_serializer_hex_dump,u=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.operation_name=t,this.types=r,this.types&&(this.keys=Object.keys(this.types)),e.printDebug=!0}return i(e,[{key:"fromByteBuffer",value:function(t){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 c=t.offset;u.fromByteBuffer(t);var l=t.offset;t.offset=c;var f=t.copy(c,l);console.error(this.operation_name+"."+n+"\t",f.toHex())}r[n]=u.fromByteBuffer(t)}catch(r){throw e.printDebug&&(console.error("Error reading "+this.operation_name+"."+n+" in data:"),t.printDebug()),r}}}catch(e){a.throw(this.operation_name+"."+n,e)}return r}},{key:"appendByteBuffer",value:function(e,t){var r=null;try{for(var n=this.keys,i=0;i<n.length;i++)r=n[i],this.types[r].appendByteBuffer(e,t[r])}catch(e){try{a.throw(this.operation_name+"."+r+" = "+JSON.stringify(t[r]),e)}catch(n){a.throw(this.operation_name+"."+r+" = "+t[r],e)}}}},{key:"fromObject",value:function(e){var t={},r=null;try{for(var n=this.keys,i=0;i<n.length;i++){r=n[i];var o=this.types[r],s=e[r],u=o.fromObject(s);t[r]=u}}catch(e){a.throw(this.operation_name+"."+r,e)}return t}},{key:"toObject",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=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 c=this.types[n],l=c.toObject(null!=e?e[n]:void 0,t);if(r[n]=l,s){var f=new o(o.DEFAULT_CAPACITY,o.LITTLE_ENDIAN),h=null!=e;if(h){var p=e[n];p&&c.appendByteBuffer(f,p)}f=f.copy(0,f.offset),console.error(this.operation_name+"."+n,f.toHex())}}}catch(e){a.throw(this.operation_name+"."+n,e)}return r}},{key:"compare",value:function(e,t){var r=this.keys[0],i=this.types[r],o=e[r],a=t[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),c=a.toString(s);return u>c?1:u<c?-1:0}},{key:"fromHex",value:function(e){var t=o.fromHex(e,o.LITTLE_ENDIAN);return this.fromByteBuffer(t)}},{key:"fromBuffer",value:function(e){var t=o.fromBinary(e.toString("binary"),o.LITTLE_ENDIAN);return this.fromByteBuffer(t)}},{key:"toHex",value:function(e){return this.toByteBuffer(e).toHex()}},{key:"toByteBuffer",value:function(e){var t=new o(o.DEFAULT_CAPACITY,o.LITTLE_ENDIAN);return this.appendByteBuffer(t,e),t.copy(0,t.offset)}},{key:"toBuffer",value:function(e){return new n(this.toByteBuffer(e).toBinary(),"binary")}}]),e}();e.exports=u},26201:e=>{"use strict";e.exports=function(e){var t=e.toObject(void 0,{use_default:!0,annotate:!0});console.error(JSON.stringify(t,null,4)),t=e.toObject(void 0,{use_default:!0,annotate:!1}),console.error(JSON.stringify(t))}},22405:(e,t,r)=>{"use strict";var n,i=r(48764).Buffer,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=r(6631),s=r(65389),u=(n=r(60457))&&n.__esModule?n:{default:n},c=r(55903),l=r(77743),f=r(14517),h=r(67626),p={};e.exports=p;var _={NODE_ENV:"production"}.npm_config__graphene_serializer_hex_dump;function d(e){if(e>=1e8)throw new Error("Expected value less than 100000000, instead got "+e);var t=[0,30,10,70,50,90,80,60,40,20,70,0,90,20,10,50,40,80,60,30,40,20,0,60,80,70,10,30,50,90,10,70,50,0,90,80,30,40,20,60,60,10,20,30,0,40,50,90,70,80,30,60,70,40,20,0,90,50,80,10,50,80,60,90,70,20,0,10,30,40,80,90,40,50,30,60,20,0,10,70,90,40,30,80,60,10,70,20,0,50,20,50,80,10,40,30,60,70,90,0],r=e/10,n=r/10,i=n/10,o=i/10,a=o/10,s=a/10,u=t[s/10];return(u=t[(u=t[(u=t[(u=t[(u=t[(u=t[(u=t[u+s%10])+a%10])+o%10])+i%10])+n%10])+r%10])+e%10])/10}p.asset={fromByteBuffer:function(e){var t=e.readInt64(),r=e.readUint8(),n="",o="";if(r>=16){var a=e.copy(e.offset-1,e.offset+3),u=new i(a.toBinary(),"binary").readInt32();o="@@"+(u/=32).toString().padStart(8,"0")+d(u).to_String(),r%=16,e.skip(3),n=(0,s.fromImpliedDecimal)(t,r)}else{var c=e.copy(e.offset,e.offset+7);o=new i(c.toBinary(),"binary").toString().replace(/\x00/g,""),e.skip(7),n=(0,s.fromImpliedDecimal)(t,r)}return n+" "+o},appendByteBuffer:function(e,t){var r="",n="",i=0,o=0;if(t.nai){switch(n=t.nai,i=parseInt(n.slice(2)),d(i=Math.floor(i/10)),t.nai){case"@@000000021":o=3,n="STM"==u.default.get("address_prefix")?"STEEM":"TESTS";break;case"@@000000013":o=3,n="STM"==u.default.get("address_prefix")?"SBD":"TBD";break;case"@@000000037":o=6,n="VESTS"}o=parseInt(t.precision),e.writeInt64(c.to_long(parseInt(t.amount)))}else{if(t=t.trim(),!/^[0-9]+\.?[0-9]* [A-Za-z0-9@]+$/.test(t))throw new Error("Expecting amount like '99.000 SYMBOL', instead got '"+t+"'");var a=t.split(" ");if(r=a[0],(n="HIVE"==(n=a[1])?"STEEM":"HBD"==n?"SBD":n).startsWith("@@"))i=parseInt(n.slice(2)),d(i=Math.floor(i/10));else if(n.length>6)throw new Error("Symbols are not longer than 6 characters "+n+"-"+n.length);e.writeInt64(c.to_long(r.replace(".","")));var s=r.indexOf(".");o=-1===s?0:r.length-s-1}if(n.startsWith("@@"))i=16+(i<<5)+o,e.writeUint32(i);else{e.writeUint8(o),e.append(n.toUpperCase(),"binary");for(var l=0;l<7-n.length;l++)e.writeUint8(0)}},fromObject:function(e){return e},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?"0.000 HIVE":e}},p.asset_symbol={fromByteBuffer:function(e){var t=e.readUint8(),r="";if(t>=16){var n=e.copy(e.offset-1,e.offset+3),o=new i(n.toBinary(),"binary").readInt32();r="@@"+(o/=32).toString().padStart(8,"0")+d(o).to_String(),t%=16,e.skip(3)}else{var a=e.copy(e.offset,e.offset+7),s=new i(a.toBinary(),"binary").toString().replace(/\x00/g,"");if("STEEM"==s||"TESTS"==s)r="@@000000021";else if("SBD"==s||"TBD"==s)r="@@000000013";else{if("VESTS"!=s)throw new Error("Expecting non-smt core asset symbol, instead got '"+s+"'");r="@@000000037"}e.skip(7)}return{nai:r,precision:t}},appendByteBuffer:function(e,t){var r=0;if(!t.nai.startsWith("@@"))throw new Error("Asset Symbols NAIs must be prefixed with '@@'. Was "+t.nai);r=parseInt(t.nai.slice(2)),d(r=Math.floor(r/10));var n=0,i="";switch(t.nai){case"@@000000021":n=3,i="STM"==u.default.get("address_prefix")?"STEEM":"TESTS";break;case"@@000000013":n=3,i="STM"==u.default.get("address_prefix")?"SBD":"TBD";break;case"@@000000037":n=6,i="VESTS"}if(n>0){e.writeUint8(n),e.append(i,"binary");for(var o=0;o<7-i.length;o++)e.writeUint8(0)}else r=16+(r<<5)+t.precision,e.writeUint32(r)},fromObject:function(e){return e},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?"STEEM":e}},p.uint8={fromByteBuffer:function(e){return e.readUint8()},appendByteBuffer:function(e,t){c.require_range(0,255,t,"uint8 "+t),e.writeUint8(t)},fromObject:function(e){return c.require_range(0,255,e,"uint8 "+e),e},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?0:(c.require_range(0,255,e,"uint8 "+e),parseInt(e))}},p.uint16={fromByteBuffer:function(e){return e.readUint16()},appendByteBuffer:function(e,t){c.require_range(0,65535,t,"uint16 "+t),e.writeUint16(t)},fromObject:function(e){return c.require_range(0,65535,e,"uint16 "+e),e},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?0:(c.require_range(0,65535,e,"uint16 "+e),parseInt(e))}},p.uint32={fromByteBuffer:function(e){return e.readUint32()},appendByteBuffer:function(e,t){c.require_range(0,4294967295,t,"uint32 "+t),e.writeUint32(t)},fromObject:function(e){return c.require_range(0,4294967295,e,"uint32 "+e),e},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?0:(c.require_range(0,4294967295,e,"uint32 "+e),parseInt(e))}};var m=-1*Math.pow(2,31),v=Math.pow(2,31)-1;p.varint32={fromByteBuffer:function(e){return e.readVarint32()},appendByteBuffer:function(e,t){c.require_range(m,v,t,"uint32 "+t),e.writeVarint32(t)},fromObject:function(e){return c.require_range(m,v,e,"uint32 "+e),e},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?0:(c.require_range(m,v,e,"uint32 "+e),parseInt(e))}},p.int16={fromByteBuffer:function(e){return e.readInt16()},appendByteBuffer:function(e,t){e.writeInt16(t)},fromObject:function(e){return e},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?0:parseInt(e)}},p.int64={fromByteBuffer:function(e){return e.readInt64()},appendByteBuffer:function(e,t){c.required(t),e.writeInt64(c.to_long(t))},fromObject:function(e){return c.required(e),c.to_long(e)},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?"0":(c.required(e),c.to_long(e).toString())}},p.uint64={fromByteBuffer:function(e){return e.readUint64()},appendByteBuffer:function(e,t){e.writeUint64(c.to_long(c.unsigned(t)))},fromObject:function(e){return c.to_long(c.unsigned(e))},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?"0":c.to_long(e).toString()}},p.uint128={fromByteBuffer:function(e){return e.readBigInt64(),e.readBigInt64()},appendByteBuffer:function(e,t){e.writeUint64(c.to_long(c.unsigned(0))),e.writeUint64(c.to_long(c.unsigned(t)))},fromObject:function(e){return c.to_long(c.unsigned(e))},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?"0":c.to_long(e).toString()}},p.string={fromByteBuffer:function(e){return new i(e.readVString(),"utf8")},appendByteBuffer:function(e,t){c.required(t),e.writeVString(t.toString())},fromObject:function(e){return c.required(e),new i(e,"utf8")},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?"":e.toString("utf8")}},p.string_binary={fromByteBuffer:function(e){var t,r=e.readVarint32();return t=e.copy(e.offset,e.offset+r),e.skip(r),new i(t.toBinary(),"binary")},appendByteBuffer:function(e,t){e.writeVarint32(t.length),e.append(t.toString("binary"),"binary")},fromObject:function(e){return c.required(e),new i(e)},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?"":e.toString()}},p.bytes=function(e){return{fromByteBuffer:function(t){if(void 0===e){var r,n=t.readVarint32();return r=t.copy(t.offset,t.offset+n),t.skip(n),new i(r.toBinary(),"binary")}return r=t.copy(t.offset,t.offset+e),t.skip(e),new i(r.toBinary(),"binary")},appendByteBuffer:function(t,r){c.required(r),"string"==typeof r&&(r=new i(r,"hex")),void 0===e&&t.writeVarint32(r.length),t.append(r.toString("binary"),"binary")},fromObject:function(e){return c.required(e),i.isBuffer(e)?e:new i(e,"hex")},toObject:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===t){var n=function(e){return new Array(e).join("00")};return n(e)}return c.required(t),t.toString("hex")}}},p.bool={fromByteBuffer:function(e){return 1===e.readUint8()},appendByteBuffer:function(e,t){e.writeUint8(JSON.parse(t)?1:0)},fromObject:function(e){return!!JSON.parse(e)},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!(t.use_default&&void 0===e||!JSON.parse(e))}},p.void={fromByteBuffer:function(e){throw new Error("(void) undefined type")},appendByteBuffer:function(e,t){throw new Error("(void) undefined type")},fromObject:function(e){throw new Error("(void) undefined type")},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t.use_default||void 0!==e)throw new Error("(void) undefined type")}},p.array=function(e){return{fromByteBuffer:function(t){var r=t.readVarint32();_&&console.log("varint32 size = "+r.toString(16));for(var n=[],i=0;0<r?i<r:i>r;i++)n.push(e.fromByteBuffer(t));return b(n,e)},appendByteBuffer:function(t,r){c.required(r),r=b(r,e),t.writeVarint32(r.length);for(var n,i=0;i<r.length;i++)n=r[i],e.appendByteBuffer(t,n)},fromObject:function(t){c.required(t),t=b(t,e);for(var r,n=[],i=0;i<t.length;i++)r=t[i],n.push(e.fromObject(r));return n},toObject:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(r.use_default&&void 0===t)return[e.toObject(t,r)];c.required(t),t=b(t,e);for(var n,i=[],o=0;o<t.length;o++)n=t[o],i.push(e.toObject(n,r));return i}}},p.time_point_sec={fromByteBuffer:function(e){return e.readUint32()},appendByteBuffer:function(e,t){"number"!=typeof t&&(t=p.time_point_sec.fromObject(t)),e.writeUint32(t)},fromObject:function(e){if(c.required(e),"number"==typeof e)return e;if(e.getTime)return Math.floor(e.getTime()/1e3);if("string"!=typeof e)throw new Error("Unknown date type: "+e);return"string"!=typeof e||/Z$/.test(e)||(e+="Z"),Math.floor(new Date(e).getTime()/1e3)},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.use_default&&void 0===e)return new Date(0).toISOString().split(".")[0];if(c.required(e),"string"==typeof e)return e;if(e.getTime)return e.toISOString().split(".")[0];var r=parseInt(e);return c.require_range(0,4294967295,r,"uint32 "+e),new Date(1e3*r).toISOString().split(".")[0]}},p.set=function(e){return{validate:function(t){for(var r,n={},i=0;i<t.length;i++){var a;if(a=void 0===(r=t[i])?"undefined":o(r),["string","number"].indexOf(a)>=0){if(void 0!==n[r])throw new Error("duplicate (set)");n[r]=!0}}return b(t,e)},fromByteBuffer:function(t){var r=t.readVarint32();return _&&console.log("varint32 size = "+r.toString(16)),this.validate(function(){for(var n=[],i=0;0<r?i<r:i>r;i++)n.push(e.fromByteBuffer(t));return n}())},appendByteBuffer:function(t,r){r||(r=[]),t.writeVarint32(r.length);for(var n,i=this.validate(r),o=0;o<i.length;o++)n=i[o],e.appendByteBuffer(t,n)},fromObject:function(t){return t||(t=[]),this.validate(function(){for(var r,n=[],i=0;i<t.length;i++)r=t[i],n.push(e.fromObject(r));return n}())},toObject:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.use_default&&void 0===t?[e.toObject(t,r)]:(t||(t=[]),this.validate(function(){for(var n,i=[],o=0;o<t.length;o++)n=t[o],i.push(e.toObject(n,r));return i}()))}}},p.fixed_array=function(e,t){return{fromByteBuffer:function(r){var n,i,o;for(o=[],n=0,i=e;n<i;n+=1)o.push(t.fromByteBuffer(r));return b(o,t)},appendByteBuffer:function(r,n){var i,o,a;for(0!==e&&(c.required(n),n=b(n,t)),i=o=0,a=e;o<a;i=o+=1)t.appendByteBuffer(r,n[i])},fromObject:function(r){var n,i,o,a;for(0!==e&&c.required(r),a=[],n=i=0,o=e;i<o;n=i+=1)a.push(t.fromObject(r[n]));return a},toObject:function(r,n){var i,o,a,s,u,l,f;if(null==n&&(n={}),n.use_default&&void 0===r){for(l=[],i=o=0,s=e;o<s;i=o+=1)l.push(t.toObject(void 0,n));return l}for(0!==e&&c.required(r),f=[],i=a=0,u=e;a<u;i=a+=1)f.push(t.toObject(r[i],n));return f}}},p.protocol_id_type=function(e){return c.required(e,"name"),t=h.reserved_spaces.protocol_ids,r=e,c.required(t,"reserved_spaces"),c.required(r,"object_type"),{fromByteBuffer:function(e){return e.readVarint32()},appendByteBuffer:function(e,n){c.required(n),void 0!==n.resolve&&(n=n.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(n)&&(n=c.get_instance(t,r,n)),e.writeVarint32(c.to_number(n))},fromObject:function(e){return c.required(e),void 0!==e.resolve&&(e=e.resolve),c.is_digits(e)?c.to_number(e):c.get_instance(t,r,e)},toObject:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=h.object_type[r];return n.use_default&&void 0===e?t+"."+i+".0":(c.required(e),void 0!==e.resolve&&(e=e.resolve),/^[0-9]+\.[0-9]+\.[0-9]+$/.test(e)&&(e=c.get_instance(t,r,e)),t+"."+i+"."+e)}};var t,r},p.object_id_type={fromByteBuffer:function(e){return l.fromByteBuffer(e)},appendByteBuffer:function(e,t){c.required(t),void 0!==t.resolve&&(t=t.resolve),(t=l.fromString(t)).appendByteBuffer(e)},fromObject:function(e){return c.required(e),void 0!==e.resolve&&(e=e.resolve),l.fromString(e)},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?"0.0.0":(c.required(e),void 0!==e.resolve&&(e=e.resolve),(e=l.fromString(e)).toString())}},p.vote_id={TYPE:255,ID:4294967040,fromByteBuffer:function(e){var t=e.readUint32();return{type:t&this.TYPE,id:t&this.ID}},appendByteBuffer:function(e,t){c.required(t),"string"===t&&(t=p.vote_id.fromObject(t));var r=t.id<<8|t.type;e.writeUint32(r)},fromObject:function(e){if(c.required(e,"(type vote_id)"),"object"===(void 0===e?"undefined":o(e)))return c.required(e.type,"type"),c.required(e.id,"id"),e;c.require_test(/^[0-9]+:[0-9]+$/,e,"vote_id format "+e);var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e.split(":"),2),r=t[0],n=t[1];return c.require_range(0,255,r,"vote type "+e),c.require_range(0,16777215,n,"vote id "+e),{type:r,id:n}},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?"0:0":(c.required(e),"string"==typeof e&&(e=p.vote_id.fromObject(e)),e.type+":"+e.id)},compare:function(e,t){return"object"!==(void 0===e?"undefined":o(e))&&(e=p.vote_id.fromObject(e)),"object"!==(void 0===t?"undefined":o(t))&&(t=p.vote_id.fromObject(t)),parseInt(e.id)-parseInt(t.id)}},p.optional=function(e){return c.required(e,"st_operation"),{fromByteBuffer:function(t){if(1===t.readUint8())return e.fromByteBuffer(t)},appendByteBuffer:function(t,r){null!=r?(t.writeUint8(1),e.appendByteBuffer(t,r)):t.writeUint8(0)},fromObject:function(t){if(void 0!==t)return e.fromObject(t)},toObject:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.use_default||void 0!==t?e.toObject(t,r):void 0;return r.annotate&&("object"===(void 0===n?"undefined":o(n))?n.__optional="parent is optional":n={__optional:n}),n}}},p.static_variant=function(e){return{nosort:!0,st_operations:e,opTypeId:function(e){var t=0,r=void 0;if("number"==typeof e)r=e;else{var n=!0,i=!1,o=void 0;try{for(var a,s=this.st_operations[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){if(a.value.operation_name===e){r=t;break}t++}}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}}return r},fromByteBuffer:function(e){var t=e.readVarint32(),r=this.st_operations[t];return _&&console.error("static_variant id 0x"+t.toString(16)+" ("+t+")"),c.required(r,"operation "+t),[t,r.fromByteBuffer(e)]},appendByteBuffer:function(e,t){c.required(t);var r=this.opTypeId(t[0]),n=this.st_operations[r];c.required(n,"operation "+r),e.writeVarint32(r),n.appendByteBuffer(e,t[1])},fromObject:function(e){c.required(e);var t=this.opTypeId(e[0]),r=this.st_operations[t];return c.required(r,"operation "+t),[t,r.fromObject(e[1])]},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.use_default&&void 0===e)return[this.st_operations[0].operation_name,this.st_operations[0].toObject(void 0,t)];c.required(e);var r=this.opTypeId(e[0]),n=this.st_operations[r];return c.required(n,"operation "+r),[n.operation_name,n.toObject(e[1],t)]},compare:function(e,t){return g(this.opTypeId(e[0]),this.opTypeId(t[0]))}}},p.map=function(e,t){return{validate:function(t){if(!Array.isArray(t))throw new Error("expecting array");for(var r,n={},i=0;i<t.length;i++){var a;if(2!==(r=t[i]).length)throw new Error("expecting two elements");if(a=o(r[0]),["number","string"].indexOf(a)>=0){if(void 0!==n[r[0]])throw new Error("duplicate (map)");n[r[0]]=!0}}return b(t,e)},fromByteBuffer:function(r){for(var n=[],i=r.readVarint32(),o=0;0<i?o<i:o>i;o++)n.push([e.fromByteBuffer(r),t.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],e.appendByteBuffer(r,i[0]),t.appendByteBuffer(r,i[1])},fromObject:function(r){c.required(r);for(var n,i=[],o=0;o<r.length;o++)n=r[o],i.push([e.fromObject(n[0]),t.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[[e.toObject(void 0,n),t.toObject(void 0,n)]];c.required(r),r=this.validate(r);for(var i,o=[],a=0;a<r.length;a++)i=r[a],o.push([e.toObject(i[0],n),t.toObject(i[1],n)]);return o}}},p.public_key={toPublic:function(e){return void 0!==e.resolve&&(e=e.resolve),null==e||e.Q?e:a.PublicKey.fromStringOrThrow(e)},fromByteBuffer:function(e){return f.public_key(e)},appendByteBuffer:function(e,t){c.required(t),f.public_key(e,p.public_key.toPublic(t))},fromObject:function(e){return c.required(e),e.Q?e:p.public_key.toPublic(e)},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?a.ecc_config.get("address_prefix")+"859gxfnXyUriMgUeThh1fWv3oqcpLFyHa3TfFYC4PK2HqhToVM":(c.required(e),e.toString())},compare:function(e,t){return 1*g(e.toString(),t.toString())}},p.address={_to_address:function(e){return c.required(e),e.addy?e:a.Address.fromString(e)},fromByteBuffer:function(e){return new a.Address(f.ripemd160(e))},appendByteBuffer:function(e,t){f.ripemd160(e,p.address._to_address(t).toBuffer())},fromObject:function(e){return p.address._to_address(e)},toObject:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.use_default&&void 0===e?a.ecc_config.get("address_prefix")+"664KmHxSuQyDsfwo4WEJvWpzg1QKdg67S":p.address._to_address(e).toString()},compare:function(e,t){return-1*g(e.toString(),t.toString())}};var g=function(e,t){return e>t?1:e<t?-1:0},y=function(e){return Array.isArray(e)?e[0]:e},b=function(e,t){return t.nosort?e:t.compare?e.sort((function(e,r){return t.compare(y(e),y(r))})):e.sort((function(e,t){return"number"==typeof y(e)&&"number"==typeof y(t)?y(e)-y(t):i.isBuffer(y(e))&&i.isBuffer(y(t))?g(y(e).toString("hex"),y(t).toString("hex")):g(y(e).toString(),y(t).toString())}))}},55903:(e,t,r)=>{"use strict";var n,i,o,a,s,u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c=r(34779).Long,l=r(67626),f=9007199254740991,h=-9007199254740991;e.exports=n={is_empty:i=function(e){return null==e},required:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))throw new Error("value required "+t+" "+e);return e},require_long:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!c.isLong(e))throw new Error("Long value required "+t+" "+e);return e},string:function(e){if(i(e))return e;if("string"!=typeof e)throw new Error("string required: "+e);return e},number:function(e){if(i(e))return e;if("number"!=typeof e)throw new Error("number required: "+e);return e},whole_number:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))return e;if(/\./.test(e))throw new Error("whole number required "+t+" "+e);return e},unsigned:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))return e;if(/-/.test(e))throw new Error("unsigned required "+t+" "+e);return e},is_digits:function(e){return"numeric"==typeof e||/^[0-9]+$/.test(e)},to_number:o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))return e;n.no_overflow53(e,t);var r="number"==typeof e?e:parseInt(e);return r},to_long:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i(e)||c.isLong(e)?e:(n.no_overflow64(e,t),"number"==typeof e&&(e=""+e),c.fromString(e))},to_string:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(i(e))return e;if("string"==typeof e)return e;if("number"==typeof e)return n.no_overflow53(e,t),""+e;if(c.isLong(e))return e.toString();throw"unsupported type "+t+": ("+(void 0===e?"undefined":u(e))+") "+e},require_test:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(t))return t;if(!e.test(t))throw new Error("unmatched "+e+" "+r+" "+t);return t},require_match:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(i(t))return t;var n=t.match(e);if(null===n)throw new Error("unmatched "+e+" "+r+" "+t);return n},require_range:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;if(o(r),r<e||r>t)throw new Error("out of range "+r+" "+n+" "+r);return r},require_object_type:a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments[1],r=arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";if(i(r))return r;var o=l.object_type[t];if(!o)throw new Error("Unknown object type: "+t+", "+n+", "+r);var a=new RegExp(e+"."+o+".[0-9]+$");if(!a.test(r))throw new Error("Expecting "+t+" in format "+e+"."+o+".[0-9]+ instead of "+r+" "+n+" "+r);return r},get_instance:function(e,t,r,n){return i(r)?r:(a(e,t,r,n),o(r.split(".")[2]))},require_relative_type:function(e,t,r){return a(0,e,t,r),t},get_relative_instance:function(e,t,r){return i(t)?t:(a(0,e,t,r),o(t.split(".")[2]))},require_protocol_type:function(e,t,r){return a(1,e,t,r),t},get_protocol_instance:function(e,t,r){return i(t)?t:(a(1,e,t,r),o(t.split(".")[2]))},get_protocol_type:s=function(e,t){if(i(e))return e;(void 0)(e,t);var r=e.split(".");return o(r[1])},get_protocol_type_name:function(e,t){if(i(e))return e;var r=s(e,t);return Object.keys(l.object_type)[r]},require_implementation_type:function(e,t,r){return a(2,e,t,r),t},get_implementation_instance:function(e,t,r){return i(t)?t:(a(2,e,t,r),o(t.split(".")[2]))},no_overflow53:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("number"!=typeof e){if("string"!=typeof e){if(!c.isLong(e))throw"unsupported type "+t+": ("+(void 0===e?"undefined":u(e))+") "+e;n.no_overflow53(e.toInt(),t)}else if(parseInt(e),e>f||e<h)throw new Error("overflow "+t+" "+e)}else if(e>f||e<h)throw new Error("overflow "+t+" "+e)},no_overflow64:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(!c.isLong(e))if(void 0===e.t||void 0===e.s)if("string"!=typeof e){if("number"!=typeof e)throw"unsupported type "+t+": ("+(void 0===e?"undefined":u(e))+") "+e;if(e>f||e<h)throw new Error("overflow "+t+" "+e)}else{for(e=e.replace(/^0+/,"");/0$/.test(e);)e=e.substring(0,e.length-1);/\.$/.test(e)&&(e=e.substring(0,e.length-1)),""===e&&(e="0");var r=c.fromString(e).toString();if(r!==e.trim())throw new Error("overflow "+t+" "+e)}else n.no_overflow64(e.toString(),t)}}},8480:(e,t,r)=>{"use strict";var n,i=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=(n=r(69719))&&n.__esModule?n:{default:n};e.exports=function(e){e.addAccountAuth=function(t,r){var n=t.signingKey,a=t.username,s=t.authorizedUsername,u=t.role,c=void 0===u?"posting":u,l=t.weight;o.default.getAccounts([a],(function(t,o){var a=i(o,1)[0];if(t)return r(new Error(t),null);if(!a)return r(new Error("Invalid account name"),null);var u=a[c];if(-1!==u.account_auths.map((function(e){return e[0]})).indexOf(s))return r(null,null);l=l||a[c].weight_threshold,u.account_auths.push([s,l]);var f="owner"===c?u:void 0,h="active"===c?u:void 0,p="posting"===c?u:void 0;e.accountUpdate(n,a.name,f,h,p,a.memo_key,a.json_metadata,r)}))},e.removeAccountAuth=function(t,r){var n=t.signingKey,a=t.username,s=t.authorizedUsername,u=t.role,c=void 0===u?"posting":u;o.default.getAccounts([a],(function(t,o){var a=i(o,1)[0];if(t)return r(new Error(t),null);if(!a)return r(new Error("Invalid account name"),null);for(var u=a[c],l=u.account_auths.length,f=0;f<l;f++)if(u.account_auths[f][0]===s){u.account_auths.splice(f,1);break}if(l===u.account_auths.length)return r(null,null);var h="owner"===c?u:void 0,p="active"===c?u:void 0,_="posting"===c?u:void 0;e.accountUpdate(n,a.name,h,p,_,a.memo_key,a.json_metadata,r)}))},e.addKeyAuth=function(t,r){var n=t.signingKey,a=t.username,s=t.authorizedKey,u=t.role,c=void 0===u?"posting":u,l=t.weight;o.default.getAccounts([a],(function(t,o){var a=i(o,1)[0];if(t)return r(new Error(t),null);if(!a)return r(new Error("Invalid account name"),null);var u=a[c];if(-1!==u.key_auths.map((function(e){return e[0]})).indexOf(s))return r(null,null);l=l||a[c].weight_threshold,u.key_auths.push([s,l]);var f="owner"===c?u:void 0,h="active"===c?u:void 0,p="posting"===c?u:void 0;e.accountUpdate(n,a.name,f,h,p,a.memo_key,a.json_metadata,r)}))},e.removeKeyAuth=function(t,r){var n=t.signingKey,a=t.username,s=t.authorizedKey,u=t.role,c=void 0===u?"posting":u;o.default.getAccounts([a],(function(t,o){var a=i(o,1)[0];if(t)return r(new Error(t),null);if(!a)return r(new Error("Invalid account name"),null);for(var u=a[c],l=u.key_auths.length,f=0;f<l;f++)if(u.key_auths[f][0]===s){u.key_auths.splice(f,1);break}if(l===u.key_auths.length)return r(null,null);var h="owner"===c?u:void 0,p="active"===c?u:void 0,_="posting"===c?u:void 0;e.accountUpdate(n,a.name,h,p,_,a.memo_key,a.json_metadata,r)}))}}},37986:(e,t,r)=>{"use strict";var n=r(48764).Buffer,i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=_(r(96624)),a=_(r(9510)),s=_(r(8480)),u=_(r(44744)),c=_(r(69719)),l=_(r(19879)),f=r(64528),h=r(68638),p=r(6631);function _(e){return e&&e.__esModule?e:{default:e}}var d=r(18137),m=r(60457),v=(0,a.default)("hive:broadcast"),g=function(){},y=(0,u.default)(c.default),b={send:function(e,t,r){var n=void 0;b._prepareTransaction(e).then((function(e){"TST"===m.get("address_prefix")&&(e.operations=JSON.parse(JSON.stringify(e.operations).replace(/ HIVE/g," TESTS")),e.operations=JSON.parse(JSON.stringify(e.operations).replace(/ HBD/g," TBD"))),v("Signing transaction (transaction, transaction.operations)",e,e.operations);var r=h.transaction.toBuffer(e);return n=p.hash.sha256(r).toString("hex").slice(0,40),o.default.join(e,l.default.signTransaction(e,t))})).spread((function(e,t){return v("Broadcasting transaction (transaction, transaction.operations)",e,e.operations),c.default.broadcastTransactionAsync(t).then((function(e){return Object.assign({id:n},e,t)}))})).nodeify(r||g)},_prepareTransaction:function(e){return c.default.getDynamicGlobalPropertiesAsync().then((function(t){var r=new Date(t.time+"Z"),i=t.last_irreversible_block_num-1&65535;return c.default.getBlockHeaderAsync(t.last_irreversible_block_num).then((function(t){var o=t?t.previous:"0000000000000000000000000000000000000000";return Object.assign({ref_block_num:i,ref_block_prefix:new n(o,"hex").readUInt32LE(4),expiration:new Date(r.getTime()+6e5)},e)}))}))}};d.forEach((function(e){var t=(0,f.camelCase)(e.operation),r=e.params||[],n=-1!==r.indexOf("parent_author")&&-1!==r.indexOf("parent_permlink");b[t+"With"]=function(r,i,o){v('Sending operation "'+t+'" with',{options:i,callback:o});var a={};return e.roles&&e.roles.length&&(a[e.roles[0]]=r),b.send({extensions:[],operations:[[e.operation,Object.assign({},i,null!=i.json_metadata?{json_metadata:w(i.json_metadata)}:{},n&&null==i.permlink?{permlink:y.commentPermlink(i.parent_author,i.parent_permlink)}:{})]]},a,o)},b[t]=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];v('Parsing operation "'+t+'" with',{args:i});var a=r.reduce((function(e,t,r){return e[t]=i[r],e}),{}),s=i[r.length];return b[t+"With"](e,a,s)}})),b.updateOperations=function(){console.log("Warning: call to updateOperations() is deprecated and can safely be removed")};var w=function(e){return"object"===(void 0===e?"undefined":i(e))?JSON.stringify(e):e};(0,s.default)(b),o.default.promisifyAll(b),e.exports=b},18137:(e,t,r)=>{"use strict";r(60457),e.exports=[{roles:["posting","active","owner"],operation:"vote",params:["voter","author","permlink","weight"]},{roles:["posting","active","owner"],operation:"comment",params:["parent_author","parent_permlink","author","permlink","title","body","json_metadata"]},{roles:["active","owner"],operation:"transfer",params:["from","to","amount","memo"]},{roles:["active","owner"],operation:"transfer_to_vesting",params:["from","to","amount"]},{roles:["active","owner"],operation:"withdraw_vesting",params:["account","vesting_shares"]},{roles:["active","owner"],operation:"limit_order_create",params:["owner","orderid","amount_to_sell","min_to_receive","fill_or_kill","expiration"]},{roles:["active","owner"],operation:"limit_order_cancel",params:["owner","orderid"]},{roles:["active","owner"],operation:"price",params:["base","quote"]},{roles:["active","owner"],operation:"feed_publish",params:["publisher","exchange_rate"]},{roles:["active","owner"],operation:"convert",params:["owner","requestid","amount"]},{roles:["active","owner"],operation:"collateralized_convert",params:["owner","requestid","amount"]},{roles:["active","owner"],operation:"account_create",params:["fee","creator","new_account_name","owner","active","posting","memo_key","json_metadata"]},{roles:["active","owner"],operation:"account_update",params:["account","owner","active","posting","memo_key","json_metadata"]},{roles:["active","owner"],operation:"witness_update",params:["owner","url","block_signing_key","props","fee"]},{roles:["active","owner"],operation:"account_witness_vote",params:["account","witness","approve"]},{roles:["active","owner"],operation:"account_witness_proxy",params:["account","proxy"]},{roles:["active","owner"],operation:"pow",params:["worker","input","signature","work"]},{roles:["active","owner"],operation:"custom",params:["required_auths","id","data"]},{roles:["posting","active","owner"],operation:"delete_comment",params:["author","permlink"]},{roles:["posting","active","owner"],operation:"custom_json",params:["required_auths","required_posting_auths","id","json"]},{roles:["posting","active","owner"],operation:"comment_options",params:["author","permlink","max_accepted_payout","percent_hbd","allow_votes","allow_curation_rewards","extensions"]},{roles:["active","owner"],operation:"set_withdraw_vesting_route",params:["from_account","to_account","percent","auto_vest"]},{roles:["active","owner"],operation:"limit_order_create2",params:["owner","orderid","amount_to_sell","exchange_rate","fill_or_kill","expiration"]},{roles:["active","owner"],operation:"claim_account",params:["creator","fee","extensions"]},{roles:["active","owner"],operation:"create_claimed_account",params:["creator","new_account_name","owner","active","posting","memo_key","json_metadata","extensions"]},{roles:["active","owner"],operation:"request_account_recovery",params:["recovery_account","account_to_recover","new_owner_authority","extensions"]},{roles:["owner"],operation:"recover_account",params:["account_to_recover","new_owner_authority","recent_owner_authority","extensions"]},{roles:["owner"],operation:"change_recovery_account",params:["account_to_recover","new_recovery_account","extensions"]},{roles:["active","owner"],operation:"escrow_transfer",params:["from","to","agent","escrow_id","hbd_amount","hive_amount","fee","ratification_deadline","escrow_expiration","json_meta"]},{roles:["active","owner"],operation:"escrow_dispute",params:["from","to","agent","who","escrow_id"]},{roles:["active","owner"],operation:"escrow_release",params:["from","to","agent","who","receiver","escrow_id","hbd_amount","hive_amount"]},{roles:["active","owner"],operation:"pow2",params:["input","pow_summary"]},{roles:["active","owner"],operation:"escrow_approve",params:["from","to","agent","who","escrow_id","approve"]},{roles:["active","owner"],operation:"transfer_to_savings",params:["from","to","amount","memo"]},{roles:["active","owner"],operation:"transfer_from_savings",params:["from","request_id","to","amount","memo"]},{roles:["active","owner"],operation:"cancel_transfer_from_savings",params:["from","request_id"]},{roles:["posting","active","owner"],operation:"custom_binary",params:["id","data"]},{roles:["owner"],operation:"decline_voting_rights",params:["account","decline"]},{roles:["active","owner"],operation:"reset_account",params:["reset_account","account_to_reset","new_owner_authority"]},{roles:["owner","posting"],operation:"set_reset_account",params:["account","current_reset_account","reset_account"]},{roles:["posting","active","owner"],operation:"claim_reward_balance",params:["account","reward_hive","reward_hbd","reward_vests"]},{roles:["active","owner"],operation:"delegate_vesting_shares",params:["delegator","delegatee","vesting_shares"]},{roles:["active","owner"],operation:"account_create_with_delegation",params:["fee","delegation","creator","new_account_name","owner","active","posting","memo_key","json_metadata","extensions"]},{roles:["active","owner"],operation:"witness_set_properties",params:["owner","props","extensions"]},{roles:["posting","active","owner"],operation:"account_update2",params:["account","owner","active","posting","memo_key","json_metadata","posting_json_metadata","extensions"]},{roles:["active","owner"],operation:"create_proposal",params:["creator","receiver","start_date","end_date","daily_pay","subject","permlink","extensions"]},{roles:["active","owner"],operation:"update_proposal_votes",params:["voter","proposal_ids","approve","extensions"]},{roles:["active","owner"],operation:"remove_proposal",params:["proposal_owner","proposal_ids","extensions"]},{roles:["active","owner"],operation:"update_proposal",params:["proposal_id","creator","daily_pay","subject","permlink","extensions"]},{roles:["active","owner"],operation:"recurrent_transfer",params:["from","to","amount","memo","recurrence","executions","extensions"]},{roles:["posting","active","owner"],operation:"claim_reward_balance2",params:["account","reward_tokens","extensions"]},{roles:["posting","active","owner"],operation:"vote2",params:["voter","author","permlink","rshares","extensions"]},{roles:["active","owner"],operation:"smt_create",params:["control_account","symbol","smt_creation_fee","precision","extensions"]},{roles:["active","owner"],operation:"smt_setup",params:["control_account","symbol","max_supply","contribution_begin_time","contribution_end_time","launch_time","hive_units_min","min_unit_ratio","max_unit_ratio","extensions"]},{roles:["active","owner"],operation:"smt_setup_emissions",params:["control_account","symbol","schedule_time","emissions_unit","interval_seconds","interval_coount","lep_time","rep_time","lep_abs_amount","rep_abs_amount","lep_rel_amount_numerator","rep_rel_amount_numerator","rel_amount_denom_bits","remove","floor_emissions","extensions"]},{roles:["active","owner"],operation:"smt_setup_ico_tier",params:["control_account","symbol","hive_units_cap","generation_policy","remove","extensions"]},{roles:["active","owner"],operation:"smt_set_setup_parameters",params:["control_account","symbol","setup_parameters","extensions"]},{roles:["active","owner"],operation:"smt_set_runtime_parameters",params:["control_account","symbol","runtime_parameters","extensions"]},{roles:["active","owner"],operation:"smt_contribute",params:["contributor","symbol","contribution_id","contribution","extensions"]},{roles:["active","owner"],operation:"fill_convert_request",params:["owner","requestid","amount_in","amount_out"]},{roles:["posting","active","owner"],operation:"comment_reward",params:["author","permlink","payout"]},{roles:["active","owner"],operation:"liquidity_reward",params:["owner","payout"]},{roles:["active","owner"],operation:"interest",params:["owner","interest"]},{roles:["active","owner"],operation:"fill_vesting_withdraw",params:["from_account","to_account","withdrawn","deposited"]},{roles:["posting","active","owner"],operation:"fill_order",params:["current_owner","current_orderid","current_pays","open_owner","open_orderid","open_pays"]},{roles:["posting","active","owner"],operation:"fill_transfer_from_savings",params:["from","to","amount","request_id","memo"]}]},60457:(e,t,r)=>{"use strict";var n,i=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=(n=r(66073))&&n.__esModule?n:{default:n},a=r(56023),s=function(){function e(t){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(0,o.default)(t,(function(e,t){r[t]=e}))}return i(e,[{key:"get",value:function(e){return this[e]}},{key:"set",value:function(e,t){this[e]=t}}]),e}();if(e.exports=new s(a),void 0!==e.exports.Config)throw new Error("default config.json file may not contain a property 'Config'");e.exports.Config=s},44744:(e,t,r)=>{"use strict";var n=o(r(27361)),i=r(6631);function o(e){return e&&e.__esModule?e:{default:e}}o(r(60457)),e.exports=function(e){function t(e,t){var r=parseFloat(e.vesting_shares.split(" ")[0]),n=parseFloat(t.total_vesting_shares.split(" ")[0]);return parseFloat(t.total_vesting_fund_hive.split(" ")[0])*(r/n)}var r=t;function o(e,t){var r=e?e.reduce((function(e,t){return-1!==t.sell_price.base.indexOf("HBD")&&(e+=t.for_sale),e}),0)/t:0;return{hiveOrders:e?e.reduce((function(e,t){return-1!==t.sell_price.base.indexOf("HIVE")&&(e+=t.for_sale),e}),0)/t:0,hbdOrders:r}}function a(e){var t=0,r=0;return e.forEach((function(e){var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(e.amount.split(" "),2),i=n[0],o=n[1];"HIVE"===o?t+=parseFloat(i):"HBD"===o&&(r+=parseFloat(i))})),{savings_pending:t,savings_hbd_pending:r}}function s(e){var t=void 0,r=e.base,n=e.quote;return/ HBD$/.test(r)&&/ HIVE$/.test(n)&&(t=parseFloat(r.split(" ")[0])/parseFloat(n.split(" ")[0])),t}var u=s;return{reputation:function(e){if(null==e)return e;var t=e<0,r=String(e);r=t?r.substring(1):r;var n=Math.log10((r>0?r:-r)-10)-9;return n=t?-n:n,parseInt(9*n+25)},vestToSteem:function(e,t,r){return console.warn("vestToSteem() is deprecated and will be removed in the future releases. Use vestToHive() instead."),parseFloat(r)*(parseFloat(e)/parseFloat(t))},vestToHive:function(e,t,r){return parseFloat(r)*(parseFloat(e)/parseFloat(t))},commentPermlink:function(e,t){var r=(new Date).toISOString().replace(/[^a-zA-Z0-9]+/g,"").toLowerCase();return("re-"+e+"-"+(t=t.replace(/(-\d{8}t\d{9}z)/g,""))+"-"+r).replace(".","")},amount:function(e,t){return e.toFixed(3)+" "+t},numberWithCommas:function(e){return e.replace(/\B(?=(\d{3})+(?!\d))/g,",")},vestingSteem:t,vestingHive:r,estimateAccountValue:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.gprops,c=i.feed_price,l=i.open_orders,f=i.savings_withdraws,h=i.vesting_steem,p=i.vesting_hive,_=[],d=t.name,m=1e3,v=void 0,g=void 0;return h&&(p=h),p&&c||(s&&c?p=r(t,s):_.push(e.getStateAsync("/@"+d).then((function(e){s=e.props,c=e.feed_price,p=r(t,s)})))),l?v=o(l,m):_.push(e.getOpenOrdersAsync(d).then((function(e){v=o(e,m)}))),f?g=a(f):_.push(e.getSavingsWithdrawFromAsync(d).then((function(e){g=a(e)}))),Promise.all(_).then((function(){var e=u(c),r=t.savings_balance,i=t.savings_hbd_balance,o=parseFloat(t.balance.split(" ")[0]),a=parseFloat(r.split(" ")[0]),s=parseFloat(t.hbd_balance),l=parseFloat(i.split(" ")[0]),f=0,h=(new Date).getTime();(t.other_history||[]).reduce((function(e,t){if("convert"!==(0,n.default)(t,[1,"op",0],""))return e;if(new Date((0,n.default)(t,[1,"timestamp"])).getTime()+3024e5<h)return e;var r=parseFloat((0,n.default)(t,[1,"op",1,"amount"]).replace(" HBD",""));f+=r}),[]);var _=s+l+g.savings_hbd_pending+v.hbdOrders+f;return((p+o+a+g.savings_pending+v.hiveOrders)*e+_).toFixed(2)}))},createSuggestedPassword:function(){return i.key_utils.get_random_key().toWif().substring(3,35)},pricePerSteem:s,pricePerHive:u}}},60590:(e,t,r)=>{"use strict";var n=r(69719),i=r(19879),o=r(37986),a=r(44744)(n),s=r(76886),u=r(60457),c=r(64528);e.exports={api:n,auth:i,broadcast:o,formatter:a,memo:s,config:u,utils:c}},64528:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=function(e){return e.replace(h,(function(e,t){return t.toUpperCase()}))},t.validateAccountName=function(e){var t,r=void 0,n=void 0,i=void 0;if(i="Account name should ",!e)return i+"not be empty.";var o=e.length;if(o<3)return i+"be longer.";if(o>16)return i+"be shorter.";/\./.test(e)&&(i="Each account segment should ");var a=e.split(".");for(r=0,t=a.length;r<t;r++){if(n=a[r],!/^[a-z]/.test(n))return i+"start with a letter.";if(!/^[a-z0-9-]*$/.test(n))return i+"have only letters, digits, or dashes.";if(/--/.test(n))return i+"have only one dash in a row.";if(!/[a-z0-9]$/.test(n))return i+"end with a letter or digit.";if(!(n.length>=3))return i+"be longer"}return null},t.buildWitnessUpdateOp=function(e,t){var r={extensions:[],owner:e,props:[]},n=!0,i=!1,o=void 0;try{for(var a,h=Object.keys(t)[Symbol.iterator]();!(n=(a=h.next()).done);n=!0){var d=a.value,m=void 0;switch(d){case"key":case"new_signing_key":m=l;break;case"account_subsidy_budget":case"account_subsidy_decay":case"maximum_block_size":m=u;break;case"hbd_interest_rate":m=s;break;case"url":m=c;break;case"hbd_exchange_rate":m=p;break;case"account_creation_fee":m=f;break;default:throw new Error("Unknown witness prop: "+d)}r.props.push([d,_(m,t[d])])}}catch(e){i=!0,o=e}finally{try{!n&&h.return&&h.return()}finally{if(i)throw o}}return r.props.sort((function(e,t){return e[0].localeCompare(t[0])})),["witness_set_properties",r]},t.autoDetectApiVersion=function(){console.log("Warning: call to autoDetectApiVersion() is deprecated and can safely be removed")};var n=o(r(22405)),i=o(r(13773));function o(e){return e&&e.__esModule?e:{default:e}}o(r(60457)),r(16394);var a=r(34779),s=n.default.uint16,u=n.default.uint32,c=n.default.string,l=n.default.public_key,f=n.default.asset,h=/_([a-z])/g,p=new i.default("price",{base:f,quote:f});function _(e,t){var r=new a(a.DEFAULT_CAPACITY,a.LITTLE_ENDIAN);return e.appendByteBuffer(r,t),r.flip(),r.toString("hex")}},9510:(e,t,r)=>{var n=r(34155).process;function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e={NODE_ENV:"production"}.DEBUG),e}(t=e.exports=r(1413)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var r=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,n)}},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())},1413:(e,t,r)=>{var n;function i(e){function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var a=new Array(arguments.length),s=0;s<a.length;s++)a[s]=arguments[s];a[0]=t.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=t.formatters[n];if("function"==typeof i){var o=a[u];r=i.call(e,o),a.splice(u,1),u--}return r})),t.formatArgs.call(e,a);var c=r.log||t.log||console.log.bind(console);c.apply(e,a)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var r,n=0;for(r in e)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t.colors[Math.abs(n)%t.colors.length]}(e),"function"==typeof t.init&&t.init(r),r}(t=e.exports=i.debug=i.default=i).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){t.save(e),t.names=[],t.skips=[];for(var r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length,i=0;i<n;i++)r[i]&&("-"===(e=r[i].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(57824),t.names=[],t.skips=[],t.formatters={}},72597:function(e,t,r){var n,i;n="undefined"!=typeof self?self:this,i=function(t){t.PrivateKey=i,t.PublicKey=o,t.generateKeys=function(){return a(n.ecc.ecdsa.generateKeys(n.ecc.curves.k256))},t.keysFromPassword=function(e,t){var r=n.codec.steemit.keysFromPassword(e,t);return{owner:a(r.owner),memo:a(r.memo),posting:a(r.posting),active:a(r.active)}},t.sha256=function(e){return u(n.hash.sha256.hash(s(e)))},t.ripemd160=function(e){return u(n.hash.ripemd160.hash(s(e)))},t.hexify=function(e){for(var t="",r=new Uint8Array(e),n=0;n<r.byteLength;n++)r[n]<16&&(t+="0"),t+=r[n].toString(16);return t};var n=function(){"use strict";var t={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(e){this.toString=function(){return"CORRUPT: "+this.message},this.message=e},invalid:function(e){this.toString=function(){return"INVALID: "+this.message},this.message=e},bug:function(e){this.toString=function(){return"BUG: "+this.message},this.message=e},notReady:function(e){this.toString=function(){return"NOT READY: "+this.message},this.message=e}}};t.bitArray={bitSlice:function(e,r,n){return e=t.bitArray._shiftRight(e.slice(r/32),32-(31&r)).slice(1),void 0===n?e:t.bitArray.clamp(e,n-r)},extract:function(e,t,r){var n=Math.floor(-t-r&31);return(-32&(t+r-1^t)?e[t/32|0]<<32-n^e[t/32+1|0]>>>n:e[t/32|0]>>>n)&(1<<r)-1},concat:function(e,r){if(0===e.length||0===r.length)return e.concat(r);var n=e[e.length-1],i=t.bitArray.getPartial(n);return 32===i?e.concat(r):t.bitArray._shiftRight(r,i,0|n,e.slice(0,e.length-1))},bitLength:function(e){var r,n=e.length;return 0===n?0:(r=e[n-1],32*(n-1)+t.bitArray.getPartial(r))},clamp:function(e,r){if(32*e.length<r)return e;var n=(e=e.slice(0,Math.ceil(r/32))).length;return r&=31,n>0&&r&&(e[n-1]=t.bitArray.partial(r,e[n-1]&2147483648>>r-1,1)),e},partial:function(e,t,r){return 32===e?t:(r?0|t:t<<32-e)+1099511627776*e},getPartial:function(e){return Math.round(e/1099511627776)||32},equal:function(e,r){if(t.bitArray.bitLength(e)!==t.bitArray.bitLength(r))return!1;var n,i=0;for(n=0;n<e.length;n++)i|=e[n]^r[n];return 0===i},_shiftRight:function(e,r,n,i){var o,a,s;for(void 0===i&&(i=[]);r>=32;r-=32)i.push(n),n=0;if(0===r)return i.concat(e);for(o=0;o<e.length;o++)i.push(n|e[o]>>>r),n=e[o]<<32-r;return a=e.length?e[e.length-1]:0,s=t.bitArray.getPartial(a),i.push(t.bitArray.partial(r+s&31,r+s>32?n:i.pop(),1)),i},_xor4:function(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]},byteswapM:function(e){var t,r;for(t=0;t<e.length;++t)r=e[t],e[t]=r>>>24|r>>>8&65280|(65280&r)<<8|r<<24;return e}},t.cipher.aes=function(e){this._tables[0][0][0]||this._precompute();var r,n,i,o,a,s=this._tables[0][4],u=this._tables[1],c=e.length,l=1;if(4!==c&&6!==c&&8!==c)throw new t.exception.invalid("invalid aes key size");for(this._key=[o=e.slice(0),a=[]],r=c;r<4*c+28;r++)i=o[r-1],(r%c==0||8===c&&r%c==4)&&(i=s[i>>>24]<<24^s[i>>16&255]<<16^s[i>>8&255]<<8^s[255&i],r%c==0&&(i=i<<8^i>>>24^l<<24,l=l<<1^283*(l>>7))),o[r]=o[r-c]^i;for(n=0;r;n++,r--)i=o[3&n?r:r-4],a[n]=r<=4||n<4?i:u[0][s[i>>>24]]^u[1][s[i>>16&255]]^u[2][s[i>>8&255]]^u[3][s[255&i]]},t.cipher.aes.prototype={encrypt:function(e){return this._crypt(e,0)},decrypt:function(e){return this._crypt(e,1)},_tables:[[[],[],[],[],[]],[[],[],[],[],[]]],_precompute:function(){var e,t,r,n,i,o,a,s,u=this._tables[0],c=this._tables[1],l=u[4],f=c[4],h=[],p=[];for(e=0;e<256;e++)p[(h[e]=e<<1^283*(e>>7))^e]=e;for(t=r=0;!l[t];t^=n||1,r=p[r]||1)for(o=(o=r^r<<1^r<<2^r<<3^r<<4)>>8^255&o^99,l[t]=o,f[o]=t,s=16843009*h[i=h[n=h[t]]]^65537*i^257*n^16843008*t,a=257*h[o]^16843008*o,e=0;e<4;e++)u[e][t]=a=a<<24^a>>>8,c[e][o]=s=s<<24^s>>>8;for(e=0;e<5;e++)u[e]=u[e].slice(0),c[e]=c[e].slice(0)},_crypt:function(e,r){if(4!==e.length)throw new t.exception.invalid("invalid aes block size");var n,i,o,a,s=this._key[r],u=e[0]^s[0],c=e[r?3:1]^s[1],l=e[2]^s[2],f=e[r?1:3]^s[3],h=s.length/4-2,p=4,_=[0,0,0,0],d=this._tables[r],m=d[0],v=d[1],g=d[2],y=d[3],b=d[4];for(a=0;a<h;a++)n=m[u>>>24]^v[c>>16&255]^g[l>>8&255]^y[255&f]^s[p],i=m[c>>>24]^v[l>>16&255]^g[f>>8&255]^y[255&u]^s[p+1],o=m[l>>>24]^v[f>>16&255]^g[u>>8&255]^y[255&c]^s[p+2],f=m[f>>>24]^v[u>>16&255]^g[c>>8&255]^y[255&l]^s[p+3],p+=4,u=n,c=i,l=o;for(a=0;a<4;a++)_[r?3&-a:a]=b[u>>>24]<<24^b[c>>16&255]<<16^b[l>>8&255]<<8^b[255&f]^s[p++],n=u,u=c,c=l,l=f,f=n;return _}},t.bn=function(e){this.initWith(e)},t.bn.prototype={radix:24,maxMul:8,_class:t.bn,copy:function(){return new this._class(this)},initWith:function(e){var t,r=0;switch(typeof e){case"object":this.limbs=e.limbs.slice(0);break;case"number":this.limbs=[e],this.normalize();break;case"string":for(e=e.replace(/^0x/,""),this.limbs=[],t=this.radix/4,r=0;r<e.length;r+=t)this.limbs.push(parseInt(e.substring(Math.max(e.length-r-t,0),e.length-r),16));break;default:this.limbs=[0]}return this},equals:function(e){"number"==typeof e&&(e=new this._class(e));var t,r=0;for(this.fullReduce(),e.fullReduce(),t=0;t<this.limbs.length||t<e.limbs.length;t++)r|=this.getLimb(t)^e.getLimb(t);return 0===r},getLimb:function(e){return e>=this.limbs.length?0:this.limbs[e]},greaterEquals:function(e){"number"==typeof e&&(e=new this._class(e));var t,r,n,i=0,o=0;for(t=Math.max(this.limbs.length,e.limbs.length)-1;t>=0;t--)i|=(r=this.getLimb(t))-(n=e.getLimb(t))&~(o|=n-r&~i);return(o|~i)>>>31},toString:function(){this.fullReduce();var e,t,r="",n=this.limbs;for(e=0;e<this.limbs.length;e++){for(t=n[e].toString(16);e<this.limbs.length-1&&t.length<6;)t="0"+t;r=t+r}return"0x"+r},addM:function(e){"object"!=typeof e&&(e=new this._class(e));var t,r=this.limbs,n=e.limbs;for(t=r.length;t<n.length;t++)r[t]=0;for(t=0;t<n.length;t++)r[t]+=n[t];return this},doubleM:function(){var e,t,r=0,n=this.radix,i=this.radixMask,o=this.limbs;for(e=0;e<o.length;e++)t=(t=o[e])+t+r,o[e]=t&i,r=t>>n;return r&&o.push(r),this},halveM:function(){var e,t,r=0,n=this.radix,i=this.limbs;for(e=i.length-1;e>=0;e--)t=i[e],i[e]=t+r>>1,r=(1&t)<<n;return i[i.length-1]||i.pop(),this},subM:function(e){"object"!=typeof e&&(e=new this._class(e));var t,r=this.limbs,n=e.limbs;for(t=r.length;t<n.length;t++)r[t]=0;for(t=0;t<n.length;t++)r[t]-=n[t];return this},mod:function(e){var r=!this.greaterEquals(new t.bn(0));e=new t.bn(e).normalize();var n=new t.bn(this).normalize(),i=0;for(r&&(n=new t.bn(0).subM(n).normalize());n.greaterEquals(e);i++)e.doubleM();for(r&&(n=e.sub(n).normalize());i>0;i--)e.halveM(),n.greaterEquals(e)&&n.subM(e).normalize();return n.trim()},inverseMod:function(e){var r,n,i=new t.bn(1),o=new t.bn(0),a=new t.bn(this),s=new t.bn(e),u=1;if(!(1&e.limbs[0]))throw new t.exception.invalid("inverseMod: p must be odd");do{for(1&a.limbs[0]&&(a.greaterEquals(s)||(r=a,a=s,s=r,r=i,i=o,o=r),a.subM(s),a.normalize(),i.greaterEquals(o)||i.addM(e),i.subM(o)),a.halveM(),1&i.limbs[0]&&i.addM(e),i.normalize(),i.halveM(),n=u=0;n<a.limbs.length;n++)u|=a.limbs[n]}while(u);if(!s.equals(1))throw new t.exception.invalid("inverseMod: p and x must be relatively prime");return o},add:function(e){return this.copy().addM(e)},sub:function(e){return this.copy().subM(e)},mul:function(e){"number"==typeof e&&(e=new this._class(e));var t,r,n,i=this.limbs,o=e.limbs,a=i.length,s=o.length,u=new this._class,c=u.limbs,l=this.maxMul;for(t=0;t<this.limbs.length+e.limbs.length+1;t++)c[t]=0;for(t=0;t<a;t++){for(n=i[t],r=0;r<s;r++)c[t+r]+=n*o[r];--l||(l=this.maxMul,u.cnormalize())}return u.cnormalize().reduce()},square:function(){return this.mul(this)},power:function(e){e=new t.bn(e).normalize().trim().limbs;var r,n,i=new this._class(1),o=this;for(r=0;r<e.length;r++)for(n=0;n<this.radix&&(e[r]&1<<n&&(i=i.mul(o)),r!=e.length-1||e[r]>>n+1!=0);n++)o=o.square();return i},mulmod:function(e,t){return this.mod(t).mul(e.mod(t)).mod(t)},powermod:function(e,r){if(e=new t.bn(e),1==(1&(r=new t.bn(r)).limbs[0])){var n=this.montpowermod(e,r);if(0!=n)return n}var i,o,a=e.normalize().trim().limbs,s=new this._class(1),u=this;for(i=0;i<a.length;i++)for(o=0;o<this.radix&&(a[i]&1<<o&&(s=s.mulmod(u,r)),i!=a.length-1||a[i]>>o+1!=0);o++)u=u.mulmod(u,r);return s},montpowermod:function(e,r){e=new t.bn(e).normalize().trim(),r=new t.bn(r);var n,i,o,a,s,u=this.radix,c=new this._class(1),l=this.copy(),f=e.bitLength();for(o=new t.bn({limbs:r.copy().normalize().trim().limbs.map((function(){return 0}))}),a=this.radix;a>0;a--)if(1==(r.limbs[r.limbs.length-1]>>a&1)){o.limbs[o.limbs.length-1]=1<<a;break}if(0==f)return this;s=f<18?1:f<48?3:f<144?4:f<768?5:6;for(var h=o.copy(),p=r.copy(),_=new t.bn(1),d=new t.bn(0),m=o.copy();m.greaterEquals(1);)m.halveM(),0==(1&_.limbs[0])?(_.halveM(),d.halveM()):(_.addM(p),_.halveM(),d.halveM(),d.addM(h));_=_.normalize(),d=d.normalize(),h.doubleM();var v=h.mulmod(h,r);if(!h.mul(_).sub(r.mul(d)).equals(1))return!1;var g=function(e){return y(e,v)},y=function(e,t){var n,i,s,c,l=(1<<a+1)-1;for((s=(i=e.mul(t)).mul(d)).limbs=s.limbs.slice(0,o.limbs.length),s.limbs.length==o.limbs.length&&(s.limbs[o.limbs.length-1]&=l),s=s.mul(r),(c=i.add(s).normalize().trim()).limbs=c.limbs.slice(o.limbs.length-1),n=0;n<c.limbs.length;n++)n>0&&(c.limbs[n-1]|=(c.limbs[n]&l)<<u-a-1),c.limbs[n]=c.limbs[n]>>a+1;return c.greaterEquals(r)&&c.subM(r),c};l=g(l),c=g(c);var b,w={},k=(1<<s-1)-1;for(w[1]=l.copy(),w[2]=y(l,l),b=1;b<=k;b++)w[2*b+1]=y(w[2*b-1],w[2]);var x=function(e,t){var r=t%e.radix;return(e.limbs[Math.floor(t/e.radix)]&1<<r)>>r};for(n=e.bitLength()-1;n>=0;)if(0==x(e,n))c=y(c,c),n-=1;else{for(var E=n-s+1;0==x(e,E);)E++;var B=0;for(i=E;i<=n;i++)B+=x(e,i)<<i-E,c=y(c,c);c=y(c,w[B]),n=E-1}return y(c,1)},trim:function(){var e,t=this.limbs;do{e=t.pop()}while(t.length&&0===e);return t.push(e),this},reduce:function(){return this},fullReduce:function(){return this.normalize()},normalize:function(){var e,t,r=0,n=this.placeVal,i=this.ipv,o=this.limbs,a=o.length,s=this.radixMask;for(e=0;e<a||0!==r&&-1!==r;e++)r=((t=(o[e]||0)+r)-(o[e]=t&s))*i;return-1===r&&(o[e-1]-=n),this.trim(),this},cnormalize:function(){var e,t,r=0,n=this.ipv,i=this.limbs,o=i.length,a=this.radixMask;for(e=0;e<o-1;e++)r=((t=i[e]+r)-(i[e]=t&a))*n;return i[e]+=r,this},toBits:function(e){this.fullReduce(),e=e||this.exponent||this.bitLength();var r=Math.floor((e-1)/24),n=t.bitArray,i=(e+7&-8)%this.radix||this.radix,o=[n.partial(i,this.getLimb(r))];for(r--;r>=0;r--)o=n.concat(o,[n.partial(Math.min(this.radix,e),this.getLimb(r))]),e-=this.radix;return o},bitLength:function(){this.fullReduce();for(var e=this.radix*(this.limbs.length-1),t=this.limbs[this.limbs.length-1];t;t>>>=1)e++;return e+7&-8}},t.bn.fromBits=function(e){var r=new this,n=[],i=t.bitArray,o=this.prototype,a=Math.min(this.bitLength||4294967296,i.bitLength(e)),s=a%o.radix||o.radix;for(n[0]=i.extract(e,0,s);s<a;s+=o.radix)n.unshift(i.extract(e,s,o.radix));return r.limbs=n,r},t.bn.prototype.ipv=1/(t.bn.prototype.placeVal=Math.pow(2,t.bn.prototype.radix)),t.bn.prototype.radixMask=(1<<t.bn.prototype.radix)-1,t.bn.pseudoMersennePrime=function(e,r){function n(e){this.initWith(e)}var i,o,a,s=n.prototype=new t.bn;for(a=s.modOffset=Math.ceil(o=e/s.radix),s.exponent=e,s.offset=[],s.factor=[],s.minOffset=a,s.fullMask=0,s.fullOffset=[],s.fullFactor=[],s.modulus=n.modulus=new t.bn(Math.pow(2,e)),s.fullMask=0|-Math.pow(2,e%s.radix),i=0;i<r.length;i++)s.offset[i]=Math.floor(r[i][0]/s.radix-o),s.fullOffset[i]=Math.ceil(r[i][0]/s.radix-o),s.factor[i]=r[i][1]*Math.pow(.5,e-r[i][0]+s.offset[i]*s.radix),s.fullFactor[i]=r[i][1]*Math.pow(.5,e-r[i][0]+s.fullOffset[i]*s.radix),s.modulus.addM(new t.bn(Math.pow(2,r[i][0])*r[i][1])),s.minOffset=Math.min(s.minOffset,-s.offset[i]);return s._class=n,s.modulus.cnormalize(),s.reduce=function(){var e,t,r,n,i=this.modOffset,o=this.limbs,a=this.offset,s=this.offset.length,u=this.factor;for(e=this.minOffset;o.length>i;){for(r=o.pop(),n=o.length,t=0;t<s;t++)o[n+a[t]]-=u[t]*r;--e||(o.push(0),this.cnormalize(),e=this.minOffset)}return this.cnormalize(),this},s._strongReduce=-1===s.fullMask?s.reduce:function(){var e,t,r=this.limbs,n=r.length-1;if(this.reduce(),n===this.modOffset-1){for(t=r[n]&this.fullMask,r[n]-=t,e=0;e<this.fullOffset.length;e++)r[n+this.fullOffset[e]]-=this.fullFactor[e]*t;this.normalize()}},s.fullReduce=function(){var e,t;for(this._strongReduce(),this.addM(this.modulus),this.addM(this.modulus),this.normalize(),this._strongReduce(),t=this.limbs.length;t<this.modOffset;t++)this.limbs[t]=0;for(e=this.greaterEquals(this.modulus),t=0;t<this.limbs.length;t++)this.limbs[t]-=this.modulus.limbs[t]*e;return this.cnormalize(),this},s.inverse=function(){return this.power(this.modulus.sub(2))},n.fromBits=t.bn.fromBits,n};var n,i=t.bn.pseudoMersennePrime;return t.bn.prime={p127:i(127,[[0,-1]]),p25519:i(255,[[0,-19]]),p192k:i(192,[[32,-1],[12,-1],[8,-1],[7,-1],[6,-1],[3,-1],[0,-1]]),p224k:i(224,[[32,-1],[12,-1],[11,-1],[9,-1],[7,-1],[4,-1],[1,-1],[0,-1]]),p256k:i(256,[[32,-1],[9,-1],[8,-1],[7,-1],[6,-1],[4,-1],[0,-1]]),p192:i(192,[[0,-1],[64,-1]]),p224:i(224,[[0,1],[96,-1]]),p256:i(256,[[0,-1],[96,1],[192,1],[224,-1]]),p384:i(384,[[0,-1],[32,1],[96,-1],[128,-1]]),p521:i(521,[[0,-1]])},t.bn.random=function(e,r){"object"!=typeof e&&(e=new t.bn(e));for(var n,i,o=e.limbs.length,a=e.limbs[o-1]+1,s=new t.bn;;){do{(n=t.random.randomWords(o,r))[o-1]<0&&(n[o-1]+=4294967296)}while(Math.floor(n[o-1]/a)===Math.floor(4294967296/a));for(n[o-1]%=a,i=0;i<o-1;i++)n[i]&=e.radixMask;if(s.limbs=n,!s.greaterEquals(e))return s}},"undefined"==typeof ArrayBuffer&&((n=this).ArrayBuffer=function(){},n.DataView=function(){}),t.codec.arrayBuffer={fromBits:function(e,r,n){var i,o,a,s,u;if(r=null==r||r,n=n||8,0===e.length)return new ArrayBuffer(0);if(a=t.bitArray.bitLength(e)/8,t.bitArray.bitLength(e)%8!=0)throw new t.exception.invalid("Invalid bit size, must be divisble by 8 to fit in an arraybuffer correctly");for(r&&a%n!=0&&(a+=n-a%n),s=new DataView(new ArrayBuffer(4*e.length)),o=0;o<e.length;o++)s.setUint32(4*o,e[o]<<32);if((i=new DataView(new ArrayBuffer(a))).byteLength===s.byteLength)return s.buffer;for(u=s.byteLength<i.byteLength?s.byteLength:i.byteLength,o=0;o<u;o++)i.setUint8(o,s.getUint8(o));return i.buffer},toBits:function(e){var r,n,i,o=[];if(0===e.byteLength)return[];r=(n=new DataView(e)).byteLength-n.byteLength%4;for(var a=0;a<r;a+=4)o.push(n.getUint32(a));if(n.byteLength%4!=0){i=new DataView(new ArrayBuffer(4)),a=0;for(var s=n.byteLength%4;a<s;a++)i.setUint8(a+4-s,n.getUint8(r+a));o.push(t.bitArray.partial(n.byteLength%4*8,i.getUint32(0)))}return o},hexDumpBuffer:function(e){for(var t,r=new DataView(e),n="",i=0;i<r.byteLength;i+=2)i%16==0&&(n+="\n"+i.toString(16)+"\t"),n+=(t=r.getUint16(i).toString(16),((t+="").length>=4?t:new Array(4-t.length+1).join("0")+t)+" ");void 0===typeof console&&(console=console||{log:function(){}}),console.log(n.toUpperCase())}},t.codec.utf8String={fromBits:function(e){var r,n,i="",o=t.bitArray.bitLength(e);for(r=0;r<o/8;r++)0==(3&r)&&(n=e[r/4]),i+=String.fromCharCode(n>>>8>>>8>>>8),n<<=8;return decodeURIComponent(escape(i))},toBits:function(e){e=unescape(encodeURIComponent(e));var r,n=[],i=0;for(r=0;r<e.length;r++)i=i<<8|e.charCodeAt(r),3==(3&r)&&(n.push(i),i=0);return 3&r&&n.push(t.bitArray.partial(8*(3&r),i)),n}},t.ecc={},t.ecc.point=function(e,r,n){void 0===r?this.isIdentity=!0:(r instanceof t.bn&&(r=new e.field(r)),n instanceof t.bn&&(n=new e.field(n)),this.x=r,this.y=n,this.isIdentity=!1),this.curve=e},t.ecc.point.prototype={toJac:function(){return new t.ecc.pointJac(this.curve,this.x,this.y,new this.curve.field(1))},mult:function(e){return this.toJac().mult(e,this).toAffine()},mult2:function(e,t,r){return this.toJac().mult2(e,this,t,r).toAffine()},multiples:function(){var e,r,n;if(void 0===this._multiples)for(n=this.toJac().doubl(),e=this._multiples=[new t.ecc.point(this.curve),this,n.toAffine()],r=3;r<16;r++)n=n.add(this),e.push(n.toAffine());return this._multiples},negate:function(){var e=new this.curve.field(0).sub(this.y).normalize().reduce();return new t.ecc.point(this.curve,this.x,e)},isValid:function(){return this.y.square().equals(this.curve.b.add(this.x.mul(this.curve.a.add(this.x.square()))))},toBits:function(){return t.bitArray.concat(this.x.toBits(),this.y.toBits())}},t.ecc.pointJac=function(e,t,r,n){void 0===t?this.isIdentity=!0:(this.x=t,this.y=r,this.z=n,this.isIdentity=!1),this.curve=e},t.ecc.pointJac.prototype={add:function(e){var r,n,i,o,a,s,u,c,l,f,h,p=this;if(p.curve!==e.curve)throw new t.exception.invalid("sjcl.ecc.add(): Points must be on the same curve to add them!");return p.isIdentity?e.toJac():e.isIdentity?p:(r=p.z.square(),(n=e.x.mul(r).subM(p.x)).equals(0)?p.y.equals(e.y.mul(r.mul(p.z)))?p.doubl():new t.ecc.pointJac(p.curve):(i=e.y.mul(r.mul(p.z)).subM(p.y),o=n.square(),a=i.square(),s=n.square().mul(n).addM(p.x.add(p.x).mul(o)),u=a.subM(s),c=p.x.mul(o).subM(u).mul(i),l=p.y.mul(n.square().mul(n)),f=c.subM(l),h=p.z.mul(n),new t.ecc.pointJac(this.curve,u,f,h)))},doubl:function(){if(this.isIdentity)return this;var e=this.y.square(),r=e.mul(this.x.mul(4)),n=e.square().mul(8),i=this.z.square(),o=this.curve.a.toString()==new t.bn(-3).toString()?this.x.sub(i).mul(3).mul(this.x.add(i)):this.x.square().mul(3).add(i.square().mul(this.curve.a)),a=o.square().subM(r).subM(r),s=r.sub(a).mul(o).subM(n),u=this.y.add(this.y).mul(this.z);return new t.ecc.pointJac(this.curve,a,s,u)},toAffine:function(){if(this.isIdentity||this.z.equals(0))return new t.ecc.point(this.curve);var e=this.z.inverse(),r=e.square();return new t.ecc.point(this.curve,this.x.mul(r).fullReduce(),this.y.mul(r.mul(e)).fullReduce())},mult:function(e,r){"number"==typeof e?e=[e]:void 0!==e.limbs&&(e=e.normalize().limbs);var n,i,o=new t.ecc.point(this.curve).toJac(),a=r.multiples();for(n=e.length-1;n>=0;n--)for(i=t.bn.prototype.radix-4;i>=0;i-=4)o=o.doubl().doubl().doubl().doubl().add(a[e[n]>>i&15]);return o},mult2:function(e,r,n,i){"number"==typeof e?e=[e]:void 0!==e.limbs&&(e=e.normalize().limbs),"number"==typeof n?n=[n]:void 0!==n.limbs&&(n=n.normalize().limbs);var o,a,s,u,c=new t.ecc.point(this.curve).toJac(),l=r.multiples(),f=i.multiples();for(o=Math.max(e.length,n.length)-1;o>=0;o--)for(s=0|e[o],u=0|n[o],a=t.bn.prototype.radix-4;a>=0;a-=4)c=c.doubl().doubl().doubl().doubl().add(l[s>>a&15]).add(f[u>>a&15]);return c},negate:function(){return this.toAffine().negate().toJac()},isValid:function(){var e=this.z.square(),t=e.square(),r=t.mul(e);return this.y.square().equals(this.curve.b.mul(r).add(this.x.mul(this.curve.a.mul(t).add(this.x.square()))))}},t.ecc.curve=function(e,r,n,i,o,a){this.field=e,this.r=new t.bn(r),this.a=new e(n),this.b=new e(i),this.G=new t.ecc.point(this,new e(o),new e(a))},t.ecc.curve.prototype.fromBits=function(e){var r=t.bitArray,n=this.field.prototype.exponent+7&-8,i=new t.ecc.point(this,this.field.fromBits(r.bitSlice(e,0,n)),this.field.fromBits(r.bitSlice(e,n,2*n)));if(!i.isValid())throw new t.exception.corrupt("not on the curve!");return i},t.ecc.curves={c192:new t.ecc.curve(t.bn.prime.p192,"0xffffffffffffffffffffffff99def836146bc9b1b4d22831",-3,"0x64210519e59c80e70fa7e9ab72243049feb8deecc146b9b1","0x188da80eb03090f67cbf20eb43a18800f4ff0afd82ff1012","0x07192b95ffc8da78631011ed6b24cdd573f977a11e794811"),c224:new t.ecc.curve(t.bn.prime.p224,"0xffffffffffffffffffffffffffff16a2e0b8f03e13dd29455c5c2a3d",-3,"0xb4050a850c04b3abf54132565044b0b7d7bfd8ba270b39432355ffb4","0xb70e0cbd6bb4bf7f321390b94a03c1d356c21122343280d6115c1d21","0xbd376388b5f723fb4c22dfe6cd4375a05a07476444d5819985007e34"),c256:new t.ecc.curve(t.bn.prime.p256,"0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551",-3,"0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b","0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296","0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5"),c384:new t.ecc.curve(t.bn.prime.p384,"0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973",-3,"0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef","0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7","0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f"),c521:new t.ecc.curve(t.bn.prime.p521,"0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E91386409",-3,"0x051953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F00","0xC6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5BD66","0x11839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD16650"),k192:new t.ecc.curve(t.bn.prime.p192k,"0xfffffffffffffffffffffffe26f2fc170f69466a74defd8d",0,3,"0xdb4ff10ec057e9ae26b07d0280b7f4341da5d1b1eae06c7d","0x9b2f2f6d9c5628a7844163d015be86344082aa88d95e2f9d"),k224:new t.ecc.curve(t.bn.prime.p224k,"0x010000000000000000000000000001dce8d2ec6184caf0a971769fb1f7",0,5,"0xa1455b334df099df30fc28a169a467e9e47075a90f7e650eb6b7a45c","0x7e089fed7fba344282cafbd6f7e319f7c0b0bd59e2ca4bdb556d61a5"),k256:new t.ecc.curve(t.bn.prime.p256k,"0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",0,7,"0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},t.ecc.curveName=function(e){var r;for(r in t.ecc.curves)if(t.ecc.curves.hasOwnProperty(r)&&t.ecc.curves[r]===e)return r;throw new t.exception.invalid("no such curve")},t.ecc.deserialize=function(e){if(!e||!e.curve||!t.ecc.curves[e.curve])throw new t.exception.invalid("invalid serialization");if(-1===["elGamal","ecdsa"].indexOf(e.type))throw new t.exception.invalid("invalid type");var r=t.ecc.curves[e.curve];if(e.secretKey){if(!e.exponent)throw new t.exception.invalid("invalid exponent");var n=new t.bn(e.exponent);return new t.ecc[e.type].secretKey(r,n)}if(!e.point)throw new t.exception.invalid("invalid point");var i=r.fromBits(t.codec.hex.toBits(e.point));return new t.ecc[e.type].publicKey(r,i)},t.ecc.basicKey={publicKey:function(e,r){this._curve=e,this._curveBitLength=e.r.bitLength(),this._point=r instanceof Array?e.fromBits(r):r,this.serialize=function(){var r=t.ecc.curveName(e);return{type:this.getType(),secretKey:!1,point:t.codec.hex.fromBits(this._point.toBits()),curve:r}},this.get=function(){var e=this._point.toBits(),r=t.bitArray.bitLength(e);return{x:t.bitArray.bitSlice(e,0,r/2),y:t.bitArray.bitSlice(e,r/2)}}},secretKey:function(e,r){this._curve=e,this._curveBitLength=e.r.bitLength(),this._exponent=r,this.serialize=function(){var r=this.get(),n=t.ecc.curveName(e);return{type:this.getType(),secretKey:!0,exponent:t.codec.hex.fromBits(r),curve:n}},this.get=function(){return this._exponent.toBits()}}},t.ecc.basicKey.generateKeys=function(e){return function(r,n,i){if("number"==typeof(r=r||256)&&void 0===(r=t.ecc.curves["c"+r]))throw new t.exception.invalid("no such curve");i=i||t.bn.random(r.r,n);var o=r.G.mult(i);return{pub:new t.ecc[e].publicKey(r,o),sec:new t.ecc[e].secretKey(r,i)}}},t.ecc.elGamal={generateKeys:t.ecc.basicKey.generateKeys("elGamal"),publicKey:function(e,r){t.ecc.basicKey.publicKey.apply(this,arguments)},secretKey:function(e,r){t.ecc.basicKey.secretKey.apply(this,arguments)}},t.ecc.elGamal.publicKey.prototype={kem:function(e){var r=t.bn.random(this._curve.r,e),n=this._curve.G.mult(r).toBits();return{key:t.hash.sha256.hash(this._point.mult(r).toBits()),tag:n}},getType:function(){return"elGamal"}},t.ecc.elGamal.secretKey.prototype={unkem:function(e){return t.hash.sha256.hash(this._curve.fromBits(e).mult(this._exponent).toBits())},dh:function(e){return t.hash.sha256.hash(e._point.mult(this._exponent).toBits())},dhJavaEc:function(e){return e._point.mult(this._exponent).x.toBits()},getType:function(){return"elGamal"}},t.ecc.ecdsa={generateKeys:t.ecc.basicKey.generateKeys("ecdsa")},t.ecc.ecdsa.publicKey=function(e,r){t.ecc.basicKey.publicKey.apply(this,arguments)},t.ecc.ecdsa.publicKey.prototype={verify:function(e,r,n){t.bitArray.bitLength(e)>this._curveBitLength&&(e=t.bitArray.clamp(e,this._curveBitLength));var i=t.bitArray,o=this._curve.r,a=this._curveBitLength,s=t.bn.fromBits(i.bitSlice(r,0,a)),u=t.bn.fromBits(i.bitSlice(r,a,2*a)),c=n?u:u.inverseMod(o),l=t.bn.fromBits(e).mul(c).mod(o),f=s.mul(c).mod(o),h=this._curve.G.mult2(l,f,this._point).x;if(s.equals(0)||u.equals(0)||s.greaterEquals(o)||u.greaterEquals(o)||!h.equals(s)){if(void 0===n)return this.verify(e,r,!0);throw new t.exception.corrupt("signature didn't check out")}return!0},getType:function(){return"ecdsa"}},t.ecc.ecdsa.secretKey=function(e,r){t.ecc.basicKey.secretKey.apply(this,arguments)},t.ecc.ecdsa.secretKey.prototype={sign:function(e,r,n,i){t.bitArray.bitLength(e)>this._curveBitLength&&(e=t.bitArray.clamp(e,this._curveBitLength));var o=this._curve.r,a=o.bitLength(),s=i||t.bn.random(o.sub(1),r).add(1),u=this._curve.G.mult(s).x.mod(o),c=t.bn.fromBits(e).add(u.mul(this._exponent)),l=n?c.inverseMod(o).mul(s).mod(o):c.mul(s.inverseMod(o)).mod(o);return t.bitArray.concat(u.toBits(a),l.toBits(a))},getType:function(){return"ecdsa"}},function(){t.hash.ripemd160=function(e){e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},t.hash.ripemd160.hash=function(e){return(new t.hash.ripemd160).update(e).finalize()},t.hash.ripemd160.prototype={reset:function(){return this._h=e.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=t.codec.utf8String.toBits(e));var r,n=this._buffer=t.bitArray.concat(this._buffer,e),i=this._length,o=this._length=i+t.bitArray.bitLength(e);if(o>9007199254740991)throw new t.exception.invalid("Cannot hash more than 2^53 - 1 bits");for(r=512+i-(512+i&511);r<=o;r+=512){for(var a=n.splice(0,16),s=0;s<16;++s)a[s]=m(a[s]);v.call(this,a)}return this},finalize:function(){var e=t.bitArray.concat(this._buffer,[t.bitArray.partial(1,1)]),r=(this._length+1)%512,n=(r>448?512:448)-r%448,i=n%32;for(i>0&&(e=t.bitArray.concat(e,[t.bitArray.partial(i,0)]));n>=32;n-=32)e.push(0);for(e.push(m(0|this._length)),e.push(m(Math.floor(this._length/4294967296)));e.length;){for(var o=e.splice(0,16),a=0;a<16;++a)o[a]=m(o[a]);v.call(this,o)}var s=this._h;for(this.reset(),a=0;a<5;++a)s[a]=m(s[a]);return s}};for(var e=[1732584193,4023233417,2562383102,271733878,3285377520],r=[0,1518500249,1859775393,2400959708,2840853838],n=[1352829926,1548603684,1836072691,2053994217,0],i=4;i>=0;--i)for(var o=1;o<16;++o)r.splice(i,0,r[i]),n.splice(i,0,n[i]);var a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],s=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],c=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11];function l(e,t,r){return e^t^r}function f(e,t,r){return e&t|~e&r}function h(e,t,r){return(e|~t)^r}function p(e,t,r){return e&r|t&~r}function _(e,t,r){return e^(t|~r)}function d(e,t){return e<<t|e>>>32-t}function m(e){return(255&e)<<24|(65280&e)<<8|(e&255<<16)>>>8|(e&255<<24)>>>24}function v(e){for(var t,i=this._h[0],o=this._h[1],m=this._h[2],v=this._h[3],g=this._h[4],y=this._h[0],b=this._h[1],w=this._h[2],k=this._h[3],x=this._h[4],E=0;E<16;++E)t=d(i+l(o,m,v)+e[a[E]]+r[E],u[E])+g,i=g,g=v,v=d(m,10),m=o,o=t,t=d(y+_(b,w,k)+e[s[E]]+n[E],c[E])+x,y=x,x=k,k=d(w,10),w=b,b=t;for(;E<32;++E)t=d(i+f(o,m,v)+e[a[E]]+r[E],u[E])+g,i=g,g=v,v=d(m,10),m=o,o=t,t=d(y+p(b,w,k)+e[s[E]]+n[E],c[E])+x,y=x,x=k,k=d(w,10),w=b,b=t;for(;E<48;++E)t=d(i+h(o,m,v)+e[a[E]]+r[E],u[E])+g,i=g,g=v,v=d(m,10),m=o,o=t,t=d(y+h(b,w,k)+e[s[E]]+n[E],c[E])+x,y=x,x=k,k=d(w,10),w=b,b=t;for(;E<64;++E)t=d(i+p(o,m,v)+e[a[E]]+r[E],u[E])+g,i=g,g=v,v=d(m,10),m=o,o=t,t=d(y+f(b,w,k)+e[s[E]]+n[E],c[E])+x,y=x,x=k,k=d(w,10),w=b,b=t;for(;E<80;++E)t=d(i+_(o,m,v)+e[a[E]]+r[E],u[E])+g,i=g,g=v,v=d(m,10),m=o,o=t,t=d(y+l(b,w,k)+e[s[E]]+n[E],c[E])+x,y=x,x=k,k=d(w,10),w=b,b=t;t=this._h[1]+m+k,this._h[1]=this._h[2]+v+x,this._h[2]=this._h[3]+g+y,this._h[3]=this._h[4]+i+b,this._h[4]=this._h[0]+o+w,this._h[0]=t}}(),t.hash.sha256=function(e){this._key[0]||this._precompute(),e?(this._h=e._h.slice(0),this._buffer=e._buffer.slice(0),this._length=e._length):this.reset()},t.hash.sha256.hash=function(e){return(new t.hash.sha256).update(e).finalize()},t.hash.sha256.prototype={blockSize:512,reset:function(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update:function(e){"string"==typeof e&&(e=t.codec.utf8String.toBits(e));var r,n=this._buffer=t.bitArray.concat(this._buffer,e),i=this._length,o=this._length=i+t.bitArray.bitLength(e);if(o>9007199254740991)throw new t.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!=typeof Uint32Array){var a=new Uint32Array(n),s=0;for(r=512+i-(512+i&511);r<=o;r+=512)this._block(a.subarray(16*s,16*(s+1))),s+=1;n.splice(0,16*s)}else for(r=512+i-(512+i&511);r<=o;r+=512)this._block(n.splice(0,16));return this},finalize:function(){var e,r=this._buffer,n=this._h;for(e=(r=t.bitArray.concat(r,[t.bitArray.partial(1,1)])).length+2;15&e;e++)r.push(0);for(r.push(Math.floor(this._length/4294967296)),r.push(0|this._length);r.length;)this._block(r.splice(0,16));return this.reset(),n},_init:[],_key:[],_precompute:function(){var e,t,r=0,n=2;function i(e){return 4294967296*(e-Math.floor(e))|0}for(;r<64;n++){for(t=!0,e=2;e*e<=n;e++)if(n%e==0){t=!1;break}t&&(r<8&&(this._init[r]=i(Math.pow(n,.5))),this._key[r]=i(Math.pow(n,1/3)),r++)}},_block:function(e){var t,r,n,i,o=this._h,a=this._key,s=o[0],u=o[1],c=o[2],l=o[3],f=o[4],h=o[5],p=o[6],_=o[7];for(t=0;t<64;t++)t<16?r=e[t]:(n=e[t+1&15],i=e[t+14&15],r=e[15&t]=(n>>>7^n>>>18^n>>>3^n<<25^n<<14)+(i>>>17^i>>>19^i>>>10^i<<15^i<<13)+e[15&t]+e[t+9&15]|0),r=r+_+(f>>>6^f>>>11^f>>>25^f<<26^f<<21^f<<7)+(p^f&(h^p))+a[t],_=p,p=h,h=f,f=l+r|0,l=c,c=u,s=r+((u=s)&c^l&(u^c))+(u>>>2^u>>>13^u>>>22^u<<30^u<<19^u<<10)|0;o[0]=o[0]+s|0,o[1]=o[1]+u|0,o[2]=o[2]+c|0,o[3]=o[3]+l|0,o[4]=o[4]+f|0,o[5]=o[5]+h|0,o[6]=o[6]+p|0,o[7]=o[7]+_|0}},t.prng=function(e){this._pools=[new t.hash.sha256],this._poolEntropy=[0],this._reseedCount=0,this._robins={},this._eventId=0,this._collectorIds={},this._collectorIdNext=0,this._strength=0,this._poolStrength=0,this._nextReseed=0,this._key=[0,0,0,0,0,0,0,0],this._counter=[0,0,0,0],this._cipher=void 0,this._defaultParanoia=e,this._collectorsStarted=!1,this._callbacks={progress:{},seeded:{}},this._callbackI=0,this._NOT_READY=0,this._READY=1,this._REQUIRES_RESEED=2,this._MAX_WORDS_PER_BURST=65536,this._PARANOIA_LEVELS=[0,48,64,96,128,192,256,384,512,768,1024],this._MILLISECONDS_PER_RESEED=3e4,this._BITS_PER_RESEED=80},t.prng.prototype={randomWords:function(e,r){var n,i,o=[],a=this.isReady(r);if(a===this._NOT_READY)throw new t.exception.notReady("generator isn't seeded");for(a&this._REQUIRES_RESEED&&this._reseedFromPools(!(a&this._READY)),n=0;n<e;n+=4)(n+1)%this._MAX_WORDS_PER_BURST==0&&this._gate(),i=this._gen4words(),o.push(i[0],i[1],i[2],i[3]);return this._gate(),o.slice(0,e)},setDefaultParanoia:function(e,r){if(0===e&&"Setting paranoia=0 will ruin your security; use it only for testing"!==r)throw new t.exception.invalid("Setting paranoia=0 will ruin your security; use it only for testing");this._defaultParanoia=e},addEntropy:function(e,r,n){n=n||"user";var i,o,a,s,u=(new Date).valueOf(),c=this._robins[n],l=this.isReady(),f=0;switch(void 0===(i=this._collectorIds[n])&&(i=this._collectorIds[n]=this._collectorIdNext++),void 0===c&&(c=this._robins[n]=0),this._robins[n]=(this._robins[n]+1)%this._pools.length,typeof e){case"number":void 0===r&&(r=1),this._pools[c].update([i,this._eventId++,1,r,u,1,0|e]);break;case"object":if("[object Uint32Array]"===(s=Object.prototype.toString.call(e))){for(a=[],o=0;o<e.length;o++)a.push(e[o]);e=a}else for("[object Array]"!==s&&(f=1),o=0;o<e.length&&!f;o++)"number"!=typeof e[o]&&(f=1);if(!f){if(void 0===r)for(r=0,o=0;o<e.length;o++)for(a=e[o];a>0;)r++,a>>>=1;this._pools[c].update([i,this._eventId++,2,r,u,e.length].concat(e))}break;case"string":void 0===r&&(r=e.length),this._pools[c].update([i,this._eventId++,3,r,u,e.length]),this._pools[c].update(e);break;default:f=1}if(f)throw new t.exception.bug("random: addEntropy only supports number, array of numbers or string");this._poolEntropy[c]+=r,this._poolStrength+=r,l===this._NOT_READY&&(this.isReady()!==this._NOT_READY&&this._fireEvent("seeded",Math.max(this._strength,this._poolStrength)),this._fireEvent("progress",this.getProgress()))},isReady:function(e){var t=this._PARANOIA_LEVELS[void 0!==e?e:this._defaultParanoia];return this._strength&&this._strength>=t?this._poolEntropy[0]>this._BITS_PER_RESEED&&(new Date).valueOf()>this._nextReseed?this._REQUIRES_RESEED|this._READY:this._READY:this._poolStrength>=t?this._REQUIRES_RESEED|this._NOT_READY:this._NOT_READY},getProgress:function(e){var t=this._PARANOIA_LEVELS[e||this._defaultParanoia];return this._strength>=t||this._poolStrength>t?1:this._poolStrength/t},startCollectors:function(){if(!this._collectorsStarted){if(this._eventListener={loadTimeCollector:this._bind(this._loadTimeCollector),mouseCollector:this._bind(this._mouseCollector),keyboardCollector:this._bind(this._keyboardCollector),accelerometerCollector:this._bind(this._accelerometerCollector),touchCollector:this._bind(this._touchCollector)},window.addEventListener)window.addEventListener("load",this._eventListener.loadTimeCollector,!1),window.addEventListener("mousemove",this._eventListener.mouseCollector,!1),window.addEventListener("keypress",this._eventListener.keyboardCollector,!1),window.addEventListener("devicemotion",this._eventListener.accelerometerCollector,!1),window.addEventListener("touchmove",this._eventListener.touchCollector,!1);else{if(!document.attachEvent)throw new t.exception.bug("can't attach event");document.attachEvent("onload",this._eventListener.loadTimeCollector),document.attachEvent("onmousemove",this._eventListener.mouseCollector),document.attachEvent("keypress",this._eventListener.keyboardCollector)}this._collectorsStarted=!0}},stopCollectors:function(){this._collectorsStarted&&(window.removeEventListener?(window.removeEventListener("load",this._eventListener.loadTimeCollector,!1),window.removeEventListener("mousemove",this._eventListener.mouseCollector,!1),window.removeEventListener("keypress",this._eventListener.keyboardCollector,!1),window.removeEventListener("devicemotion",this._eventListener.accelerometerCollector,!1),window.removeEventListener("touchmove",this._eventListener.touchCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this._eventListener.loadTimeCollector),document.detachEvent("onmousemove",this._eventListener.mouseCollector),document.detachEvent("keypress",this._eventListener.keyboardCollector)),this._collectorsStarted=!1)},addEventListener:function(e,t){this._callbacks[e][this._callbackI++]=t},removeEventListener:function(e,t){var r,n,i=this._callbacks[e],o=[];for(n in i)i.hasOwnProperty(n)&&i[n]===t&&o.push(n);for(r=0;r<o.length;r++)delete i[n=o[r]]},_bind:function(e){var t=this;return function(){e.apply(t,arguments)}},_gen4words:function(){for(var e=0;e<4&&(this._counter[e]=this._counter[e]+1|0,!this._counter[e]);e++);return this._cipher.encrypt(this._counter)},_gate:function(){this._key=this._gen4words().concat(this._gen4words()),this._cipher=new t.cipher.aes(this._key)},_reseed:function(e){this._key=t.hash.sha256.hash(this._key.concat(e)),this._cipher=new t.cipher.aes(this._key);for(var r=0;r<4&&(this._counter[r]=this._counter[r]+1|0,!this._counter[r]);r++);},_reseedFromPools:function(e){var r,n=[],i=0;for(this._nextReseed=n[0]=(new Date).valueOf()+this._MILLISECONDS_PER_RESEED,r=0;r<16;r++)n.push(4294967296*Math.random()|0);for(r=0;r<this._pools.length&&(n=n.concat(this._pools[r].finalize()),i+=this._poolEntropy[r],this._poolEntropy[r]=0,e||!(this._reseedCount&1<<r));r++);this._reseedCount>=1<<this._pools.length&&(this._pools.push(new t.hash.sha256),this._poolEntropy.push(0)),this._poolStrength-=i,i>this._strength&&(this._strength=i),this._reseedCount++,this._reseed(n)},_keyboardCollector:function(){this._addCurrentTimeToEntropy(1)},_mouseCollector:function(e){var t,r;try{t=e.x||e.clientX||e.offsetX||0,r=e.y||e.clientY||e.offsetY||0}catch(e){t=0,r=0}0!=t&&0!=r&&this.addEntropy([t,r],2,"mouse"),this._addCurrentTimeToEntropy(0)},_touchCollector:function(e){var t=e.touches[0]||e.changedTouches[0],r=t.pageX||t.clientX,n=t.pageY||t.clientY;this.addEntropy([r,n],1,"touch"),this._addCurrentTimeToEntropy(0)},_loadTimeCollector:function(){this._addCurrentTimeToEntropy(2)},_addCurrentTimeToEntropy:function(e){"undefined"!=typeof window&&window.performance&&"function"==typeof window.performance.now?this.addEntropy(window.performance.now(),e,"loadtime"):this.addEntropy((new Date).valueOf(),e,"loadtime")},_accelerometerCollector:function(e){var t=e.accelerationIncludingGravity.x||e.accelerationIncludingGravity.y||e.accelerationIncludingGravity.z;if(window.orientation){var r=window.orientation;"number"==typeof r&&this.addEntropy(r,1,"accelerometer")}t&&this.addEntropy(t,2,"accelerometer"),this._addCurrentTimeToEntropy(0)},_fireEvent:function(e,r){var n,i=t.random._callbacks[e],o=[];for(n in i)i.hasOwnProperty(n)&&o.push(i[n]);for(n=0;n<o.length;n++)o[n](r)}},t.random=new t.prng(6),function(){try{var n,i,o;if(e.exports&&(i=function(){try{return r(55835)}catch(e){return null}}())&&i.randomBytes)n=i.randomBytes(128),n=new Uint32Array(new Uint8Array(n).buffer),t.random.addEntropy(n,1024,"crypto.randomBytes");else if("undefined"!=typeof window&&"undefined"!=typeof Uint32Array){if(o=new Uint32Array(32),window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(o);else{if(!window.msCrypto||!window.msCrypto.getRandomValues)return;window.msCrypto.getRandomValues(o)}t.random.addEntropy(o,1024,"crypto.getRandomValues")}}catch(e){"undefined"!=typeof window&&window.console&&(console.log("There was an error collecting entropy from the browser:"),console.log(e))}}(),t.codec.base58={alpha:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",lookup:{1:0,2:1,3:2,4:3,5:4,6:5,7:6,8:7,9:8,A:9,B:10,C:11,D:12,E:13,F:14,G:15,H:16,J:17,K:18,L:19,M:20,N:21,P:22,Q:23,R:24,S:25,T:26,U:27,V:28,W:29,X:30,Y:31,Z:32,a:33,b:34,c:35,d:36,e:37,f:38,g:39,h:40,i:41,j:42,k:43,m:44,n:45,o:46,p:47,q:48,r:49,s:50,t:51,u:52,v:53,w:54,x:55,y:56,z:57},toBits:function(e){for(var r=new t.bn,n=new t.bn(58),i=0;i<e.length;i++){var o=new t.bn(t.codec.base58.lookup[e[i]]);r.addM(o.mul(n.power(e.length-i-1)))}return r.fullReduce(),r.toBits()},fromBits:function(e){for(var r=t.bn.fromBits(e),n=t.bitArray.bitLength(e),i=Math.ceil(n*(Math.log(2)/Math.log(58))),o=new t.bn(58),a="",s=i-1;s>=0;s--){for(var u=new t.bn(s),c=o.power(u),l=0;r.greaterEquals(c);)r.subM(c),r.normalize(),l++;s===i-1&&0===l||(a+=t.codec.base58.alpha[l])}return a}},t.codec.base58Check={defaultChecksumFn:function(e){return t.bitArray.bitSlice(t.hash.sha256.hash(t.hash.sha256.hash(e)),0,32)},fromBits:function(e,r,n){n=n||t.codec.base58Check.defaultChecksumFn;for(var i=t.bitArray.concat([t.bitArray.partial(8,e)],r),o=n(i),a=t.bitArray.concat(i,o),s=t.codec.base58.fromBits(a),u=0;0==t.bitArray.extract(a,u,8);)s="1"+s,u+=8;return s},toBits:function(e,r){r=r||t.codec.base58Check.defaultChecksumFn;var n=t.codec.base58.toBits(e),i=t.bitArray.bitLength(n),o=t.bitArray.bitSlice(n,0,i-32),a=t.bitArray.bitSlice(n,i-32),s=r(o);if(!t.bitArray.equal(s,a))throw new Error("Checksums do not match");return o}},t.codec.steemit={ROLES:["owner","memo","active","posting"],MAINNET:{pubHeader:0,privHeader:128,pubPrefix:"STM"},TESTNET:{pubHeader:0,privHeader:128,pubPrefix:"TST"},keyChecksum:function(e){return t.bitArray.bitSlice(t.hash.ripemd160.hash(e),0,32)},keysFromPassword:function(e,r){for(var n={},i=t.ecc.curves.k256,o=0;o<t.codec.steemit.ROLES.length;o++){var a=t.codec.steemit.ROLES[o],s=e+a+r,u=t.bn.fromBits(t.hash.sha256.hash(t.codec.utf8String.toBits(s)));n[a]=t.ecc.ecdsa.generateKeys(i,0,u)}return n},signRecoverably:function(e,r,n,i){for(t.bitArray.bitLength(r)>this._curveBitLength&&(r=t.bitArray.clamp(r,this._curveBitLength));;){var o=t.ecc.curves.k256,a=o.r,s=a.bitLength(),u=i||t.bn.random(a.sub(1),n).add(1),c=o.G.mult(u);if(i&&(i=i.add(1)),!c.isIdentity){var l=c.x.mod(a),f=t.bn.fromBits(r).add(l.mul(e._exponent)).mul(u.inverseMod(a)).mod(a),h=31;!0&c.y.limbs[0]&&h++;var p=l.toBits(s),_=f.toBits(s),d=t.bitArray.extract(p,0,8),m=t.bitArray.extract(p,8,8),v=t.bitArray.extract(_,0,8),g=t.bitArray.extract(_,8,8);if(!(128&d)&&(0!=d||128&m)&&!(128&v)&&(0!=v||128&g)){var y=t.bitArray.concat(l.toBits(s),f.toBits(s));return t.bitArray.concat([t.bitArray.partial(8,h)],y)}}}},recoverPublicKey:function(e,r){var n=t.ecc.curves.k256,i=n.r,o=n.G,a=t.bitArray.extract(r,0,8)-31,s=t.bn.fromBits(e),u=t.bn.fromBits(t.bitArray.bitSlice(r,8,264)),c=t.bn.fromBits(t.bitArray.bitSlice(r,264));if(a<0||a>4)throw new Error("Corrupt signature: recovery parameter is wrong");for(var l=1==(1&a),f=0;f<=1;f++){var h=u.add(i.mul(f)),p=t.codec.steemit._yFromX(h,l),_=new t.ecc.point(n,h,p),d=u.inverseMod(i),m=new t.bn(0).sub(s).mod(i),v=o.mult2(m,c,_).mult(d),g=new t.ecc.ecdsa.publicKey(n,v);try{return g.verify(e,t.bitArray.bitSlice(r,8)),g}catch(e){}}throw new Error("public key was unrecoverable")},serializePublicKey:function(e,r){r=r||t.codec.steemit.MAINNET;var n=e.get(),i=r.pubHeader;return 1&t.bn.fromBits(n.y).limbs[0]?i|=3:i|=2,r.pubPrefix+t.codec.base58Check.fromBits(i,n.x,t.codec.steemit.keyChecksum)},deserializePublicKey:function(e,r){r=r||t.codec.steemit.MAINNET;var n=t.ecc.curves.k256;if(0!==e.indexOf(r.pubPrefix))throw new Error('Public key is not in correct format, it should begin with "'+r.pubPrefix+'"');var i=t.codec.base58Check.toBits(e.slice(3),t.codec.steemit.keyChecksum),o=t.bitArray.extract(i,0,8),a=3==o;if((o&r.pubHeader)!==r.pubHeader)throw new Error("public key has invalid header");if(0==(3&o)&&0==(2&o))throw new Error("public key has invalid header: should set 0x2 or 0x3, but got 0x"+o.toString(16));var s=t.bitArray.bitSlice(i,8),u=t.bn.fromBits(s),c=t.codec.steemit._yFromX(u,a);return new t.ecc.ecdsa.publicKey(n,new t.ecc.point(n,u,c))},serializePrivateKey:function(e,r){return r=r||t.codec.steemit.MAINNET,t.codec.base58Check.fromBits(r.privHeader,e.get())},deserializePrivateKey:function(e,r){r=r||t.codec.steemit.MAINNET.privHeader;var n=t.ecc.curves.k256,i=t.codec.base58Check.toBits(e),o=t.bitArray.extract(i,0,8);if(o!==r)throw new Error("private key has invalid header: wanted 0x"+r.toString(16)+", got 0x"+o.toString(16));var a=t.bitArray.bitSlice(i,8);return new t.ecc.ecdsa.secretKey(n,t.bn.fromBits(a))},_yFromX:function(e,r){var n=t.ecc.curves.k256,i=t.codec.steemit._getPident(),o=e.powermod(3,n.field.modulus).add(e.mulmod(n.a,n.field.modulus)).add(n.b).mod(n.field.modulus).powermod(i,n.field.modulus),a=o.mod(2).equals(1);return a&&r||!a&&!r?o:n.field.modulus.sub(o).normalize()},_getPident:function(){return t.codec.steemit.PIDENT||(t.codec.steemit.PIDENT=t.ecc.curves.k256.field.modulus.add(1).normalize().halveM().halveM().normalize()),t.codec.steemit.PIDENT}},t}();function i(e,t){this.getPublicKey=function(){return t||(t=n.ecc.ecdsa.generateKeys(n.ecc.curves.k256,void 0,n.bn.fromBits(e.get())).pub),new o(t)},this.sign=function(t){return u(n.codec.steemit.signRecoverably(e,s(t)))}}function o(e){this._p=e}function a(e){return{private:n.codec.steemit.serializePrivateKey(e.sec),public:n.codec.steemit.serializePublicKey(e.pub)}}function s(e){if(e instanceof ArrayBuffer)return n.codec.arrayBuffer.toBits(e);throw new Error("You must supply an ArrayBuffer")}function u(e){return n.codec.arrayBuffer.fromBits(e,0,0)}t.sjcl=n,i.from=function(e,t){return new i(n.codec.steemit.deserializePrivateKey(e,t))},o.from=function(e){return new o(n.codec.steemit.deserializePublicKey(e))},o.recover=function(e,t){return new o(n.codec.steemit.recoverPublicKey(s(e),s(t)))},o.prototype={toString:function(){return n.codec.steemit.serializePublicKey(this._p)},verify:function(e,t){try{var r=n.bitArray.bitSlice(s(t),8);return this._p.verify(s(e),r),!0}catch(e){return!1}}}},"string"!=typeof t.nodeName?i(t):(n.steemit=n.steemit||{},i(n.steemit.crypto={}))},56678:function(e,t,r){"use strict";var n,i=r(48764).Buffer,o=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){e.done?i(e.value):new r((function(t){t(e.value)})).then(a,s)}u((n=n.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=n[2&o[0]?"return":o[0]?"throw":"next"])&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[0,i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(72597),c=r(55835);t.K=i.from("3b3b081e46ea808d5a96b08c4bc5003f5e15767090f344faab531ec57565136b","hex");var l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.name="ValidationError",r&&(n.cause=r,n.message+=" ("+r.message+")"),n}return o(t,e),t}(Error);function f(e,r,n,i,o){var a=c.createHash("sha256");a.update(e),a.update(r),a.update(n),a.update(i);var s=c.createHash("sha256");return s.update(t.K),s.update(a.digest()),s.update(o),s.digest()}t.sign=function(e,t,r){if(!e.params)throw new Error("Unable to sign a request without params");for(var n=i.from(JSON.stringify(e.params),"utf8").toString("base64"),o=c.randomBytes(8),a=o.toString("hex"),s=(new Date).toISOString(),l=f(s,t,e.method,n,o),h=[],p=0,_=r;p<_.length;p++){var d=_[p];"string"==typeof d&&(d=u.PrivateKey.from(d));var m=u.hexify(d.sign(l.buffer));h.push(m)}return{jsonrpc:"2.0",method:e.method,id:e.id,params:{__signed:{account:t,nonce:a,params:n,signatures:h,timestamp:s}}}},t.validate=function(e,t){return a(this,void 0,void 0,(function(){var r,n,o,a,u,c,h;return s(this,(function(s){switch(s.label){case 0:if("2.0"!==e.jsonrpc||"string"!=typeof e.method)throw new l("Invalid JSON RPC Request");if(null==e.params||null==e.params.__signed)throw new l("Signed payload missing");if(1!==Object.keys(e.params).length)throw new l("Invalid request params");if(null==(r=e.params.__signed).account)throw new l("Missing account");try{o=i.from(r.params,"base64").toString("utf8"),n=JSON.parse(o)}catch(e){throw new l("Invalid encoded params",e)}if(null==r.nonce||"string"!=typeof r.nonce)throw new l("Invalid nonce");if(8!==(a=i.from(r.nonce,"hex")).length)throw new l("Invalid nonce");if(u=Date.parse(r.timestamp),Number.isNaN(u))throw new l("Invalid timestamp");if(Date.now()-u>6e4)throw new l("Signature expired");c=f(r.timestamp,r.account,e.method,r.params,a),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,t(c,r.signatures,r.account)];case 2:return s.sent(),[3,4];case 3:throw h=s.sent(),new l("Verification failed",h);case 4:return[2,n]}}))}))}},96624:(e,t,r)=>{var n,i=r(34155).process;n=function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){var u="function"==typeof _dereq_&&_dereq_;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[a]={exports:{}};t[a][0].call(l.exports,(function(e){return i(t[a][1][e]||e)}),l,l.exports,e,t,r,n)}return r[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){"use strict";t.exports=function(e){var t=e._SomePromiseArray;function r(e){var r=new t(e),n=r.promise();return r.setHowMany(1),r.setUnwrap(),r.init(),n}e.any=function(e){return r(e)},e.prototype.any=function(){return r(this)}}},{}],2:[function(e,t,r){"use strict";var n;try{throw new Error}catch(e){n=e}var o=e("./schedule"),a=e("./queue");function s(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new a(16),this._normalQueue=new a(16),this._haveDrainedQueues=!1;var e=this;this.drainQueues=function(){e._drainQueues()},this._schedule=o}function u(e){for(;e.length()>0;)c(e)}function c(e){var t=e.shift();if("function"!=typeof t)t._settlePromises();else{var r=e.shift(),n=e.shift();t.call(r,n)}}s.prototype.setScheduler=function(e){var t=this._schedule;return this._schedule=e,this._customScheduler=!0,t},s.prototype.hasCustomScheduler=function(){return this._customScheduler},s.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},s.prototype.fatalError=function(e,t){t?(i.stderr.write("Fatal "+(e instanceof Error?e.stack:e)+"\n"),i.exit(2)):this.throwLater(e)},s.prototype.throwLater=function(e,t){if(1===arguments.length&&(t=e,e=function(){throw t}),"undefined"!=typeof setTimeout)setTimeout((function(){e(t)}),0);else try{this._schedule((function(){e(t)}))}catch(e){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},s.prototype.invokeLater=function(e,t,r){this._lateQueue.push(e,t,r),this._queueTick()},s.prototype.invoke=function(e,t,r){this._normalQueue.push(e,t,r),this._queueTick()},s.prototype.settlePromises=function(e){this._normalQueue._pushOne(e),this._queueTick()},s.prototype._drainQueues=function(){u(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,u(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},{"./queue":26,"./schedule":29}],3:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){var i=!1,o=function(e,t){this._reject(t)},a=function(e,t){t.promiseRejectionQueued=!0,t.bindingPromise._then(o,o,null,this,e)},s=function(e,t){0==(50397184&this._bitField)&&this._resolveCallback(t.target)},u=function(e,t){t.promiseRejectionQueued||this._reject(e)};e.prototype.bind=function(o){i||(i=!0,e.prototype._propagateFrom=n.propagateFromFunction(),e.prototype._boundValue=n.boundValueFunction());var c=r(o),l=new e(t);l._propagateFrom(this,1);var f=this._target();if(l._setBoundTo(c),c instanceof e){var h={promiseRejectionQueued:!1,promise:l,target:f,bindingPromise:c};f._then(t,a,void 0,l,h),c._then(s,u,void 0,l,h),l._setOnCancel(c)}else l._resolveCallback(f);return l},e.prototype._setBoundTo=function(e){void 0!==e?(this._bitField=2097152|this._bitField,this._boundTo=e):this._bitField=-2097153&this._bitField},e.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},e.bind=function(t,r){return e.resolve(r).bind(t)}}},{}],4:[function(e,t,r){"use strict";var n;"undefined"!=typeof Promise&&(n=Promise);var i=e("./promise")();i.noConflict=function(){try{Promise===i&&(Promise=n)}catch(e){}return i},t.exports=i},{"./promise":22}],5:[function(e,t,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 r=e("./util"),n=r.canEvaluate;function i(e){var n=function(e,n){var i;if(null!=e&&(i=e[n]),"function"!=typeof i){var o="Object "+r.classString(e)+" has no method '"+r.toString(n)+"'";throw new t.TypeError(o)}return i}(e,this.pop());return n.apply(e,this)}function o(e){return e[this]}function a(e){var t=+this;return t<0&&(t=Math.max(0,t+e.length)),e[t]}r.isIdentifier,t.prototype.call=function(e){var t=[].slice.call(arguments,1);return t.push(e),this._then(i,void 0,void 0,t,void 0)},t.prototype.get=function(e){var t;if("number"==typeof e)t=a;else if(n){var r=(void 0)(e);t=null!==r?r:o}else t=o;return this._then(t,void 0,void 0,e,void 0)}}},{"./util":36}],6:[function(e,t,r){"use strict";t.exports=function(t,r,n,i){var o=e("./util"),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 e=this,t=e;e._isCancellable();){if(!e._cancelBy(t)){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}var r=e._cancellationParent;if(null==r||!r._isCancellable()){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}e._isFollowing()&&e._followee().cancel(),e._setWillBeCancelled(),t=e,e=r}},t.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},t.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},t.prototype._cancelBy=function(e){return e===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(e,t){if(o.isArray(e))for(var r=0;r<e.length;++r)this._doInvokeOnCancel(e[r],t);else if(void 0!==e)if("function"==typeof e){if(!t){var n=a(e).call(this._boundValue());n===s&&(this._attachExtraTrace(n.e),u.throwLater(n.e))}}else e._resultCancelled(this)},t.prototype._invokeOnCancel=function(){var e=this._onCancel();this._unsetOnCancel(),u.invoke(this._doInvokeOnCancel,this,e)},t.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},t.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(e,t,r){"use strict";t.exports=function(t){var r=e("./util"),n=e("./es5").keys,i=r.tryCatch,o=r.errorObj;return function(e,a,s){return function(u){var c=s._boundValue();e:for(var l=0;l<e.length;++l){var f=e[l];if(f===Error||null!=f&&f.prototype instanceof Error){if(u instanceof f)return i(a).call(c,u)}else if("function"==typeof f){var h=i(f).call(c,u);if(h===o)return h;if(h)return i(a).call(c,u)}else if(r.isObject(u)){for(var p=n(f),_=0;_<p.length;++_){var d=p[_];if(f[d]!=u[d])continue e}return i(a).call(c,u)}}return t}}}},{"./es5":13,"./util":36}],8:[function(e,t,r){"use strict";t.exports=function(e){var t=!1,r=[];function n(){this._trace=new n.CapturedTrace(i())}function i(){var e=r.length-1;if(e>=0)return r[e]}return e.prototype._promiseCreated=function(){},e.prototype._pushContext=function(){},e.prototype._popContext=function(){return null},e._peekContext=e.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 e=r.pop(),t=e._promiseCreated;return e._promiseCreated=null,t}return null},n.CapturedTrace=null,n.create=function(){if(t)return new n},n.deactivateLongStackTraces=function(){},n.activateLongStackTraces=function(){var r=e.prototype._pushContext,o=e.prototype._popContext,a=e._peekContext,s=e.prototype._peekContext,u=e.prototype._promiseCreated;n.deactivateLongStackTraces=function(){e.prototype._pushContext=r,e.prototype._popContext=o,e._peekContext=a,e.prototype._peekContext=s,e.prototype._promiseCreated=u,t=!1},t=!0,e.prototype._pushContext=n.prototype._pushContext,e.prototype._popContext=n.prototype._popContext,e._peekContext=e.prototype._peekContext=i,e.prototype._promiseCreated=function(){var e=this._peekContext();e&&null==e._promiseCreated&&(e._promiseCreated=this)}},n}},{}],9:[function(e,t,r){"use strict";t.exports=function(t,r,n,o){var a,s,u,c,l=t._async,f=e("./errors").Warning,h=e("./util"),p=e("./es5"),_=h.canAttachTrace,d=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,m=/\((?:timers\.js):\d+:\d+\)/,v=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,g=null,y=null,b=!1,w=!(0==h.env("BLUEBIRD_DEBUG")),k=!(0==h.env("BLUEBIRD_WARNINGS")||!w&&!h.env("BLUEBIRD_WARNINGS")),x=!(0==h.env("BLUEBIRD_LONG_STACK_TRACES")||!w&&!h.env("BLUEBIRD_LONG_STACK_TRACES")),E=0!=h.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(k||!!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}c=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 e=this._target();e._bitField=-1048577&e._bitField|524288},t.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),c(this))},t.prototype._notifyUnhandledRejectionIsHandled=function(){Q("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 e=this._settledValue();this._setUnhandledRejectionIsNotified(),Q("unhandledRejection",s,e,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(e,t,r){return V(e,t,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 B=function(){};t.longStackTraces=function(){if(l.haveItemsQueued()&&!re.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!re.longStackTraces&&$()){var e=t.prototype._captureStackTrace,n=t.prototype._attachExtraTrace,i=t.prototype._dereferenceTrace;re.longStackTraces=!0,B=function(){if(l.haveItemsQueued()&&!re.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=n,t.prototype._dereferenceTrace=i,r.deactivateLongStackTraces(),re.longStackTraces=!1},t.prototype._captureStackTrace=U,t.prototype._attachExtraTrace=z,t.prototype._dereferenceTrace=H,r.activateLongStackTraces()}},t.hasLongStackTraces=function(){return re.longStackTraces&&$()};var S={unhandledrejection:{before:function(){var e=h.global.onunhandledrejection;return h.global.onunhandledrejection=null,e},after:function(e){h.global.onunhandledrejection=e}},rejectionhandled:{before:function(){var e=h.global.onrejectionhandled;return h.global.onrejectionhandled=null,e},after:function(e){h.global.onrejectionhandled=e}}},C=function(){var e=function(e,t){if(!e)return!h.global.dispatchEvent(t);var r;try{return r=e.before(),!h.global.dispatchEvent(t)}finally{e.after(r)}};try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return h.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new CustomEvent(t,{detail:r,cancelable:!0});return p.defineProperty(n,"promise",{value:r.promise}),p.defineProperty(n,"reason",{value:r.reason}),e(S[t],n)}}return"function"==typeof Event?(t=new Event("CustomEvent"),h.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=new Event(t,{cancelable:!0});return n.detail=r,p.defineProperty(n,"promise",{value:r.promise}),p.defineProperty(n,"reason",{value:r.reason}),e(S[t],n)}):((t=document.createEvent("CustomEvent")).initCustomEvent("testingtheevent",!1,!0,{}),h.global.dispatchEvent(t),function(t,r){t=t.toLowerCase();var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,!1,!0,r),e(S[t],n)})}catch(e){}return function(){return!1}}(),j=h.isNode?function(){return i.emit.apply(i,arguments)}:h.global?function(e){var t="on"+e.toLowerCase(),r=h.global[t];return!!r&&(r.apply(h.global,[].slice.call(arguments,1)),!0)}:function(){return!1};function A(e,t){return{promise:t}}var T={promiseCreated:A,promiseFulfilled:A,promiseRejected:A,promiseResolved:A,promiseCancelled:A,promiseChained:function(e,t,r){return{promise:t,child:r}},warning:function(e,t){return{warning:t}},unhandledRejection:function(e,t,r){return{reason:t,promise:r}},rejectionHandled:A},O=function(e){var t=!1;try{t=j.apply(null,arguments)}catch(e){l.throwLater(e),t=!0}var r=!1;try{r=C(e,T[e].apply(null,arguments))}catch(e){l.throwLater(e),r=!0}return r||t};function P(){return!1}function F(e,t,r){var n=this;try{e(t,r,(function(e){if("function"!=typeof e)throw new TypeError("onCancel must be a function, got: "+h.toString(e));n._attachCancellationCallback(e)}))}catch(e){return e}}function D(e){if(!this._isCancellable())return this;var t=this._onCancel();void 0!==t?h.isArray(t)?t.push(e):this._setOnCancel([t,e]):this._setOnCancel(e)}function R(){return this._onCancelField}function I(e){this._onCancelField=e}function q(){this._cancellationParent=void 0,this._onCancelField=void 0}function M(e,t){if(0!=(1&t)){this._cancellationParent=e;var r=e._branchesRemainingToCancel;void 0===r&&(r=0),e._branchesRemainingToCancel=r+1}0!=(2&t)&&e._isBound()&&this._setBoundTo(e._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;re.warnings=!!r,E=re.warnings,h.isObject(r)&&"wForgottenReturn"in r&&(E=!!r.wForgottenReturn)}if("cancellation"in e&&e.cancellation&&!re.cancellation){if(l.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");t.prototype._clearCancellationData=q,t.prototype._propagateFrom=M,t.prototype._onCancel=R,t.prototype._setOnCancel=I,t.prototype._attachCancellationCallback=D,t.prototype._execute=F,L=M,re.cancellation=!0}if("monitoring"in e&&(e.monitoring&&!re.monitoring?(re.monitoring=!0,t.prototype._fireEvent=O):!e.monitoring&&re.monitoring&&(re.monitoring=!1,t.prototype._fireEvent=P)),"asyncHooks"in e&&h.nodeSupportsAsyncResource){var i=re.asyncHooks,a=!!e.asyncHooks;i!==a&&(re.asyncHooks=a,a?n():o())}return t},t.prototype._fireEvent=P,t.prototype._execute=function(e,t,r){try{e(t,r)}catch(e){return e}},t.prototype._onCancel=function(){},t.prototype._setOnCancel=function(e){},t.prototype._attachCancellationCallback=function(e){},t.prototype._captureStackTrace=function(){},t.prototype._attachExtraTrace=function(){},t.prototype._dereferenceTrace=function(){},t.prototype._clearCancellationData=function(){},t.prototype._propagateFrom=function(e,t){};var L=function(e,t){0!=(2&t)&&e._isBound()&&this._setBoundTo(e._boundTo)};function N(){var e=this._boundTo;return void 0!==e&&e instanceof t?e.isFulfilled()?e.value():void 0:e}function U(){this._trace=new ee(this._peekContext())}function z(e,t){if(_(e)){var r=this._trace;if(void 0!==r&&t&&(r=r._parent),void 0!==r)r.attachExtraTrace(e);else if(!e.__stackCleaned__){var n=G(e);h.notEnumerableProp(e,"stack",n.message+"\n"+n.stack.join("\n")),h.notEnumerableProp(e,"__stackCleaned__",!0)}}}function H(){this._trace=void 0}function V(e,r,n){if(re.warnings){var i,o=new f(e);if(r)n._attachExtraTrace(o);else if(re.longStackTraces&&(i=t._peekContext()))i.attachExtraTrace(o);else{var a=G(o);o.stack=a.message+"\n"+a.stack.join("\n")}O("warning",o)||W(o,"",!0)}}function K(e){for(var t=[],r=0;r<e.length;++r){var n=e[r],i=" (No stack trace)"===n||g.test(n),o=i&&X(n);i&&!o&&(b&&" "!==n.charAt(0)&&(n=" "+n),t.push(n))}return t}function G(e){var t=e.stack,r=e.toString();return t="string"==typeof t&&t.length>0?function(e){for(var t=e.stack.replace(/\s+$/g,"").split("\n"),r=0;r<t.length;++r){var n=t[r];if(" (No stack trace)"===n||g.test(n))break}return r>0&&"SyntaxError"!=e.name&&(t=t.slice(r)),t}(e):[" (No stack trace)"],{message:r,stack:"SyntaxError"==e.name?t:K(t)}}function W(e,t,r){if("undefined"!=typeof console){var n;if(h.isObject(e)){var i=e.stack;n=t+y(i,e)}else n=t+String(e);"function"==typeof u?u(n,r):"function"!=typeof console.log&&"object"!=typeof console.log||console.log(n)}}function Q(e,t,r,n){var i=!1;try{"function"==typeof t&&(i=!0,"rejectionHandled"===e?t(n):t(r,n))}catch(e){l.throwLater(e)}"unhandledRejection"===e?O(e,r,n)||i||W(r,"Unhandled rejection "):O(e,n)}function J(e){var t;if("function"==typeof e)t="[function "+(e.name||"anonymous")+"]";else{if(t=e&&"function"==typeof e.toString?e.toString():h.toString(e),/\[object [a-zA-Z0-9$_]+\]/.test(t))try{t=JSON.stringify(e)}catch(e){}0===t.length&&(t="(empty array)")}return"(<"+function(e){return e.length<41?e:e.substr(0,38)+"..."}(t)+">, no stack trace)"}function $(){return"function"==typeof te}var X=function(){return!1},Y=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;function Z(e){var t=e.match(Y);if(t)return{fileName:t[1],line:parseInt(t[2],10)}}function ee(e){this._parent=e,this._promisesCreated=0;var t=this._length=1+(void 0===e?0:e._length);te(this,ee),t>32&&this.uncycle()}h.inherits(ee,Error),r.CapturedTrace=ee,ee.prototype.uncycle=function(){var e=this._length;if(!(e<2)){for(var t=[],r={},n=0,i=this;void 0!==i;++n)t.push(i),i=i._parent;for(n=(e=this._length=n)-1;n>=0;--n){var o=t[n].stack;void 0===r[o]&&(r[o]=n)}for(n=0;n<e;++n){var a=r[t[n].stack];if(void 0!==a&&a!==n){a>0&&(t[a-1]._parent=void 0,t[a-1]._length=1),t[n]._parent=void 0,t[n]._length=1;var s=n>0?t[n-1]:this;a<e-1?(s._parent=t[a+1],s._parent.uncycle(),s._length=s._parent._length+1):(s._parent=void 0,s._length=1);for(var u=s._length+1,c=n-2;c>=0;--c)t[c]._length=u,u++;return}}}},ee.prototype.attachExtraTrace=function(e){if(!e.__stackCleaned__){this.uncycle();for(var t=G(e),r=t.message,n=[t.stack],i=this;void 0!==i;)n.push(K(i.stack.split("\n"))),i=i._parent;!function(e){for(var t=e[0],r=1;r<e.length;++r){for(var n=e[r],i=t.length-1,o=t[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(t[i]!==u)break;t.pop(),i--}t=n}}(n),function(e){for(var t=0;t<e.length;++t)(0===e[t].length||t+1<e.length&&e[t][0]===e[t+1][0])&&(e.splice(t,1),t--)}(n),h.notEnumerableProp(e,"stack",function(e,t){for(var r=0;r<t.length-1;++r)t[r].push("From previous event:"),t[r]=t[r].join("\n");return r<t.length&&(t[r]=t[r].join("\n")),e+"\n"+t.join("\n")}(r,n)),h.notEnumerableProp(e,"__stackCleaned__",!0)}};var te=function(){var e=/^\s*at\s*/,t=function(e,t){return"string"==typeof e?e:void 0!==t.name&&void 0!==t.message?t.toString():J(t)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,g=e,y=t;var r=Error.captureStackTrace;return X=function(e){return d.test(e)},function(e,t){Error.stackTraceLimit+=6,r(e,t),Error.stackTraceLimit-=6}}var n,i=new Error;if("string"==typeof i.stack&&i.stack.split("\n")[0].indexOf("stackDetection@")>=0)return g=/@/,y=t,b=!0,function(e){e.stack=(new Error).stack};try{throw new Error}catch(e){n="stack"in e}return!("stack"in i)&&n&&"number"==typeof Error.stackTraceLimit?(g=e,y=t,function(e){Error.stackTraceLimit+=6;try{throw new Error}catch(t){e.stack=t.stack}Error.stackTraceLimit-=6}):(y=function(e,t){return"string"==typeof e?e:"object"!=typeof t&&"function"!=typeof t||void 0===t.name||void 0===t.message?J(t):t.toString()},null)}();"undefined"!=typeof console&&void 0!==console.warn&&(u=function(e){console.warn(e)},h.isNode&&i.stderr.isTTY?u=function(e,t){var r=t?"[33m":"[31m";console.warn(r+e+"[0m\n")}:h.isNode||"string"!=typeof(new Error).stack||(u=function(e,t){console.warn("%c"+e,t?"color: darkorange":"color: red")}));var re={warnings:k,longStackTraces:!1,cancellation:!1,monitoring:!1,asyncHooks:!1};return x&&t.longStackTraces(),{asyncHooks:function(){return re.asyncHooks},longStackTraces:function(){return re.longStackTraces},warnings:function(){return re.warnings},cancellation:function(){return re.cancellation},monitoring:function(){return re.monitoring},propagateFromFunction:function(){return L},boundValueFunction:function(){return N},checkForgottenReturns:function(e,t,r,n,i){if(void 0===e&&null!==t&&E){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&n._bitField))return;r&&(r+=" ");var o="",a="";if(t._trace){for(var s=t._trace.stack.split("\n"),u=K(s),c=u.length-1;c>=0;--c){var l=u[c];if(!m.test(l)){var f=l.match(v);f&&(o="at "+f[1]+":"+f[2]+":"+f[3]+" ");break}}if(u.length>0){var h=u[0];for(c=0;c<s.length;++c)if(s[c]===h){c>0&&(a="\n"+s[c-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,t)}},setBounds:function(e,t){if($()){for(var r,n,i=(e.stack||"").split("\n"),o=(t.stack||"").split("\n"),a=-1,s=-1,u=0;u<i.length;++u)if(c=Z(i[u])){r=c.fileName,a=c.line;break}for(u=0;u<o.length;++u){var c;if(c=Z(o[u])){n=c.fileName,s=c.line;break}}a<0||s<0||!r||!n||r!==n||a>=s||(X=function(e){if(d.test(e))return!0;var t=Z(e);return!!(t&&t.fileName===r&&a<=t.line&&t.line<=s)})}},warn:V,deprecated:function(e,t){var r=e+" is deprecated and will be removed in a future version.";return t&&(r+=" Use "+t+" instead."),V(r)},CapturedTrace:ee,fireDomEvent:C,fireGlobalEvent:j}}},{"./errors":12,"./es5":13,"./util":36}],10:[function(e,t,r){"use strict";t.exports=function(e){function t(){return this.value}function r(){throw this.reason}e.prototype.return=e.prototype.thenReturn=function(r){return r instanceof e&&r.suppressUnhandledRejections(),this._then(t,void 0,void 0,{value:r},void 0)},e.prototype.throw=e.prototype.thenThrow=function(e){return this._then(r,void 0,void 0,{reason:e},void 0)},e.prototype.catchThrow=function(e){if(arguments.length<=1)return this._then(void 0,r,void 0,{reason:e},void 0);var t=arguments[1],n=function(){throw t};return this.caught(e,n)},e.prototype.catchReturn=function(r){if(arguments.length<=1)return r instanceof e&&r.suppressUnhandledRejections(),this._then(void 0,t,void 0,{value:r},void 0);var n=arguments[1];n instanceof e&&n.suppressUnhandledRejections();var i=function(){return n};return this.caught(r,i)}}},{}],11:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.reduce,n=e.all;function i(){return n(this)}e.prototype.each=function(e){return r(this,e,t,0)._then(i,void 0,void 0,this,void 0)},e.prototype.mapSeries=function(e){return r(this,e,t,t)},e.each=function(e,n){return r(e,n,t,0)._then(i,void 0,void 0,e,void 0)},e.mapSeries=function(e,n){return r(e,n,t,t)}}},{}],12:[function(e,t,r){"use strict";var n,i,o=e("./es5"),a=o.freeze,s=e("./util"),u=s.inherits,c=s.notEnumerableProp;function l(e,t){function r(n){if(!(this instanceof r))return new r(n);c(this,"message","string"==typeof n?n:t),c(this,"name",e),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this)}return u(r,Error),r}var f=l("Warning","warning"),h=l("CancellationError","cancellation error"),p=l("TimeoutError","timeout error"),_=l("AggregateError","aggregate error");try{n=TypeError,i=RangeError}catch(e){n=l("TypeError","type error"),i=l("RangeError","range error")}for(var d="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),m=0;m<d.length;++m)"function"==typeof Array.prototype[d[m]]&&(_.prototype[d[m]]=Array.prototype[d[m]]);o.defineProperty(_.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),_.prototype.isOperational=!0;var v=0;function g(e){if(!(this instanceof g))return new g(e);c(this,"name","OperationalError"),c(this,"message",e),this.cause=e,this.isOperational=!0,e instanceof Error?(c(this,"message",e.message),c(this,"stack",e.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}_.prototype.toString=function(){var e=Array(4*v+1).join(" "),t="\n"+e+"AggregateError of:\n";v++,e=Array(4*v+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]=e+i[o];t+=(n=i.join("\n"))+"\n"}return v--,t},u(g,Error);var y=Error.__BluebirdErrorTypes__;y||(y=a({CancellationError:h,TimeoutError:p,OperationalError:g,RejectionError:g,AggregateError:_}),o.defineProperty(Error,"__BluebirdErrorTypes__",{value:y,writable:!1,enumerable:!1,configurable:!1})),t.exports={Error,TypeError:n,RangeError:i,CancellationError:y.CancellationError,OperationalError:y.OperationalError,TimeoutError:y.TimeoutError,AggregateError:y.AggregateError,Warning:f}},{"./es5":13,"./util":36}],13:[function(e,t,r){var n=function(){"use strict";return void 0===this}();if(n)t.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:n,propertyIsWritable:function(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!(r&&!r.writable&&!r.set)}};else{var i={}.hasOwnProperty,o={}.toString,a={}.constructor.prototype,s=function(e){var t=[];for(var r in e)i.call(e,r)&&t.push(r);return t};t.exports={isArray:function(e){try{return"[object Array]"===o.call(e)}catch(e){return!1}},keys:s,names:s,defineProperty:function(e,t,r){return e[t]=r.value,e},getDescriptor:function(e,t){return{value:e[t]}},freeze:function(e){return e},getPrototypeOf:function(e){try{return Object(e).constructor.prototype}catch(e){return a}},isES5:n,propertyIsWritable:function(){return!0}}}},{}],14:[function(e,t,r){"use strict";t.exports=function(e,t){var r=e.map;e.prototype.filter=function(e,n){return r(this,e,n,t)},e.filter=function(e,n,i){return r(e,n,i,t)}}},{}],15:[function(e,t,r){"use strict";t.exports=function(t,r,n){var i=e("./util"),o=t.CancellationError,a=i.errorObj,s=e("./catch_filter")(n);function u(e,t,r){this.promise=e,this.type=t,this.handler=r,this.called=!1,this.cancelPromise=null}function c(e){this.finallyHandler=e}function l(e,t){return null!=e.cancelPromise&&(arguments.length>1?e.cancelPromise._reject(t):e.cancelPromise._cancel(),e.cancelPromise=null,!0)}function f(){return p.call(this,this.promise._target()._settledValue())}function h(e){if(!l(this,e))return a.e=e,a}function p(e){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(),e);if(u===n)return u;if(void 0!==u){i._setReturnedNonUndefined();var p=r(u,i);if(p instanceof t){if(null!=this.cancelPromise){if(p._isCancelled()){var _=new o("late cancellation observer");return i._attachExtraTrace(_),a.e=_,a}p.isPending()&&p._attachCancellationCallback(new c(this))}return p._then(f,h,void 0,this,void 0)}}}return i.isRejected()?(l(this),a.e=e,a):(l(this),e)}return u.prototype.isFinallyHandler=function(){return 0===this.type},c.prototype._resultCancelled=function(){l(this.finallyHandler)},t.prototype._passThrough=function(e,t,r,n){return"function"!=typeof e?this.then():this._then(r,n,void 0,new u(this,t,e),void 0)},t.prototype.lastly=t.prototype.finally=function(e){return this._passThrough(e,0,p,p)},t.prototype.tap=function(e){return this._passThrough(e,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 c=arguments[n];return this._passThrough(s(o,c,this),1,void 0,p)},u}},{"./catch_filter":7,"./util":36}],16:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){var s=e("./errors").TypeError,u=e("./util"),c=u.errorObj,l=u.tryCatch,f=[];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(f):f,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=l(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=l(this._generator.throw).call(this._generator,r),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(e)}},h.prototype._promiseFulfilled=function(e){this._yieldedPromise=null,this._promise._pushContext();var t=l(this._generator.next).call(this._generator,e);this._promise._popContext(),this._continue(t)},h.prototype._promiseRejected=function(e){this._yieldedPromise=null,this._promise._attachExtraTrace(e),this._promise._pushContext();var t=l(this._generator.throw).call(this._generator,e);this._promise._popContext(),this._continue(t)},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===c)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||(o=function(e,r,n){for(var o=0;o<r.length;++o){n._pushContext();var a=l(r[o])(e);if(n._popContext(),a===c){n._pushContext();var s=t.reject(c.e);return n._popContext(),s}var u=i(a,n);if(u instanceof t)return u}return null}(o,this._yieldHandlers,this._promise),null!==o)){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(e,t){if("function"!=typeof e)throw new s("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=Object(t).yieldHandler,n=h,i=(new Error).stack;return function(){var t=e.apply(this,arguments),o=new n(void 0,void 0,r,i),a=o.promise();return o._generator=t,o._promiseFulfilled(void 0),a}},t.coroutine.addYieldHandler=function(e){if("function"!=typeof e)throw new s("expecting a function but got "+u.classString(e));f.push(e)},t.spawn=function(e){if(a.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof e)return r("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=new h(e,this),i=n.promise();return n._run(t.spawn),i}}},{"./errors":12,"./util":36}],17:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o){var a=e("./util");a.canEvaluate,a.tryCatch,a.errorObj,t.join=function(){var e,t=arguments.length-1;t>0&&"function"==typeof arguments[t]&&(e=arguments[t]);var n=[].slice.call(arguments);e&&n.pop();var i=new r(n).promise();return void 0!==e?i.spread(e):i}}},{"./util":36}],18:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){var s=e("./util"),u=s.tryCatch,c=s.errorObj,l=t._async;function f(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=[],l.invoke(this._asyncInit,this,void 0),s.isArray(e))for(var u=0;u<e.length;++u){var c=e[u];c instanceof t&&c.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 f(e,r,a="number"==typeof a&&isFinite(a)&&a>=1?a:0,o).promise()}s.inherits(f,r),f.prototype._asyncInit=function(){this._init$(void 0,-2)},f.prototype._init=function(){},f.prototype._promiseFulfilled=function(e,r){var n=this._values,o=this.length(),s=this._preservedValues,l=this._limit;if(r<0){if(n[r=-1*r-1]=e,l>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(l>=1&&this._inFlight>=l)return n[r]=e,this._queue.push(r),!1;null!==s&&(s[r]=e);var f=this._promise,h=this._callback,p=f._boundValue();f._pushContext();var _=u(h).call(p,e,r,o),d=f._popContext();if(a.checkForgottenReturns(_,d,null!==s?"Promise.filter":"Promise.map",f),_===c)return this._reject(_.e),!0;var m=i(_,this._promise);if(m instanceof t){var v=(m=m._target())._bitField;if(0==(50397184&v))return l>=1&&this._inFlight++,n[r]=m,m._proxy(this,-1*(r+1)),!1;if(0==(33554432&v))return 0!=(16777216&v)?(this._reject(m._reason()),!0):(this._cancel(),!0);_=m._value()}n[r]=_}return++this._totalResolved>=o&&(null!==s?this._filter(n,s):this._resolve(n),!0)},f.prototype._drainQueue=function(){for(var e=this._queue,t=this._limit,r=this._values;e.length>0&&this._inFlight<t;){if(this._isResolved())return;var n=e.pop();this._promiseFulfilled(r[n],n)}},f.prototype._filter=function(e,t){for(var r=t.length,n=new Array(r),i=0,o=0;o<r;++o)e[o]&&(n[i++]=t[o]);n.length=i,this._resolve(n)},f.prototype.preservedValues=function(){return this._preservedValues},t.prototype.map=function(e,t){return h(this,e,t,null)},t.map=function(e,t,r,n){return h(e,t,r,n)}}},{"./util":36}],19:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o){var a=e("./util"),s=a.tryCatch;t.method=function(e){if("function"!=typeof e)throw new t.TypeError("expecting a function but got "+a.classString(e));return function(){var n=new t(r);n._captureStackTrace(),n._pushContext();var i=s(e).apply(this,arguments),a=n._popContext();return o.checkForgottenReturns(i,a,"Promise.method",n),n._resolveFromSyncValue(i),n}},t.attempt=t.try=function(e){if("function"!=typeof e)return i("expecting a function but got "+a.classString(e));var n,u=new t(r);if(u._captureStackTrace(),u._pushContext(),arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var c=arguments[1],l=arguments[2];n=a.isArray(c)?s(e).apply(l,c):s(e).call(l,c)}else n=s(e)();var f=u._popContext();return o.checkForgottenReturns(n,f,"Promise.try",u),u._resolveFromSyncValue(n),u},t.prototype._resolveFromSyncValue=function(e){e===a.errorObj?this._rejectCallback(e.e,!1):this._resolveCallback(e,!0)}}},{"./util":36}],20:[function(e,t,r){"use strict";var n=e("./util"),i=n.maybeWrapAsError,o=e("./errors").OperationalError,a=e("./es5"),s=/^(?:name|message|stack|cause)$/;function u(e){var t;if(function(e){return e instanceof Error&&a.getPrototypeOf(e)===Error.prototype}(e)){(t=new o(e)).name=e.name,t.message=e.message,t.stack=e.stack;for(var r=a.keys(e),i=0;i<r.length;++i){var u=r[i];s.test(u)||(t[u]=e[u])}return t}return n.markAsOriginatingFromRejection(e),e}t.exports=function(e,t){return function(r,n){if(null!==e){if(r){var o=u(i(r));e._attachExtraTrace(o),e._reject(o)}else if(t){var a=[].slice.call(arguments,1);e._fulfill(a)}else e._fulfill(n);e=null}}}},{"./errors":12,"./es5":13,"./util":36}],21:[function(e,t,r){"use strict";t.exports=function(t){var r=e("./util"),n=t._async,i=r.tryCatch,o=r.errorObj;function a(e,t){if(!r.isArray(e))return s.call(this,e,t);var a=i(t).apply(this._boundValue(),[null].concat(e));a===o&&n.throwLater(a.e)}function s(e,t){var r=this._boundValue(),a=void 0===e?i(t).call(r,null):i(t).call(r,null,e);a===o&&n.throwLater(a.e)}function u(e,t){if(!e){var r=new Error(e+"");r.cause=e,e=r}var a=i(t).call(this._boundValue(),e);a===o&&n.throwLater(a.e)}t.prototype.asCallback=t.prototype.nodeify=function(e,t){if("function"==typeof e){var r=s;void 0!==t&&Object(t).spread&&(r=a),this._then(r,u,void 0,this,e)}return this}}},{"./util":36}],22:[function(e,t,r){"use strict";t.exports=function(){var r=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},n=function(){return new F.PromiseInspection(this._target())},o=function(e){return F.reject(new g(e))};function a(){}var s={},u=e("./util");u.setReflectHandler(n);var c=function(){var e=i.domain;return void 0===e?null:e},l=function(){return{domain:c(),async:null}},f=u.isNode&&u.nodeSupportsAsyncResource?e("async_hooks").AsyncResource:null,h=function(){return{domain:c(),async:new f("Bluebird::Promise")}},p=u.isNode?l:function(){return null};u.notEnumerableProp(F,"_getContext",p);var _=e("./es5"),d=e("./async"),m=new d;_.defineProperty(F,"_async",{value:m});var v=e("./errors"),g=F.TypeError=v.TypeError;F.RangeError=v.RangeError;var y=F.CancellationError=v.CancellationError;F.TimeoutError=v.TimeoutError,F.OperationalError=v.OperationalError,F.RejectionError=v.OperationalError,F.AggregateError=v.AggregateError;var b=function(){},w={},k={},x=e("./thenables")(F,b),E=e("./promise_array")(F,b,x,o,a),B=e("./context")(F),S=B.create,C=e("./debuggability")(F,B,(function(){p=h,u.notEnumerableProp(F,"_getContext",h)}),(function(){p=l,u.notEnumerableProp(F,"_getContext",l)})),j=(C.CapturedTrace,e("./finally")(F,x,k)),A=e("./catch_filter")(k),T=e("./nodeback"),O=u.errorObj,P=u.tryCatch;function F(e){e!==b&&function(e,t){if(null==e||e.constructor!==F)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n");if("function"!=typeof t)throw new g("expecting a function but got "+u.classString(t))}(this,e),this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,this._resolveFromExecutor(e),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function D(e){this.promise._resolveCallback(e)}function R(e){this.promise._rejectCallback(e,!1)}function I(e){var t=new F(b);t._fulfillmentHandler0=e,t._rejectionHandler0=e,t._promise0=e,t._receiver0=e}return F.prototype.toString=function(){return"[object Promise]"},F.prototype.caught=F.prototype.catch=function(e){var t=arguments.length;if(t>1){var r,n=new Array(t-1),i=0;for(r=0;r<t-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(e=arguments[r]))throw new g("The last argument to .catch() must be a function, got "+u.toString(e));return this.then(void 0,A(n,e,this))}return this.then(void 0,e)},F.prototype.reflect=function(){return this._then(n,n,void 0,this,void 0)},F.prototype.then=function(e,t){if(C.warnings()&&arguments.length>0&&"function"!=typeof e&&"function"!=typeof t){var r=".then() only accepts functions but was passed: "+u.classString(e);arguments.length>1&&(r+=", "+u.classString(t)),this._warn(r)}return this._then(e,t,void 0,void 0,void 0)},F.prototype.done=function(e,t){this._then(e,t,void 0,void 0,void 0)._setIsFinal()},F.prototype.spread=function(e){return"function"!=typeof e?o("expecting a function but got "+u.classString(e)):this.all()._then(e,void 0,void 0,w,void 0)},F.prototype.toJSON=function(){var e={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(e.fulfillmentValue=this.value(),e.isFulfilled=!0):this.isRejected()&&(e.rejectionReason=this.reason(),e.isRejected=!0),e},F.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},F.prototype.error=function(e){return this.caught(u.originatesFromRejection,e)},F.getNewLibraryCopy=t.exports,F.is=function(e){return e instanceof F},F.fromNode=F.fromCallback=function(e){var t=new F(b);t._captureStackTrace();var r=arguments.length>1&&!!Object(arguments[1]).multiArgs,n=P(e)(T(t,r));return n===O&&t._rejectCallback(n.e,!0),t._isFateSealed()||t._setAsyncGuaranteed(),t},F.all=function(e){return new E(e).promise()},F.cast=function(e){var t=x(e);return t instanceof F||((t=new F(b))._captureStackTrace(),t._setFulfilled(),t._rejectionHandler0=e),t},F.resolve=F.fulfilled=F.cast,F.reject=F.rejected=function(e){var t=new F(b);return t._captureStackTrace(),t._rejectCallback(e,!0),t},F.setScheduler=function(e){if("function"!=typeof e)throw new g("expecting a function but got "+u.classString(e));return m.setScheduler(e)},F.prototype._then=function(e,t,r,n,i){var o=void 0!==i,a=o?i:new F(b),s=this._target(),c=s._bitField;o||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===n&&0!=(2097152&this._bitField)&&(n=0!=(50397184&c)?this._boundValue():s===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var l=p();if(0!=(50397184&c)){var f,h,_=s._settlePromiseCtx;0!=(33554432&c)?(h=s._rejectionHandler0,f=e):0!=(16777216&c)?(h=s._fulfillmentHandler0,f=t,s._unsetRejectionIsUnhandled()):(_=s._settlePromiseLateCancellationObserver,h=new y("late cancellation observer"),s._attachExtraTrace(h),f=t),m.invoke(_,s,{handler:u.contextBind(l,f),promise:a,receiver:n,value:h})}else s._addCallbacks(e,t,a,n,l);return a},F.prototype._length=function(){return 65535&this._bitField},F.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},F.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},F.prototype._setLength=function(e){this._bitField=-65536&this._bitField|65535&e},F.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},F.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},F.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},F.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},F.prototype._isFinal=function(){return(4194304&this._bitField)>0},F.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},F.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},F.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},F.prototype._setAsyncGuaranteed=function(){if(!m.hasCustomScheduler()){var e=this._bitField;this._bitField=e|(536870912&e)>>2^134217728}},F.prototype._setNoAsyncGuarantee=function(){this._bitField=-134217729&(536870912|this._bitField)},F.prototype._receiverAt=function(e){var t=0===e?this._receiver0:this[4*e-4+3];if(t!==s)return void 0===t&&this._isBound()?this._boundValue():t},F.prototype._promiseAt=function(e){return this[4*e-4+2]},F.prototype._fulfillmentHandlerAt=function(e){return this[4*e-4+0]},F.prototype._rejectionHandlerAt=function(e){return this[4*e-4+1]},F.prototype._boundValue=function(){},F.prototype._migrateCallback0=function(e){e._bitField;var t=e._fulfillmentHandler0,r=e._rejectionHandler0,n=e._promise0,i=e._receiverAt(0);void 0===i&&(i=s),this._addCallbacks(t,r,n,i,null)},F.prototype._migrateCallbackAt=function(e,t){var r=e._fulfillmentHandlerAt(t),n=e._rejectionHandlerAt(t),i=e._promiseAt(t),o=e._receiverAt(t);void 0===o&&(o=s),this._addCallbacks(r,n,i,o,null)},F.prototype._addCallbacks=function(e,t,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 e&&(this._fulfillmentHandler0=u.contextBind(i,e)),"function"==typeof t&&(this._rejectionHandler0=u.contextBind(i,t));else{var a=4*o-4;this[a+2]=r,this[a+3]=n,"function"==typeof e&&(this[a+0]=u.contextBind(i,e)),"function"==typeof t&&(this[a+1]=u.contextBind(i,t))}return this._setLength(o+1),o},F.prototype._proxy=function(e,t){this._addCallbacks(void 0,void 0,t,e,null)},F.prototype._resolveCallback=function(e,t){if(0==(117506048&this._bitField)){if(e===this)return this._rejectCallback(r(),!1);var n=x(e,this);if(!(n instanceof F))return this._fulfill(e);t&&this._propagateFrom(n,2);var i=n._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(n)}else if(0!=(33554432&o))this._fulfill(i._value());else if(0!=(16777216&o))this._reject(i._reason());else{var u=new y("late cancellation observer");i._attachExtraTrace(u),this._reject(u)}}else this._reject(r())}},F.prototype._rejectCallback=function(e,t,r){var n=u.ensureErrorObject(e),i=n===e;if(!i&&!r&&C.warnings()){var o="a promise was rejected with a non-error: "+u.classString(e);this._warn(o,!0)}this._attachExtraTrace(n,!!t&&i),this._reject(e)},F.prototype._resolveFromExecutor=function(e){if(e!==b){var t=this;this._captureStackTrace(),this._pushContext();var r=!0,n=this._execute(e,(function(e){t._resolveCallback(e)}),(function(e){t._rejectCallback(e,r)}));r=!1,this._popContext(),void 0!==n&&t._rejectCallback(n,!0)}},F.prototype._settlePromiseFromHandler=function(e,t,r,n){var i=n._bitField;if(0==(65536&i)){var o;n._pushContext(),t===w?r&&"number"==typeof r.length?o=P(e).apply(this._boundValue(),r):(o=O).e=new g("cannot .spread() a non-array: "+u.classString(r)):o=P(e).call(t,r);var a=n._popContext();0==(65536&(i=n._bitField))&&(o===k?n._reject(r):o===O?n._rejectCallback(o.e,!1):(C.checkForgottenReturns(o,a,"",n,this),n._resolveCallback(o)))}},F.prototype._target=function(){for(var e=this;e._isFollowing();)e=e._followee();return e},F.prototype._followee=function(){return this._rejectionHandler0},F.prototype._setFollowee=function(e){this._rejectionHandler0=e},F.prototype._settlePromise=function(e,t,r,i){var o=e instanceof F,s=this._bitField,u=0!=(134217728&s);0!=(65536&s)?(o&&e._invokeInternalOnCancel(),r instanceof j&&r.isFinallyHandler()?(r.cancelPromise=e,P(t).call(r,i)===O&&e._reject(O.e)):t===n?e._fulfill(n.call(r)):r instanceof a?r._promiseCancelled(e):o||e instanceof E?e._cancel():r.cancel()):"function"==typeof t?o?(u&&e._setAsyncGuaranteed(),this._settlePromiseFromHandler(t,r,i,e)):t.call(r,i,e):r instanceof a?r._isResolved()||(0!=(33554432&s)?r._promiseFulfilled(i,e):r._promiseRejected(i,e)):o&&(u&&e._setAsyncGuaranteed(),0!=(33554432&s)?e._fulfill(i):e._reject(i))},F.prototype._settlePromiseLateCancellationObserver=function(e){var t=e.handler,r=e.promise,n=e.receiver,i=e.value;"function"==typeof t?r instanceof F?this._settlePromiseFromHandler(t,n,i,r):t.call(n,i,r):r instanceof F&&r._reject(i)},F.prototype._settlePromiseCtx=function(e){this._settlePromise(e.promise,e.handler,e.receiver,e.value)},F.prototype._settlePromise0=function(e,t,r){var n=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(n,e,i,t)},F.prototype._clearCallbackDataAtIndex=function(e){var t=4*e-4;this[t+2]=this[t+3]=this[t+0]=this[t+1]=void 0},F.prototype._fulfill=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(e===this){var n=r();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=e,(65535&t)>0&&(0!=(134217728&t)?this._settlePromises():m.settlePromises(this),this._dereferenceTrace())}},F.prototype._reject=function(e){var t=this._bitField;if(!((117506048&t)>>>16)){if(this._setRejected(),this._fulfillmentHandler0=e,this._isFinal())return m.fatalError(e,u.isNode);(65535&t)>0?m.settlePromises(this):this._ensurePossibleRejectionHandled()}},F.prototype._fulfillPromises=function(e,t){for(var r=1;r<e;r++){var n=this._fulfillmentHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,t)}},F.prototype._rejectPromises=function(e,t){for(var r=1;r<e;r++){var n=this._rejectionHandlerAt(r),i=this._promiseAt(r),o=this._receiverAt(r);this._clearCallbackDataAtIndex(r),this._settlePromise(i,n,o,t)}},F.prototype._settlePromises=function(){var e=this._bitField,t=65535&e;if(t>0){if(0!=(16842752&e)){var r=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,r,e),this._rejectPromises(t,r)}else{var n=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,n,e),this._fulfillPromises(t,n)}this._setLength(0)}this._clearCancellationData()},F.prototype._settledValue=function(){var e=this._bitField;return 0!=(33554432&e)?this._rejectionHandler0:0!=(16777216&e)?this._fulfillmentHandler0:void 0},"undefined"!=typeof Symbol&&Symbol.toStringTag&&_.defineProperty(F.prototype,Symbol.toStringTag,{get:function(){return"Object"}}),F.defer=F.pending=function(){return C.deprecated("Promise.defer","new Promise"),{promise:new F(b),resolve:D,reject:R}},u.notEnumerableProp(F,"_makeSelfResolutionError",r),e("./method")(F,b,x,o,C),e("./bind")(F,b,x,C),e("./cancel")(F,E,o,C),e("./direct_resolve")(F),e("./synchronous_inspection")(F),e("./join")(F,E,x,b,m),F.Promise=F,F.version="3.7.2",e("./call_get.js")(F),e("./generators.js")(F,o,b,x,a,C),e("./map.js")(F,E,o,x,b,C),e("./nodeify.js")(F),e("./promisify.js")(F,b),e("./props.js")(F,E,x,o),e("./race.js")(F,b,x,o),e("./reduce.js")(F,E,o,x,b,C),e("./settle.js")(F,E,C),e("./some.js")(F,E,o),e("./timers.js")(F,b,C),e("./using.js")(F,o,x,S,b,C),e("./any.js")(F),e("./each.js")(F,b),e("./filter.js")(F,b),u.toFastProperties(F),u.toFastProperties(F.prototype),I({a:1}),I({b:2}),I({c:3}),I(1),I((function(){})),I(void 0),I(!1),I(new F(b)),C.setBounds(d.firstLineError,u.lastLineError),F}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36,async_hooks:void 0}],23:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o){var a=e("./util");function s(e){var n=this._promise=new t(r);e instanceof t&&(n._propagateFrom(e,3),e.suppressUnhandledRejections()),n._setOnCancel(this),this._values=e,this._length=0,this._totalResolved=0,this._init(void 0,-2)}return a.isArray,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(e){switch(e){case-2:return[];case-3:return{};case-6:return new Map}}(o));else{var c=i("expecting an array or an iterable object but got "+a.classString(s)).reason();this._promise._rejectCallback(c,!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(e){this._values=null,this._promise._fulfill(e)},s.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},s.prototype._reject=function(e){this._values=null,this._promise._rejectCallback(e,!1)},s.prototype._promiseFulfilled=function(e,t){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},s.prototype._promiseCancelled=function(){return this._cancel(),!0},s.prototype._promiseRejected=function(e){return this._totalResolved++,this._reject(e),!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(e){return e},s}},{"./util":36}],24:[function(e,t,r){"use strict";t.exports=function(t,r){var n={},i=e("./util"),o=e("./nodeback"),a=i.withAppended,s=i.maybeWrapAsError,u=i.canEvaluate,c=e("./errors").TypeError,l={__isPromisified__:!0},f=new RegExp("^(?:"+["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"].join("|")+")$"),h=function(e){return i.isIdentifier(e)&&"_"!==e.charAt(0)&&"constructor"!==e};function p(e){return!f.test(e)}function _(e){try{return!0===e.__isPromisified__}catch(e){return!1}}function d(e,t,r){var n=i.getDataPropertyOrDefault(e,t+r,l);return!!n&&_(n)}var m=u?void 0:function(e,u,c,l,f,h){var p=function(){return this}(),_=e;function d(){var i=u;u===n&&(i=this);var c=new t(r);c._captureStackTrace();var l="string"==typeof _&&this!==p?this[_]:e,f=o(c,h);try{l.apply(i,a(arguments,f))}catch(e){c._rejectCallback(s(e),!0,!0)}return c._isFateSealed()||c._setAsyncGuaranteed(),c}return"string"==typeof _&&(e=l),i.notEnumerableProp(d,"__isPromisified__",!0),d};function v(e,t,r,o,a){for(var s=new RegExp(t.replace(/([$])/,"\\$")+"$"),u=function(e,t,r,n){for(var o=i.inheritedDataKeys(e),a=[],s=0;s<o.length;++s){var u=o[s],l=e[u],f=n===h||h(u);"function"!=typeof l||_(l)||d(e,u,t)||!n(u,l,e,f)||a.push(u,l)}return function(e,t,r){for(var n=0;n<e.length;n+=2){var i=e[n];if(r.test(i))for(var o=i.replace(r,""),a=0;a<e.length;a+=2)if(e[a]===o)throw new c("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",t))}}(a,t,r),a}(e,t,s,r),l=0,f=u.length;l<f;l+=2){var p=u[l],v=u[l+1],g=p+t;if(o===m)e[g]=m(p,n,p,v,t,a);else{var y=o(v,(function(){return m(p,n,p,v,t,a)}));i.notEnumerableProp(y,"__isPromisified__",!0),e[g]=y}}return i.toFastProperties(e),e}t.promisify=function(e,t){if("function"!=typeof e)throw new c("expecting a function but got "+i.classString(e));if(_(e))return e;var r,o,a,s=(r=e,o=void 0===(t=Object(t)).context?n:t.context,a=!!t.multiArgs,m(r,o,void 0,r,null,a));return i.copyDescriptors(e,s,p),s},t.promisifyAll=function(e,t){if("function"!=typeof e&&"object"!=typeof e)throw new c("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");var r=!!(t=Object(t)).multiArgs,n=t.suffix;"string"!=typeof n&&(n="Async");var o=t.filter;"function"!=typeof o&&(o=h);var a=t.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(e),u=0;u<s.length;++u){var l=e[s[u]];"constructor"!==s[u]&&i.isClass(l)&&(v(l.prototype,n,o,a,r),v(l,n,o,a,r))}return v(e,n,o,a,r)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(e,t,r){"use strict";t.exports=function(t,r,n,i){var o,a=e("./util"),s=a.isObject,u=e("./es5");"function"==typeof Map&&(o=Map);var c=function(){var e=0,t=0;function r(r,n){this[e]=r,this[e+t]=n,e++}return function(n){t=n.size,e=0;var i=new Array(2*n.size);return n.forEach(r,i),i}}();function l(e){var t,r=!1;if(void 0!==o&&e instanceof o)t=c(e),r=!0;else{var n=u.keys(e),i=n.length;t=new Array(2*i);for(var a=0;a<i;++a){var s=n[a];t[a]=e[s],t[a+i]=s}}this.constructor$(t),this._isMap=r,this._init$(void 0,r?-6:-3)}function f(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 l(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(l,r),l.prototype._init=function(){},l.prototype._promiseFulfilled=function(e,t){if(this._values[t]=e,++this._totalResolved>=this._length){var r;if(this._isMap)r=function(e){for(var t=new o,r=e.length/2|0,n=0;n<r;++n){var i=e[r+n],a=e[n];t.set(i,a)}return t}(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},l.prototype.shouldCopyValues=function(){return!1},l.prototype.getActualLength=function(e){return e>>1},t.prototype.props=function(){return f(this)},t.props=function(e){return f(e)}}},{"./es5":13,"./util":36}],26:[function(e,t,r){"use strict";function n(e){this._capacity=e,this._length=0,this._front=0}n.prototype._willBeOverCapacity=function(e){return this._capacity<e},n.prototype._pushOne=function(e){var t=this.length();this._checkCapacity(t+1),this[this._front+t&this._capacity-1]=e,this._length=t+1},n.prototype.push=function(e,t,r){var n=this.length()+3;if(this._willBeOverCapacity(n))return this._pushOne(e),this._pushOne(t),void this._pushOne(r);var i=this._front+n-3;this._checkCapacity(n);var o=this._capacity-1;this[i+0&o]=e,this[i+1&o]=t,this[i+2&o]=r,this._length=n},n.prototype.shift=function(){var e=this._front,t=this[e];return this[e]=void 0,this._front=e+1&this._capacity-1,this._length--,t},n.prototype.length=function(){return this._length},n.prototype._checkCapacity=function(e){this._capacity<e&&this._resizeTo(this._capacity<<1)},n.prototype._resizeTo=function(e){var t=this._capacity;this._capacity=e,function(e,t,r,n,i){for(var o=0;o<i;++o)r[o+n]=e[o+0],e[o+0]=void 0}(this,0,this,t,this._front+this._length&t-1)},t.exports=n},{}],27:[function(e,t,r){"use strict";t.exports=function(t,r,n,i){var o=e("./util");function a(e,s){var u,c=n(e);if(c instanceof t)return(u=c).then((function(e){return a(e,u)}));if(null===(e=o.asArray(e)))return i("expecting an array or an iterable object but got "+o.classString(e));var l=new t(r);void 0!==s&&l._propagateFrom(s,3);for(var f=l._fulfill,h=l._reject,p=0,_=e.length;p<_;++p){var d=e[p];(void 0!==d||p in e)&&t.cast(d)._then(f,h,void 0,l,null)}return l}t.race=function(e){return a(e,void 0)},t.prototype.race=function(){return a(this,void 0)}}},{"./util":36}],28:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){var s=e("./util"),u=s.tryCatch;function c(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 l(e,t){this.isFulfilled()?t._resolve(e):t._reject(e)}function f(e,t,r,i){return"function"!=typeof t?n("expecting a function but got "+s.classString(t)):new c(e,t,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(c,r),c.prototype._gotAccum=function(e){void 0!==this._eachValues&&null!==this._eachValues&&e!==o&&this._eachValues.push(e)},c.prototype._eachComplete=function(e){return null!==this._eachValues&&this._eachValues.push(e),this._eachValues},c.prototype._init=function(){},c.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},c.prototype.shouldCopyValues=function(){return!1},c.prototype._resolve=function(e){this._promise._resolveCallback(e),this._values=null},c.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())},c.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(l,l,void 0,r,this)},t.prototype.reduce=function(e,t){return f(this,e,t,null)},t.reduce=function(e,t,r,n){return f(e,t,r,n)}}},{"./util":36}],29:[function(e,t,n){"use strict";var o,a,s,u,c,l=e("./util"),f=l.getNativePromise();if(l.isNode&&"undefined"==typeof MutationObserver){var h=r.g.setImmediate,p=i.nextTick;o=l.isRecentNode?function(e){h.call(r.g,e)}:function(e){p.call(i,e)}}else if("function"==typeof f&&"function"==typeof f.resolve){var _=f.resolve();o=function(e){_.then(e)}}else o="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)||!("classList"in document.documentElement)?"undefined"!=typeof setImmediate?function(e){setImmediate(e)}:"undefined"!=typeof setTimeout?function(e){setTimeout(e,0)}:function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}:(a=document.createElement("div"),s={attributes:!0},u=!1,c=document.createElement("div"),new MutationObserver((function(){a.classList.toggle("foo"),u=!1})).observe(c,s),function(e){var t=new MutationObserver((function(){t.disconnect(),e()}));t.observe(a,s),u||(u=!0,c.classList.toggle("foo"))});t.exports=o},{"./util":36}],30:[function(e,t,r){"use strict";t.exports=function(t,r,n){var i=t.PromiseInspection;function o(e){this.constructor$(e)}e("./util").inherits(o,r),o.prototype._promiseResolved=function(e,t){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},o.prototype._promiseFulfilled=function(e,t){var r=new i;return r._bitField=33554432,r._settledValueField=e,this._promiseResolved(t,r)},o.prototype._promiseRejected=function(e,t){var r=new i;return r._bitField=16777216,r._settledValueField=e,this._promiseResolved(t,r)},t.settle=function(e){return n.deprecated(".settle()",".reflect()"),new o(e).promise()},t.allSettled=function(e){return new o(e).promise()},t.prototype.settle=function(){return t.settle(this)}}},{"./util":36}],31:[function(e,t,r){"use strict";t.exports=function(t,r,n){var i=e("./util"),o=e("./errors").RangeError,a=e("./errors").AggregateError,s=i.isArray,u={};function c(e){this.constructor$(e),this._howMany=0,this._unwrap=!1,this._initialized=!1}function l(e,t){if((0|t)!==t||t<0)return n("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var r=new c(e),i=r.promise();return r.setHowMany(t),r.init(),i}i.inherits(c,r),c.prototype._init=function(){if(this._initialized)if(0!==this._howMany){this._init$(void 0,-5);var e=s(this._values);!this._isResolved()&&e&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}else this._resolve([])},c.prototype.init=function(){this._initialized=!0,this._init()},c.prototype.setUnwrap=function(){this._unwrap=!0},c.prototype.howMany=function(){return this._howMany},c.prototype.setHowMany=function(e){this._howMany=e},c.prototype._promiseFulfilled=function(e){return this._addFulfilled(e),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},c.prototype._promiseRejected=function(e){return this._addRejected(e),this._checkOutcome()},c.prototype._promiseCancelled=function(){return this._values instanceof t||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},c.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var e=new a,t=this.length();t<this._values.length;++t)this._values[t]!==u&&e.push(this._values[t]);return e.length>0?this._reject(e):this._cancel(),!0}return!1},c.prototype._fulfilled=function(){return this._totalResolved},c.prototype._rejected=function(){return this._values.length-this.length()},c.prototype._addRejected=function(e){this._values.push(e)},c.prototype._addFulfilled=function(e){this._values[this._totalResolved++]=e},c.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},c.prototype._getRangeError=function(e){var t="Input array must contain at least "+this._howMany+" items but contains only "+e+" items";return new o(t)},c.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},t.some=function(e,t){return l(e,t)},t.prototype.some=function(e){return l(this,e)},t._SomePromiseArray=c}},{"./errors":12,"./util":36}],32:[function(e,t,r){"use strict";t.exports=function(e){function t(e){void 0!==e?(e=e._target(),this._bitField=e._bitField,this._settledValueField=e._isFateSealed()?e._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}t.prototype._settledValue=function(){return this._settledValueField};var r=t.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=t.prototype.error=t.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=t.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=t.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},a=t.prototype.isPending=function(){return 0==(50397184&this._bitField)},s=t.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};t.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},e.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},e.prototype._isCancelled=function(){return this._target().__isCancelled()},e.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},e.prototype.isPending=function(){return a.call(this._target())},e.prototype.isRejected=function(){return o.call(this._target())},e.prototype.isFulfilled=function(){return i.call(this._target())},e.prototype.isResolved=function(){return s.call(this._target())},e.prototype.value=function(){return r.call(this._target())},e.prototype.reason=function(){var e=this._target();return e._unsetRejectionIsUnhandled(),n.call(e)},e.prototype._value=function(){return this._settledValue()},e.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},e.PromiseInspection=t}},{}],33:[function(e,t,r){"use strict";t.exports=function(t,r){var n=e("./util"),i=n.errorObj,o=n.isObject,a={}.hasOwnProperty;return function(e,s){if(o(e)){if(e instanceof t)return e;var u=function(e){try{return function(e){return e.then}(e)}catch(e){return i.e=e,i}}(e);if(u===i){s&&s._pushContext();var c=t.reject(u.e);return s&&s._popContext(),c}if("function"==typeof u)return function(e){try{return a.call(e,"_promise0")}catch(e){return!1}}(e)?(c=new t(r),e._then(c._fulfill,c._reject,void 0,c,null),c):function(e,o,a){var s=new t(r),u=s;a&&a._pushContext(),s._captureStackTrace(),a&&a._popContext();var c=!0,l=n.tryCatch(o).call(e,(function(e){s&&(s._resolveCallback(e),s=null)}),(function(e){s&&(s._rejectCallback(e,c,!0),s=null)}));return c=!1,s&&l===i&&(s._rejectCallback(l.e,!0,!0),s=null),u}(e,u,s)}return e}}},{"./util":36}],34:[function(e,t,r){"use strict";t.exports=function(t,r,n){var i=e("./util"),o=t.TimeoutError;function a(e){this.handle=e}a.prototype._resultCancelled=function(){clearTimeout(this.handle)};var s=function(e){return u(+this).thenReturn(e)},u=t.delay=function(e,i){var o,u;return void 0!==i?(o=t.resolve(i)._then(s,null,null,e,void 0),n.cancellation()&&i instanceof t&&o._setOnCancel(i)):(o=new t(r),u=setTimeout((function(){o._fulfill()}),+e),n.cancellation()&&o._setOnCancel(new a(u)),o._captureStackTrace()),o._setAsyncGuaranteed(),o};function c(e){return clearTimeout(this.handle),e}function l(e){throw clearTimeout(this.handle),e}t.prototype.delay=function(e){return u(e,this)},t.prototype.timeout=function(e,t){var r,s;e=+e;var u=new a(setTimeout((function(){r.isPending()&&function(e,t,r){var n;n="string"!=typeof t?t instanceof Error?t:new o("operation timed out"):new o(t),i.markAsOriginatingFromRejection(n),e._attachExtraTrace(n),e._reject(n),null!=r&&r.cancel()}(r,t,s)}),e));return n.cancellation()?(s=this.then(),(r=s._then(c,l,void 0,u,void 0))._setOnCancel(u)):r=this._then(c,l,void 0,u,void 0),r}}},{"./util":36}],35:[function(e,t,r){"use strict";t.exports=function(t,r,n,i,o,a){var s=e("./util"),u=e("./errors").TypeError,c=e("./util").inherits,l=s.errorObj,f=s.tryCatch,h={};function p(e){setTimeout((function(){throw e}),0)}function _(e,r){var i=0,a=e.length,s=new t(o);return function o(){if(i>=a)return s._fulfill();var u=function(e){var t=n(e);return t!==e&&"function"==typeof e._isDisposable&&"function"==typeof e._getDisposer&&e._isDisposable()&&t._setDisposable(e._getDisposer()),t}(e[i++]);if(u instanceof t&&u._isDisposable()){try{u=n(u._getDisposer().tryDispose(r),e.promise)}catch(e){return p(e)}if(u instanceof t)return u._then(o,p,null,null,null)}o()}(),s}function d(e,t,r){this._data=e,this._promise=t,this._context=r}function m(e,t,r){this.constructor$(e,t,r)}function v(e){return d.isDisposer(e)?(this.resources[this.index]._setDisposable(e),e.promise()):e}function g(e){this.length=e,this.promise=null,this[e-1]=null}d.prototype.data=function(){return this._data},d.prototype.promise=function(){return this._promise},d.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():h},d.prototype.tryDispose=function(e){var t=this.resource(),r=this._context;void 0!==r&&r._pushContext();var n=t!==h?this.doDispose(t,e):null;return void 0!==r&&r._popContext(),this._promise._unsetDisposable(),this._data=null,n},d.isDisposer=function(e){return null!=e&&"function"==typeof e.resource&&"function"==typeof e.tryDispose},c(m,d),m.prototype.doDispose=function(e,t){return this.data().call(e,e,t)},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 e=arguments.length;if(e<2)return r("you must pass at least 2 arguments to Promise.using");var i,o=arguments[e-1];if("function"!=typeof o)return r("expecting a function but got "+s.classString(o));var u=!0;2===e&&Array.isArray(arguments[0])?(e=(i=arguments[0]).length,u=!1):(i=arguments,e--);for(var c=new g(e),h=0;h<e;++h){var p=i[h];if(d.isDisposer(p)){var m=p;(p=p.promise())._setDisposable(m)}else{var y=n(p);y instanceof t&&(p=y._then(v,null,null,{resources:c,index:h},void 0))}c[h]=p}var b=new Array(c.length);for(h=0;h<b.length;++h)b[h]=t.resolve(c[h]).reflect();var w=t.all(b).then((function(e){for(var t=0;t<e.length;++t){var r=e[t];if(r.isRejected())return l.e=r.error(),l;if(!r.isFulfilled())return void w.cancel();e[t]=r.value()}k._pushContext(),o=f(o);var n=u?o.apply(void 0,e):o(e),i=k._popContext();return a.checkForgottenReturns(n,i,"Promise.using",k),n})),k=w.lastly((function(){var e=new t.PromiseInspection(w);return _(c,e)}));return c.promise=k,k._setOnCancel(c),k},t.prototype._setDisposable=function(e){this._bitField=131072|this._bitField,this._disposer=e},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(e){if("function"==typeof e)return new m(e,this,i());throw new u}}},{"./errors":12,"./util":36}],36:[function(e,t,n){"use strict";var o,a=e("./es5"),s="undefined"==typeof navigator,u={e:{}},c="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:void 0!==this?this:null;function l(){try{var e=o;return o=null,e.apply(this,arguments)}catch(e){return u.e=e,u}}function f(e){return null==e||!0===e||!1===e||"string"==typeof e||"number"==typeof e}function h(e,t,r){if(f(e))return e;var n={value:r,configurable:!0,enumerable:!1,writable:!0};return a.defineProperty(e,t,n),e}var p=function(){var e=[Array.prototype,Object.prototype,Function.prototype],t=function(t){for(var r=0;r<e.length;++r)if(e[r]===t)return!0;return!1};if(a.isES5){var r=Object.getOwnPropertyNames;return function(e){for(var n=[],i=Object.create(null);null!=e&&!t(e);){var o;try{o=r(e)}catch(e){return n}for(var s=0;s<o.length;++s){var u=o[s];if(!i[u]){i[u]=!0;var c=Object.getOwnPropertyDescriptor(e,u);null!=c&&null==c.get&&null==c.set&&n.push(u)}}e=a.getPrototypeOf(e)}return n}}var n={}.hasOwnProperty;return function(r){if(t(r))return[];var i=[];e:for(var o in r)if(n.call(r,o))i.push(o);else{for(var a=0;a<e.length;++a)if(n.call(e[a],o))continue e;i.push(o)}return i}}(),_=/this\s*\.\s*\S+\s*=/;var d=/^[a-z$_][a-z$_0-9]*$/i;function m(e){try{return e+""}catch(e){return"[no string representation]"}}function v(e){return e instanceof Error||null!==e&&"object"==typeof e&&"string"==typeof e.message&&"string"==typeof e.name}function g(e){return v(e)&&a.propertyIsWritable(e,"stack")}var y="stack"in new Error?function(e){return g(e)?e:new Error(m(e))}:function(e){if(g(e))return e;try{throw new Error(m(e))}catch(e){return e}};function b(e){return{}.toString.call(e)}var w=function(e){return a.isArray(e)?e:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var k="function"==typeof Array.from?function(e){return Array.from(e)}:function(e){for(var t,r=[],n=e[Symbol.iterator]();!(t=n.next()).done;)r.push(t.value);return r};w=function(e){return a.isArray(e)?e:null!=e&&"function"==typeof e[Symbol.iterator]?k(e):null}}var x,E=void 0!==i&&"[object process]"===b(i).toLowerCase(),B=void 0!==i&&!0;var S,C={setReflectHandler:function(e){x=e},isClass:function(e){try{if("function"==typeof e){var t=a.names(e.prototype),r=a.isES5&&t.length>1,n=t.length>0&&!(1===t.length&&"constructor"===t[0]),i=_.test(e+"")&&a.names(e).length>0;if(r||n||i)return!0}return!1}catch(e){return!1}},isIdentifier:function(e){return d.test(e)},inheritedDataKeys:p,getDataPropertyOrDefault:function(e,t,r){if(!a.isES5)return{}.hasOwnProperty.call(e,t)?e[t]:void 0;var n=Object.getOwnPropertyDescriptor(e,t);return null!=n?null==n.get&&null==n.set?n.value:r:void 0},thrower:function(e){throw e},isArray:a.isArray,asArray:w,notEnumerableProp:h,isPrimitive:f,isObject:function(e){return"function"==typeof e||"object"==typeof e&&null!==e},isError:v,canEvaluate:s,errorObj:u,tryCatch:function(e){return o=e,l},inherits:function(e,t){var r={}.hasOwnProperty;function n(){for(var n in this.constructor=e,this.constructor$=t,t.prototype)r.call(t.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=t.prototype[n])}return n.prototype=t.prototype,e.prototype=new n,e.prototype},withAppended:function(e,t){var r,n=e.length,i=new Array(n+1);for(r=0;r<n;++r)i[r]=e[r];return i[r]=t,i},maybeWrapAsError:function(e){return f(e)?new Error(m(e)):e},toFastProperties:function(e){function t(){}t.prototype=e;var r=new t;function n(){return typeof r.foo}return n(),n(),e},filledRange:function(e,t,r){for(var n=new Array(e),i=0;i<e;++i)n[i]=t+i+r;return n},toString:m,canAttachTrace:g,ensureErrorObject:y,originatesFromRejection:function(e){return null!=e&&(e instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===e.isOperational)},markAsOriginatingFromRejection:function(e){try{h(e,"isOperational",!0)}catch(e){}},classString:b,copyDescriptors:function(e,t,r){for(var n=a.names(e),i=0;i<n.length;++i){var o=n[i];if(r(o))try{a.defineProperty(t,o,a.getDescriptor(e,o))}catch(e){}}},isNode:E,hasEnvVariables:B,env:function(e){return B?{NODE_ENV:"production"}[e]:void 0},global:c,getNativePromise:function(){if("function"==typeof Promise)try{if("[object Promise]"===b(new Promise((function(){}))))return Promise}catch(e){}},contextBind:function(e,t){if(null===e||"function"!=typeof t||t===x)return t;null!==e.domain&&(t=e.domain.bind(t));var r=e.async;if(null!==r){var n=t;t=function(){var e=new Array(2).concat([].slice.call(arguments));return e[0]=n,e[1]=this,r.runInAsyncScope.apply(r,e)}}return t}};C.isRecentNode=C.isNode&&(i.versions&&i.versions.node?S=i.versions.node.split(".").map(Number):i.version&&(S=i.version.split(".").map(Number)),0===S[0]&&S[1]>10||S[0]>0),C.nodeSupportsAsyncResource=C.isNode&&function(){var t=!1;try{t="function"==typeof e("async_hooks").AsyncResource.prototype.runInAsyncScope}catch(e){t=!1}return t}(),C.isNode&&C.toFastProperties(i);try{throw new Error}catch(e){C.lastLineError=e}t.exports=C},{"./es5":13,async_hooks:void 0}]},{},[4])(4)},e.exports=n(),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise)},74077:function(e,t){var r="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=r.DOMException}return e.prototype=r,new e}();!function(e){!function(t){var r="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,i="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function _(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function d(e){var t=new FileReader,r=_(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;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(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var e,t,r,n=p(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=_(t=new FileReader),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(e,t){e=c(e),t=l(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},h.prototype.delete=function(e){delete this.map[c(e)]},h.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},h.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},h.prototype.set=function(e,t){this.map[c(e)]=l(t)},h.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},h.prototype.keys=function(){var e=[];return this.forEach((function(t,r){e.push(r)})),f(e)},h.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},h.prototype.entries=function(){var e=[];return this.forEach((function(t,r){e.push([r,t])})),f(e)},n&&(h.prototype[Symbol.iterator]=h.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(e,t){var r,n,i=(t=t||{}).body;if(e instanceof y){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new h(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(n=(r=t.method||this.method||"GET").toUpperCase(),g.indexOf(n)>-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},v.call(y.prototype),v.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];w.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function x(e,r){return new Promise((function(n,o){var a=new y(e,r);if(a.signal&&a.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function u(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};r.url="responseURL"in s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}x.polyfill=!0,e.fetch||(e.fetch=x,e.Headers=h,e.Request=y,e.Response=w),t.Headers=h,t.Request=y,t.Response=w,t.fetch=x,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(t=i.fetch).default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t},48590:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});var n=r(34155).process;const i="[object process]"===Object.prototype.toString.call(void 0!==n?n:0)},76447:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>i});class n extends Array{constructor(e,t){if(super(e),this.sign=t,e>n.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(e){var t=Math.floor,r=Number.isFinite;if("number"==typeof e){if(0===e)return n.__zero();if(n.__isOneDigitInt(e))return 0>e?n.__oneDigit(-e,!0):n.__oneDigit(e,!1);if(!r(e)||t(e)!==e)throw new RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return n.__fromDouble(e)}if("string"==typeof e){const t=n.__fromString(e);if(null===t)throw new SyntaxError("Cannot convert "+e+" to a BigInt");return t}if("boolean"==typeof e)return!0===e?n.__oneDigit(1,!1):n.__zero();if("object"==typeof e){if(e.constructor===n)return e;const t=n.__toPrimitive(e);return n.BigInt(t)}throw new TypeError("Cannot convert "+e+" to a BigInt")}toDebugString(){const e=["BigInt["];for(const t of this)e.push((t?(t>>>0).toString(16):t)+", ");return e.push("]"),e.join("")}toString(e=10){if(2>e||36<e)throw new RangeError("toString() radix argument must be between 2 and 36");return 0===this.length?"0":0==(e&e-1)?n.__toStringBasePowerOfTwo(this,e):n.__toStringGeneric(this,e,!1)}static toNumber(e){const t=e.length;if(0===t)return 0;if(1===t){const t=e.__unsignedDigit(0);return e.sign?-t:t}const r=e.__digit(t-1),i=n.__clz30(r),o=30*t-i;if(1024<o)return e.sign?-1/0:1/0;let a=o-1,s=r,u=t-1;const c=i+3;let l=32===c?0:s<<c;l>>>=12;const f=c-12;let h=12<=c?0:s<<20+c,p=20+c;for(0<f&&0<u&&(u--,s=e.__digit(u),l|=s>>>30-f,h=s<<f+2,p=f+2);0<p&&0<u;)u--,s=e.__digit(u),h|=30<=p?s<<p-30:s>>>30-p,p-=30;const _=n.__decideRounding(e,p,u,s);if((1===_||0===_&&1==(1&h))&&(h=h+1>>>0,0===h&&(l++,0!=l>>>20&&(l=0,a++,1023<a))))return e.sign?-1/0:1/0;const d=e.sign?-2147483648:0;return a=a+1023<<20,n.__kBitConversionInts[1]=d|a|l,n.__kBitConversionInts[0]=h,n.__kBitConversionDouble[0]}static unaryMinus(e){if(0===e.length)return e;const t=e.__copy();return t.sign=!e.sign,t}static bitwiseNot(e){return e.sign?n.__absoluteSubOne(e).__trim():n.__absoluteAddOne(e,!0)}static exponentiate(e,t){if(t.sign)throw new RangeError("Exponent must be positive");if(0===t.length)return n.__oneDigit(1,!1);if(0===e.length)return e;if(1===e.length&&1===e.__digit(0))return e.sign&&0==(1&t.__digit(0))?n.unaryMinus(e):e;if(1<t.length)throw new RangeError("BigInt too big");let r=t.__unsignedDigit(0);if(1===r)return e;if(r>=n.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===e.length&&2===e.__digit(0)){const t=1+(0|r/30),i=e.sign&&0!=(1&r),o=new n(t,i);o.__initializeDigits();const a=1<<r%30;return o.__setDigit(t-1,a),o}let i=null,o=e;for(0!=(1&r)&&(i=e),r>>=1;0!==r;r>>=1)o=n.multiply(o,o),0!=(1&r)&&(i=null===i?o:n.multiply(i,o));return i}static multiply(e,t){if(0===e.length)return e;if(0===t.length)return t;let r=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&r--;const i=new n(r,e.sign!==t.sign);i.__initializeDigits();for(let r=0;r<e.length;r++)n.__multiplyAccumulate(t,e.__digit(r),i,r);return i.__trim()}static divide(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>n.__absoluteCompare(e,t))return n.__zero();const r=e.sign!==t.sign,i=t.__unsignedDigit(0);let o;if(1===t.length&&32767>=i){if(1===i)return r===e.sign?e:n.unaryMinus(e);o=n.__absoluteDivSmall(e,i,null)}else o=n.__absoluteDivLarge(e,t,!0,!1);return o.sign=r,o.__trim()}static remainder(e,t){if(0===t.length)throw new RangeError("Division by zero");if(0>n.__absoluteCompare(e,t))return e;const r=t.__unsignedDigit(0);if(1===t.length&&32767>=r){if(1===r)return n.__zero();const t=n.__absoluteModSmall(e,r);return 0===t?n.__zero():n.__oneDigit(t,e.sign)}const i=n.__absoluteDivLarge(e,t,!1,!0);return i.sign=e.sign,i.__trim()}static add(e,t){const r=e.sign;return r===t.sign?n.__absoluteAdd(e,t,r):0<=n.__absoluteCompare(e,t)?n.__absoluteSub(e,t,r):n.__absoluteSub(t,e,!r)}static subtract(e,t){const r=e.sign;return r===t.sign?0<=n.__absoluteCompare(e,t)?n.__absoluteSub(e,t,r):n.__absoluteSub(t,e,!r):n.__absoluteAdd(e,t,r)}static leftShift(e,t){return 0===t.length||0===e.length?e:t.sign?n.__rightShiftByAbsolute(e,t):n.__leftShiftByAbsolute(e,t)}static signedRightShift(e,t){return 0===t.length||0===e.length?e:t.sign?n.__leftShiftByAbsolute(e,t):n.__rightShiftByAbsolute(e,t)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(e,t){return 0>n.__compareToBigInt(e,t)}static lessThanOrEqual(e,t){return 0>=n.__compareToBigInt(e,t)}static greaterThan(e,t){return 0<n.__compareToBigInt(e,t)}static greaterThanOrEqual(e,t){return 0<=n.__compareToBigInt(e,t)}static equal(e,t){if(e.sign!==t.sign)return!1;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e.__digit(r)!==t.__digit(r))return!1;return!0}static notEqual(e,t){return!n.equal(e,t)}static bitwiseAnd(e,t){var r=Math.max;if(!e.sign&&!t.sign)return n.__absoluteAnd(e,t).__trim();if(e.sign&&t.sign){const i=r(e.length,t.length)+1;let o=n.__absoluteSubOne(e,i);const a=n.__absoluteSubOne(t);return o=n.__absoluteOr(o,a,o),n.__absoluteAddOne(o,!0,o).__trim()}return e.sign&&([e,t]=[t,e]),n.__absoluteAndNot(e,n.__absoluteSubOne(t)).__trim()}static bitwiseXor(e,t){var r=Math.max;if(!e.sign&&!t.sign)return n.__absoluteXor(e,t).__trim();if(e.sign&&t.sign){const i=r(e.length,t.length),o=n.__absoluteSubOne(e,i),a=n.__absoluteSubOne(t);return n.__absoluteXor(o,a,o).__trim()}const i=r(e.length,t.length)+1;e.sign&&([e,t]=[t,e]);let o=n.__absoluteSubOne(t,i);return o=n.__absoluteXor(o,e,o),n.__absoluteAddOne(o,!0,o).__trim()}static bitwiseOr(e,t){const r=(0,Math.max)(e.length,t.length);if(!e.sign&&!t.sign)return n.__absoluteOr(e,t).__trim();if(e.sign&&t.sign){let i=n.__absoluteSubOne(e,r);const o=n.__absoluteSubOne(t);return i=n.__absoluteAnd(i,o,i),n.__absoluteAddOne(i,!0,i).__trim()}e.sign&&([e,t]=[t,e]);let i=n.__absoluteSubOne(t,r);return i=n.__absoluteAndNot(i,e,i),n.__absoluteAddOne(i,!0,i).__trim()}static asIntN(e,t){var r=Math.floor;if(0===t.length)return t;if(0>(e=r(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return n.__zero();if(e>=n.__kMaxLengthBits)return t;const i=0|(e+29)/30;if(t.length<i)return t;const o=t.__unsignedDigit(i-1),a=1<<(e-1)%30;if(t.length===i&&o<a)return t;if((o&a)!==a)return n.__truncateToNBits(e,t);if(!t.sign)return n.__truncateAndSubFromPowerOfTwo(e,t,!0);if(0==(o&a-1)){for(let r=i-2;0<=r;r--)if(0!==t.__digit(r))return n.__truncateAndSubFromPowerOfTwo(e,t,!1);return t.length===i&&o===a?t:n.__truncateToNBits(e,t)}return n.__truncateAndSubFromPowerOfTwo(e,t,!1)}static asUintN(e,t){var r=Math.floor;if(0===t.length)return t;if(0>(e=r(e)))throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return n.__zero();if(t.sign){if(e>n.__kMaxLengthBits)throw new RangeError("BigInt too big");return n.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=n.__kMaxLengthBits)return t;const i=0|(e+29)/30;if(t.length<i)return t;const o=e%30;if(t.length==i){if(0===o)return t;if(0==t.__digit(i-1)>>>o)return t}return n.__truncateToNBits(e,t)}static ADD(e,t){if(e=n.__toPrimitive(e),t=n.__toPrimitive(t),"string"==typeof e)return"string"!=typeof t&&(t=t.toString()),e+t;if("string"==typeof t)return e.toString()+t;if(e=n.__toNumeric(e),t=n.__toNumeric(t),n.__isBigInt(e)&&n.__isBigInt(t))return n.add(e,t);if("number"==typeof e&&"number"==typeof t)return e+t;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(e,t){return n.__compare(e,t,0)}static LE(e,t){return n.__compare(e,t,1)}static GT(e,t){return n.__compare(e,t,2)}static GE(e,t){return n.__compare(e,t,3)}static EQ(e,t){for(;;){if(n.__isBigInt(e))return n.__isBigInt(t)?n.equal(e,t):n.EQ(t,e);if("number"==typeof e){if(n.__isBigInt(t))return n.__equalToNumber(t,e);if("object"!=typeof t)return e==t;t=n.__toPrimitive(t)}else if("string"==typeof e){if(n.__isBigInt(t))return null!==(e=n.__fromString(e))&&n.equal(e,t);if("object"!=typeof t)return e==t;t=n.__toPrimitive(t)}else if("boolean"==typeof e){if(n.__isBigInt(t))return n.__equalToNumber(t,+e);if("object"!=typeof t)return e==t;t=n.__toPrimitive(t)}else if("symbol"==typeof e){if(n.__isBigInt(t))return!1;if("object"!=typeof t)return e==t;t=n.__toPrimitive(t)}else{if("object"!=typeof e)return e==t;if("object"==typeof t&&t.constructor!==n)return e==t;e=n.__toPrimitive(e)}}}static NE(e,t){return!n.EQ(e,t)}static __zero(){return new n(0,!1)}static __oneDigit(e,t){const r=new n(1,t);return r.__setDigit(0,e),r}__copy(){const e=new n(this.length,this.sign);for(let t=0;t<this.length;t++)e[t]=this[t];return e}__trim(){let e=this.length,t=this[e-1];for(;0===t;)e--,t=this[e-1],this.pop();return 0===e&&(this.sign=!1),this}__initializeDigits(){for(let e=0;e<this.length;e++)this[e]=0}static __decideRounding(e,t,r,n){if(0<t)return-1;let i;if(0>t)i=-t-1;else{if(0===r)return-1;r--,n=e.__digit(r),i=29}let o=1<<i;if(0==(n&o))return-1;if(o-=1,0!=(n&o))return 1;for(;0<r;)if(r--,0!==e.__digit(r))return 1;return 0}static __fromDouble(e){n.__kBitConversionDouble[0]=e;const t=(2047&n.__kBitConversionInts[1]>>>20)-1023,r=1+(0|t/30),i=new n(r,0>e);let o=1048575&n.__kBitConversionInts[1]|1048576,a=n.__kBitConversionInts[0];const s=t%30;let u,c=0;if(s<20){const e=20-s;c=e+32,u=o>>>e,o=o<<32-e|a>>>e,a<<=32-e}else if(20===s)c=32,u=o,o=a,a=0;else{const e=s-20;c=32-e,u=o<<e|a>>>32-e,o=a<<e,a=0}i.__setDigit(r-1,u);for(let e=r-2;0<=e;e--)0<c?(c-=30,u=o>>>2,o=o<<30|a>>>2,a<<=30):u=0,i.__setDigit(e,u);return i.__trim()}static __isWhitespace(e){return!!(13>=e&&9<=e)||(159>=e?32==e:131071>=e?160==e||5760==e:196607>=e?10>=(e&=131071)||40==e||41==e||47==e||95==e||4096==e:65279==e)}static __fromString(e,t=0){let r=0;const i=e.length;let o=0;if(o===i)return n.__zero();let a=e.charCodeAt(o);for(;n.__isWhitespace(a);){if(++o===i)return n.__zero();a=e.charCodeAt(o)}if(43===a){if(++o===i)return null;a=e.charCodeAt(o),r=1}else if(45===a){if(++o===i)return null;a=e.charCodeAt(o),r=-1}if(0===t){if(t=10,48===a){if(++o===i)return n.__zero();if(a=e.charCodeAt(o),88===a||120===a){if(t=16,++o===i)return null;a=e.charCodeAt(o)}else if(79===a||111===a){if(t=8,++o===i)return null;a=e.charCodeAt(o)}else if(66===a||98===a){if(t=2,++o===i)return null;a=e.charCodeAt(o)}}}else if(16===t&&48===a){if(++o===i)return n.__zero();if(a=e.charCodeAt(o),88===a||120===a){if(++o===i)return null;a=e.charCodeAt(o)}}if(0!=r&&10!==t)return null;for(;48===a;){if(++o===i)return n.__zero();a=e.charCodeAt(o)}const s=i-o;let u=n.__kMaxBitsPerChar[t],c=n.__kBitsPerCharTableMultiplier-1;if(s>1073741824/u)return null;const l=u*s+c>>>n.__kBitsPerCharTableShift,f=new n(0|(l+29)/30,!1),h=10>t?t:10,p=10<t?t-10:0;if(0==(t&t-1)){u>>=n.__kBitsPerCharTableShift;const t=[],r=[];let s=!1;do{let n=0,c=0;for(;;){let t;if(a-48>>>0<h)t=a-48;else{if(!((32|a)-97>>>0<p)){s=!0;break}t=(32|a)-87}if(c+=u,n=n<<u|t,++o===i){s=!0;break}if(a=e.charCodeAt(o),30<c+u)break}t.push(n),r.push(c)}while(!s);n.__fillFromParts(f,t,r)}else{f.__initializeDigits();let r=!1,s=0;do{let l=0,_=1;for(;;){let n;if(a-48>>>0<h)n=a-48;else{if(!((32|a)-97>>>0<p)){r=!0;break}n=(32|a)-87}const u=_*t;if(1073741823<u)break;if(_=u,l=l*t+n,s++,++o===i){r=!0;break}a=e.charCodeAt(o)}c=30*n.__kBitsPerCharTableMultiplier-1;const d=0|(u*s+c>>>n.__kBitsPerCharTableShift)/30;f.__inplaceMultiplyAdd(_,l,d)}while(!r)}if(o!==i){if(!n.__isWhitespace(a))return null;for(o++;o<i;o++)if(a=e.charCodeAt(o),!n.__isWhitespace(a))return null}return f.sign=-1==r,f.__trim()}static __fillFromParts(e,t,r){let n=0,i=0,o=0;for(let a=t.length-1;0<=a;a--){const s=t[a],u=r[a];i|=s<<o,o+=u,30===o?(e.__setDigit(n++,i),o=0,i=0):30<o&&(e.__setDigit(n++,1073741823&i),o-=30,i=s>>>u-o)}if(0!==i){if(n>=e.length)throw new Error("implementation bug");e.__setDigit(n++,i)}for(;n<e.length;n++)e.__setDigit(n,0)}static __toStringBasePowerOfTwo(e,t){const r=e.length;let i=t-1;i=(85&i>>>1)+(85&i),i=(51&i>>>2)+(51&i),i=(15&i>>>4)+(15&i);const o=i,a=t-1,s=e.__digit(r-1);let u=0|(30*r-n.__clz30(s)+o-1)/o;if(e.sign&&u++,268435456<u)throw new Error("string too long");const c=Array(u);let l=u-1,f=0,h=0;for(let t=0;t<r-1;t++){const r=e.__digit(t),i=(f|r<<h)&a;c[l--]=n.__kConversionChars[i];const s=o-h;for(f=r>>>s,h=30-s;h>=o;)c[l--]=n.__kConversionChars[f&a],f>>>=o,h-=o}const p=(f|s<<h)&a;for(c[l--]=n.__kConversionChars[p],f=s>>>o-h;0!==f;)c[l--]=n.__kConversionChars[f&a],f>>>=o;if(e.sign&&(c[l--]="-"),-1!=l)throw new Error("implementation bug");return c.join("")}static __toStringGeneric(e,t,r){const i=e.length;if(0===i)return"";if(1===i){let n=e.__unsignedDigit(0).toString(t);return!1===r&&e.sign&&(n="-"+n),n}const o=30*i-n.__clz30(e.__digit(i-1)),a=n.__kMaxBitsPerChar[t]-1;let s=o*n.__kBitsPerCharTableMultiplier;s+=a-1,s=0|s/a;const u=s+1>>1,c=n.exponentiate(n.__oneDigit(t,!1),n.__oneDigit(u,!1));let l,f;const h=c.__unsignedDigit(0);if(1===c.length&&32767>=h){l=new n(e.length,!1),l.__initializeDigits();let r=0;for(let t=2*e.length-1;0<=t;t--){const n=r<<15|e.__halfDigit(t);l.__setHalfDigit(t,0|n/h),r=0|n%h}f=r.toString(t)}else{const r=n.__absoluteDivLarge(e,c,!0,!0);l=r.quotient;const i=r.remainder.__trim();f=n.__toStringGeneric(i,t,!0)}l.__trim();let p=n.__toStringGeneric(l,t,!0);for(;f.length<u;)f="0"+f;return!1===r&&e.sign&&(p="-"+p),p+f}static __unequalSign(e){return e?-1:1}static __absoluteGreater(e){return e?-1:1}static __absoluteLess(e){return e?1:-1}static __compareToBigInt(e,t){const r=e.sign;if(r!==t.sign)return n.__unequalSign(r);const i=n.__absoluteCompare(e,t);return 0<i?n.__absoluteGreater(r):0>i?n.__absoluteLess(r):0}static __compareToNumber(e,t){if(n.__isOneDigitInt(t)){const r=e.sign,i=0>t;if(r!==i)return n.__unequalSign(r);if(0===e.length){if(i)throw new Error("implementation bug");return 0===t?0:-1}if(1<e.length)return n.__absoluteGreater(r);const o=Math.abs(t),a=e.__unsignedDigit(0);return a>o?n.__absoluteGreater(r):a<o?n.__absoluteLess(r):0}return n.__compareToDouble(e,t)}static __compareToDouble(e,t){if(t!=t)return t;if(t===1/0)return-1;if(t===-1/0)return 1;const r=e.sign;if(r!==0>t)return n.__unequalSign(r);if(0===t)throw new Error("implementation bug: should be handled elsewhere");if(0===e.length)return-1;n.__kBitConversionDouble[0]=t;const i=2047&n.__kBitConversionInts[1]>>>20;if(2047==i)throw new Error("implementation bug: handled elsewhere");const o=i-1023;if(0>o)return n.__absoluteGreater(r);const a=e.length;let s=e.__digit(a-1);const u=n.__clz30(s),c=30*a-u,l=o+1;if(c<l)return n.__absoluteLess(r);if(c>l)return n.__absoluteGreater(r);let f=1048576|1048575&n.__kBitConversionInts[1],h=n.__kBitConversionInts[0];const p=29-u;if(p!==(0|(c-1)%30))throw new Error("implementation bug");let _,d=0;if(20>p){const e=20-p;d=e+32,_=f>>>e,f=f<<32-e|h>>>e,h<<=32-e}else if(20===p)d=32,_=f,f=h,h=0;else{const e=p-20;d=32-e,_=f<<e|h>>>32-e,f=h<<e,h=0}if(s>>>=0,_>>>=0,s>_)return n.__absoluteGreater(r);if(s<_)return n.__absoluteLess(r);for(let t=a-2;0<=t;t--){0<d?(d-=30,_=f>>>2,f=f<<30|h>>>2,h<<=30):_=0;const i=e.__unsignedDigit(t);if(i>_)return n.__absoluteGreater(r);if(i<_)return n.__absoluteLess(r)}if(0!==f||0!==h){if(0===d)throw new Error("implementation bug");return n.__absoluteLess(r)}return 0}static __equalToNumber(e,t){var r=Math.abs;return n.__isOneDigitInt(t)?0===t?0===e.length:1===e.length&&e.sign===0>t&&e.__unsignedDigit(0)===r(t):0===n.__compareToDouble(e,t)}static __comparisonResultToBool(e,t){return 0===t?0>e:1===t?0>=e:2===t?0<e:3===t?0<=e:void 0}static __compare(e,t,r){if(e=n.__toPrimitive(e),t=n.__toPrimitive(t),"string"==typeof e&&"string"==typeof t)switch(r){case 0:return e<t;case 1:return e<=t;case 2:return e>t;case 3:return e>=t}if(n.__isBigInt(e)&&"string"==typeof t)return null!==(t=n.__fromString(t))&&n.__comparisonResultToBool(n.__compareToBigInt(e,t),r);if("string"==typeof e&&n.__isBigInt(t))return null!==(e=n.__fromString(e))&&n.__comparisonResultToBool(n.__compareToBigInt(e,t),r);if(e=n.__toNumeric(e),t=n.__toNumeric(t),n.__isBigInt(e)){if(n.__isBigInt(t))return n.__comparisonResultToBool(n.__compareToBigInt(e,t),r);if("number"!=typeof t)throw new Error("implementation bug");return n.__comparisonResultToBool(n.__compareToNumber(e,t),r)}if("number"!=typeof e)throw new Error("implementation bug");if(n.__isBigInt(t))return n.__comparisonResultToBool(n.__compareToNumber(t,e),2^r);if("number"!=typeof t)throw new Error("implementation bug");return 0===r?e<t:1===r?e<=t:2===r?e>t:3===r?e>=t:void 0}__clzmsd(){return n.__clz30(this.__digit(this.length-1))}static __absoluteAdd(e,t,r){if(e.length<t.length)return n.__absoluteAdd(t,e,r);if(0===e.length)return e;if(0===t.length)return e.sign===r?e:n.unaryMinus(e);let i=e.length;(0===e.__clzmsd()||t.length===e.length&&0===t.__clzmsd())&&i++;const o=new n(i,r);let a=0,s=0;for(;s<t.length;s++){const r=e.__digit(s)+t.__digit(s)+a;a=r>>>30,o.__setDigit(s,1073741823&r)}for(;s<e.length;s++){const t=e.__digit(s)+a;a=t>>>30,o.__setDigit(s,1073741823&t)}return s<o.length&&o.__setDigit(s,a),o.__trim()}static __absoluteSub(e,t,r){if(0===e.length)return e;if(0===t.length)return e.sign===r?e:n.unaryMinus(e);const i=new n(e.length,r);let o=0,a=0;for(;a<t.length;a++){const r=e.__digit(a)-t.__digit(a)-o;o=1&r>>>30,i.__setDigit(a,1073741823&r)}for(;a<e.length;a++){const t=e.__digit(a)-o;o=1&t>>>30,i.__setDigit(a,1073741823&t)}return i.__trim()}static __absoluteAddOne(e,t,r=null){const i=e.length;null===r?r=new n(i,t):r.sign=t;let o=1;for(let t=0;t<i;t++){const n=e.__digit(t)+o;o=n>>>30,r.__setDigit(t,1073741823&n)}return 0!=o&&r.__setDigitGrow(i,1),r}static __absoluteSubOne(e,t){const r=e.length,i=new n(t=t||r,!1);let o=1;for(let t=0;t<r;t++){const r=e.__digit(t)-o;o=1&r>>>30,i.__setDigit(t,1073741823&r)}if(0!=o)throw new Error("implementation bug");for(let e=r;e<t;e++)i.__setDigit(e,0);return i}static __absoluteAnd(e,t,r=null){let i=e.length,o=t.length,a=o;if(i<o){a=i;const r=e,n=i;e=t,i=o,t=r,o=n}let s=a;null===r?r=new n(s,!1):s=r.length;let u=0;for(;u<a;u++)r.__setDigit(u,e.__digit(u)&t.__digit(u));for(;u<s;u++)r.__setDigit(u,0);return r}static __absoluteAndNot(e,t,r=null){const i=e.length,o=t.length;let a=o;i<o&&(a=i);let s=i;null===r?r=new n(s,!1):s=r.length;let u=0;for(;u<a;u++)r.__setDigit(u,e.__digit(u)&~t.__digit(u));for(;u<i;u++)r.__setDigit(u,e.__digit(u));for(;u<s;u++)r.__setDigit(u,0);return r}static __absoluteOr(e,t,r=null){let i=e.length,o=t.length,a=o;if(i<o){a=i;const r=e,n=i;e=t,i=o,t=r,o=n}let s=i;null===r?r=new n(s,!1):s=r.length;let u=0;for(;u<a;u++)r.__setDigit(u,e.__digit(u)|t.__digit(u));for(;u<i;u++)r.__setDigit(u,e.__digit(u));for(;u<s;u++)r.__setDigit(u,0);return r}static __absoluteXor(e,t,r=null){let i=e.length,o=t.length,a=o;if(i<o){a=i;const r=e,n=i;e=t,i=o,t=r,o=n}let s=i;null===r?r=new n(s,!1):s=r.length;let u=0;for(;u<a;u++)r.__setDigit(u,e.__digit(u)^t.__digit(u));for(;u<i;u++)r.__setDigit(u,e.__digit(u));for(;u<s;u++)r.__setDigit(u,0);return r}static __absoluteCompare(e,t){const r=e.length-t.length;if(0!=r)return r;let n=e.length-1;for(;0<=n&&e.__digit(n)===t.__digit(n);)n--;return 0>n?0:e.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(e,t,r,i){if(0===t)return;const o=32767&t,a=t>>>15;let s=0,u=0;for(let t,c=0;c<e.length;c++,i++){t=r.__digit(i);const l=e.__digit(c),f=32767&l,h=l>>>15,p=n.__imul(f,o),_=n.__imul(f,a),d=n.__imul(h,o);t+=u+p+s,s=t>>>30,t&=1073741823,t+=((32767&_)<<15)+((32767&d)<<15),s+=t>>>30,u=n.__imul(h,a)+(_>>>15)+(d>>>15),r.__setDigit(i,1073741823&t)}for(;0!=s||0!==u;i++){let e=r.__digit(i);e+=s+u,u=0,s=e>>>30,r.__setDigit(i,1073741823&e)}}static __internalMultiplyAdd(e,t,r,i,o){let a=r,s=0;for(let r=0;r<i;r++){const i=e.__digit(r),u=n.__imul(32767&i,t),c=n.__imul(i>>>15,t),l=u+((32767&c)<<15)+s+a;a=l>>>30,s=c>>>15,o.__setDigit(r,1073741823&l)}if(o.length>i)for(o.__setDigit(i++,a+s);i<o.length;)o.__setDigit(i++,0);else if(0!==a+s)throw new Error("implementation bug")}__inplaceMultiplyAdd(e,t,r){r>this.length&&(r=this.length);const i=32767&e,o=e>>>15;let a=0,s=t;for(let e=0;e<r;e++){const t=this.__digit(e),r=32767&t,u=t>>>15,c=n.__imul(r,i),l=n.__imul(r,o),f=n.__imul(u,i);let h=s+c+a;a=h>>>30,h&=1073741823,h+=((32767&l)<<15)+((32767&f)<<15),a+=h>>>30,s=n.__imul(u,o)+(l>>>15)+(f>>>15),this.__setDigit(e,1073741823&h)}if(0!=a||0!==s)throw new Error("implementation bug")}static __absoluteDivSmall(e,t,r=null){null===r&&(r=new n(e.length,!1));let i=0;for(let n,o=2*e.length-1;0<=o;o-=2){n=(i<<15|e.__halfDigit(o))>>>0;const a=0|n/t;i=0|n%t,n=(i<<15|e.__halfDigit(o-1))>>>0;const s=0|n/t;i=0|n%t,r.__setDigit(o>>>1,a<<15|s)}return r}static __absoluteModSmall(e,t){let r=0;for(let n=2*e.length-1;0<=n;n--)r=0|((r<<15|e.__halfDigit(n))>>>0)%t;return r}static __absoluteDivLarge(e,t,r,i){const o=t.__halfDigitLength(),a=t.length,s=e.__halfDigitLength()-o;let u=null;r&&(u=new n(s+2>>>1,!1),u.__initializeDigits());const c=new n(o+2>>>1,!1);c.__initializeDigits();const l=n.__clz15(t.__halfDigit(o-1));0<l&&(t=n.__specialLeftShift(t,l,0));const f=n.__specialLeftShift(e,l,1),h=t.__halfDigit(o-1);let p=0;for(let e,i=s;0<=i;i--){e=32767;const s=f.__halfDigit(i+o);if(s!==h){const r=(s<<15|f.__halfDigit(i+o-1))>>>0;e=0|r/h;let a=0|r%h;const u=t.__halfDigit(o-2),c=f.__halfDigit(i+o-2);for(;n.__imul(e,u)>>>0>(a<<16|c)>>>0&&(e--,a+=h,!(32767<a)););}n.__internalMultiplyAdd(t,e,0,a,c);let l=f.__inplaceSub(c,i,o+1);0!==l&&(l=f.__inplaceAdd(t,i,o),f.__setHalfDigit(i+o,32767&f.__halfDigit(i+o)+l),e--),r&&(1&i?p=e<<15:u.__setDigit(i>>>1,p|e))}if(i)return f.__inplaceRightShift(l),r?{quotient:u,remainder:f}:f;if(r)return u;throw new Error("unreachable")}static __clz15(e){return n.__clz30(e)-15}__inplaceAdd(e,t,r){let n=0;for(let i=0;i<r;i++){const r=this.__halfDigit(t+i)+e.__halfDigit(i)+n;n=r>>>15,this.__setHalfDigit(t+i,32767&r)}return n}__inplaceSub(e,t,r){let n=0;if(1&t){t>>=1;let i=this.__digit(t),o=32767&i,a=0;for(;a<r-1>>>1;a++){const r=e.__digit(a),s=(i>>>15)-(32767&r)-n;n=1&s>>>15,this.__setDigit(t+a,(32767&s)<<15|32767&o),i=this.__digit(t+a+1),o=(32767&i)-(r>>>15)-n,n=1&o>>>15}const s=e.__digit(a),u=(i>>>15)-(32767&s)-n;if(n=1&u>>>15,this.__setDigit(t+a,(32767&u)<<15|32767&o),t+a+1>=this.length)throw new RangeError("out of bounds");0==(1&r)&&(i=this.__digit(t+a+1),o=(32767&i)-(s>>>15)-n,n=1&o>>>15,this.__setDigit(t+e.length,1073709056&i|32767&o))}else{t>>=1;let i=0;for(;i<e.length-1;i++){const r=this.__digit(t+i),o=e.__digit(i),a=(32767&r)-(32767&o)-n;n=1&a>>>15;const s=(r>>>15)-(o>>>15)-n;n=1&s>>>15,this.__setDigit(t+i,(32767&s)<<15|32767&a)}const o=this.__digit(t+i),a=e.__digit(i),s=(32767&o)-(32767&a)-n;n=1&s>>>15;let u=0;0==(1&r)&&(u=(o>>>15)-(a>>>15)-n,n=1&u>>>15),this.__setDigit(t+i,(32767&u)<<15|32767&s)}return n}__inplaceRightShift(e){if(0===e)return;let t=this.__digit(0)>>>e;const r=this.length-1;for(let n=0;n<r;n++){const r=this.__digit(n+1);this.__setDigit(n,1073741823&r<<30-e|t),t=r>>>e}this.__setDigit(r,t)}static __specialLeftShift(e,t,r){const i=e.length,o=new n(i+r,!1);if(0===t){for(let t=0;t<i;t++)o.__setDigit(t,e.__digit(t));return 0<r&&o.__setDigit(i,0),o}let a=0;for(let r=0;r<i;r++){const n=e.__digit(r);o.__setDigit(r,1073741823&n<<t|a),a=n>>>30-t}return 0<r&&o.__setDigit(i,a),o}static __leftShiftByAbsolute(e,t){const r=n.__toShiftAmount(t);if(0>r)throw new RangeError("BigInt too big");const i=0|r/30,o=r%30,a=e.length,s=0!==o&&0!=e.__digit(a-1)>>>30-o,u=a+i+(s?1:0),c=new n(u,e.sign);if(0===o){let t=0;for(;t<i;t++)c.__setDigit(t,0);for(;t<u;t++)c.__setDigit(t,e.__digit(t-i))}else{let t=0;for(let e=0;e<i;e++)c.__setDigit(e,0);for(let r=0;r<a;r++){const n=e.__digit(r);c.__setDigit(r+i,1073741823&n<<o|t),t=n>>>30-o}if(s)c.__setDigit(a+i,t);else if(0!==t)throw new Error("implementation bug")}return c.__trim()}static __rightShiftByAbsolute(e,t){const r=e.length,i=e.sign,o=n.__toShiftAmount(t);if(0>o)return n.__rightShiftByMaximum(i);const a=0|o/30,s=o%30;let u=r-a;if(0>=u)return n.__rightShiftByMaximum(i);let c=!1;if(i)if(0!=(e.__digit(a)&(1<<s)-1))c=!0;else for(let t=0;t<a;t++)if(0!==e.__digit(t)){c=!0;break}c&&0===s&&0==~e.__digit(r-1)&&u++;let l=new n(u,i);if(0===s){l.__setDigit(u-1,0);for(let t=a;t<r;t++)l.__setDigit(t-a,e.__digit(t))}else{let t=e.__digit(a)>>>s;const n=r-a-1;for(let r=0;r<n;r++){const n=e.__digit(r+a+1);l.__setDigit(r,1073741823&n<<30-s|t),t=n>>>s}l.__setDigit(n,t)}return c&&(l=n.__absoluteAddOne(l,!0,l)),l.__trim()}static __rightShiftByMaximum(e){return e?n.__oneDigit(1,!0):n.__zero()}static __toShiftAmount(e){if(1<e.length)return-1;const t=e.__unsignedDigit(0);return t>n.__kMaxLengthBits?-1:t}static __toPrimitive(e,t="default"){if("object"!=typeof e)return e;if(e.constructor===n)return e;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){const r=e[Symbol.toPrimitive];if(r){const e=r(t);if("object"!=typeof e)return e;throw new TypeError("Cannot convert object to primitive value")}}const r=e.valueOf;if(r){const t=r.call(e);if("object"!=typeof t)return t}const i=e.toString;if(i){const t=i.call(e);if("object"!=typeof t)return t}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(e){return n.__isBigInt(e)?e:+e}static __isBigInt(e){return"object"==typeof e&&null!==e&&e.constructor===n}static __truncateToNBits(e,t){const r=0|(e+29)/30,i=new n(r,t.sign),o=r-1;for(let e=0;e<o;e++)i.__setDigit(e,t.__digit(e));let a=t.__digit(o);if(0!=e%30){const t=32-e%30;a=a<<t>>>t}return i.__setDigit(o,a),i.__trim()}static __truncateAndSubFromPowerOfTwo(e,t,r){var i=Math.min;const o=0|(e+29)/30,a=new n(o,r);let s=0;const u=o-1;let c=0;for(const e=i(u,t.length);s<e;s++){const e=0-t.__digit(s)-c;c=1&e>>>30,a.__setDigit(s,1073741823&e)}for(;s<u;s++)a.__setDigit(s,0|1073741823&-c);let l=u<t.length?t.__digit(u):0;const f=e%30;let h;if(0==f)h=0-l-c,h&=1073741823;else{const e=32-f;l=l<<e>>>e;const t=1<<32-e;h=t-l-c,h&=t-1}return a.__setDigit(u,h),a.__trim()}__digit(e){return this[e]}__unsignedDigit(e){return this[e]>>>0}__setDigit(e,t){this[e]=0|t}__setDigitGrow(e,t){this[e]=0|t}__halfDigitLength(){const e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}__halfDigit(e){return 32767&this[e>>>1]>>>15*(1&e)}__setHalfDigit(e,t){const r=e>>>1,n=this.__digit(r),i=1&e?32767&n|t<<15:1073709056&n|32767&t;this.__setDigit(r,i)}static __digitPow(e,t){let r=1;for(;0<t;)1&t&&(r*=e),t>>>=1,e*=e;return r}static __isOneDigitInt(e){return(1073741823&e)===e}}n.__kMaxLength=33554432,n.__kMaxLengthBits=n.__kMaxLength<<5,n.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],n.__kBitsPerCharTableShift=5,n.__kBitsPerCharTableMultiplier=1<<n.__kBitsPerCharTableShift,n.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],n.__kBitConversionBuffer=new ArrayBuffer(8),n.__kBitConversionDouble=new Float64Array(n.__kBitConversionBuffer),n.__kBitConversionInts=new Int32Array(n.__kBitConversionBuffer),n.__clz30=Math.clz32?function(e){return Math.clz32(e)-2}:function(e){return 0===e?30:0|29-(0|Math.log(e>>>0)/Math.LN2)},n.__imul=Math.imul||function(e,t){return 0|e*t};const i=n},77412:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},89881:(e,t,r)=>{var n=r(47816),i=r(99291)(n);e.exports=i},47816:(e,t,r)=>{var n=r(28483),i=r(3674);e.exports=function(e,t){return e&&n(e,t,i)}},54290:(e,t,r)=>{var n=r(6557);e.exports=function(e){return"function"==typeof e?e:n}},99291:(e,t,r)=>{var n=r(98612);e.exports=function(e,t){return function(r,i){if(null==r)return r;if(!n(r))return e(r,i);for(var o=r.length,a=t?o:-1,s=Object(r);(t?a--:++a<o)&&!1!==i(s[a],a,s););return r}}},66073:(e,t,r)=>{e.exports=r(84486)},84486:(e,t,r)=>{var n=r(77412),i=r(89881),o=r(54290),a=r(1469);e.exports=function(e,t){return(a(e)?n:i)(e,o(t))}},99353:(e,t,r)=>{e.exports=r(71846)},71846:(e,t,r)=>{var n=r(41960);t.operation=function(e){var r=t.timeouts(e);return new n(r,{forever:e&&e.forever,unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})},t.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var r in e)t[r]=e[r];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var n=[],i=0;i<t.retries;i++)n.push(this.createTimeout(i,t));return e&&e.forever&&!n.length&&n.push(this.createTimeout(i,t)),n.sort((function(e,t){return e-t})),n},t.createTimeout=function(e,t){var r=t.randomize?Math.random()+1:1,n=Math.round(r*t.minTimeout*Math.pow(t.factor,e));return Math.min(n,t.maxTimeout)},t.wrap=function(e,r,n){if(r instanceof Array&&(n=r,r=null),!n)for(var i in n=[],e)"function"==typeof e[i]&&n.push(i);for(var o=0;o<n.length;o++){var a=n[o],s=e[a];e[a]=function(n){var i=t.operation(r),o=Array.prototype.slice.call(arguments,1),a=o.pop();o.push((function(e){i.retry(e)||(e&&(arguments[0]=i.mainError()),a.apply(this,arguments))})),i.attempt((function(){n.apply(e,o)}))}.bind(e,s),e[a].options=r}}},41960:e=>{function t(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var r=this._timeouts.shift();if(void 0===r){if(!this._cachedTimeouts)return!1;this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),r=this._timeouts.shift()}var n=this,i=setTimeout((function(){n._attempts++,n._operationTimeoutCb&&(n._timeout=setTimeout((function(){n._operationTimeoutCb(n._attempts)}),n._operationTimeout),n._options.unref&&n._timeout.unref()),n._fn(n._attempts)}),r);return this._options.unref&&i.unref(),!0},t.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var r=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){r._operationTimeoutCb()}),r._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},t.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},t.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,r=0,n=0;n<this._errors.length;n++){var i=this._errors[n],o=i.message,a=(e[o]||0)+1;e[o]=a,a>=r&&(t=i,r=a)}return t}},56023:e=>{"use strict";e.exports=JSON.parse('{"transport":"http","websocket":"wss://api.hive.blog:8090","uri":"https://api.hive.blog","url":"https://api.hive.blog","dev_uri":"","stage_uri":"","address_prefix":"STM","chain_id":"beeab0de00000000000000000000000000000000000000000000000000000000","alternative_api_endpoints":["https://api.hive.blog","https://api.ha.deathwing.me"],"failover_threshold":3,"useAppbaseApi":true}')}}]);