mirror of https://github.com/status-im/web3.js.git
7 lines
140 KiB
JavaScript
7 lines
140 KiB
JavaScript
require=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var h=r[s]={exports:{}};e[s][0].call(h.exports,function(t){var r=e[s][1][t];return i(r?r:t)},h,h.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){var n=t("bignumber.js"),i=t("../utils/utils"),o=t("./formatters"),s=t("./param"),a=function(t){return"[]"===t.slice(-2)},u=function(t){this._name=t.name,this._match=t.match,this._mode=t.mode,this._inputFormatter=t.inputFormatter,this._outputFormatter=t.outputFormatter};u.prototype.isType=function(t){return"strict"===this._match?this._name===t||0===t.indexOf(this._name)&&"[]"===t.slice(this._name.length):"prefix"===this._match?0===t.indexOf(this._name):void 0},u.prototype.formatInput=function(t,e){if(i.isArray(t)&&e){var r=this;return t.map(function(t){return r._inputFormatter(t)}).reduce(function(t,e){return t.combine(e)},o.formatInputInt(t.length)).withOffset(32)}return this._inputFormatter(t)},u.prototype.formatOutput=function(t,e){if(e){for(var r=[],i=new n(t.dynamicPart().slice(0,64),16),o=0;64*i>o;o+=64)r.push(this._outputFormatter(new s(t.dynamicPart().substr(o+64,64))));return r}return this._outputFormatter(t)},u.prototype.sliceParam=function(t,e,r){return"bytes"===this._mode?s.decodeBytes(t,e):a(r)?s.decodeArray(t,e):s.decodeParam(t,e)};var c=function(t){this._types=t};c.prototype._requireType=function(t){var e=this._types.filter(function(e){return e.isType(t)})[0];if(!e)throw Error("invalid solidity type!: "+t);return e},c.prototype._formatInput=function(t,e){return this._requireType(t).formatInput(e,a(t))},c.prototype.encodeParam=function(t,e){return this._formatInput(t,e).encode()},c.prototype.encodeParams=function(t,e){var r=this,n=t.map(function(t,n){return r._formatInput(t,e[n])});return s.encodeList(n)},c.prototype.decodeParam=function(t,e){return this.decodeParams([t],e)[0]},c.prototype.decodeParams=function(t,e){var r=this;return t.map(function(t,n){var i=r._requireType(t),o=i.sliceParam(e,n,t);return i.formatOutput(o,a(t))})};var h=new c([new u({name:"address",match:"strict",mode:"value",inputFormatter:o.formatInputInt,outputFormatter:o.formatOutputAddress}),new u({name:"bool",match:"strict",mode:"value",inputFormatter:o.formatInputBool,outputFormatter:o.formatOutputBool}),new u({name:"int",match:"prefix",mode:"value",inputFormatter:o.formatInputInt,outputFormatter:o.formatOutputInt}),new u({name:"uint",match:"prefix",mode:"value",inputFormatter:o.formatInputInt,outputFormatter:o.formatOutputUInt}),new u({name:"bytes",match:"strict",mode:"bytes",inputFormatter:o.formatInputDynamicBytes,outputFormatter:o.formatOutputDynamicBytes}),new u({name:"bytes",match:"prefix",mode:"value",inputFormatter:o.formatInputBytes,outputFormatter:o.formatOutputBytes}),new u({name:"real",match:"prefix",mode:"value",inputFormatter:o.formatInputReal,outputFormatter:o.formatOutputReal}),new u({name:"ureal",match:"prefix",mode:"value",inputFormatter:o.formatInputReal,outputFormatter:o.formatOutputUReal})]);e.exports=h},{"../utils/utils":6,"./formatters":2,"./param":3,"bignumber.js":"bignumber.js"}],2:[function(t,e,r){var n=t("bignumber.js"),i=t("../utils/utils"),o=t("../utils/config"),s=t("./param"),a=function(t){var e=2*o.ETH_PADDING;n.config(o.ETH_BIGNUMBER_ROUNDING_MODE);var r=i.padLeft(i.toTwosComplement(t).round().toString(16),e);return new s(r)},u=function(t){var e=i.fromAscii(t,o.ETH_PADDING).substr(2);return new s(e)},c=function(t){var e=i.fromAscii(t,o.ETH_PADDING).substr(2);return new s(a(t.length).value+e,32)},h=function(t){var e="000000000000000000000000000000000000000000000000000000000000000"+(t?"1":"0");return new s(e)},f=function(t){return a(new n(t).times(new n(2).pow(128)))},l=function(t){return"1"===new n(t.substr(0,1),16).toString(2).substr(0,1)},p=function(t){var e=t.staticPart()||"0";return l(e)?new n(e,16).minus(new n("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16)).minus(1):new n(e,16)},d=function(t){var e=t.staticPart()||"0";return new n(e,16)},m=function(t){return p(t).dividedBy(new n(2).pow(128))},g=function(t){return d(t).dividedBy(new n(2).pow(128))},y=function(t){return"0000000000000000000000000000000000000000000000000000000000000001"===t.staticPart()?!0:!1},v=function(t){return i.toAscii(t.staticPart())},b=function(t){return i.toAscii(t.dynamicPart().slice(64))},w=function(t){var e=t.staticPart();return"0x"+e.slice(e.length-40,e.length)};e.exports={formatInputInt:a,formatInputBytes:u,formatInputDynamicBytes:c,formatInputBool:h,formatInputReal:f,formatOutputInt:p,formatOutputUInt:d,formatOutputReal:m,formatOutputUReal:g,formatOutputBool:y,formatOutputBytes:v,formatOutputDynamicBytes:b,formatOutputAddress:w}},{"../utils/config":4,"../utils/utils":6,"./param":3,"bignumber.js":"bignumber.js"}],3:[function(t,e,r){var n=t("../utils/utils"),i=function(t,e){this.value=t||"",this.offset=e};i.prototype.dynamicPartLength=function(){return this.dynamicPart().length/2},i.prototype.withOffset=function(t){return new i(this.value,t)},i.prototype.combine=function(t){return new i(this.value+t.value)},i.prototype.isDynamic=function(){return this.value.length>64||void 0!==this.offset},i.prototype.offsetAsBytes=function(){return this.isDynamic()?n.padLeft(n.toTwosComplement(this.offset).toString(16),64):""},i.prototype.staticPart=function(){return this.isDynamic()?this.offsetAsBytes():this.value},i.prototype.dynamicPart=function(){return this.isDynamic()?this.value:""},i.prototype.encode=function(){return this.staticPart()+this.dynamicPart()},i.encodeList=function(t){var e=32*t.length,r=t.map(function(t){if(!t.isDynamic())return t;var r=e;return e+=t.dynamicPartLength(),t.withOffset(r)});return r.reduce(function(t,e){return t+e.dynamicPart()},r.reduce(function(t,e){return t+e.staticPart()},""))},i.decodeParam=function(t,e){return e=e||0,new i(t.substr(64*e,64))};var o=function(t,e){return parseInt("0x"+t.substr(64*e,64))};i.decodeBytes=function(t,e){e=e||0;var r=o(t,e);return new i(t.substr(2*r,128),0)},i.decodeArray=function(t,e){e=e||0;var r=o(t,e),n=parseInt("0x"+t.substr(2*r,64));return new i(t.substr(2*r,64*(n+1)),0)},e.exports=i},{"../utils/utils":6}],4:[function(t,e,r){var n=t("bignumber.js"),i=["wei","kwei","Mwei","Gwei","szabo","finney","femtoether","picoether","nanoether","microether","milliether","nano","micro","milli","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e.exports={ETH_PADDING:32,ETH_SIGNATURE_LENGTH:4,ETH_UNITS:i,ETH_BIGNUMBER_ROUNDING_MODE:{ROUNDING_MODE:n.ROUND_DOWN},ETH_POLLING_TIMEOUT:500,defaultBlock:"latest",defaultAccount:void 0}},{"bignumber.js":"bignumber.js"}],5:[function(t,e,r){var n=t("./utils"),i=t("crypto-js/sha3");e.exports=function(t,e){return"0x"!==t.substr(0,2)||e||(console.warn("requirement of using web3.fromAscii before sha3 is deprecated"),console.warn("new usage: 'web3.sha3(\"hello\")'"),console.warn("see https://github.com/ethereum/web3.js/pull/205"),console.warn("if you need to hash hex value, you can do 'sha3(\"0xfff\", true)'"),t=n.toAscii(t)),i(t,{outputLength:256}).toString()}},{"./utils":6,"crypto-js/sha3":66}],6:[function(t,e,r){var n=t("bignumber.js"),i={wei:"1",kwei:"1000",ada:"1000",femtoether:"1000",mwei:"1000000",babbage:"1000000",picoether:"1000000",gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",einstein:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"},o=function(t,e,r){return new Array(e-t.length+1).join(r?r:"0")+t},s=function(t){var e="",r=0,n=t.length;for("0x"===t.substring(0,2)&&(r=2);n>r;r+=2){var i=parseInt(t.substr(r,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},a=function(t){for(var e="",r=0;r<t.length;r++){var n=t.charCodeAt(r).toString(16);e+=n.length<2?"0"+n:n}return e},u=function(t,e){e=void 0===e?0:e;for(var r=a(t);r.length<2*e;)r+="00";return"0x"+r},c=function(t){if(-1!==t.name.indexOf("("))return t.name;var e=t.inputs.map(function(t){return t.type}).join();return t.name+"("+e+")"},h=function(t){var e=t.indexOf("(");return-1!==e?t.substr(0,e):t},f=function(t){var e=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)).replace(" ",""):""},l=function(t){return v(t).toNumber()},p=function(t){var e=v(t),r=e.toString(16);return e.lessThan(0)?"-0x"+r.substr(1):"0x"+r},d=function(t){if(O(t))return p(+t);if(x(t))return p(t);if(I(t))return u(JSON.stringify(t));if(S(t)){if(0===t.indexOf("-0x"))return p(t);if(!isFinite(t))return u(t)}return p(t)},m=function(t){t=t?t.toLowerCase():"ether";var e=i[t];if(void 0===e)throw new Error("This unit doesn't exists, please use the one of the following units"+JSON.stringify(i,null,2));return new n(e,10)},g=function(t,e){var r=v(t).dividedBy(m(e));return x(t)?r:r.toString(10)},y=function(t,e){var r=v(t).times(m(e));return x(t)?r:r.toString(10)},v=function(t){return t=t||0,x(t)?t:!S(t)||0!==t.indexOf("0x")&&0!==t.indexOf("-0x")?new n(t.toString(10),10):new n(t.replace("0x",""),16)},b=function(t){var e=v(t);return e.lessThan(0)?new n("ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",16).plus(e).plus(1):e},w=function(t){return/^0x[0-9a-f]{40}$/.test(t)},_=function(t){return/^(0x)?[0-9a-f]{40}$/.test(t)},E=function(t){return w(t)?t:/^[0-9a-f]{40}$/.test(t)?"0x"+t:"0x"+o(d(t).substr(2),40)},x=function(t){return t instanceof n||t&&t.constructor&&"BigNumber"===t.constructor.name},S=function(t){return"string"==typeof t||t&&t.constructor&&"String"===t.constructor.name},A=function(t){return"function"==typeof t},I=function(t){return"object"==typeof t},O=function(t){return"boolean"==typeof t},B=function(t){return t instanceof Array},T=function(t){try{return!!JSON.parse(t)}catch(e){return!1}},R=function(t){return/^XE[0-9]{2}(ETH[0-9A-Z]{13}|[0-9A-Z]{30})$/.test(t)};e.exports={padLeft:o,toHex:d,toDecimal:l,fromDecimal:p,toAscii:s,fromAscii:u,transformToFullName:c,extractDisplayName:h,extractTypeName:f,toWei:y,fromWei:g,toBigNumber:v,toTwosComplement:b,toAddress:E,isBigNumber:x,isStrictAddress:w,isAddress:_,isFunction:A,isString:S,isObject:I,isBoolean:O,isArray:B,isJson:T,isIBAN:R}},{"bignumber.js":"bignumber.js"}],7:[function(t,e,r){e.exports={version:"0.6.1"}},{}],8:[function(t,e,r){var n=t("./version.json"),i=t("./web3/net"),o=t("./web3/eth"),s=t("./web3/db"),a=t("./web3/shh"),u=t("./web3/watches"),c=t("./web3/filter"),h=t("./utils/utils"),f=t("./web3/formatters"),l=t("./web3/requestmanager"),p=t("./utils/config"),d=t("./web3/property"),m=t("./web3/batch"),g=t("./utils/sha3"),y=[new d({name:"version.client",getter:"web3_clientVersion"}),new d({name:"version.network",getter:"net_version",inputFormatter:h.toDecimal}),new d({name:"version.ethereum",getter:"eth_protocolVersion",inputFormatter:h.toDecimal}),new d({name:"version.whisper",getter:"shh_version",inputFormatter:h.toDecimal})],v=function(t,e){e.forEach(function(e){e.attachToObject(t)})},b=function(t,e){e.forEach(function(e){e.attachToObject(t)})},w={};w.providers={},w.currentProvider=null,w.version={},w.version.api=n.version,w.eth={},w.eth.filter=function(t,e){return new c(t,u.eth(),f.outputLogFormatter,e)},w.shh={},w.shh.filter=function(t,e){return new c(t,u.shh(),f.outputPostFormatter,e)},w.net={},w.db={},w.setProvider=function(t){this.currentProvider=t,l.getInstance().setProvider(t)},w.reset=function(){l.getInstance().reset(),p.defaultBlock="latest",p.defaultAccount=void 0},w.toHex=h.toHex,w.toAscii=h.toAscii,w.fromAscii=h.fromAscii,w.toDecimal=h.toDecimal,w.fromDecimal=h.fromDecimal,w.toBigNumber=h.toBigNumber,w.toWei=h.toWei,w.fromWei=h.fromWei,w.isAddress=h.isAddress,w.isIBAN=h.isIBAN,w.sha3=g,w.createBatch=function(){return new m},Object.defineProperty(w.eth,"defaultBlock",{get:function(){return p.defaultBlock},set:function(t){return p.defaultBlock=t,t}}),Object.defineProperty(w.eth,"defaultAccount",{get:function(){return p.defaultAccount},set:function(t){return p.defaultAccount=t,t}}),w._extend=function(t){t.property&&!w[t.property]&&(w[t.property]={}),v(w[t.property]||w,t.methods||[]),b(w[t.property]||w,t.properties||[])},w._extend.formatters=f,w._extend.utils=h,w._extend.Method=t("./web3/method"),w._extend.Property=t("./web3/property"),b(w,y),v(w.net,i.methods),b(w.net,i.properties),v(w.eth,o.methods),b(w.eth,o.properties),v(w.db,s.methods),v(w.shh,a.methods),e.exports=w},{"./utils/config":4,"./utils/sha3":5,"./utils/utils":6,"./version.json":7,"./web3/batch":10,"./web3/db":12,"./web3/eth":14,"./web3/filter":16,"./web3/formatters":17,"./web3/method":22,"./web3/net":24,"./web3/property":25,"./web3/requestmanager":27,"./web3/shh":28,"./web3/watches":30}],9:[function(t,e,r){var n=t("../utils/sha3"),i=t("./event"),o=t("./formatters"),s=t("../utils/utils"),a=t("./filter"),u=t("./watches"),c=function(t,e){this._json=t,this._address=e};c.prototype.encode=function(t){t=t||{};var e={};return["fromBlock","toBlock"].filter(function(e){return void 0!==t[e]}).forEach(function(r){e[r]=o.inputBlockNumberFormatter(t[r])}),e.topics=[null,null,null,null,null],e.address=this._address,e},c.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=t.topics[0].slice(2),r=this._json.filter(function(t){return e===n(s.transformToFullName(t))})[0];if(!r)return console.warn("cannot find event for log"),t;var o=new i(r,this._address);return o.decode(t)},c.prototype.execute=function(t,e){var r=this.encode(t),n=this.decode.bind(this);return new a(r,u.eth(),n,e)},c.prototype.attachToContract=function(t){var e=this.execute.bind(this);t.allEvents=e},e.exports=c},{"../utils/sha3":5,"../utils/utils":6,"./event":15,"./filter":16,"./formatters":17,"./watches":30}],10:[function(t,e,r){var n=t("./requestmanager"),i=function(){this.requests=[]};i.prototype.add=function(t){this.requests.push(t)},i.prototype.execute=function(){var t=this.requests;n.getInstance().sendBatch(t,function(e,r){r=r||[],t.map(function(t,e){return r[e]||{}}).map(function(e,r){return t[r].format?t[r].format(e.result):e.result}).forEach(function(r,n){t[n].callback&&t[n].callback(e,r)})})},e.exports=i},{"./requestmanager":27}],11:[function(t,e,r){var n=t("../web3"),i=t("../utils/utils"),o=t("../solidity/coder"),s=t("./event"),a=t("./function"),u=t("./allevents"),c=function(t,e){return t.filter(function(t){return"constructor"===t.type&&t.inputs.length===e.length}).map(function(t){return t.inputs.map(function(t){return t.type})}).map(function(t){return o.encodeParams(t,e)})[0]||""},h=function(t,e){e.filter(function(t){return"function"===t.type}).map(function(e){return new a(e,t.address)}).forEach(function(e){e.attachToContract(t)})},f=function(t,e){var r=e.filter(function(t){return"event"===t.type}),n=new u(r,t.address);n.attachToContract(t),r.map(function(e){return new s(e,t.address)}).forEach(function(e){e.attachToContract(t)})},l=function(t){return new p(t)},p=function(t){this.abi=t};p.prototype["new"]=function(){var t,e={},r=Array.prototype.slice.call(arguments);i.isFunction(r[r.length-1])&&(t=r.pop());var o=r[r.length-1];i.isObject(o)&&!i.isArray(o)&&(e=r.pop());var s=c(this.abi,r);if(e.data+=s,!t){var a=n.eth.sendTransaction(e);return this.at(a)}var u=this;n.eth.sendTransaction(e,function(e,r){e&&t(e),u.at(r,t)})},p.prototype.at=function(t,e){return e&&e(null,new d(this.abi,t)),new d(this.abi,t)};var d=function(t,e){this.address=e,h(this,t),f(this,t)};e.exports=l},{"../solidity/coder":1,"../utils/utils":6,"../web3":8,"./allevents":9,"./event":15,"./function":18}],12:[function(t,e,r){var n=t("./method"),i=new n({name:"putString",call:"db_putString",params:3}),o=new n({name:"getString",call:"db_getString",params:2}),s=new n({name:"putHex",call:"db_putHex",params:3}),a=new n({name:"getHex",call:"db_getHex",params:2}),u=[i,o,s,a];e.exports={methods:u}},{"./method":22}],13:[function(t,e,r){e.exports={InvalidNumberOfParams:function(){return new Error("Invalid number of input parameters")},InvalidConnection:function(t){return new Error("CONNECTION ERROR: Couldn't connect to node "+t+", is it running?")},InvalidProvider:function(){return new Error("Providor not set or invalid")},InvalidResponse:function(t){var e=t&&t.error&&t.error.message?t.error.message:"Invalid JSON RPC response";return new Error(e)}}},{}],14:[function(t,e,r){"use strict";var n=t("./formatters"),i=t("../utils/utils"),o=t("./method"),s=t("./property"),a=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockByHash":"eth_getBlockByNumber"},u=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getTransactionByBlockHashAndIndex":"eth_getTransactionByBlockNumberAndIndex"},c=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleByBlockHashAndIndex":"eth_getUncleByBlockNumberAndIndex"},h=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getBlockTransactionCountByHash":"eth_getBlockTransactionCountByNumber"},f=function(t){return i.isString(t[0])&&0===t[0].indexOf("0x")?"eth_getUncleCountByBlockHash":"eth_getUncleCountByBlockNumber"},l=new o({name:"getBalance",call:"eth_getBalance",params:2,inputFormatter:[i.toAddress,n.inputDefaultBlockNumberFormatter],outputFormatter:n.outputBigNumberFormatter}),p=new o({name:"getStorageAt",call:"eth_getStorageAt",params:3,inputFormatter:[null,i.toHex,n.inputDefaultBlockNumberFormatter]}),d=new o({name:"getCode",call:"eth_getCode",params:2,inputFormatter:[i.toAddress,n.inputDefaultBlockNumberFormatter]}),m=new o({name:"getBlock",call:a,params:2,inputFormatter:[n.inputBlockNumberFormatter,function(t){return!!t}],outputFormatter:n.outputBlockFormatter}),g=new o({name:"getUncle",call:c,params:2,inputFormatter:[n.inputBlockNumberFormatter,i.toHex],outputFormatter:n.outputBlockFormatter}),y=new o({name:"getCompilers",call:"eth_getCompilers",params:0}),v=new o({name:"getBlockTransactionCount",call:h,params:1,inputFormatter:[n.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),b=new o({name:"getBlockUncleCount",call:f,params:1,inputFormatter:[n.inputBlockNumberFormatter],outputFormatter:i.toDecimal}),w=new o({name:"getTransaction",call:"eth_getTransactionByHash",params:1,outputFormatter:n.outputTransactionFormatter}),_=new o({name:"getTransactionFromBlock",call:u,params:2,inputFormatter:[n.inputBlockNumberFormatter,i.toHex],outputFormatter:n.outputTransactionFormatter}),E=new o({name:"getTransactionCount",call:"eth_getTransactionCount",params:2,inputFormatter:[null,n.inputDefaultBlockNumberFormatter],outputFormatter:i.toDecimal}),x=new o({name:"sendRawTransaction",call:"eth_sendRawTransaction",params:1,inputFormatter:[]}),S=new o({name:"sendTransaction",call:"eth_sendTransaction",params:1,inputFormatter:[n.inputTransactionFormatter]}),A=new o({name:"call",call:"eth_call",params:2,inputFormatter:[n.inputTransactionFormatter,n.inputDefaultBlockNumberFormatter]}),I=new o({name:"estimateGas",call:"eth_estimateGas",params:1,inputFormatter:[n.inputTransactionFormatter],outputFormatter:i.toDecimal}),O=new o({name:"compile.solidity",call:"eth_compileSolidity",params:1}),B=new o({name:"compile.lll",call:"eth_compileLLL",params:1}),T=new o({name:"compile.serpent",call:"eth_compileSerpent",params:1}),R=new o({name:"submitWork",call:"eth_submitWork",params:3}),k=new o({name:"getWork",call:"eth_getWork",params:0}),N=[l,p,d,m,g,y,v,b,w,_,E,A,I,x,S,O,B,T,R,k],L=[new s({name:"coinbase",getter:"eth_coinbase"}),new s({name:"mining",getter:"eth_mining"}),new s({name:"hashrate",getter:"eth_hashrate",outputFormatter:i.toDecimal}),new s({name:"gasPrice",getter:"eth_gasPrice",outputFormatter:n.outputBigNumberFormatter}),new s({name:"accounts",getter:"eth_accounts"}),new s({name:"blockNumber",getter:"eth_blockNumber",outputFormatter:i.toDecimal})];e.exports={methods:N,properties:L}},{"../utils/utils":6,"./formatters":17,"./method":22,"./property":25}],15:[function(t,e,r){var n=t("../utils/utils"),i=t("../solidity/coder"),o=t("./formatters"),s=t("../utils/sha3"),a=t("./filter"),u=t("./watches"),c=function(t,e){this._params=t.inputs,this._name=n.transformToFullName(t),this._address=e,this._anonymous=t.anonymous};c.prototype.types=function(t){return this._params.filter(function(e){return e.indexed===t}).map(function(t){return t.type})},c.prototype.displayName=function(){return n.extractDisplayName(this._name)},c.prototype.typeName=function(){return n.extractTypeName(this._name)},c.prototype.signature=function(){return s(this._name)},c.prototype.encode=function(t,e){t=t||{},e=e||{};var r={};["fromBlock","toBlock"].filter(function(t){return void 0!==e[t]}).forEach(function(t){r[t]=o.inputBlockNumberFormatter(e[t])}),r.topics=[],this._anonymous||(r.address=this._address,r.topics.push("0x"+this.signature()));var s=this._params.filter(function(t){return t.indexed===!0}).map(function(e){var r=t[e.name];return void 0===r||null===r?null:n.isArray(r)?r.map(function(t){return"0x"+i.encodeParam(e.type,t)}):"0x"+i.encodeParam(e.type,r)});return r.topics=r.topics.concat(s),r},c.prototype.decode=function(t){t.data=t.data||"",t.topics=t.topics||[];var e=this._anonymous?t.topics:t.topics.slice(1),r=e.map(function(t){return t.slice(2)}).join(""),n=i.decodeParams(this.types(!0),r),s=t.data.slice(2),a=i.decodeParams(this.types(!1),s),u=o.outputLogFormatter(t);return u.event=this.displayName(),u.address=t.address,u.args=this._params.reduce(function(t,e){return t[e.name]=e.indexed?n.shift():a.shift(),t},{}),delete u.data,delete u.topics,u},c.prototype.execute=function(t,e,r){n.isFunction(arguments[arguments.length-1])&&(r=arguments[arguments.length-1],2===arguments.length&&(e=null),1===arguments.length&&(e=null,t={}));var i=this.encode(t,e),o=this.decode.bind(this);return new a(i,u.eth(),o,r)},c.prototype.attachToContract=function(t){var e=this.execute.bind(this),r=this.displayName();t[r]||(t[r]=e),t[r][this.typeName()]=this.execute.bind(this,t)},e.exports=c},{"../solidity/coder":1,"../utils/sha3":5,"../utils/utils":6,"./filter":16,"./formatters":17,"./watches":30}],16:[function(t,e,r){var n=t("./requestmanager"),i=t("./formatters"),o=t("../utils/utils"),s=function(t){return null===t||"undefined"==typeof t?null:(t=String(t),0===t.indexOf("0x")?t:o.fromAscii(t))},a=function(t){return o.isString(t)?t:(t=t||{},t.topics=t.topics||[],t.topics=t.topics.map(function(t){return o.isArray(t)?t.map(s):s(t)}),{topics:t.topics,to:t.to,address:t.address,fromBlock:i.inputBlockNumberFormatter(t.fromBlock),toBlock:i.inputBlockNumberFormatter(t.toBlock)})},u=function(t,e){o.isString(t.options)||t.get(function(t,r){t&&e(t),r.forEach(function(t){e(null,t)})})},c=function(t){var e=function(e,r){return e?t.callbacks.forEach(function(t){t(e)}):void r.forEach(function(e){e=t.formatter?t.formatter(e):e,t.callbacks.forEach(function(t){t(null,e)})})};n.getInstance().startPolling({method:t.implementation.poll.call,params:[t.filterId]},t.filterId,e,t.stopWatching.bind(t))},h=function(t,e,r,n){var i=this,o={};e.forEach(function(t){t.attachToObject(o)}),this.options=a(t),this.implementation=o,this.callbacks=[],this.pollFilters=[],this.formatter=r,this.implementation.newFilter(this.options,function(t,e){if(t)i.callbacks.forEach(function(e){e(t)});else if(i.filterId=e,i.callbacks.forEach(function(t){u(i,t)}),c(i),n)return i.watch(n)})};h.prototype.watch=function(t){return this.callbacks.push(t),this.filterId&&(u(this,t),c(this)),this},h.prototype.stopWatching=function(){n.getInstance().stopPolling(this.filterId),this.implementation.uninstallFilter(this.filterId,function(){}),this.callbacks=[]},h.prototype.get=function(t){var e=this;if(!o.isFunction(t)){var r=this.implementation.getLogs(this.filterId);return r.map(function(t){return e.formatter?e.formatter(t):t})}return this.implementation.getLogs(this.filterId,function(r,n){r?t(r):t(null,n.map(function(t){return e.formatter?e.formatter(t):t}))}),this},e.exports=h},{"../utils/utils":6,"./formatters":17,"./requestmanager":27}],17:[function(t,e,r){var n=t("../utils/utils"),i=t("../utils/config"),o=function(t){return n.toBigNumber(t)},s=function(t){return"latest"===t||"pending"===t||"earliest"===t},a=function(t){return void 0===t?i.defaultBlock:u(t)},u=function(t){return void 0===t?void 0:s(t)?t:n.toHex(t)},c=function(t){return t.from=t.from||i.defaultAccount,t.code&&(t.data=t.code,delete t.code),["gasPrice","gas","value","nonce"].filter(function(e){return void 0!==t[e]}).forEach(function(e){t[e]=n.fromDecimal(t[e])}),t},h=function(t){return null!==t.blockNumber&&(t.blockNumber=n.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=n.toDecimal(t.transactionIndex)),t.nonce=n.toDecimal(t.nonce),t.gas=n.toDecimal(t.gas),t.gasPrice=n.toBigNumber(t.gasPrice),t.value=n.toBigNumber(t.value),t},f=function(t){return t.gasLimit=n.toDecimal(t.gasLimit),t.gasUsed=n.toDecimal(t.gasUsed),t.size=n.toDecimal(t.size),t.timestamp=n.toDecimal(t.timestamp),null!==t.number&&(t.number=n.toDecimal(t.number)),t.difficulty=n.toBigNumber(t.difficulty),t.totalDifficulty=n.toBigNumber(t.totalDifficulty),n.isArray(t.transactions)&&t.transactions.forEach(function(t){return n.isString(t)?void 0:h(t)}),t},l=function(t){return null!==t.blockNumber&&(t.blockNumber=n.toDecimal(t.blockNumber)),null!==t.transactionIndex&&(t.transactionIndex=n.toDecimal(t.transactionIndex)),null!==t.logIndex&&(t.logIndex=n.toDecimal(t.logIndex)),t},p=function(t){return t.payload=n.toHex(t.payload),t.ttl=n.fromDecimal(t.ttl),t.workToProve=n.fromDecimal(t.workToProve),t.priority=n.fromDecimal(t.priority),n.isArray(t.topics)||(t.topics=t.topics?[t.topics]:[]),t.topics=t.topics.map(function(t){return n.fromAscii(t)}),t},d=function(t){return t.expiry=n.toDecimal(t.expiry),t.sent=n.toDecimal(t.sent),t.ttl=n.toDecimal(t.ttl),t.workProved=n.toDecimal(t.workProved),t.payloadRaw=t.payload,t.payload=n.toAscii(t.payload),n.isJson(t.payload)&&(t.payload=JSON.parse(t.payload)),t.topics||(t.topics=[]),t.topics=t.topics.map(function(t){return n.toAscii(t)}),t};e.exports={inputDefaultBlockNumberFormatter:a,inputBlockNumberFormatter:u,inputTransactionFormatter:c,inputPostFormatter:p,outputBigNumberFormatter:o,outputTransactionFormatter:h,outputBlockFormatter:f,outputLogFormatter:l,outputPostFormatter:d}},{"../utils/config":4,"../utils/utils":6}],18:[function(t,e,r){var n=t("../web3"),i=t("../solidity/coder"),o=t("../utils/utils"),s=t("./formatters"),a=t("../utils/sha3"),u=function(t,e){this._inputTypes=t.inputs.map(function(t){return t.type}),this._outputTypes=t.outputs.map(function(t){return t.type}),this._constant=t.constant,this._name=o.transformToFullName(t),this._address=e};u.prototype.extractCallback=function(t){return o.isFunction(t[t.length-1])?t.pop():void 0},u.prototype.extractDefaultBlock=function(t){return t.length>this._inputTypes.length&&!o.isObject(t[t.length-1])?s.inputDefaultBlockNumberFormatter(t.pop()):void 0},u.prototype.toPayload=function(t){var e={};return t.length>this._inputTypes.length&&o.isObject(t[t.length-1])&&(e=t[t.length-1]),e.to=this._address,e.data="0x"+this.signature()+i.encodeParams(this._inputTypes,t),e},u.prototype.signature=function(){return a(this._name).slice(0,8)},u.prototype.unpackOutput=function(t){if(t){t=t.length>=2?t.slice(2):t;var e=i.decodeParams(this._outputTypes,t);return 1===e.length?e[0]:e}},u.prototype.call=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),r=this.extractDefaultBlock(t),i=this.toPayload(t);if(!e){var o=n.eth.call(i,r);return this.unpackOutput(o)}var s=this;n.eth.call(i,r,function(t,r){e(t,s.unpackOutput(r))})},u.prototype.sendTransaction=function(){var t=Array.prototype.slice.call(arguments).filter(function(t){return void 0!==t}),e=this.extractCallback(t),r=this.toPayload(t);return e?void n.eth.sendTransaction(r,e):n.eth.sendTransaction(r)},u.prototype.estimateGas=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),r=this.toPayload(t);return e?void n.eth.estimateGas(r,e):n.eth.estimateGas(r)},u.prototype.displayName=function(){return o.extractDisplayName(this._name)},u.prototype.typeName=function(){return o.extractTypeName(this._name)},u.prototype.request=function(){var t=Array.prototype.slice.call(arguments),e=this.extractCallback(t),r=this.toPayload(t),n=this.unpackOutput.bind(this);return{callback:e,payload:r,format:n}},u.prototype.execute=function(){var t=!this._constant;return t?this.sendTransaction.apply(this,Array.prototype.slice.call(arguments)):this.call.apply(this,Array.prototype.slice.call(arguments))},u.prototype.attachToContract=function(t){var e=this.execute.bind(this);e.request=this.request.bind(this),e.call=this.call.bind(this),e.sendTransaction=this.sendTransaction.bind(this),e.estimateGas=this.estimateGas.bind(this);var r=this.displayName();t[r]||(t[r]=e),t[r][this.typeName()]=e},e.exports=u},{"../solidity/coder":1,"../utils/sha3":5,"../utils/utils":6,"../web3":8,"./formatters":17}],19:[function(t,e,r){"use strict";var n="undefined"!=typeof window&&window.XMLHttpRequest?window.XMLHttpRequest:t("xmlhttprequest").XMLHttpRequest,i=t("./errors"),o=function(t){this.host=t||"http://localhost:8545"};o.prototype.send=function(t){var e=new n;e.open("POST",this.host,!1),e.setRequestHeader("Content-type","application/json");try{e.send(JSON.stringify(t))}catch(r){throw i.InvalidConnection(this.host)}var o=e.responseText;try{o=JSON.parse(o)}catch(s){throw i.InvalidResponse(o)}return o},o.prototype.sendAsync=function(t,e){var r=new n;r.onreadystatechange=function(){if(4===r.readyState){var t=r.responseText,n=null;try{t=JSON.parse(t)}catch(o){n=i.InvalidResponse(t)}e(n,t)}},r.open("POST",this.host,!0),r.setRequestHeader("Content-type","application/json");try{r.send(JSON.stringify(t))}catch(o){e(i.InvalidConnection(this.host))}},e.exports=o},{"./errors":13,xmlhttprequest:68}],20:[function(t,e,r){var n=t("../utils/utils"),i=function(t){this._iban=t};i.prototype.isValid=function(){return n.isIBAN(this._iban)},i.prototype.isDirect=function(){return 34===this._iban.length},i.prototype.isIndirect=function(){return 20===this._iban.length},i.prototype.checksum=function(){return this._iban.substr(2,2)},i.prototype.institution=function(){return this.isIndirect()?this._iban.substr(7,4):""},i.prototype.client=function(){return this.isIndirect()?this._iban.substr(11):""},i.prototype.address=function(){return this.isDirect()?this._iban.substr(4):""},e.exports=i},{"../utils/utils":6}],21:[function(t,e,r){var n=function(){return arguments.callee._singletonInstance?arguments.callee._singletonInstance:(arguments.callee._singletonInstance=this,void(this.messageId=1))};n.getInstance=function(){var t=new n;return t},n.prototype.toPayload=function(t,e){return t||console.error("jsonrpc method should be specified!"),{jsonrpc:"2.0",method:t,params:e||[],id:this.messageId++}},n.prototype.isValidResponse=function(t){return!!t&&!t.error&&"2.0"===t.jsonrpc&&"number"==typeof t.id&&void 0!==t.result},n.prototype.toBatchPayload=function(t){var e=this;return t.map(function(t){return e.toPayload(t.method,t.params)})},e.exports=n},{}],22:[function(t,e,r){var n=t("./requestmanager"),i=t("../utils/utils"),o=t("./errors"),s=function(t){this.name=t.name,this.call=t.call,this.params=t.params||0,this.inputFormatter=t.inputFormatter,this.outputFormatter=t.outputFormatter};s.prototype.getCall=function(t){return i.isFunction(this.call)?this.call(t):this.call},s.prototype.extractCallback=function(t){return i.isFunction(t[t.length-1])?t.pop():void 0},s.prototype.validateArgs=function(t){if(t.length!==this.params)throw o.InvalidNumberOfParams()},s.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter.map(function(e,r){return e?e(t[r]):t[r];
|
||
|
||
}):t},s.prototype.formatOutput=function(t){return this.outputFormatter&&null!==t?this.outputFormatter(t):t},s.prototype.attachToObject=function(t){var e=this.send.bind(this);e.request=this.request.bind(this),e.call=this.call;var r=this.name.split(".");r.length>1?(t[r[0]]=t[r[0]]||{},t[r[0]][r[1]]=e):t[r[0]]=e},s.prototype.toPayload=function(t){var e=this.getCall(t),r=this.extractCallback(t),n=this.formatInput(t);return this.validateArgs(n),{method:e,params:n,callback:r}},s.prototype.request=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));return t.format=this.formatOutput.bind(this),t},s.prototype.send=function(){var t=this.toPayload(Array.prototype.slice.call(arguments));if(t.callback){var e=this;return n.getInstance().sendAsync(t,function(r,n){t.callback(r,e.formatOutput(n))})}return this.formatOutput(n.getInstance().send(t))},e.exports=s},{"../utils/utils":6,"./errors":13,"./requestmanager":27}],23:[function(t,e,r){var n=t("./contract"),i="0xc6d9d2cd449a754c494264e1809c50e34d64562b",o=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"name",outputs:[{name:"o_name",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"content",outputs:[{name:"",type:"bytes32"}],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"addr",outputs:[{name:"",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"reserve",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"subRegistrar",outputs:[{name:"o_subRegistrar",type:"address"}],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_newOwner",type:"address"}],name:"transfer",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_registrar",type:"address"}],name:"setSubRegistrar",outputs:[],type:"function"},{constant:!1,inputs:[],name:"Registrar",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_a",type:"address"},{name:"_primary",type:"bool"}],name:"setAddress",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"},{name:"_content",type:"bytes32"}],name:"setContent",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_name",type:"bytes32"}],name:"disown",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_name",type:"bytes32"}],name:"register",outputs:[{name:"",type:"address"}],type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"}],name:"Changed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"name",type:"bytes32"},{indexed:!0,name:"addr",type:"address"}],name:"PrimaryChanged",type:"event"}];e.exports=n(o).at(i)},{"./contract":11}],24:[function(t,e,r){var n=t("../utils/utils"),i=t("./property"),o=[],s=[new i({name:"listening",getter:"net_listening"}),new i({name:"peerCount",getter:"net_peerCount",outputFormatter:n.toDecimal})];e.exports={methods:o,properties:s}},{"../utils/utils":6,"./property":25}],25:[function(t,e,r){var n=t("./requestmanager"),i=function(t){this.name=t.name,this.getter=t.getter,this.setter=t.setter,this.outputFormatter=t.outputFormatter,this.inputFormatter=t.inputFormatter};i.prototype.formatInput=function(t){return this.inputFormatter?this.inputFormatter(t):t},i.prototype.formatOutput=function(t){return this.outputFormatter&&null!==t?this.outputFormatter(t):t},i.prototype.attachToObject=function(t){var e={get:this.get.bind(this)},r=this.name.split("."),n=r[0];r.length>1&&(t[r[0]]=t[r[0]]||{},t=t[r[0]],n=r[1]),Object.defineProperty(t,n,e);var i=function(t,e){return t+e.charAt(0).toUpperCase()+e.slice(1)};t[i("get",n)]=this.getAsync.bind(this)},i.prototype.get=function(){return this.formatOutput(n.getInstance().send({method:this.getter}))},i.prototype.getAsync=function(t){var e=this;n.getInstance().sendAsync({method:this.getter},function(r,n){return r?t(r):void t(r,e.formatOutput(n))})},e.exports=i},{"./requestmanager":27}],26:[function(t,e,r){var n=function(){};n.prototype.send=function(t){var e=navigator.qt.callMethod(JSON.stringify(t));return JSON.parse(e)},e.exports=n},{}],27:[function(t,e,r){var n=t("./jsonrpc"),i=t("../utils/utils"),o=t("../utils/config"),s=t("./errors"),a=function(t){return arguments.callee._singletonInstance?arguments.callee._singletonInstance:(arguments.callee._singletonInstance=this,this.provider=t,this.polls={},this.timeout=null,void(this.isPolling=!1))};a.getInstance=function(){var t=new a;return t},a.prototype.send=function(t){if(!this.provider)return console.error(s.InvalidProvider()),null;var e=n.getInstance().toPayload(t.method,t.params),r=this.provider.send(e);if(!n.getInstance().isValidResponse(r))throw s.InvalidResponse(r);return r.result},a.prototype.sendAsync=function(t,e){if(!this.provider)return e(s.InvalidProvider());var r=n.getInstance().toPayload(t.method,t.params);this.provider.sendAsync(r,function(t,r){return t?e(t):n.getInstance().isValidResponse(r)?void e(null,r.result):e(s.InvalidResponse(r))})},a.prototype.sendBatch=function(t,e){if(!this.provider)return e(s.InvalidProvider());var r=n.getInstance().toBatchPayload(t);this.provider.sendAsync(r,function(t,r){return t?e(t):i.isArray(r)?void e(t,r):e(s.InvalidResponse(r))})},a.prototype.setProvider=function(t){this.provider=t,this.provider&&!this.isPolling&&(this.poll(),this.isPolling=!0)},a.prototype.startPolling=function(t,e,r,n){this.polls["poll_"+e]={data:t,id:e,callback:r,uninstall:n}},a.prototype.stopPolling=function(t){delete this.polls["poll_"+t]},a.prototype.reset=function(){for(var t in this.polls)this.polls[t].uninstall();this.polls={},this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.poll()},a.prototype.poll=function(){if(this.timeout=setTimeout(this.poll.bind(this),o.ETH_POLLING_TIMEOUT),0!==Object.keys(this.polls).length){if(!this.provider)return void console.error(s.InvalidProvider());var t=[],e=[];for(var r in this.polls)t.push(this.polls[r].data),e.push(r);if(0!==t.length){var a=n.getInstance().toBatchPayload(t),u=this;this.provider.sendAsync(a,function(t,r){if(!t){if(!i.isArray(r))throw s.InvalidResponse(r);r.map(function(t,r){var n=e[r];return u.polls[n]?(t.callback=u.polls[n].callback,t):!1}).filter(function(t){return!!t}).filter(function(t){var e=n.getInstance().isValidResponse(t);return e||t.callback(s.InvalidResponse(t)),e}).filter(function(t){return i.isArray(t.result)&&t.result.length>0}).forEach(function(t){t.callback(null,t.result)})}})}}},e.exports=a},{"../utils/config":4,"../utils/utils":6,"./errors":13,"./jsonrpc":21}],28:[function(t,e,r){var n=t("./method"),i=t("./formatters"),o=new n({name:"post",call:"shh_post",params:1,inputFormatter:[i.inputPostFormatter]}),s=new n({name:"newIdentity",call:"shh_newIdentity",params:0}),a=new n({name:"hasIdentity",call:"shh_hasIdentity",params:1}),u=new n({name:"newGroup",call:"shh_newGroup",params:0}),c=new n({name:"addToGroup",call:"shh_addToGroup",params:0}),h=[o,s,a,u,c];e.exports={methods:h}},{"./formatters":17,"./method":22}],29:[function(t,e,r){var n=t("../web3"),i=t("./icap"),o=t("./namereg"),s=t("./contract"),a=function(t,e,r,n){var s=new i(e);if(!s.isValid())throw new Error("invalid iban address");if(s.isDirect())return u(t,s.address(),r,n);if(!n){var a=o.addr(s.institution());return c(t,a,r,s.client())}o.addr(s.insitution(),function(e,i){return c(t,i,r,s.client(),n)})},u=function(t,e,r,i){return n.eth.sendTransaction({address:e,from:t,value:r},i)},c=function(t,e,r,n,i){var o=[{constant:!1,inputs:[{name:"name",type:"bytes32"}],name:"deposit",outputs:[],type:"function"}];return s(o).at(e).deposit(n,{from:t,value:r},i)};e.exports=a},{"../web3":8,"./contract":11,"./icap":20,"./namereg":23}],30:[function(t,e,r){var n=t("./method"),i=function(){var t=function(t){var e=t[0];switch(e){case"latest":return t.shift(),this.params=0,"eth_newBlockFilter";case"pending":return t.shift(),this.params=0,"eth_newPendingTransactionFilter";default:return"eth_newFilter"}},e=new n({name:"newFilter",call:t,params:1}),r=new n({name:"uninstallFilter",call:"eth_uninstallFilter",params:1}),i=new n({name:"getLogs",call:"eth_getFilterLogs",params:1}),o=new n({name:"poll",call:"eth_getFilterChanges",params:1});return[e,r,i,o]},o=function(){var t=new n({name:"newFilter",call:"shh_newFilter",params:1}),e=new n({name:"uninstallFilter",call:"shh_uninstallFilter",params:1}),r=new n({name:"getLogs",call:"shh_getMessages",params:1}),i=new n({name:"poll",call:"shh_getFilterChanges",params:1});return[t,e,r,i]};e.exports={eth:i,shh:o}},{"./method":22}],31:[function(t,e,r){},{}],32:[function(t,e,r){arguments[4][31][0].apply(r,arguments)},{dup:31}],33:[function(t,e,r){function n(t){return this instanceof n?(this.length=0,this.parent=void 0,"number"==typeof t?i(this,t):"string"==typeof t?o(this,t,arguments.length>1?arguments[1]:"utf8"):s(this,t)):arguments.length>1?new n(t,arguments[1]):new n(t)}function i(t,e){if(t=l(t,0>e?0:0|p(e)),!n.TYPED_ARRAY_SUPPORT)for(var r=0;e>r;r++)t[r]=0;return t}function o(t,e,r){("string"!=typeof r||""===r)&&(r="utf8");var n=0|m(e,r);return t=l(t,n),t.write(e,r),t}function s(t,e){if(n.isBuffer(e))return a(t,e);if(Y(e))return u(t,e);if(null==e)throw new TypeError("must start with number, buffer, array or string");return"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer?c(t,e):e.length?h(t,e):f(t,e)}function a(t,e){var r=0|p(e.length);return t=l(t,r),e.copy(t,0,0,r),t}function u(t,e){var r=0|p(e.length);t=l(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function c(t,e){var r=0|p(e.length);t=l(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function h(t,e){var r=0|p(e.length);t=l(t,r);for(var n=0;r>n;n+=1)t[n]=255&e[n];return t}function f(t,e){var r,n=0;"Buffer"===e.type&&Y(e.data)&&(r=e.data,n=0|p(r.length)),t=l(t,n);for(var i=0;n>i;i+=1)t[i]=255&r[i];return t}function l(t,e){n.TYPED_ARRAY_SUPPORT?t=n._augment(new Uint8Array(e)):(t.length=e,t._isBuffer=!0);var r=0!==e&&e<=n.poolSize>>>1;return r&&(t.parent=V),t}function p(t){if(t>=J)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+J.toString(16)+" bytes");return 0|t}function d(t,e){if(!(this instanceof d))return new d(t,e);var r=new n(t,e);return delete r.parent,r}function m(t,e){if("string"!=typeof t&&(t=String(t)),0===t.length)return 0;switch(e||"utf8"){case"ascii":case"binary":case"raw":return t.length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t.length;case"hex":return t.length>>>1;case"utf8":case"utf-8":return j(t).length;case"base64":return q(t).length;default:return t.length}}function g(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=e.length;if(o%2!==0)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");t[r+s]=a}return s}function y(t,e,r,n){return H(j(e,t.length-r),t,r,n)}function v(t,e,r,n){return H(U(e),t,r,n)}function b(t,e,r,n){return v(t,e,r,n)}function w(t,e,r,n){return H(q(e),t,r,n)}function _(t,e,r,n){return H(M(e,t.length-r),t,r,n)}function E(t,e,r){return G.fromByteArray(0===e&&r===t.length?t:t.slice(e,r))}function x(t,e,r){var n="",i="";r=Math.min(t.length,r);for(var o=e;r>o;o++)t[o]<=127?(n+=z(i)+String.fromCharCode(t[o]),i=""):i+="%"+t[o].toString(16);return n+z(i)}function S(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(127&t[i]);return n}function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;r>i;i++)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){var n=t.length;(!e||0>e)&&(e=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=e;r>o;o++)i+=F(t[o]);return i}function O(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function B(t,e,r){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function T(t,e,r,i,o,s){if(!n.isBuffer(t))throw new TypeError("buffer must be a Buffer instance");if(e>o||s>e)throw new RangeError("value is out of bounds");if(r+i>t.length)throw new RangeError("index out of range")}function R(t,e,r,n){0>e&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);o>i;i++)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function k(t,e,r,n){0>e&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);o>i;i++)t[r+i]=e>>>8*(n?i:3-i)&255}function N(t,e,r,n,i,o){if(e>i||o>e)throw new RangeError("value is out of bounds");if(r+n>t.length)throw new RangeError("index out of range");if(0>r)throw new RangeError("index out of range")}function L(t,e,r,n,i){return i||N(t,e,r,4,3.4028234663852886e38,-3.4028234663852886e38),W.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,i){return i||N(t,e,r,8,1.7976931348623157e308,-1.7976931348623157e308),W.write(t,e,r,n,52,8),r+8}function C(t){if(t=D(t).replace(X,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function D(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function F(t){return 16>t?"0"+t.toString(16):t.toString(16)}function j(t,e){e=e||1/0;for(var r,n=t.length,i=null,o=[],s=0;n>s;s++){if(r=t.charCodeAt(s),r>55295&&57344>r){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(56320>r){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=i-55296<<10|r-56320|65536,i=null}else i&&((e-=3)>-1&&o.push(239,191,189),i=null);if(128>r){if((e-=1)<0)break;o.push(r)}else if(2048>r){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(2097152>r))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function U(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e}function M(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);s++)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function q(t){return G.toByteArray(C(t))}function H(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);i++)e[i+r]=t[i];return i}function z(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}var G=t("base64-js"),W=t("ieee754"),Y=t("is-array");r.Buffer=n,r.SlowBuffer=d,r.INSPECT_MAX_BYTES=50,n.poolSize=8192;var J=1073741823,V={};n.TYPED_ARRAY_SUPPORT=function(){try{var t=new ArrayBuffer(0),e=new Uint8Array(t);return e.foo=function(){return 42},42===e.foo()&&"function"==typeof e.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(r){return!1}}(),n.isBuffer=function(t){return!(null==t||!t._isBuffer)},n.compare=function(t,e){if(!n.isBuffer(t)||!n.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,i=e.length,o=0,s=Math.min(r,i);s>o&&t[o]===e[o];)++o;return o!==s&&(r=t[o],i=e[o]),i>r?-1:r>i?1:0},n.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.concat=function(t,e){if(!Y(t))throw new TypeError("list argument must be an Array of Buffers.");if(0===t.length)return new n(0);if(1===t.length)return t[0];var r;if(void 0===e)for(e=0,r=0;r<t.length;r++)e+=t[r].length;var i=new n(e),o=0;for(r=0;r<t.length;r++){var s=t[r];s.copy(i,o),o+=s.length}return i},n.byteLength=m,n.prototype.length=void 0,n.prototype.parent=void 0,n.prototype.toString=function(t,e,r){var n=!1;if(e=0|e,r=void 0===r||r===1/0?this.length:0|r,t||(t="utf8"),0>e&&(e=0),r>this.length&&(r=this.length),e>=r)return"";for(;;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return x(this,e,r);case"ascii":return S(this,e,r);case"binary":return A(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}},n.prototype.equals=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:0===n.compare(this,t)},n.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},n.prototype.compare=function(t){if(!n.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?0:n.compare(this,t)},n.prototype.indexOf=function(t,e){function r(t,e,r){for(var n=-1,i=0;r+i<t.length;i++)if(t[r+i]===e[-1===n?0:i-n]){if(-1===n&&(n=i),i-n+1===e.length)return r+n}else n=-1;return-1}if(e>2147483647?e=2147483647:-2147483648>e&&(e=-2147483648),e>>=0,0===this.length)return-1;if(e>=this.length)return-1;if(0>e&&(e=Math.max(this.length+e,0)),"string"==typeof t)return 0===t.length?-1:String.prototype.indexOf.call(this,t,e);if(n.isBuffer(t))return r(this,t,e);if("number"==typeof t)return n.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,t,e):r(this,[t],e);throw new TypeError("val must be string, number or Buffer")},n.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},n.prototype.set=function(t,e){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,e)},n.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else if(isFinite(e))e=0|e,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0);else{var i=n;n=e,e=0|r,r=i}var o=this.length-e;if((void 0===r||r>o)&&(r=o),t.length>0&&(0>r||0>e)||e>this.length)throw new RangeError("attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return y(this,t,e,r);case"ascii":return v(this,t,e,r);case"binary":return b(this,t,e,r);case"base64":return w(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.slice=function(t,e){var r=this.length;t=~~t,e=void 0===e?r:~~e,0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),t>e&&(e=t);var i;if(n.TYPED_ARRAY_SUPPORT)i=n._augment(this.subarray(t,e));else{var o=e-t;i=new n(o,void 0);for(var s=0;o>s;s++)i[s]=this[s+t]}return i.length&&(i.parent=this.parent||this),i},n.prototype.readUIntLE=function(t,e,r){t=0|t,e=0|e,r||B(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},n.prototype.readUIntBE=function(t,e,r){t=0|t,e=0|e,r||B(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},n.prototype.readUInt8=function(t,e){return e||B(t,1,this.length),this[t]},n.prototype.readUInt16LE=function(t,e){return e||B(t,2,this.length),this[t]|this[t+1]<<8},n.prototype.readUInt16BE=function(t,e){return e||B(t,2,this.length),this[t]<<8|this[t+1]},n.prototype.readUInt32LE=function(t,e){return e||B(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},n.prototype.readUInt32BE=function(t,e){return e||B(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},n.prototype.readIntLE=function(t,e,r){t=0|t,e=0|e,r||B(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},n.prototype.readIntBE=function(t,e,r){t=0|t,e=0|e,r||B(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},n.prototype.readInt8=function(t,e){return e||B(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},n.prototype.readInt16LE=function(t,e){e||B(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt16BE=function(t,e){e||B(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},n.prototype.readInt32LE=function(t,e){return e||B(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},n.prototype.readInt32BE=function(t,e){return e||B(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},n.prototype.readFloatLE=function(t,e){return e||B(t,4,this.length),W.read(this,t,!0,23,4)},n.prototype.readFloatBE=function(t,e){return e||B(t,4,this.length),W.read(this,t,!1,23,4)},n.prototype.readDoubleLE=function(t,e){return e||B(t,8,this.length),W.read(this,t,!0,52,8)},n.prototype.readDoubleBE=function(t,e){return e||B(t,8,this.length),W.read(this,t,!1,52,8)},n.prototype.writeUIntLE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||T(this,t,e,r,Math.pow(2,8*r),0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},n.prototype.writeUIntBE=function(t,e,r,n){t=+t,e=0|e,r=0|r,n||T(this,t,e,r,Math.pow(2,8*r),0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},n.prototype.writeUInt8=function(t,e,r){return t=+t,e=0|e,r||T(this,t,e,1,255,0),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t,e+1},n.prototype.writeUInt16LE=function(t,e,r){return t=+t,e=0|e,r||T(this,t,e,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},n.prototype.writeUInt16BE=function(t,e,r){return t=+t,e=0|e,r||T(this,t,e,2,65535,0),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t):R(this,t,e,!1),e+2},n.prototype.writeUInt32LE=function(t,e,r){return t=+t,e=0|e,r||T(this,t,e,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t):k(this,t,e,!0),e+4},n.prototype.writeUInt32BE=function(t,e,r){return t=+t,e=0|e,r||T(this,t,e,4,4294967295,0),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t):k(this,t,e,!1),e+4},n.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);T(this,t,e,r,i-1,-i)}var o=0,s=1,a=0>t?1:0;for(this[e]=255&t;++o<r&&(s*=256);)this[e+o]=(t/s>>0)-a&255;return e+r},n.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e=0|e,!n){var i=Math.pow(2,8*r-1);T(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0>t?1:0;for(this[e+o]=255&t;--o>=0&&(s*=256);)this[e+o]=(t/s>>0)-a&255;return e+r},n.prototype.writeInt8=function(t,e,r){return t=+t,e=0|e,r||T(this,t,e,1,127,-128),n.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),0>t&&(t=255+t+1),this[e]=t,e+1},n.prototype.writeInt16LE=function(t,e,r){return t=+t,e=0|e,r||T(this,t,e,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},n.prototype.writeInt16BE=function(t,e,r){return t=+t,e=0|e,r||T(this,t,e,2,32767,-32768),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t):R(this,t,e,!1),e+2},n.prototype.writeInt32LE=function(t,e,r){return t=+t,e=0|e,r||T(this,t,e,4,2147483647,-2147483648),n.TYPED_ARRAY_SUPPORT?(this[e]=t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):k(this,t,e,!0),e+4},n.prototype.writeInt32BE=function(t,e,r){return t=+t,e=0|e,r||T(this,t,e,4,2147483647,-2147483648),0>t&&(t=4294967295+t+1),n.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t):k(this,t,e,!1),e+4},n.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},n.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},n.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},n.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},n.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&r>i&&(i=r),i===r)return 0;if(0===t.length||0===this.length)return 0;if(0>e)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-r&&(i=t.length-e+r);var o=i-r;if(1e3>o||!n.TYPED_ARRAY_SUPPORT)for(var s=0;o>s;s++)t[s+e]=this[s+r];else t._set(this.subarray(r,r+o),e);return o},n.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),e>r)throw new RangeError("end < start");if(r!==e&&0!==this.length){if(0>e||e>=this.length)throw new RangeError("start out of bounds");if(0>r||r>this.length)throw new RangeError("end out of bounds");var n;if("number"==typeof t)for(n=e;r>n;n++)this[n]=t;else{var i=j(t.toString()),o=i.length;for(n=e;r>n;n++)this[n]=i[n%o]}return this}},n.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(n.TYPED_ARRAY_SUPPORT)return new n(this).buffer;for(var t=new Uint8Array(this.length),e=0,r=t.length;r>e;e+=1)t[e]=this[e];return t.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=n.prototype;n._augment=function(t){return t.constructor=n,t._isBuffer=!0,t._set=t.set,t.get=$.get,t.set=$.set,t.write=$.write,t.toString=$.toString,t.toLocaleString=$.toString,t.toJSON=$.toJSON,t.equals=$.equals,t.compare=$.compare,t.indexOf=$.indexOf,t.copy=$.copy,t.slice=$.slice,t.readUIntLE=$.readUIntLE,t.readUIntBE=$.readUIntBE,t.readUInt8=$.readUInt8,t.readUInt16LE=$.readUInt16LE,t.readUInt16BE=$.readUInt16BE,t.readUInt32LE=$.readUInt32LE,t.readUInt32BE=$.readUInt32BE,t.readIntLE=$.readIntLE,t.readIntBE=$.readIntBE,t.readInt8=$.readInt8,t.readInt16LE=$.readInt16LE,t.readInt16BE=$.readInt16BE,t.readInt32LE=$.readInt32LE,t.readInt32BE=$.readInt32BE,t.readFloatLE=$.readFloatLE,t.readFloatBE=$.readFloatBE,t.readDoubleLE=$.readDoubleLE,t.readDoubleBE=$.readDoubleBE,t.writeUInt8=$.writeUInt8,t.writeUIntLE=$.writeUIntLE,t.writeUIntBE=$.writeUIntBE,t.writeUInt16LE=$.writeUInt16LE,t.writeUInt16BE=$.writeUInt16BE,t.writeUInt32LE=$.writeUInt32LE,t.writeUInt32BE=$.writeUInt32BE,t.writeIntLE=$.writeIntLE,t.writeIntBE=$.writeIntBE,t.writeInt8=$.writeInt8,t.writeInt16LE=$.writeInt16LE,t.writeInt16BE=$.writeInt16BE,t.writeInt32LE=$.writeInt32LE,t.writeInt32BE=$.writeInt32BE,t.writeFloatLE=$.writeFloatLE,t.writeFloatBE=$.writeFloatBE,t.writeDoubleLE=$.writeDoubleLE,t.writeDoubleBE=$.writeDoubleBE,t.fill=$.fill,t.inspect=$.inspect,t.toArrayBuffer=$.toArrayBuffer,t};var X=/[^+\/0-9A-z\-]/g},{"base64-js":34,ieee754:35,"is-array":36}],34:[function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function e(t){var e=t.charCodeAt(0);return e===s||e===f?62:e===a||e===l?63:u>e?-1:u+10>e?e-u+26+26:h+26>e?e-h:c+26>e?e-c+26:void 0}function r(t){function r(t){c[f++]=t}var n,i,s,a,u,c;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=t.length;u="="===t.charAt(h-2)?2:"="===t.charAt(h-1)?1:0,c=new o(3*t.length/4-u),s=u>0?t.length-4:t.length;var f=0;for(n=0,i=0;s>n;n+=4,i+=3)a=e(t.charAt(n))<<18|e(t.charAt(n+1))<<12|e(t.charAt(n+2))<<6|e(t.charAt(n+3)),r((16711680&a)>>16),r((65280&a)>>8),r(255&a);return 2===u?(a=e(t.charAt(n))<<2|e(t.charAt(n+1))>>4,r(255&a)):1===u&&(a=e(t.charAt(n))<<10|e(t.charAt(n+1))<<4|e(t.charAt(n+2))>>2,r(a>>8&255),r(255&a)),c}function i(t){function e(t){return n.charAt(t)}function r(t){return e(t>>18&63)+e(t>>12&63)+e(t>>6&63)+e(63&t)}var i,o,s,a=t.length%3,u="";for(i=0,s=t.length-a;s>i;i+=3)o=(t[i]<<16)+(t[i+1]<<8)+t[i+2],u+=r(o);switch(a){case 1:o=t[t.length-1],u+=e(o>>2),u+=e(o<<4&63),u+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],u+=e(o>>10),u+=e(o>>4&63),u+=e(o<<2&63),u+="="}return u}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="+".charCodeAt(0),a="/".charCodeAt(0),u="0".charCodeAt(0),c="a".charCodeAt(0),h="A".charCodeAt(0),f="-".charCodeAt(0),l="_".charCodeAt(0);t.toByteArray=r,t.fromByteArray=i}("undefined"==typeof r?this.base64js={}:r)},{}],35:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,h=-7,f=r?i-1:0,l=r?-1:1,p=t[e+f];for(f+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+f],f+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return s?0/0:(p?-1:1)*(1/0);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,h=(1<<c)-1,f=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+f>=1?l/u:l*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*m}},{}],36:[function(t,e,r){var n=Array.isArray,i=Object.prototype.toString;e.exports=n||function(t){return!!t&&"[object Array]"==i.call(t)}},{}],37:[function(t,e,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function s(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!o(t)||0>t||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,r,n,o,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[t],a(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),u=1;n>u;u++)o[u-1]=arguments[u];r.apply(this,o)}else if(s(r)){for(n=arguments.length,o=new Array(n-1),u=1;n>u;u++)o[u-1]=arguments[u];for(c=r.slice(),n=c.length,u=0;n>u;u++)c[u].apply(this,o)}return!0},n.prototype.addListener=function(t,e){var r;if(!i(e))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?s(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,s(this._events[t])&&!this._events[t].warned){var r;r=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())}return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function r(){this.removeListener(t,r),n||(n=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var n=!1;return r.listener=e,this.on(t,r),this},n.prototype.removeListener=function(t,e){var r,n,o,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],o=r.length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(s(r)){for(a=o;a-->0;)if(r[a]===e||r[a].listener&&r[a].listener===e){n=a;break}if(0>n)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],i(r))this.removeListener(t,r);else for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[];
|
||
|
||
},n.listenerCount=function(t,e){var r;return r=t._events&&t._events[e]?i(t._events[e])?1:t._events[e].length:0}},{}],38:[function(t,e,r){var n=e.exports,i=(t("events").EventEmitter,t("./lib/request")),o=t("url");n.request=function(t,e){"string"==typeof t&&(t=o.parse(t)),t||(t={}),t.host||t.port||(t.port=parseInt(window.location.port,10)),!t.host&&t.hostname&&(t.host=t.hostname),t.protocol||(t.protocol=t.scheme?t.scheme+":":window.location.protocol),t.host||(t.host=window.location.hostname||window.location.host),/:/.test(t.host)&&(t.port||(t.port=t.host.split(":")[1]),t.host=t.host.split(":")[0]),t.port||(t.port="https:"==t.protocol?443:80);var r=new i(new s,t);return e&&r.on("response",e),r},n.get=function(t,e){t.method="GET";var r=n.request(t,e);return r.end(),r},n.Agent=function(){},n.Agent.defaultMaxSockets=4;var s=function(){if("undefined"==typeof window)throw new Error("no window object present");if(window.XMLHttpRequest)return window.XMLHttpRequest;if(window.ActiveXObject){for(var t=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],e=0;e<t.length;e++)try{var r=new window.ActiveXObject(t[e]);return function(){if(r){var n=r;return r=null,n}return new window.ActiveXObject(t[e])}}catch(n){}throw new Error("ajax not supported in this browser")}throw new Error("ajax not supported in this browser")}();n.STATUS_CODES={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Time-out",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Request Entity Too Large",414:"Request-URI Too Large",415:"Unsupported Media Type",416:"Requested Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Time-out",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{"./lib/request":39,events:37,url:62}],39:[function(t,e,r){var n=t("stream"),i=t("./response"),o=t("Base64"),s=t("inherits"),a=e.exports=function(t,e){var r=this;r.writable=!0,r.xhr=t,r.body=[],r.uri=(e.protocol||"http:")+"//"+e.host+(e.port?":"+e.port:"")+(e.path||"/"),"undefined"==typeof e.withCredentials&&(e.withCredentials=!0);try{t.withCredentials=e.withCredentials}catch(n){}if(e.responseType)try{t.responseType=e.responseType}catch(n){}if(t.open(e.method||"GET",r.uri,!0),t.onerror=function(t){r.emit("error",new Error("Network error"))},r._headers={},e.headers)for(var s=u(e.headers),a=0;a<s.length;a++){var c=s[a];if(r.isSafeRequestHeader(c)){var h=e.headers[c];r.setHeader(c,h)}}e.auth&&this.setHeader("Authorization","Basic "+o.btoa(e.auth));var f=new i;f.on("close",function(){r.emit("close")}),f.on("ready",function(){r.emit("response",f)}),f.on("error",function(t){r.emit("error",t)}),t.onreadystatechange=function(){t.__aborted||f.handle(t)}};s(a,n),a.prototype.setHeader=function(t,e){this._headers[t.toLowerCase()]=e},a.prototype.getHeader=function(t){return this._headers[t.toLowerCase()]},a.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},a.prototype.write=function(t){this.body.push(t)},a.prototype.destroy=function(t){this.xhr.__aborted=!0,this.xhr.abort(),this.emit("close")},a.prototype.end=function(t){void 0!==t&&this.body.push(t);for(var e=u(this._headers),r=0;r<e.length;r++){var n=e[r],i=this._headers[n];if(c(i))for(var o=0;o<i.length;o++)this.xhr.setRequestHeader(n,i[o]);else this.xhr.setRequestHeader(n,i)}if(0===this.body.length)this.xhr.send("");else if("string"==typeof this.body[0])this.xhr.send(this.body.join(""));else if(c(this.body[0])){for(var s=[],r=0;r<this.body.length;r++)s.push.apply(s,this.body[r]);this.xhr.send(s)}else if(/Array/.test(Object.prototype.toString.call(this.body[0]))){for(var a=0,r=0;r<this.body.length;r++)a+=this.body[r].length;for(var s=new this.body[0].constructor(a),h=0,r=0;r<this.body.length;r++)for(var l=this.body[r],o=0;o<l.length;o++)s[h++]=l[o];this.xhr.send(s)}else if(f(this.body[0]))this.xhr.send(this.body[0]);else{for(var s="",r=0;r<this.body.length;r++)s+=this.body[r].toString();this.xhr.send(s)}},a.unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","content-transfer-encoding","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"],a.prototype.isSafeRequestHeader=function(t){return t?-1===h(a.unsafeHeaders,t.toLowerCase()):!1};var u=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},c=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},h=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},f=function(t){return"undefined"!=typeof Blob&&t instanceof Blob?!0:"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?!0:"undefined"!=typeof FormData&&t instanceof FormData?!0:void 0}},{"./response":40,Base64:41,inherits:43,stream:60}],40:[function(t,e,r){function n(t){for(var e=t.getAllResponseHeaders().split(/\r?\n/),r={},n=0;n<e.length;n++){var i=e[n];if(""!==i){var o=i.match(/^([^:]+):\s*(.*)/);if(o){var s=o[1].toLowerCase(),a=o[2];void 0!==r[s]?u(r[s])?r[s].push(a):r[s]=[r[s],a]:r[s]=a}else r[i]=!0}}return r}var i=t("stream"),o=t("util"),s=e.exports=function(t){this.offset=0,this.readable=!0};o.inherits(s,i);var a={streaming:!0,status2:!0};s.prototype.getResponse=function(t){var e=String(t.responseType).toLowerCase();return"blob"===e?t.responseBlob||t.response:"arraybuffer"===e?t.response:t.responseText},s.prototype.getHeader=function(t){return this.headers[t.toLowerCase()]},s.prototype.handle=function(t){if(2===t.readyState&&a.status2){try{this.statusCode=t.status,this.headers=n(t)}catch(e){a.status2=!1}a.status2&&this.emit("ready")}else if(a.streaming&&3===t.readyState){try{this.statusCode||(this.statusCode=t.status,this.headers=n(t),this.emit("ready"))}catch(e){}try{this._emitData(t)}catch(e){a.streaming=!1}}else 4===t.readyState&&(this.statusCode||(this.statusCode=t.status,this.emit("ready")),this._emitData(t),t.error?this.emit("error",this.getResponse(t)):this.emit("end"),this.emit("close"))},s.prototype._emitData=function(t){var e=this.getResponse(t);return e.toString().match(/ArrayBuffer/)?(this.emit("data",new Uint8Array(e,this.offset)),void(this.offset=e.byteLength)):void(e.length>this.offset&&(this.emit("data",e.slice(this.offset)),this.offset=e.length))};var u=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{stream:60,util:64}],41:[function(t,e,r){!function(){function t(t){this.message=t}var e="undefined"!=typeof r?r:this,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var r,i,o=0,s=n,a="";e.charAt(0|o)||(s="=",o%1);a+=s.charAt(63&r>>8-o%1*8)){if(i=e.charCodeAt(o+=.75),i>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");r=r<<8|i}return a}),e.atob||(e.atob=function(e){if(e=e.replace(/=+$/,""),e.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,s=0,a="";i=e.charAt(s++);~i&&(r=o%4?64*r+i:i,o++%4)?a+=String.fromCharCode(255&r>>(-2*o&6)):0)i=n.indexOf(i);return a})}()},{}],42:[function(t,e,r){var n=t("http"),i=e.exports;for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);i.request=function(t,e){return t||(t={}),t.scheme="https",n.request.call(this,t,e)}},{http:38}],43:[function(t,e,r){e.exports="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],44:[function(t,e,r){e.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},{}],45:[function(t,e,r){!function(t){function n(t){throw RangeError(N[t])}function i(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function o(t,e){var r=t.split("@"),n="";r.length>1&&(n=r[0]+"@",t=r[1]),t=t.replace(k,".");var o=t.split("."),s=i(o,e).join(".");return n+s}function s(t){for(var e,r,n=[],i=0,o=t.length;o>i;)e=t.charCodeAt(i++),e>=55296&&56319>=e&&o>i?(r=t.charCodeAt(i++),56320==(64512&r)?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--)):n.push(e);return n}function a(t){return i(t,function(t){var e="";return t>65535&&(t-=65536,e+=C(t>>>10&1023|55296),t=56320|1023&t),e+=C(t)}).join("")}function u(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:_}function c(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function h(t,e,r){var n=0;for(t=r?P(t/A):t>>1,t+=P(t/e);t>L*x>>1;n+=_)t=P(t/L);return P(n+(L+1)*t/(t+S))}function f(t){var e,r,i,o,s,c,f,l,p,d,m=[],g=t.length,y=0,v=O,b=I;for(r=t.lastIndexOf(B),0>r&&(r=0),i=0;r>i;++i)t.charCodeAt(i)>=128&&n("not-basic"),m.push(t.charCodeAt(i));for(o=r>0?r+1:0;g>o;){for(s=y,c=1,f=_;o>=g&&n("invalid-input"),l=u(t.charCodeAt(o++)),(l>=_||l>P((w-y)/c))&&n("overflow"),y+=l*c,p=b>=f?E:f>=b+x?x:f-b,!(p>l);f+=_)d=_-p,c>P(w/d)&&n("overflow"),c*=d;e=m.length+1,b=h(y-s,e,0==s),P(y/e)>w-v&&n("overflow"),v+=P(y/e),y%=e,m.splice(y++,0,v)}return a(m)}function l(t){var e,r,i,o,a,u,f,l,p,d,m,g,y,v,b,S=[];for(t=s(t),g=t.length,e=O,r=0,a=I,u=0;g>u;++u)m=t[u],128>m&&S.push(C(m));for(i=o=S.length,o&&S.push(B);g>i;){for(f=w,u=0;g>u;++u)m=t[u],m>=e&&f>m&&(f=m);for(y=i+1,f-e>P((w-r)/y)&&n("overflow"),r+=(f-e)*y,e=f,u=0;g>u;++u)if(m=t[u],e>m&&++r>w&&n("overflow"),m==e){for(l=r,p=_;d=a>=p?E:p>=a+x?x:p-a,!(d>l);p+=_)b=l-d,v=_-d,S.push(C(c(d+b%v,0))),l=P(b/v);S.push(C(c(l,0))),a=h(r,y,i==o),r=0,++i}++r,++e}return S.join("")}function p(t){return o(t,function(t){return T.test(t)?f(t.slice(4).toLowerCase()):t})}function d(t){return o(t,function(t){return R.test(t)?"xn--"+l(t):t})}var m="object"==typeof r&&r&&!r.nodeType&&r,g="object"==typeof e&&e&&!e.nodeType&&e,y="object"==typeof global&&global;(y.global===y||y.window===y||y.self===y)&&(t=y);var v,b,w=2147483647,_=36,E=1,x=26,S=38,A=700,I=72,O=128,B="-",T=/^xn--/,R=/[^\x20-\x7E]/,k=/[\x2E\u3002\uFF0E\uFF61]/g,N={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},L=_-E,P=Math.floor,C=String.fromCharCode;if(v={version:"1.3.2",ucs2:{decode:s,encode:a},decode:f,encode:l,toASCII:d,toUnicode:p},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return v});else if(m&&g)if(e.exports==m)g.exports=v;else for(b in v)v.hasOwnProperty(b)&&(m[b]=v[b]);else t.punycode=v}(this)},{}],46:[function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,o){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var h=0;c>h;++h){var f,l,p,d,m=t[h].replace(a,"%20"),g=m.indexOf(r);g>=0?(f=m.substr(0,g),l=m.substr(g+1)):(f=m,l=""),p=decodeURIComponent(f),d=decodeURIComponent(l),n(s,p)?i(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],47:[function(t,e,r){"use strict";function n(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?n(s(t),function(s){var a=encodeURIComponent(i(s))+r;return o(t[s])?n(t[s],function(t){return a+encodeURIComponent(i(t))}).join(e):a+encodeURIComponent(i(t[s]))}).join(e):a?encodeURIComponent(i(a))+r+encodeURIComponent(i(t)):""};var o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],48:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":46,"./encode":47}],49:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":50}],50:[function(t,e,r){function n(t){return this instanceof n?(u.call(this,t),c.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(t)}function i(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function o(t,e){for(var r=0,n=t.length;n>r;r++)e(t[r],r)}e.exports=n;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=t("core-util-is");a.inherits=t("inherits");var u=t("./_stream_readable"),c=t("./_stream_writable");a.inherits(n,u),o(s(c.prototype),function(t){n.prototype[t]||(n.prototype[t]=c.prototype[t])})},{"./_stream_readable":52,"./_stream_writable":54,"core-util-is":55,inherits:43}],51:[function(t,e,r){function n(t){return this instanceof n?void i.call(this,t):new n(t)}e.exports=n;var i=t("./_stream_transform"),o=t("core-util-is");o.inherits=t("inherits"),o.inherits(n,i),n.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":53,"core-util-is":55,inherits:43}],52:[function(t,e,r){function n(e,r){var n=t("./_stream_duplex");e=e||{};var i=e.highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,r instanceof n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(B||(B=t("string_decoder/").StringDecoder),this.decoder=new B(e.encoding),this.encoding=e.encoding)}function i(e){t("./_stream_duplex");return this instanceof i?(this._readableState=new n(e,this),this.readable=!0,void I.call(this)):new i(e)}function o(t,e,r,n,i){var o=c(e,r);if(o)t.emit("error",o);else if(O.isNullOrUndefined(r))e.reading=!1,e.ended||h(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!i){var a=new Error("stream.push() after EOF");t.emit("error",a)}else if(e.endEmitted&&i){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else!e.decoder||i||n||(r=e.decoder.write(r)),i||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&f(t)),p(t,e);else i||(e.reading=!1);return s(e)}function s(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}function a(t){if(t>=R)t=R;else{t--;for(var e=1;32>e;e<<=1)t|=t>>e;t++}return t}function u(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||O.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:0>=t?0:(t>e.highWaterMark&&(e.highWaterMark=a(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function c(t,e){var r=null;return O.isBuffer(e)||O.isString(e)||O.isNullOrUndefined(e)||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function h(t,e){if(e.decoder&&!e.ended){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,f(t)}function f(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(T("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?process.nextTick(function(){l(t)}):l(t))}function l(t){T("emit readable"),t.emit("readable"),v(t)}function p(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(function(){d(t,e)}))}function d(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(T("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function m(t){return function(){var e=t._readableState;T("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&A.listenerCount(t,"data")&&(e.flowing=!0,v(t))}}function g(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(function(){y(t,e)}))}function y(t,e){e.resumeScheduled=!1,t.emit("resume"),v(t),e.flowing&&!e.reading&&t.read(0)}function v(t){var e=t._readableState;if(T("flow",e.flowing),e.flowing)do var r=t.read();while(null!==r&&e.flowing)}function b(t,e){var r,n=e.buffer,i=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===n.length)return null;if(0===i)r=null;else if(s)r=n.shift();else if(!t||t>=i)r=o?n.join(""):S.concat(n,i),n.length=0;else if(t<n[0].length){var a=n[0];r=a.slice(0,t),n[0]=a.slice(t)}else if(t===n[0].length)r=n.shift();else{r=o?"":new S(t);for(var u=0,c=0,h=n.length;h>c&&t>u;c++){var a=n[0],f=Math.min(t-u,a.length);o?r+=a.slice(0,f):a.copy(r,u,0,f),f<a.length?n[0]=a.slice(f):n.shift(),u+=f}}return r}function w(t){var e=t._readableState;if(e.length>0)throw new Error("endReadable called on non-empty stream");e.endEmitted||(e.ended=!0,process.nextTick(function(){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function _(t,e){for(var r=0,n=t.length;n>r;r++)e(t[r],r)}function E(t,e){for(var r=0,n=t.length;n>r;r++)if(t[r]===e)return r;return-1}e.exports=i;var x=t("isarray"),S=t("buffer").Buffer;i.ReadableState=n;var A=t("events").EventEmitter;A.listenerCount||(A.listenerCount=function(t,e){return t.listeners(e).length});var I=t("stream"),O=t("core-util-is");O.inherits=t("inherits");var B,T=t("util");T=T&&T.debuglog?T.debuglog("stream"):function(){},O.inherits(i,I),i.prototype.push=function(t,e){var r=this._readableState;return O.isString(t)&&!r.objectMode&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=new S(t,e),e="")),o(this,r,t,e,!1)},i.prototype.unshift=function(t){var e=this._readableState;return o(this,e,t,"",!0)},i.prototype.setEncoding=function(e){return B||(B=t("string_decoder/").StringDecoder),this._readableState.decoder=new B(e),this._readableState.encoding=e,this};var R=8388608;i.prototype.read=function(t){T("read",t);var e=this._readableState,r=t;if((!O.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return T("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?w(this):f(this),null;if(t=u(t,e),0===t&&e.ended)return 0===e.length&&w(this),null;var n=e.needReadable;T("need readable",n),(0===e.length||e.length-t<e.highWaterMark)&&(n=!0,T("length less than watermark",n)),(e.ended||e.reading)&&(n=!1,T("reading or ended",n)),n&&(T("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),n&&!e.reading&&(t=u(r,e));var i;return i=t>0?b(t,e):null,O.isNull(i)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),r!==t&&e.ended&&0===e.length&&w(this),O.isNull(i)||this.emit("data",i),i},i.prototype._read=function(t){this.emit("error",new Error("not implemented"))},i.prototype.pipe=function(t,e){function r(t){T("onunpipe"),t===h&&i()}function n(){T("onend"),t.end()}function i(){T("cleanup"),t.removeListener("close",a),t.removeListener("finish",u),t.removeListener("drain",d),t.removeListener("error",s),t.removeListener("unpipe",r),h.removeListener("end",n),h.removeListener("end",i),h.removeListener("data",o),!f.awaitDrain||t._writableState&&!t._writableState.needDrain||d()}function o(e){T("ondata");var r=t.write(e);!1===r&&(T("false write response, pause",h._readableState.awaitDrain),h._readableState.awaitDrain++,h.pause())}function s(e){T("onerror",e),c(),t.removeListener("error",s),0===A.listenerCount(t,"error")&&t.emit("error",e)}function a(){t.removeListener("finish",u),c()}function u(){T("onfinish"),t.removeListener("close",a),c()}function c(){T("unpipe"),h.unpipe(t)}var h=this,f=this._readableState;switch(f.pipesCount){case 0:f.pipes=t;break;case 1:f.pipes=[f.pipes,t];break;default:f.pipes.push(t)}f.pipesCount+=1,T("pipe count=%d opts=%j",f.pipesCount,e);var l=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,p=l?n:i;f.endEmitted?process.nextTick(p):h.once("end",p),t.on("unpipe",r);var d=m(h);return t.on("drain",d),h.on("data",o),t._events&&t._events.error?x(t._events.error)?t._events.error.unshift(s):t._events.error=[s,t._events.error]:t.on("error",s),t.once("close",a),t.once("finish",u),t.emit("pipe",h),f.flowing||(T("pipe resume"),h.resume()),t},i.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var r=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;n>i;i++)r[i].emit("unpipe",this);return this}var i=E(e.pipes,t);return-1===i?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},i.prototype.on=function(t,e){var r=I.prototype.on.call(this,t,e);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var n=this._readableState;if(!n.readableListening)if(n.readableListening=!0,n.emittedReadable=!1,n.needReadable=!0,n.reading)n.length&&f(this,n);else{var i=this;process.nextTick(function(){T("readable nexttick read 0"),i.read(0)})}}return r},i.prototype.addListener=i.prototype.on,i.prototype.resume=function(){var t=this._readableState;return t.flowing||(T("resume"),t.flowing=!0,t.reading||(T("resume read 0"),this.read(0)),g(this,t)),this},i.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this},i.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;t.on("end",function(){if(T("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){if(T("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length)){var o=n.push(i);o||(r=!0,t.pause())}});for(var i in t)O.isFunction(t[i])&&O.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));var o=["error","close","destroy","pause","resume"];return _(o,function(e){t.on(e,n.emit.bind(n,e))}),n._read=function(e){T("wrapped _read",e),r&&(r=!1,t.resume())},n},i._fromList=b},{"./_stream_duplex":50,buffer:33,"core-util-is":55,events:37,inherits:43,isarray:44,stream:60,"string_decoder/":61,util:32}],53:[function(t,e,r){function n(t,e){this.afterTransform=function(t,r){return i(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function i(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,u.isNullOrUndefined(r)||t.push(r),i&&i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);a.call(this,t),this._transformState=new n(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){u.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var r=t._writableState,n=t._transformState;if(r.length)throw new Error("calling transform done when ws.length != 0");if(n.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}e.exports=o;var a=t("./_stream_duplex"),u=t("core-util-is");u.inherits=t("inherits"),u.inherits(o,a),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,a.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;u.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},{"./_stream_duplex":50,"core-util-is":55,inherits:43}],54:[function(t,e,r){function n(t,e,r){this.chunk=t,this.encoding=e,this.callback=r}function i(e,r){var n=t("./_stream_duplex");e=e||{};var i=e.highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:o,this.objectMode=!!e.objectMode,r instanceof n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=e.decodeStrings===!1;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){p(r,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function o(e){var r=t("./_stream_duplex");return this instanceof o||this instanceof r?(this._writableState=new i(e,this),this.writable=!0,void x.call(this)):new o(e)}function s(t,e,r){var n=new Error("write after end");t.emit("error",n),process.nextTick(function(){r(n)})}function a(t,e,r,n){var i=!0;if(!(E.isBuffer(r)||E.isString(r)||E.isNullOrUndefined(r)||e.objectMode)){var o=new TypeError("Invalid non-string/buffer chunk");t.emit("error",o),process.nextTick(function(){n(o)}),i=!1}return i}function u(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&E.isString(e)&&(e=new _(e,r)),e}function c(t,e,r,i,o){r=u(e,r,i),E.isBuffer(r)&&(i="buffer");var s=e.objectMode?1:r.length;e.length+=s;var a=e.length<e.highWaterMark;return a||(e.needDrain=!0),e.writing||e.corked?e.buffer.push(new n(r,i,o)):h(t,e,!1,s,r,i,o),a}function h(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function f(t,e,r,n,i){r?process.nextTick(function(){e.pendingcb--,i(n)}):(e.pendingcb--,i(n)),t._writableState.errorEmitted=!0,t.emit("error",n)}function l(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function p(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(l(r),e)f(t,r,n,e,i);else{var o=y(t,r);o||r.corked||r.bufferProcessing||!r.buffer.length||g(t,r),n?process.nextTick(function(){d(t,r,o,i)}):d(t,r,o,i)}}function d(t,e,r,n){r||m(t,e),e.pendingcb--,n(),b(t,e)}function m(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function g(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var r=[],n=0;n<e.buffer.length;n++)r.push(e.buffer[n].callback);e.pendingcb++,h(t,e,!0,e.length,e.buffer,"",function(t){for(var n=0;n<r.length;n++)e.pendingcb--,r[n](t)}),e.buffer=[]}else{for(var n=0;n<e.buffer.length;n++){var i=e.buffer[n],o=i.chunk,s=i.encoding,a=i.callback,u=e.objectMode?1:o.length;if(h(t,e,!1,u,o,s,a),e.writing){n++;break}}n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}e.bufferProcessing=!1}function y(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function v(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function b(t,e){var r=y(t,e);return r&&(0===e.pendingcb?(v(t,e),e.finished=!0,t.emit("finish")):v(t,e)),r}function w(t,e,r){e.ending=!0,b(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0}e.exports=o;var _=t("buffer").Buffer;o.WritableState=i;var E=t("core-util-is");E.inherits=t("inherits");var x=t("stream");E.inherits(o,x),o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},o.prototype.write=function(t,e,r){var n=this._writableState,i=!1;return E.isFunction(e)&&(r=e,e=null),E.isBuffer(t)?e="buffer":e||(e=n.defaultEncoding),E.isFunction(r)||(r=function(){}),n.ended?s(this,n,r):a(this,n,t,r)&&(n.pendingcb++,i=c(this,n,t,e,r)),i},o.prototype.cork=function(){var t=this._writableState;t.corked++},o.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||g(this,t))},o.prototype._write=function(t,e,r){r(new Error("not implemented"))},o.prototype._writev=null,o.prototype.end=function(t,e,r){var n=this._writableState;E.isFunction(t)?(r=t,t=null,e=null):E.isFunction(e)&&(r=e,e=null),E.isNullOrUndefined(t)||this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||w(this,n,r)}},{"./_stream_duplex":50,buffer:33,"core-util-is":55,inherits:43,stream:60}],55:[function(t,e,r){function n(t){return Array.isArray(t)}function i(t){return"boolean"==typeof t}function o(t){return null===t}function s(t){return null==t}function a(t){return"number"==typeof t}function u(t){return"string"==typeof t}function c(t){return"symbol"==typeof t}function h(t){return void 0===t}function f(t){return l(t)&&"[object RegExp]"===v(t)}function l(t){return"object"==typeof t&&null!==t}function p(t){return l(t)&&"[object Date]"===v(t)}function d(t){return l(t)&&("[object Error]"===v(t)||t instanceof Error)}function m(t){return"function"==typeof t}function g(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function y(t){return Buffer.isBuffer(t)}function v(t){return Object.prototype.toString.call(t)}r.isArray=n,r.isBoolean=i,r.isNull=o,r.isNullOrUndefined=s,r.isNumber=a,r.isString=u,r.isSymbol=c,r.isUndefined=h,r.isRegExp=f,r.isObject=l,r.isDate=p,r.isError=d,r.isFunction=m,r.isPrimitive=g,r.isBuffer=y},{}],56:[function(t,e,r){e.exports=t("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":51}],57:[function(t,e,r){r=e.exports=t("./lib/_stream_readable.js"),r.Stream=t("stream"),r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":50,"./lib/_stream_passthrough.js":51,"./lib/_stream_readable.js":52,"./lib/_stream_transform.js":53,"./lib/_stream_writable.js":54,stream:60}],58:[function(t,e,r){e.exports=t("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":53}],59:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":54}],60:[function(t,e,r){function n(){i.call(this)}e.exports=n;var i=t("events").EventEmitter,o=t("inherits");o(n,i),n.Readable=t("readable-stream/readable.js"),n.Writable=t("readable-stream/writable.js"),n.Duplex=t("readable-stream/duplex.js"),n.Transform=t("readable-stream/transform.js"),n.PassThrough=t("readable-stream/passthrough.js"),n.Stream=n,n.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&c.pause&&c.pause()}function n(){c.readable&&c.resume&&c.resume()}function o(){h||(h=!0,t.end())}function s(){h||(h=!0,"function"==typeof t.destroy&&t.destroy())}function a(t){if(u(),0===i.listenerCount(this,"error"))throw t}function u(){c.removeListener("data",r),t.removeListener("drain",n),
|
||
c.removeListener("end",o),c.removeListener("close",s),c.removeListener("error",a),t.removeListener("error",a),c.removeListener("end",u),c.removeListener("close",u),t.removeListener("close",u)}var c=this;c.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(c.on("end",o),c.on("close",s));var h=!1;return c.on("error",a),t.on("error",a),c.on("end",u),c.on("close",u),t.on("close",u),t.emit("pipe",c),t}},{events:37,inherits:43,"readable-stream/duplex.js":49,"readable-stream/passthrough.js":56,"readable-stream/readable.js":57,"readable-stream/transform.js":58,"readable-stream/writable.js":59}],61:[function(t,e,r){function n(t){if(t&&!u(t))throw new Error("Unknown encoding: "+t)}function i(t){return t.toString(this.encoding)}function o(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function s(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}var a=t("buffer").Buffer,u=a.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},c=r.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),n(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=s;break;default:return void(this.write=i)}this.charBuffer=new a(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";t=t.slice(r,t.length),e=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var n=e.charCodeAt(e.length-1);if(!(n>=55296&&56319>=n)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),e+=t.toString(this.encoding,0,i);var i=e.length-1,n=e.charCodeAt(i);if(n>=55296&&56319>=n){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},c.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(2>=e&&r>>4==14){this.charLength=3;break}if(3>=e&&r>>3==30){this.charLength=4;break}}this.charReceived=e},c.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},{buffer:33}],62:[function(t,e,r){function n(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(t,e,r){if(t&&c(t)&&t instanceof n)return t;var i=new n;return i.parse(t,e,r),i}function o(t){return u(t)&&(t=i(t)),t instanceof n?t.format():n.prototype.format.call(t)}function s(t,e){return i(t,!1,!0).resolve(e)}function a(t,e){return t?i(t,!1,!0).resolveObject(e):e}function u(t){return"string"==typeof t}function c(t){return"object"==typeof t&&null!==t}function h(t){return null===t}function f(t){return null==t}var l=t("punycode");r.parse=i,r.resolve=s,r.resolveObject=a,r.format=o,r.Url=n;var p=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,m=["<",">",'"',"`"," ","\r","\n"," "],g=["{","}","|","\\","^","`"].concat(m),y=["'"].concat(g),v=["%","/","?",";","#"].concat(y),b=["/","?","#"],w=255,_=/^[a-z0-9A-Z_-]{0,63}$/,E=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},S={javascript:!0,"javascript:":!0},A={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},I=t("querystring");n.prototype.parse=function(t,e,r){if(!u(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t;n=n.trim();var i=p.exec(n);if(i){i=i[0];var o=i.toLowerCase();this.protocol=o,n=n.substr(i.length)}if(r||i||n.match(/^\/\/[^@\/]+@[^@\/]+/)){var s="//"===n.substr(0,2);!s||i&&S[i]||(n=n.substr(2),this.slashes=!0)}if(!S[i]&&(s||i&&!A[i])){for(var a=-1,c=0;c<b.length;c++){var h=n.indexOf(b[c]);-1!==h&&(-1===a||a>h)&&(a=h)}var f,d;d=-1===a?n.lastIndexOf("@"):n.lastIndexOf("@",a),-1!==d&&(f=n.slice(0,d),n=n.slice(d+1),this.auth=decodeURIComponent(f)),a=-1;for(var c=0;c<v.length;c++){var h=n.indexOf(v[c]);-1!==h&&(-1===a||a>h)&&(a=h)}-1===a&&(a=n.length),this.host=n.slice(0,a),n=n.slice(a),this.parseHost(),this.hostname=this.hostname||"";var m="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!m)for(var g=this.hostname.split(/\./),c=0,O=g.length;O>c;c++){var B=g[c];if(B&&!B.match(_)){for(var T="",R=0,k=B.length;k>R;R++)T+=B.charCodeAt(R)>127?"x":B[R];if(!T.match(_)){var N=g.slice(0,c),L=g.slice(c+1),P=B.match(E);P&&(N.push(P[1]),L.unshift(P[2])),L.length&&(n="/"+L.join(".")+n),this.hostname=N.join(".");break}}}if(this.hostname=this.hostname.length>w?"":this.hostname.toLowerCase(),!m){for(var C=this.hostname.split("."),D=[],c=0;c<C.length;++c){var F=C[c];D.push(F.match(/[^A-Za-z0-9_-]/)?"xn--"+l.encode(F):F)}this.hostname=D.join(".")}var j=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+j,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==n[0]&&(n="/"+n))}if(!x[o])for(var c=0,O=y.length;O>c;c++){var M=y[c],q=encodeURIComponent(M);q===M&&(q=escape(M)),n=n.split(M).join(q)}var H=n.indexOf("#");-1!==H&&(this.hash=n.substr(H),n=n.slice(0,H));var z=n.indexOf("?");if(-1!==z?(this.search=n.substr(z),this.query=n.substr(z+1),e&&(this.query=I.parse(this.query)),n=n.slice(0,z)):e&&(this.search="",this.query={}),n&&(this.pathname=n),A[o]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var j=this.pathname||"",F=this.search||"";this.path=j+F}return this.href=this.format(),this},n.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&c(this.query)&&Object.keys(this.query).length&&(o=I.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||A[e])&&i!==!1?(i="//"+(i||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):i||(i=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),r=r.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),s=s.replace("#","%23"),e+i+r+s+n},n.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format()},n.prototype.resolveObject=function(t){if(u(t)){var e=new n;e.parse(t,!1,!0),t=e}var r=new n;if(Object.keys(this).forEach(function(t){r[t]=this[t]},this),r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol)return Object.keys(t).forEach(function(e){"protocol"!==e&&(r[e]=t[e])}),A[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r;if(t.protocol&&t.protocol!==r.protocol){if(!A[t.protocol])return Object.keys(t).forEach(function(e){r[e]=t[e]}),r.href=r.format(),r;if(r.protocol=t.protocol,t.host||S[t.protocol])r.pathname=t.pathname;else{for(var i=(t.pathname||"").split("/");i.length&&!(t.host=i.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==i[0]&&i.unshift(""),i.length<2&&i.unshift(""),r.pathname=i.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var o=r.pathname||"",s=r.search||"";r.path=o+s}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var a=r.pathname&&"/"===r.pathname.charAt(0),c=t.host||t.pathname&&"/"===t.pathname.charAt(0),l=c||a||r.host&&t.pathname,p=l,d=r.pathname&&r.pathname.split("/")||[],i=t.pathname&&t.pathname.split("/")||[],m=r.protocol&&!A[r.protocol];if(m&&(r.hostname="",r.port=null,r.host&&(""===d[0]?d[0]=r.host:d.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===i[0]?i[0]=t.host:i.unshift(t.host)),t.host=null),l=l&&(""===i[0]||""===d[0])),c)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,d=i;else if(i.length)d||(d=[]),d.pop(),d=d.concat(i),r.search=t.search,r.query=t.query;else if(!f(t.search)){if(m){r.hostname=r.host=d.shift();var g=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;g&&(r.auth=g.shift(),r.host=r.hostname=g.shift())}return r.search=t.search,r.query=t.query,h(r.pathname)&&h(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!d.length)return r.pathname=null,r.path=r.search?"/"+r.search:null,r.href=r.format(),r;for(var y=d.slice(-1)[0],v=(r.host||t.host)&&("."===y||".."===y)||""===y,b=0,w=d.length;w>=0;w--)y=d[w],"."==y?d.splice(w,1):".."===y?(d.splice(w,1),b++):b&&(d.splice(w,1),b--);if(!l&&!p)for(;b--;b)d.unshift("..");!l||""===d[0]||d[0]&&"/"===d[0].charAt(0)||d.unshift(""),v&&"/"!==d.join("/").substr(-1)&&d.push("");var _=""===d[0]||d[0]&&"/"===d[0].charAt(0);if(m){r.hostname=r.host=_?"":d.length?d.shift():"";var g=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;g&&(r.auth=g.shift(),r.host=r.hostname=g.shift())}return l=l||r.host&&d.length,l&&!_&&d.unshift(""),d.length?r.pathname=d.join("/"):(r.pathname=null,r.path=null),h(r.pathname)&&h(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var t=this.host,e=d.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{punycode:45,querystring:48}],63:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],64:[function(t,e,r){function n(t,e){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),a(n,t,n.depth)}function i(t,e){var r=n.styles[e];return r?"["+n.colors[r][0]+"m"+t+"["+n.colors[r][1]+"m":t}function o(t,e){return t}function s(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}function a(t,e,n){if(t.customInspect&&e&&A(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=a(t,i,n)),i}var o=u(t,e);if(o)return o;var d=Object.keys(e),m=s(d);if(t.showHidden&&(d=Object.getOwnPropertyNames(e)),S(e)&&(d.indexOf("message")>=0||d.indexOf("description")>=0))return c(e);if(0===d.length){if(A(e)){var g=e.name?": "+e.name:"";return t.stylize("[Function"+g+"]","special")}if(_(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(x(e))return t.stylize(Date.prototype.toString.call(e),"date");if(S(e))return c(e)}var y="",b=!1,w=["{","}"];if(p(e)&&(b=!0,w=["[","]"]),A(e)){var E=e.name?": "+e.name:"";y=" [Function"+E+"]"}if(_(e)&&(y=" "+RegExp.prototype.toString.call(e)),x(e)&&(y=" "+Date.prototype.toUTCString.call(e)),S(e)&&(y=" "+c(e)),0===d.length&&(!b||0==e.length))return w[0]+y+w[1];if(0>n)return _(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var I;return I=b?h(t,e,n,m,d):d.map(function(r){return f(t,e,n,m,r,b)}),t.seen.pop(),l(I,y,w)}function u(t,e){if(w(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return y(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):m(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i){for(var o=[],s=0,a=e.length;a>s;++s)o.push(R(e,String(s))?f(t,e,r,n,String(s),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}function f(t,e,r,n,i,o){var s,u,c;if(c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},c.get?u=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(u=t.stylize("[Setter]","special")),R(n,i)||(s="["+i+"]"),u||(t.seen.indexOf(c.value)<0?(u=m(r)?a(t,c.value,null):a(t,c.value,r-1),u.indexOf("\n")>-1&&(u=o?u.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+u.split("\n").map(function(t){return" "+t}).join("\n"))):u=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return u;s=JSON.stringify(""+i),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+u}function l(t,e,r){var n=0,i=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return null==t}function y(t){return"number"==typeof t}function v(t){return"string"==typeof t}function b(t){return"symbol"==typeof t}function w(t){return void 0===t}function _(t){return E(t)&&"[object RegExp]"===O(t)}function E(t){return"object"==typeof t&&null!==t}function x(t){return E(t)&&"[object Date]"===O(t)}function S(t){return E(t)&&("[object Error]"===O(t)||t instanceof Error)}function A(t){return"function"==typeof t}function I(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function O(t){return Object.prototype.toString.call(t)}function B(t){return 10>t?"0"+t.toString(10):t.toString(10)}function T(){var t=new Date,e=[B(t.getHours()),B(t.getMinutes()),B(t.getSeconds())].join(":");return[t.getDate(),P[t.getMonth()],e].join(" ")}function R(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var k=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(n(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,o=i.length,s=String(t).replace(k,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(e){return"[Circular]"}default:return t}}),a=i[r];o>r;a=i[++r])s+=m(a)||!E(a)?" "+a:" "+n(a);return s},r.deprecate=function(t,e){function n(){if(!i){if(process.throwDeprecation)throw new Error(e);process.traceDeprecation?console.trace(e):console.error(e),i=!0}return t.apply(this,arguments)}if(w(global.process))return function(){return r.deprecate(t,e).apply(this,arguments)};if(process.noDeprecation===!0)return t;var i=!1;return n};var N,L={};r.debuglog=function(t){if(w(N)&&(N=process.env.NODE_DEBUG||""),t=t.toUpperCase(),!L[t])if(new RegExp("\\b"+t+"\\b","i").test(N)){var e=process.pid;L[t]=function(){var n=r.format.apply(r,arguments);console.error("%s %d: %s",t,e,n)}}else L[t]=function(){};return L[t]},r.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=m,r.isNullOrUndefined=g,r.isNumber=y,r.isString=v,r.isSymbol=b,r.isUndefined=w,r.isRegExp=_,r.isObject=E,r.isDate=x,r.isError=S,r.isFunction=A,r.isPrimitive=I,r.isBuffer=t("./support/isBuffer");var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];r.log=function(){console.log("%s - %s",T(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!E(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}},{"./support/isBuffer":63,inherits:43}],65:[function(t,e,r){!function(t,n){"object"==typeof r?e.exports=r=n():"function"==typeof define&&define.amd?define([],n):t.CryptoJS=n()}(this,function(){var t=t||function(t,e){var r={},n=r.lib={},i=n.Base=function(){function t(){}return{extend:function(e){t.prototype=this;var r=new t;return e&&r.mixIn(e),r.hasOwnProperty("init")||(r.init=function(){r.$super.init.apply(this,arguments)}),r.init.prototype=r,r.$super=this,r},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),o=n.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:4*t.length},toString:function(t){return(t||a).stringify(this)},concat:function(t){var e=this.words,r=t.words,n=this.sigBytes,i=t.sigBytes;if(this.clamp(),n%4)for(var o=0;i>o;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[n+o>>>2]|=s<<24-(n+o)%4*8}else for(var o=0;i>o;o+=4)e[n+o>>>2]=r[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=i.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var r,n=[],i=function(e){var e=e,r=987654321,n=4294967295;return function(){r=36969*(65535&r)+(r>>16)&n,e=18e3*(65535&e)+(e>>16)&n;var i=(r<<16)+e&n;return i/=4294967296,i+=.5,i*(t.random()>.5?1:-1)}},s=0;e>s;s+=4){var a=i(4294967296*(r||t.random()));r=987654071*a(),n.push(4294967296*a()|0)}return new o.init(n,e)}}),s=r.enc={},a=s.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;r>i;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;e>n;n+=2)r[n>>>3]|=parseInt(t.substr(n,2),16)<<24-n%8*4;return new o.init(r,e/2)}},u=s.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,n=[],i=0;r>i;i++){var o=e[i>>>2]>>>24-i%4*8&255;n.push(String.fromCharCode(o))}return n.join("")},parse:function(t){for(var e=t.length,r=[],n=0;e>n;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;return new o.init(r,e)}},c=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(u.stringify(t)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(t){return u.parse(unescape(encodeURIComponent(t)))}},h=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=c.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r=this._data,n=r.words,i=r.sigBytes,s=this.blockSize,a=4*s,u=i/a;u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0);var c=u*s,h=t.min(4*c,i);if(c){for(var f=0;c>f;f+=s)this._doProcessBlock(n,f);var l=n.splice(0,c);r.sigBytes-=h}return new o.init(l,h)},clone:function(){var t=i.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),f=(n.Hasher=h.extend({cfg:i.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){t&&this._append(t);var e=this._doFinalize();return e},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new f.HMAC.init(t,r).finalize(e)}}}),r.algo={});return r}(Math);return t})},{}],66:[function(t,e,r){!function(n,i,o){"object"==typeof r?e.exports=r=i(t("./core"),t("./x64-core")):"function"==typeof define&&define.amd?define(["./core","./x64-core"],i):i(n.CryptoJS)}(this,function(t){return function(e){var r=t,n=r.lib,i=n.WordArray,o=n.Hasher,s=r.x64,a=s.Word,u=r.algo,c=[],h=[],f=[];!function(){for(var t=1,e=0,r=0;24>r;r++){c[t+5*e]=(r+1)*(r+2)/2%64;var n=e%5,i=(2*t+3*e)%5;t=n,e=i}for(var t=0;5>t;t++)for(var e=0;5>e;e++)h[t+5*e]=e+(2*t+3*e)%5*5;for(var o=1,s=0;24>s;s++){for(var u=0,l=0,p=0;7>p;p++){if(1&o){var d=(1<<p)-1;32>d?l^=1<<d:u^=1<<d-32}128&o?o=o<<1^113:o<<=1}f[s]=a.create(u,l)}}();var l=[];!function(){for(var t=0;25>t;t++)l[t]=a.create()}();var p=u.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;25>e;e++)t[e]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var r=this._state,n=this.blockSize/2,i=0;n>i;i++){var o=t[e+2*i],s=t[e+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8);var a=r[i];a.high^=s,a.low^=o}for(var u=0;24>u;u++){for(var p=0;5>p;p++){for(var d=0,m=0,g=0;5>g;g++){var a=r[p+5*g];d^=a.high,m^=a.low}var y=l[p];y.high=d,y.low=m}for(var p=0;5>p;p++)for(var v=l[(p+4)%5],b=l[(p+1)%5],w=b.high,_=b.low,d=v.high^(w<<1|_>>>31),m=v.low^(_<<1|w>>>31),g=0;5>g;g++){var a=r[p+5*g];a.high^=d,a.low^=m}for(var E=1;25>E;E++){var a=r[E],x=a.high,S=a.low,A=c[E];if(32>A)var d=x<<A|S>>>32-A,m=S<<A|x>>>32-A;else var d=S<<A-32|x>>>64-A,m=x<<A-32|S>>>64-A;var I=l[h[E]];I.high=d,I.low=m}var O=l[0],B=r[0];O.high=B.high,O.low=B.low;for(var p=0;5>p;p++)for(var g=0;5>g;g++){var E=p+5*g,a=r[E],T=l[E],R=l[(p+1)%5+5*g],k=l[(p+2)%5+5*g];a.high=T.high^~R.high&k.high,a.low=T.low^~R.low&k.low}var a=r[0],N=f[u];a.high^=N.high,a.low^=N.low}},_doFinalize:function(){var t=this._data,r=t.words,n=(8*this._nDataBytes,8*t.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(e.ceil((n+1)/o)*o>>>5)-1]|=128,t.sigBytes=4*r.length,this._process();for(var s=this._state,a=this.cfg.outputLength/8,u=a/8,c=[],h=0;u>h;h++){var f=s[h],l=f.high,p=f.low;l=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8),p=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8),c.push(p),c.push(l)}return new i.init(c,a)},clone:function(){for(var t=o.clone.call(this),e=t._state=this._state.slice(0),r=0;25>r;r++)e[r]=e[r].clone();return t}});r.SHA3=o._createHelper(p),r.HmacSHA3=o._createHmacHelper(p)}(Math),t.SHA3})},{"./core":65,"./x64-core":67}],67:[function(t,e,r){!function(n,i){"object"==typeof r?e.exports=r=i(t("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)}(this,function(t){return function(e){{var r=t,n=r.lib,i=n.Base,o=n.WordArray,s=r.x64={};s.Word=i.extend({init:function(t,e){this.high=t,this.low=e}}),s.WordArray=i.extend({init:function(t,r){t=this.words=t||[],this.sigBytes=r!=e?r:8*t.length},toX32:function(){for(var t=this.words,e=t.length,r=[],n=0;e>n;n++){var i=t[n];r.push(i.high),r.push(i.low)}return o.create(r,this.sigBytes)},clone:function(){for(var t=i.clone.call(this),e=t.words=this.words.slice(0),r=e.length,n=0;r>n;n++)e[n]=e[n].clone();return t}})}}(),t})},{"./core":65}],68:[function(t,e,r){var n=t("url"),i=t("child_process").spawn,o=t("fs");r.XMLHttpRequest=function(){"use strict";var e,r,s=this,a=t("http"),u=t("https"),c={},h=!1,f={"User-Agent":"node-XMLHttpRequest",Accept:"*/*"},l=f,p=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","content-transfer-encoding","cookie","cookie2","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],d=["TRACE","TRACK","CONNECT"],m=!1,g=!1,y={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText="",this.responseXML="",this.status=null,this.statusText=null;var v=function(t){return h||t&&-1===p.indexOf(t.toLowerCase())},b=function(t){return t&&-1===d.indexOf(t)};this.open=function(t,e,r,n,i){if(this.abort(),g=!1,!b(t))throw"SecurityError: Request method not allowed";c={method:t,url:e.toString(),async:"boolean"!=typeof r?!0:r,user:n||null,password:i||null},w(this.OPENED)},this.setDisableHeaderCheck=function(t){h=t},this.setRequestHeader=function(t,e){if(this.readyState!==this.OPENED)throw"INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN";if(!v(t))return void console.warn('Refused to set unsafe header "'+t+'"');if(m)throw"INVALID_STATE_ERR: send flag is true";l[t]=e},this.getResponseHeader=function(t){return"string"==typeof t&&this.readyState>this.OPENED&&r&&r.headers&&r.headers[t.toLowerCase()]&&!g?r.headers[t.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||g)return"";var t="";for(var e in r.headers)"set-cookie"!==e&&"set-cookie2"!==e&&(t+=e+": "+r.headers[e]+"\r\n");return t.substr(0,t.length-2)},this.getRequestHeader=function(t){return"string"==typeof t&&l[t]?l[t]:""},this.send=function(t){if(this.readyState!==this.OPENED)throw"INVALID_STATE_ERR: connection must be opened before send() is called";if(m)throw"INVALID_STATE_ERR: send has already been called";var h,f=!1,p=!1,d=n.parse(c.url);switch(d.protocol){case"https:":f=!0;case"http:":h=d.hostname;break;case"file:":p=!0;break;case void 0:case"":h="localhost";break;default:throw"Protocol not supported."}if(p){if("GET"!==c.method)throw"XMLHttpRequest: Only GET method is supported";if(c.async)o.readFile(d.pathname,"utf8",function(t,e){t?s.handleError(t):(s.status=200,s.responseText=e,w(s.DONE))});else try{this.responseText=o.readFileSync(d.pathname,"utf8"),this.status=200,w(s.DONE)}catch(y){this.handleError(y)}}else{var v=d.port||(f?443:80),b=d.pathname+(d.search?d.search:"");if(l.Host=h,f&&443===v||80===v||(l.Host+=":"+d.port),c.user){"undefined"==typeof c.password&&(c.password="");var _=new Buffer(c.user+":"+c.password);l.Authorization="Basic "+_.toString("base64")}"GET"===c.method||"HEAD"===c.method?t=null:t?(l["Content-Length"]=Buffer.isBuffer(t)?t.length:Buffer.byteLength(t),l["Content-Type"]||(l["Content-Type"]="text/plain;charset=UTF-8")):"POST"===c.method&&(l["Content-Length"]=0);var E={host:h,port:v,path:b,method:c.method,headers:l,agent:!1};if(g=!1,c.async){var x=f?u.request:a.request;m=!0,s.dispatchEvent("readystatechange");var S=function k(t){if(r=t,301===r.statusCode||302===r.statusCode||303===r.statusCode||307===r.statusCode){c.url=r.headers.location;var i=n.parse(c.url);h=i.hostname;var o={hostname:i.hostname,port:i.port,path:i.path,method:303===r.statusCode?"GET":c.method,headers:l};return e=x(o,k).on("error",A),void e.end()}r.setEncoding("utf8"),w(s.HEADERS_RECEIVED),s.status=r.statusCode,r.on("data",function(t){t&&(s.responseText+=t),m&&w(s.LOADING)}),r.on("end",function(){m&&(w(s.DONE),m=!1)}),r.on("error",function(t){s.handleError(t)})},A=function(t){s.handleError(t)};e=x(E,S).on("error",A),t&&e.write(t),e.end(),s.dispatchEvent("loadstart")}else{var I=".node-xmlhttprequest-content-"+process.pid,O=".node-xmlhttprequest-sync-"+process.pid;o.writeFileSync(O,"","utf8");for(var B="var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http"+(f?"s":"")+".request;var options = "+JSON.stringify(E)+";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('"+I+"', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');fs.unlinkSync('"+O+"');});response.on('error', function(error) {fs.writeFileSync('"+I+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+O+"');});}).on('error', function(error) {fs.writeFileSync('"+I+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+O+"');});"+(t?"req.write('"+JSON.stringify(t).slice(1,-1).replace(/'/g,"\\'")+"');":"")+"req.end();",T=i(process.argv[0],["-e",B]);o.existsSync(O););var R=JSON.parse(o.readFileSync(I,"utf8"));T.stdin.end(),o.unlinkSync(I),R.err?s.handleError(R.err):(r=R.data,s.status=R.data.statusCode,s.responseText=R.data.text,w(s.DONE))}}},this.handleError=function(t){this.status=503,this.statusText=t,this.responseText=t.stack,g=!0,w(this.DONE)},this.abort=function(){e&&(e.abort(),e=null),l=f,this.responseText="",this.responseXML="",g=!0,this.readyState===this.UNSENT||this.readyState===this.OPENED&&!m||this.readyState===this.DONE||(m=!1,w(this.DONE)),this.readyState=this.UNSENT},this.addEventListener=function(t,e){t in y||(y[t]=[]),y[t].push(e)},this.removeEventListener=function(t,e){t in y&&(y[t]=y[t].filter(function(t){return t!==e}))},this.dispatchEvent=function(t){if("function"==typeof s["on"+t]&&s["on"+t](),t in y)for(var e=0,r=y[t].length;r>e;e++)y[t][e].call(s)};var w=function(t){(t==s.LOADING||s.readyState!==t)&&(s.readyState=t,(c.async||s.readyState<s.OPENED||s.readyState===s.DONE)&&s.dispatchEvent("readystatechange"),s.readyState!==s.DONE||g||(s.dispatchEvent("load"),s.dispatchEvent("loadend")))}}},{child_process:31,fs:31,http:38,https:42,url:62}],"bignumber.js":[function(t,e,r){!function(r){"use strict";function n(t){function e(t,n){var i,o,s,a,u,c,h=this;if(!(h instanceof e))return G&&N(26,"constructor call without new",t),new e(t,n);if(null!=n&&W(n,2,64,C,"base")){if(n=0|n,c=t+"",10==n)return h=new e(t instanceof e?t:c),L(h,j+h.e+1,U);if((a="number"==typeof t)&&0*t!=0||!new RegExp("^-?"+(i="["+E.slice(0,n)+"]+")+"(?:\\."+i+")?$",37>n?"i":"").test(c))return m(h,c,a,n);a?(h.s=0>1/t?(c=c.slice(1),-1):1,G&&c.replace(/^0\.0*|\./,"").length>15&&N(C,_,t),a=!1):h.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1,c=r(c,10,n,h.s)}else{if(t instanceof e)return h.s=t.s,h.e=t.e,h.c=(t=t.c)?t.slice():t,void(C=0);if((a="number"==typeof t)&&0*t==0){if(h.s=0>1/t?(t=-t,-1):1,t===~~t){for(o=0,s=t;s>=10;s/=10,o++);return h.e=o,h.c=[t],void(C=0)}c=t+""}else{if(!g.test(c=t+""))return m(h,c,a);h.s=45===c.charCodeAt(0)?(c=c.slice(1),-1):1}}for((o=c.indexOf("."))>-1&&(c=c.replace(".","")),(s=c.search(/e/i))>0?(0>o&&(o=s),o+=+c.slice(s+1),c=c.substring(0,s)):0>o&&(o=c.length),s=0;48===c.charCodeAt(s);s++);for(u=c.length;48===c.charCodeAt(--u););if(c=c.slice(s,u+1))if(u=c.length,a&&G&&u>15&&N(C,_,h.s*t),o=o-s-1,o>z)h.c=h.e=null;else if(H>o)h.c=[h.e=0];else{if(h.e=o,h.c=[],s=(o+1)%S,0>o&&(s+=S),u>s){for(s&&h.c.push(+c.slice(0,s)),u-=S;u>s;)h.c.push(+c.slice(s,s+=S));c=c.slice(s),s=S-c.length}else s-=u;for(;s--;c+="0");h.c.push(+c)}else h.c=[h.e=0];C=0}function r(t,r,n,i){var s,a,u,h,l,p,d,m=t.indexOf("."),g=j,y=U;for(37>n&&(t=t.toLowerCase()),m>=0&&(u=V,V=0,t=t.replace(".",""),d=new e(n),l=d.pow(t.length-m),V=u,d.c=c(f(o(l.c),l.e),10,r),d.e=d.c.length),p=c(t,n,r),a=u=p.length;0==p[--u];p.pop());if(!p[0])return"0";if(0>m?--a:(l.c=p,l.e=a,l.s=i,l=P(l,d,g,y,r),p=l.c,h=l.r,a=l.e),s=a+g+1,m=p[s],u=r/2,h=h||0>s||null!=p[s+1],h=4>y?(null!=m||h)&&(0==y||y==(l.s<0?3:2)):m>u||m==u&&(4==y||h||6==y&&1&p[s-1]||y==(l.s<0?8:7)),1>s||!p[0])t=h?f("1",-g):"0";else{if(p.length=s,h)for(--r;++p[--s]>r;)p[s]=0,s||(++a,p.unshift(1));for(u=p.length;!p[--u];);for(m=0,t="";u>=m;t+=E.charAt(p[m++]));t=f(t,a)}return t}function p(t,r,n,i){var s,a,u,c,l;if(n=null!=n&&W(n,0,8,i,w)?0|n:U,!t.c)return t.toString();if(s=t.c[0],u=t.e,null==r)l=o(t.c),l=19==i||24==i&&M>=u?h(l,u):f(l,u);else if(t=L(new e(t),r,n),a=t.e,l=o(t.c),c=l.length,19==i||24==i&&(a>=r||M>=a)){for(;r>c;l+="0",c++);l=h(l,a)}else if(r-=u,l=f(l,a),a+1>c){if(--r>0)for(l+=".";r--;l+="0");}else if(r+=a-c,r>0)for(a+1==c&&(l+=".");r--;l+="0");return t.s<0&&s?"-"+l:l}function T(t,r){var n,i,o=0;for(u(t[0])&&(t=t[0]),n=new e(t[0]);++o<t.length;){if(i=new e(t[o]),!i.s){n=i;break}r.call(n,i)&&(n=i)}return n}function R(t,e,r,n,i){return(e>t||t>r||t!=l(t))&&N(n,(i||"decimal places")+(e>t||t>r?" out of range":" not an integer"),t),!0}function k(t,e,r){for(var n=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,
|
||
n++);return(r=n+r*S-1)>z?t.c=t.e=null:H>r?t.c=[t.e=0]:(t.e=r,t.c=e),t}function N(t,e,r){var n=new Error(["new BigNumber","cmp","config","div","divToInt","eq","gt","gte","lt","lte","minus","mod","plus","precision","random","round","shift","times","toDigits","toExponential","toFixed","toFormat","toFraction","pow","toPrecision","toString","BigNumber"][t]+"() "+e+": "+r);throw n.name="BigNumber Error",C=0,n}function L(t,e,r,n){var i,o,s,a,u,c,h,f=t.c,l=I;if(f){t:{for(i=1,a=f[0];a>=10;a/=10,i++);if(o=e-i,0>o)o+=S,s=e,u=f[c=0],h=u/l[i-s-1]%10|0;else if(c=y((o+1)/S),c>=f.length){if(!n)break t;for(;f.length<=c;f.push(0));u=h=0,i=1,o%=S,s=o-S+1}else{for(u=a=f[c],i=1;a>=10;a/=10,i++);o%=S,s=o-S+i,h=0>s?0:u/l[i-s-1]%10|0}if(n=n||0>e||null!=f[c+1]||(0>s?u:u%l[i-s-1]),n=4>r?(h||n)&&(0==r||r==(t.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(o>0?s>0?u/l[i-s]:0:f[c-1])%10&1||r==(t.s<0?8:7)),1>e||!f[0])return f.length=0,n?(e-=t.e+1,f[0]=l[e%S],t.e=-e||0):f[0]=t.e=0,t;if(0==o?(f.length=c,a=1,c--):(f.length=c+1,a=l[S-o],f[c]=s>0?v(u/l[i-s]%l[s])*a:0),n)for(;;){if(0==c){for(o=1,s=f[0];s>=10;s/=10,o++);for(s=f[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(t.e++,f[0]==x&&(f[0]=1));break}if(f[c]+=a,f[c]!=x)break;f[c--]=0,a=1}for(o=f.length;0===f[--o];f.pop());}t.e>z?t.c=t.e=null:t.e<H&&(t.c=[t.e=0])}return t}var P,C=0,D=e.prototype,F=new e(1),j=20,U=4,M=-7,q=21,H=-1e7,z=1e7,G=!0,W=R,Y=!1,J=1,V=100,$={decimalSeparator:".",groupSeparator:",",groupSize:3,secondaryGroupSize:0,fractionGroupSeparator:" ",fractionGroupSize:0};return e.another=n,e.ROUND_UP=0,e.ROUND_DOWN=1,e.ROUND_CEIL=2,e.ROUND_FLOOR=3,e.ROUND_HALF_UP=4,e.ROUND_HALF_DOWN=5,e.ROUND_HALF_EVEN=6,e.ROUND_HALF_CEIL=7,e.ROUND_HALF_FLOOR=8,e.EUCLID=9,e.config=function(){var t,e,r=0,n={},i=arguments,o=i[0],s=o&&"object"==typeof o?function(){return o.hasOwnProperty(e)?null!=(t=o[e]):void 0}:function(){return i.length>r?null!=(t=i[r++]):void 0};return s(e="DECIMAL_PLACES")&&W(t,0,B,2,e)&&(j=0|t),n[e]=j,s(e="ROUNDING_MODE")&&W(t,0,8,2,e)&&(U=0|t),n[e]=U,s(e="EXPONENTIAL_AT")&&(u(t)?W(t[0],-B,0,2,e)&&W(t[1],0,B,2,e)&&(M=0|t[0],q=0|t[1]):W(t,-B,B,2,e)&&(M=-(q=0|(0>t?-t:t)))),n[e]=[M,q],s(e="RANGE")&&(u(t)?W(t[0],-B,-1,2,e)&&W(t[1],1,B,2,e)&&(H=0|t[0],z=0|t[1]):W(t,-B,B,2,e)&&(0|t?H=-(z=0|(0>t?-t:t)):G&&N(2,e+" cannot be zero",t))),n[e]=[H,z],s(e="ERRORS")&&(t===!!t||1===t||0===t?(C=0,W=(G=!!t)?R:a):G&&N(2,e+b,t)),n[e]=G,s(e="CRYPTO")&&(t===!!t||1===t||0===t?(Y=!(!t||!d||"object"!=typeof d),t&&!Y&&G&&N(2,"crypto unavailable",d)):G&&N(2,e+b,t)),n[e]=Y,s(e="MODULO_MODE")&&W(t,0,9,2,e)&&(J=0|t),n[e]=J,s(e="POW_PRECISION")&&W(t,0,B,2,e)&&(V=0|t),n[e]=V,s(e="FORMAT")&&("object"==typeof t?$=t:G&&N(2,e+" not an object",t)),n[e]=$,n},e.max=function(){return T(arguments,D.lt)},e.min=function(){return T(arguments,D.gt)},e.random=function(){var t=9007199254740992,r=Math.random()*t&2097151?function(){return v(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var n,i,o,s,a,u=0,c=[],h=new e(F);if(t=null!=t&&W(t,0,B,14)?0|t:j,s=y(t/S),Y)if(d&&d.getRandomValues){for(n=d.getRandomValues(new Uint32Array(s*=2));s>u;)a=131072*n[u]+(n[u+1]>>>11),a>=9e15?(i=d.getRandomValues(new Uint32Array(2)),n[u]=i[0],n[u+1]=i[1]):(c.push(a%1e14),u+=2);u=s/2}else if(d&&d.randomBytes){for(n=d.randomBytes(s*=7);s>u;)a=281474976710656*(31&n[u])+1099511627776*n[u+1]+4294967296*n[u+2]+16777216*n[u+3]+(n[u+4]<<16)+(n[u+5]<<8)+n[u+6],a>=9e15?d.randomBytes(7).copy(n,u):(c.push(a%1e14),u+=7);u=s/7}else G&&N(14,"crypto unavailable",d);if(!u)for(;s>u;)a=r(),9e15>a&&(c[u++]=a%1e14);for(s=c[--u],t%=S,s&&t&&(a=I[S-t],c[u]=v(s/a)*a);0===c[u];c.pop(),u--);if(0>u)c=[o=0];else{for(o=-1;0===c[0];c.shift(),o-=S);for(u=1,a=c[0];a>=10;a/=10,u++);S>u&&(o-=S-u)}return h.e=o,h.c=c,h}}(),P=function(){function t(t,e,r){var n,i,o,s,a=0,u=t.length,c=e%O,h=e/O|0;for(t=t.slice();u--;)o=t[u]%O,s=t[u]/O|0,n=h*o+s*c,i=c*o+n%O*O+a,a=(i/r|0)+(n/O|0)+h*s,t[u]=i%r;return a&&t.unshift(a),t}function r(t,e,r,n){var i,o;if(r!=n)o=r>n?1:-1;else for(i=o=0;r>i;i++)if(t[i]!=e[i]){o=t[i]>e[i]?1:-1;break}return o}function n(t,e,r,n){for(var i=0;r--;)t[r]-=i,i=t[r]<e[r]?1:0,t[r]=i*n+t[r]-e[r];for(;!t[0]&&t.length>1;t.shift());}return function(o,s,a,u,c){var h,f,l,p,d,m,g,y,b,w,_,E,A,I,O,B,T,R=o.s==s.s?1:-1,k=o.c,N=s.c;if(!(k&&k[0]&&N&&N[0]))return new e(o.s&&s.s&&(k?!N||k[0]!=N[0]:N)?k&&0==k[0]||!N?0*R:R/0:0/0);for(y=new e(R),b=y.c=[],f=o.e-s.e,R=a+f+1,c||(c=x,f=i(o.e/S)-i(s.e/S),R=R/S|0),l=0;N[l]==(k[l]||0);l++);if(N[l]>(k[l]||0)&&f--,0>R)b.push(1),p=!0;else{for(I=k.length,B=N.length,l=0,R+=2,d=v(c/(N[0]+1)),d>1&&(N=t(N,d,c),k=t(k,d,c),B=N.length,I=k.length),A=B,w=k.slice(0,B),_=w.length;B>_;w[_++]=0);T=N.slice(),T.unshift(0),O=N[0],N[1]>=c/2&&O++;do{if(d=0,h=r(N,w,B,_),0>h){if(E=w[0],B!=_&&(E=E*c+(w[1]||0)),d=v(E/O),d>1)for(d>=c&&(d=c-1),m=t(N,d,c),g=m.length,_=w.length;1==r(m,w,g,_);)d--,n(m,g>B?T:N,g,c),g=m.length,h=1;else 0==d&&(h=d=1),m=N.slice(),g=m.length;if(_>g&&m.unshift(0),n(w,m,_,c),_=w.length,-1==h)for(;r(N,w,B,_)<1;)d++,n(w,_>B?T:N,_,c),_=w.length}else 0===h&&(d++,w=[0]);b[l++]=d,w[0]?w[_++]=k[A]||0:(w=[k[A]],_=1)}while((A++<I||null!=w[0])&&R--);p=null!=w[0],b[0]||b.shift()}if(c==x){for(l=1,R=b[0];R>=10;R/=10,l++);L(y,a+(y.e=l+f*S-1)+1,u,p)}else y.e=f,y.r=+p;return y}}(),m=function(){var t=/^(-?)0([xbo])/i,r=/^([^.]+)\.$/,n=/^\.([^.]+)$/,i=/^-?(Infinity|NaN)$/,o=/^\s*\+|^\s+|\s+$/g;return function(s,a,u,c){var h,f=u?a:a.replace(o,"");if(i.test(f))s.s=isNaN(f)?null:0>f?-1:1;else{if(!u&&(f=f.replace(t,function(t,e,r){return h="x"==(r=r.toLowerCase())?16:"b"==r?2:8,c&&c!=h?t:e}),c&&(h=c,f=f.replace(r,"$1").replace(n,"0.$1")),a!=f))return new e(f,h);G&&N(C,"not a"+(c?" base "+c:"")+" number",a),s.s=null}s.c=s.e=null,C=0}}(),D.absoluteValue=D.abs=function(){var t=new e(this);return t.s<0&&(t.s=1),t},D.ceil=function(){return L(new e(this),this.e+1,2)},D.comparedTo=D.cmp=function(t,r){return C=1,s(this,new e(t,r))},D.decimalPlaces=D.dp=function(){var t,e,r=this.c;if(!r)return null;if(t=((e=r.length-1)-i(this.e/S))*S,e=r[e])for(;e%10==0;e/=10,t--);return 0>t&&(t=0),t},D.dividedBy=D.div=function(t,r){return C=3,P(this,new e(t,r),j,U)},D.dividedToIntegerBy=D.divToInt=function(t,r){return C=4,P(this,new e(t,r),0,1)},D.equals=D.eq=function(t,r){return C=5,0===s(this,new e(t,r))},D.floor=function(){return L(new e(this),this.e+1,3)},D.greaterThan=D.gt=function(t,r){return C=6,s(this,new e(t,r))>0},D.greaterThanOrEqualTo=D.gte=function(t,r){return C=7,1===(r=s(this,new e(t,r)))||0===r},D.isFinite=function(){return!!this.c},D.isInteger=D.isInt=function(){return!!this.c&&i(this.e/S)>this.c.length-2},D.isNaN=function(){return!this.s},D.isNegative=D.isNeg=function(){return this.s<0},D.isZero=function(){return!!this.c&&0==this.c[0]},D.lessThan=D.lt=function(t,r){return C=8,s(this,new e(t,r))<0},D.lessThanOrEqualTo=D.lte=function(t,r){return C=9,-1===(r=s(this,new e(t,r)))||0===r},D.minus=D.sub=function(t,r){var n,o,s,a,u=this,c=u.s;if(C=10,t=new e(t,r),r=t.s,!c||!r)return new e(0/0);if(c!=r)return t.s=-r,u.plus(t);var h=u.e/S,f=t.e/S,l=u.c,p=t.c;if(!h||!f){if(!l||!p)return l?(t.s=-r,t):new e(p?u:0/0);if(!l[0]||!p[0])return p[0]?(t.s=-r,t):new e(l[0]?u:3==U?-0:0)}if(h=i(h),f=i(f),l=l.slice(),c=h-f){for((a=0>c)?(c=-c,s=l):(f=h,s=p),s.reverse(),r=c;r--;s.push(0));s.reverse()}else for(o=(a=(c=l.length)<(r=p.length))?c:r,c=r=0;o>r;r++)if(l[r]!=p[r]){a=l[r]<p[r];break}if(a&&(s=l,l=p,p=s,t.s=-t.s),r=(o=p.length)-(n=l.length),r>0)for(;r--;l[n++]=0);for(r=x-1;o>c;){if(l[--o]<p[o]){for(n=o;n&&!l[--n];l[n]=r);--l[n],l[o]+=x}l[o]-=p[o]}for(;0==l[0];l.shift(),--f);return l[0]?k(t,l,f):(t.s=3==U?-1:1,t.c=[t.e=0],t)},D.modulo=D.mod=function(t,r){var n,i,o=this;return C=11,t=new e(t,r),!o.c||!t.s||t.c&&!t.c[0]?new e(0/0):!t.c||o.c&&!o.c[0]?new e(o):(9==J?(i=t.s,t.s=1,n=P(o,t,0,3),t.s=i,n.s*=i):n=P(o,t,0,J),o.minus(n.times(t)))},D.negated=D.neg=function(){var t=new e(this);return t.s=-t.s||null,t},D.plus=D.add=function(t,r){var n,o=this,s=o.s;if(C=12,t=new e(t,r),r=t.s,!s||!r)return new e(0/0);if(s!=r)return t.s=-r,o.minus(t);var a=o.e/S,u=t.e/S,c=o.c,h=t.c;if(!a||!u){if(!c||!h)return new e(s/0);if(!c[0]||!h[0])return h[0]?t:new e(c[0]?o:0*s)}if(a=i(a),u=i(u),c=c.slice(),s=a-u){for(s>0?(u=a,n=h):(s=-s,n=c),n.reverse();s--;n.push(0));n.reverse()}for(s=c.length,r=h.length,0>s-r&&(n=h,h=c,c=n,r=s),s=0;r;)s=(c[--r]=c[r]+h[r]+s)/x|0,c[r]%=x;return s&&(c.unshift(s),++u),k(t,c,u)},D.precision=D.sd=function(t){var e,r,n=this,i=n.c;if(null!=t&&t!==!!t&&1!==t&&0!==t&&(G&&N(13,"argument"+b,t),t!=!!t&&(t=null)),!i)return null;if(r=i.length-1,e=r*S+1,r=i[r]){for(;r%10==0;r/=10,e--);for(r=i[0];r>=10;r/=10,e++);}return t&&n.e+1>e&&(e=n.e+1),e},D.round=function(t,r){var n=new e(this);return(null==t||W(t,0,B,15))&&L(n,~~t+this.e+1,null!=r&&W(r,0,8,15,w)?0|r:U),n},D.shift=function(t){var r=this;return W(t,-A,A,16,"argument")?r.times("1e"+l(t)):new e(r.c&&r.c[0]&&(-A>t||t>A)?r.s*(0>t?0:1/0):r)},D.squareRoot=D.sqrt=function(){var t,r,n,s,a,u=this,c=u.c,h=u.s,f=u.e,l=j+4,p=new e("0.5");if(1!==h||!c||!c[0])return new e(!h||0>h&&(!c||c[0])?0/0:c?u:1/0);if(h=Math.sqrt(+u),0==h||h==1/0?(r=o(c),(r.length+f)%2==0&&(r+="0"),h=Math.sqrt(r),f=i((f+1)/2)-(0>f||f%2),h==1/0?r="1e"+f:(r=h.toExponential(),r=r.slice(0,r.indexOf("e")+1)+f),n=new e(r)):n=new e(h+""),n.c[0])for(f=n.e,h=f+l,3>h&&(h=0);;)if(a=n,n=p.times(a.plus(P(u,a,l,1))),o(a.c).slice(0,h)===(r=o(n.c)).slice(0,h)){if(n.e<f&&--h,r=r.slice(h-3,h+1),"9999"!=r&&(s||"4999"!=r)){(!+r||!+r.slice(1)&&"5"==r.charAt(0))&&(L(n,n.e+j+2,1),t=!n.times(n).eq(u));break}if(!s&&(L(a,a.e+j+2,0),a.times(a).eq(u))){n=a;break}l+=4,h+=4,s=1}return L(n,n.e+j+1,U,t)},D.times=D.mul=function(t,r){var n,o,s,a,u,c,h,f,l,p,d,m,g,y,v,b=this,w=b.c,_=(C=17,t=new e(t,r)).c;if(!(w&&_&&w[0]&&_[0]))return!b.s||!t.s||w&&!w[0]&&!_||_&&!_[0]&&!w?t.c=t.e=t.s=null:(t.s*=b.s,w&&_?(t.c=[0],t.e=0):t.c=t.e=null),t;for(o=i(b.e/S)+i(t.e/S),t.s*=b.s,h=w.length,p=_.length,p>h&&(g=w,w=_,_=g,s=h,h=p,p=s),s=h+p,g=[];s--;g.push(0));for(y=x,v=O,s=p;--s>=0;){for(n=0,d=_[s]%v,m=_[s]/v|0,u=h,a=s+u;a>s;)f=w[--u]%v,l=w[u]/v|0,c=m*f+l*d,f=d*f+c%v*v+g[a]+n,n=(f/y|0)+(c/v|0)+m*l,g[a--]=f%y;g[a]=n}return n?++o:g.shift(),k(t,g,o)},D.toDigits=function(t,r){var n=new e(this);return t=null!=t&&W(t,1,B,18,"precision")?0|t:null,r=null!=r&&W(r,0,8,18,w)?0|r:U,t?L(n,t,r):n},D.toExponential=function(t,e){return p(this,null!=t&&W(t,0,B,19)?~~t+1:null,e,19)},D.toFixed=function(t,e){return p(this,null!=t&&W(t,0,B,20)?~~t+this.e+1:null,e,20)},D.toFormat=function(t,e){var r=p(this,null!=t&&W(t,0,B,21)?~~t+this.e+1:null,e,21);if(this.c){var n,i=r.split("."),o=+$.groupSize,s=+$.secondaryGroupSize,a=$.groupSeparator,u=i[0],c=i[1],h=this.s<0,f=h?u.slice(1):u,l=f.length;if(s&&(n=o,o=s,s=n,l-=n),o>0&&l>0){for(n=l%o||o,u=f.substr(0,n);l>n;n+=o)u+=a+f.substr(n,o);s>0&&(u+=a+f.slice(n)),h&&(u="-"+u)}r=c?u+$.decimalSeparator+((s=+$.fractionGroupSize)?c.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+$.fractionGroupSeparator):c):u}return r},D.toFraction=function(t){var r,n,i,s,a,u,c,h,f,l=G,p=this,d=p.c,m=new e(F),g=n=new e(F),y=c=new e(F);if(null!=t&&(G=!1,u=new e(t),G=l,(!(l=u.isInt())||u.lt(F))&&(G&&N(22,"max denominator "+(l?"out of range":"not an integer"),t),t=!l&&u.c&&L(u,u.e+1,1).gte(F)?u:null)),!d)return p.toString();for(f=o(d),s=m.e=f.length-p.e-1,m.c[0]=I[(a=s%S)<0?S+a:a],t=!t||u.cmp(m)>0?s>0?m:g:u,a=z,z=1/0,u=new e(f),c.c[0]=0;h=P(u,m,0,1),i=n.plus(h.times(y)),1!=i.cmp(t);)n=y,y=i,g=c.plus(h.times(i=g)),c=i,m=u.minus(h.times(i=m)),u=i;return i=P(t.minus(n),y,0,1),c=c.plus(i.times(g)),n=n.plus(i.times(y)),c.s=g.s=p.s,s*=2,r=P(g,y,s,U).minus(p).abs().cmp(P(c,n,s,U).minus(p).abs())<1?[g.toString(),y.toString()]:[c.toString(),n.toString()],z=a,r},D.toNumber=function(){var t=this;return+t||(t.s?0*t.s:0/0)},D.toPower=D.pow=function(t){var r,n,i=v(0>t?-t:+t),o=this;if(!W(t,-A,A,23,"exponent")&&(!isFinite(t)||i>A&&(t/=0)||parseFloat(t)!=t&&!(t=0/0)))return new e(Math.pow(+o,t));for(r=V?y(V/S+2):0,n=new e(F);;){if(i%2){if(n=n.times(o),!n.c)break;r&&n.c.length>r&&(n.c.length=r)}if(i=v(i/2),!i)break;o=o.times(o),r&&o.c&&o.c.length>r&&(o.c.length=r)}return 0>t&&(n=F.div(n)),r?L(n,V,U):n},D.toPrecision=function(t,e){return p(this,null!=t&&W(t,1,B,24,"precision")?0|t:null,e,24)},D.toString=function(t){var e,n=this,i=n.s,s=n.e;return null===s?i?(e="Infinity",0>i&&(e="-"+e)):e="NaN":(e=o(n.c),e=null!=t&&W(t,2,64,25,"base")?r(f(e,s),0|t,10,i):M>=s||s>=q?h(e,s):f(e,s),0>i&&n.c[0]&&(e="-"+e)),e},D.truncated=D.trunc=function(){return L(new e(this),this.e+1,1)},D.valueOf=D.toJSON=function(){return this.toString()},null!=t&&e.config(t),e}function i(t){var e=0|t;return t>0||t===e?e:e-1}function o(t){for(var e,r,n=1,i=t.length,o=t[0]+"";i>n;){for(e=t[n++]+"",r=S-e.length;r--;e="0"+e);o+=e}for(i=o.length;48===o.charCodeAt(--i););return o.slice(0,i+1||1)}function s(t,e){var r,n,i=t.c,o=e.c,s=t.s,a=e.s,u=t.e,c=e.e;if(!s||!a)return null;if(r=i&&!i[0],n=o&&!o[0],r||n)return r?n?0:-a:s;if(s!=a)return s;if(r=0>s,n=u==c,!i||!o)return n?0:!i^r?1:-1;if(!n)return u>c^r?1:-1;for(a=(u=i.length)<(c=o.length)?u:c,s=0;a>s;s++)if(i[s]!=o[s])return i[s]>o[s]^r?1:-1;return u==c?0:u>c^r?1:-1}function a(t,e,r){return(t=l(t))>=e&&r>=t}function u(t){return"[object Array]"==Object.prototype.toString.call(t)}function c(t,e,r){for(var n,i,o=[0],s=0,a=t.length;a>s;){for(i=o.length;i--;o[i]*=e);for(o[n=0]+=E.indexOf(t.charAt(s++));n<o.length;n++)o[n]>r-1&&(null==o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}function h(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(0>e?"e":"e+")+e}function f(t,e){var r,n;if(0>e){for(n="0.";++e;n+="0");t=n+t}else if(r=t.length,++e>r){for(n="0",e-=r;--e;n+="0");t+=n}else r>e&&(t=t.slice(0,e)+"."+t.slice(e));return t}function l(t){return t=parseFloat(t),0>t?y(t):v(t)}var p,d,m,g=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,y=Math.ceil,v=Math.floor,b=" not a boolean or binary digit",w="rounding mode",_="number type has more than 15 significant digits",E="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",x=1e14,S=14,A=9007199254740991,I=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],O=1e7,B=1e9;if(p=n(),"function"==typeof define&&define.amd)define(function(){return p});else if("undefined"!=typeof e&&e.exports){if(e.exports=p,!d)try{d=t("crypto")}catch(T){}}else r.BigNumber=p}(this)},{crypto:31}],web3:[function(t,e,r){var n=t("./lib/web3");n.providers.HttpProvider=t("./lib/web3/httpprovider"),n.providers.QtSyncProvider=t("./lib/web3/qtsync"),n.eth.contract=t("./lib/web3/contract"),n.eth.namereg=t("./lib/web3/namereg"),n.eth.sendIBANTransaction=t("./lib/web3/transfer"),"undefined"!=typeof window&&"undefined"==typeof window.web3&&(window.web3=n),e.exports=n},{"./lib/web3":8,"./lib/web3/contract":11,"./lib/web3/httpprovider":19,"./lib/web3/namereg":23,"./lib/web3/qtsync":26,"./lib/web3/transfer":29}]},{},["web3"]); |