!function(f){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=f();else if("function"==typeof define&&define.amd)define([],f);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).libs=f()}}(function(){var define,module,exports;return function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i1&&"="===string.charAt(p);)++n;return Math.ceil(3*string.length)/4-n};for(var b64=new Array(64),s64=new Array(123),i=0;i<64;)s64[b64[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;base64.encode=function(buffer,start,end){for(var t,parts=null,chunk=[],i=0,j=0;start>2],t=(3&b)<<4,j=1;break;case 1:chunk[i++]=b64[t|b>>4],t=(15&b)<<2,j=2;break;case 2:chunk[i++]=b64[t|b>>6],chunk[i++]=b64[63&b],j=0}i>8191&&((parts||(parts=[])).push(String.fromCharCode.apply(String,chunk)),i=0)}return j&&(chunk[i++]=b64[t],chunk[i++]=61,1===j&&(chunk[i++]=61)),parts?(i&&parts.push(String.fromCharCode.apply(String,chunk.slice(0,i))),parts.join("")):String.fromCharCode.apply(String,chunk.slice(0,i))};base64.decode=function(string,buffer,offset){for(var t,start=offset,j=0,i=0;i1)break;if(void 0===(c=s64[c]))throw Error("invalid encoding");switch(j){case 0:t=c,j=1;break;case 1:buffer[offset++]=t<<2|(48&c)>>4,t=c,j=2;break;case 2:buffer[offset++]=(15&t)<<4|(60&c)>>2,t=c,j=3;break;case 3:buffer[offset++]=(3&t)<<6|c,j=0}}if(1===j)throw Error("invalid encoding");return offset-start},base64.test=function(string){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(string)}},{}],4:[function(require,module,exports){"use strict";function codegen(functionParams,functionName){"string"==typeof functionParams&&(functionName=functionParams,functionParams=void 0);var body=[];function Codegen(formatStringOrScope){if("string"!=typeof formatStringOrScope){var source=toString();if(codegen.verbose&&console.log("codegen: "+source),source="return "+source,formatStringOrScope){for(var scopeKeys=Object.keys(formatStringOrScope),scopeParams=new Array(scopeKeys.length+1),scopeValues=new Array(scopeKeys.length),scopeOffset=0;scopeOffset0?0:2147483648,buf,pos);else if(isNaN(val))writeUint(2143289344,buf,pos);else if(val>3.4028234663852886e38)writeUint((sign<<31|2139095040)>>>0,buf,pos);else if(val<1.1754943508222875e-38)writeUint((sign<<31|Math.round(val/1.401298464324817e-45))>>>0,buf,pos);else{var exponent=Math.floor(Math.log(val)/Math.LN2);writeUint((sign<<31|exponent+127<<23|8388607&Math.round(val*Math.pow(2,-exponent)*8388608))>>>0,buf,pos)}}function readFloat_ieee754(readUint,buf,pos){var uint=readUint(buf,pos),sign=2*(uint>>31)+1,exponent=uint>>>23&255,mantissa=8388607&uint;return 255===exponent?mantissa?NaN:sign*(1/0):0===exponent?1.401298464324817e-45*sign*mantissa:sign*Math.pow(2,exponent-150)*(mantissa+8388608)}exports.writeFloatLE=writeFloat_ieee754.bind(null,writeUintLE),exports.writeFloatBE=writeFloat_ieee754.bind(null,writeUintBE),exports.readFloatLE=readFloat_ieee754.bind(null,readUintLE),exports.readFloatBE=readFloat_ieee754.bind(null,readUintBE)}(),"undefined"!=typeof Float64Array?function(){var f64=new Float64Array([-0]),f8b=new Uint8Array(f64.buffer),le=128===f8b[7];function writeDouble_f64_cpy(val,buf,pos){f64[0]=val,buf[pos]=f8b[0],buf[pos+1]=f8b[1],buf[pos+2]=f8b[2],buf[pos+3]=f8b[3],buf[pos+4]=f8b[4],buf[pos+5]=f8b[5],buf[pos+6]=f8b[6],buf[pos+7]=f8b[7]}function writeDouble_f64_rev(val,buf,pos){f64[0]=val,buf[pos]=f8b[7],buf[pos+1]=f8b[6],buf[pos+2]=f8b[5],buf[pos+3]=f8b[4],buf[pos+4]=f8b[3],buf[pos+5]=f8b[2],buf[pos+6]=f8b[1],buf[pos+7]=f8b[0]}function readDouble_f64_cpy(buf,pos){return f8b[0]=buf[pos],f8b[1]=buf[pos+1],f8b[2]=buf[pos+2],f8b[3]=buf[pos+3],f8b[4]=buf[pos+4],f8b[5]=buf[pos+5],f8b[6]=buf[pos+6],f8b[7]=buf[pos+7],f64[0]}function readDouble_f64_rev(buf,pos){return f8b[7]=buf[pos],f8b[6]=buf[pos+1],f8b[5]=buf[pos+2],f8b[4]=buf[pos+3],f8b[3]=buf[pos+4],f8b[2]=buf[pos+5],f8b[1]=buf[pos+6],f8b[0]=buf[pos+7],f64[0]}exports.writeDoubleLE=le?writeDouble_f64_cpy:writeDouble_f64_rev,exports.writeDoubleBE=le?writeDouble_f64_rev:writeDouble_f64_cpy,exports.readDoubleLE=le?readDouble_f64_cpy:readDouble_f64_rev,exports.readDoubleBE=le?readDouble_f64_rev:readDouble_f64_cpy}():function(){function writeDouble_ieee754(writeUint,off0,off1,val,buf,pos){var sign=val<0?1:0;if(sign&&(val=-val),0===val)writeUint(0,buf,pos+off0),writeUint(1/val>0?0:2147483648,buf,pos+off1);else if(isNaN(val))writeUint(0,buf,pos+off0),writeUint(2146959360,buf,pos+off1);else if(val>1.7976931348623157e308)writeUint(0,buf,pos+off0),writeUint((sign<<31|2146435072)>>>0,buf,pos+off1);else{var mantissa;if(val<2.2250738585072014e-308)writeUint((mantissa=val/5e-324)>>>0,buf,pos+off0),writeUint((sign<<31|mantissa/4294967296)>>>0,buf,pos+off1);else{var exponent=Math.floor(Math.log(val)/Math.LN2);1024===exponent&&(exponent=1023),writeUint(4503599627370496*(mantissa=val*Math.pow(2,-exponent))>>>0,buf,pos+off0),writeUint((sign<<31|exponent+1023<<20|1048576*mantissa&1048575)>>>0,buf,pos+off1)}}}function readDouble_ieee754(readUint,off0,off1,buf,pos){var lo=readUint(buf,pos+off0),hi=readUint(buf,pos+off1),sign=2*(hi>>31)+1,exponent=hi>>>20&2047,mantissa=4294967296*(1048575&hi)+lo;return 2047===exponent?mantissa?NaN:sign*(1/0):0===exponent?5e-324*sign*mantissa:sign*Math.pow(2,exponent-1075)*(mantissa+4503599627370496)}exports.writeDoubleLE=writeDouble_ieee754.bind(null,writeUintLE,0,4),exports.writeDoubleBE=writeDouble_ieee754.bind(null,writeUintBE,4,0),exports.readDoubleLE=readDouble_ieee754.bind(null,readUintLE,0,4),exports.readDoubleBE=readDouble_ieee754.bind(null,readUintBE,4,0)}(),exports}function writeUintLE(val,buf,pos){buf[pos]=255&val,buf[pos+1]=val>>>8&255,buf[pos+2]=val>>>16&255,buf[pos+3]=val>>>24}function writeUintBE(val,buf,pos){buf[pos]=val>>>24,buf[pos+1]=val>>>16&255,buf[pos+2]=val>>>8&255,buf[pos+3]=255&val}function readUintLE(buf,pos){return(buf[pos]|buf[pos+1]<<8|buf[pos+2]<<16|buf[pos+3]<<24)>>>0}function readUintBE(buf,pos){return(buf[pos]<<24|buf[pos+1]<<16|buf[pos+2]<<8|buf[pos+3])>>>0}module.exports=factory(factory)},{}],8:[function(require,module,exports){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],9:[function(require,module,exports){"use strict";var path=exports,isAbsolute=path.isAbsolute=function(path){return/^(?:\/|\w+:)/.test(path)},normalize=path.normalize=function(path){var parts=(path=path.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),absolute=isAbsolute(path),prefix="";absolute&&(prefix=parts.shift()+"/");for(var i=0;i0&&".."!==parts[i-1]?parts.splice(--i,2):absolute?parts.splice(i,1):++i:"."===parts[i]?parts.splice(i,1):++i;return prefix+parts.join("/")};path.resolve=function(originPath,includePath,alreadyNormalized){return alreadyNormalized||(includePath=normalize(includePath)),isAbsolute(includePath)?includePath:(alreadyNormalized||(originPath=normalize(originPath)),(originPath=originPath.replace(/(?:\/|^)[^/]+$/,"")).length?normalize(originPath+"/"+includePath):includePath)}},{}],10:[function(require,module,exports){"use strict";module.exports=function(alloc,slice,size){var SIZE=size||8192,MAX=SIZE>>>1,slab=null,offset=SIZE;return function(size){if(size<1||size>MAX)return alloc(size);offset+size>SIZE&&(slab=alloc(SIZE),offset=0);var buf=slice.call(slab,offset,offset+=size);return 7&offset&&(offset=1+(7|offset)),buf}}},{}],11:[function(require,module,exports){"use strict";var utf8=exports;utf8.length=function(string){for(var len=0,c=0,i=0;i191&&t<224?chunk[i++]=(31&t)<<6|63&buffer[start++]:t>239&&t<365?(t=((7&t)<<18|(63&buffer[start++])<<12|(63&buffer[start++])<<6|63&buffer[start++])-65536,chunk[i++]=55296+(t>>10),chunk[i++]=56320+(1023&t)):chunk[i++]=(15&t)<<12|(63&buffer[start++])<<6|63&buffer[start++],i>8191&&((parts||(parts=[])).push(String.fromCharCode.apply(String,chunk)),i=0);return parts?(i&&parts.push(String.fromCharCode.apply(String,chunk.slice(0,i))),parts.join("")):String.fromCharCode.apply(String,chunk.slice(0,i))},utf8.write=function(string,buffer,offset){for(var c1,c2,start=offset,i=0;i>6|192,buffer[offset++]=63&c1|128):55296==(64512&c1)&&56320==(64512&(c2=string.charCodeAt(i+1)))?(c1=65536+((1023&c1)<<10)+(1023&c2),++i,buffer[offset++]=c1>>18|240,buffer[offset++]=c1>>12&63|128,buffer[offset++]=c1>>6&63|128,buffer[offset++]=63&c1|128):(buffer[offset++]=c1>>12|224,buffer[offset++]=c1>>6&63|128,buffer[offset++]=63&c1|128);return offset-start}},{}],12:[function(require,module,exports){var asn1=exports;asn1.bignum=require("bn.js"),asn1.define=require("./asn1/api").define,asn1.base=require("./asn1/base"),asn1.constants=require("./asn1/constants"),asn1.decoders=require("./asn1/decoders"),asn1.encoders=require("./asn1/encoders")},{"./asn1/api":13,"./asn1/base":15,"./asn1/constants":19,"./asn1/decoders":21,"./asn1/encoders":24,"bn.js":198}],13:[function(require,module,exports){var asn1=require("../asn1"),inherits=require("inherits");function Entity(name,body){this.name=name,this.body=body,this.decoders={},this.encoders={}}exports.define=function(name,body){return new Entity(name,body)},Entity.prototype._createNamed=function(base){var named;try{named=require("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){named=function(entity){this._initNamed(entity)}}return inherits(named,base),named.prototype._initNamed=function(entity){base.call(this,entity)},new named(this)},Entity.prototype._getDecoder=function(enc){return enc=enc||"der",this.decoders.hasOwnProperty(enc)||(this.decoders[enc]=this._createNamed(asn1.decoders[enc])),this.decoders[enc]},Entity.prototype.decode=function(data,enc,options){return this._getDecoder(enc).decode(data,options)},Entity.prototype._getEncoder=function(enc){return enc=enc||"der",this.encoders.hasOwnProperty(enc)||(this.encoders[enc]=this._createNamed(asn1.encoders[enc])),this.encoders[enc]},Entity.prototype.encode=function(data,enc,reporter){return this._getEncoder(enc).encode(data,reporter)}},{"../asn1":12,inherits:477,vm:912}],14:[function(require,module,exports){var inherits=require("inherits"),Reporter=require("../base").Reporter,Buffer=require("buffer").Buffer;function DecoderBuffer(base,options){Reporter.call(this,options),Buffer.isBuffer(base)?(this.base=base,this.offset=0,this.length=base.length):this.error("Input not Buffer")}function EncoderBuffer(value,reporter){if(Array.isArray(value))this.length=0,this.value=value.map(function(item){return item instanceof EncoderBuffer||(item=new EncoderBuffer(item,reporter)),this.length+=item.length,item},this);else if("number"==typeof value){if(!(0<=value&&value<=255))return reporter.error("non-byte EncoderBuffer value");this.value=value,this.length=1}else if("string"==typeof value)this.value=value,this.length=Buffer.byteLength(value);else{if(!Buffer.isBuffer(value))return reporter.error("Unsupported type: "+typeof value);this.value=value,this.length=value.length}}inherits(DecoderBuffer,Reporter),exports.DecoderBuffer=DecoderBuffer,DecoderBuffer.prototype.save=function(){return{offset:this.offset,reporter:Reporter.prototype.save.call(this)}},DecoderBuffer.prototype.restore=function(save){var res=new DecoderBuffer(this.base);return res.offset=save.offset,res.length=this.offset,this.offset=save.offset,Reporter.prototype.restore.call(this,save.reporter),res},DecoderBuffer.prototype.isEmpty=function(){return this.offset===this.length},DecoderBuffer.prototype.readUInt8=function(fail){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(fail||"DecoderBuffer overrun")},DecoderBuffer.prototype.skip=function(bytes,fail){if(!(this.offset+bytes<=this.length))return this.error(fail||"DecoderBuffer overrun");var res=new DecoderBuffer(this.base);return res._reporterState=this._reporterState,res.offset=this.offset,res.length=this.offset+bytes,this.offset+=bytes,res},DecoderBuffer.prototype.raw=function(save){return this.base.slice(save?save.offset:this.offset,this.length)},exports.EncoderBuffer=EncoderBuffer,EncoderBuffer.prototype.join=function(out,offset){return out||(out=new Buffer(this.length)),offset||(offset=0),0===this.length?out:(Array.isArray(this.value)?this.value.forEach(function(item){item.join(out,offset),offset+=item.length}):("number"==typeof this.value?out[offset]=this.value:"string"==typeof this.value?out.write(this.value,offset):Buffer.isBuffer(this.value)&&this.value.copy(out,offset),offset+=this.length),out)}},{"../base":15,buffer:240,inherits:477}],15:[function(require,module,exports){var base=exports;base.Reporter=require("./reporter").Reporter,base.DecoderBuffer=require("./buffer").DecoderBuffer,base.EncoderBuffer=require("./buffer").EncoderBuffer,base.Node=require("./node")},{"./buffer":14,"./node":16,"./reporter":17}],16:[function(require,module,exports){var Reporter=require("../base").Reporter,EncoderBuffer=require("../base").EncoderBuffer,DecoderBuffer=require("../base").DecoderBuffer,assert=require("minimalistic-assert"),tags=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],methods=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(tags);function Node(enc,parent){var state={};this._baseState=state,state.enc=enc,state.parent=parent||null,state.children=null,state.tag=null,state.args=null,state.reverseArgs=null,state.choice=null,state.optional=!1,state.any=!1,state.obj=!1,state.use=null,state.useDecoder=null,state.key=null,state.default=null,state.explicit=null,state.implicit=null,state.contains=null,state.parent||(state.children=[],this._wrap())}module.exports=Node;var stateProps=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Node.prototype.clone=function(){var state=this._baseState,cstate={};stateProps.forEach(function(prop){cstate[prop]=state[prop]});var res=new this.constructor(cstate.parent);return res._baseState=cstate,res},Node.prototype._wrap=function(){var state=this._baseState;methods.forEach(function(method){this[method]=function(){var clone=new this.constructor(this);return state.children.push(clone),clone[method].apply(clone,arguments)}},this)},Node.prototype._init=function(body){var state=this._baseState;assert(null===state.parent),body.call(this),state.children=state.children.filter(function(child){return child._baseState.parent===this},this),assert.equal(state.children.length,1,"Root node can have only one child")},Node.prototype._useArgs=function(args){var state=this._baseState,children=args.filter(function(arg){return arg instanceof this.constructor},this);args=args.filter(function(arg){return!(arg instanceof this.constructor)},this),0!==children.length&&(assert(null===state.children),state.children=children,children.forEach(function(child){child._baseState.parent=this},this)),0!==args.length&&(assert(null===state.args),state.args=args,state.reverseArgs=args.map(function(arg){if("object"!=typeof arg||arg.constructor!==Object)return arg;var res={};return Object.keys(arg).forEach(function(key){key==(0|key)&&(key|=0);var value=arg[key];res[value]=key}),res}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(method){Node.prototype[method]=function(){var state=this._baseState;throw new Error(method+" not implemented for encoding: "+state.enc)}}),tags.forEach(function(tag){Node.prototype[tag]=function(){var state=this._baseState,args=Array.prototype.slice.call(arguments);return assert(null===state.tag),state.tag=tag,this._useArgs(args),this}}),Node.prototype.use=function(item){assert(item);var state=this._baseState;return assert(null===state.use),state.use=item,this},Node.prototype.optional=function(){return this._baseState.optional=!0,this},Node.prototype.def=function(val){var state=this._baseState;return assert(null===state.default),state.default=val,state.optional=!0,this},Node.prototype.explicit=function(num){var state=this._baseState;return assert(null===state.explicit&&null===state.implicit),state.explicit=num,this},Node.prototype.implicit=function(num){var state=this._baseState;return assert(null===state.explicit&&null===state.implicit),state.implicit=num,this},Node.prototype.obj=function(){var state=this._baseState,args=Array.prototype.slice.call(arguments);return state.obj=!0,0!==args.length&&this._useArgs(args),this},Node.prototype.key=function(newKey){var state=this._baseState;return assert(null===state.key),state.key=newKey,this},Node.prototype.any=function(){return this._baseState.any=!0,this},Node.prototype.choice=function(obj){var state=this._baseState;return assert(null===state.choice),state.choice=obj,this._useArgs(Object.keys(obj).map(function(key){return obj[key]})),this},Node.prototype.contains=function(item){var state=this._baseState;return assert(null===state.use),state.contains=item,this},Node.prototype._decode=function(input,options){var state=this._baseState;if(null===state.parent)return input.wrapResult(state.children[0]._decode(input,options));var prevObj,result=state.default,present=!0,prevKey=null;if(null!==state.key&&(prevKey=input.enterKey(state.key)),state.optional){var tag=null;if(null!==state.explicit?tag=state.explicit:null!==state.implicit?tag=state.implicit:null!==state.tag&&(tag=state.tag),null!==tag||state.any){if(present=this._peekTag(input,tag,state.any),input.isError(present))return present}else{var save=input.save();try{null===state.choice?this._decodeGeneric(state.tag,input,options):this._decodeChoice(input,options),present=!0}catch(e){present=!1}input.restore(save)}}if(state.obj&&present&&(prevObj=input.enterObject()),present){if(null!==state.explicit){var explicit=this._decodeTag(input,state.explicit);if(input.isError(explicit))return explicit;input=explicit}var start=input.offset;if(null===state.use&&null===state.choice){if(state.any)save=input.save();var body=this._decodeTag(input,null!==state.implicit?state.implicit:state.tag,state.any);if(input.isError(body))return body;state.any?result=input.raw(save):input=body}if(options&&options.track&&null!==state.tag&&options.track(input.path(),start,input.length,"tagged"),options&&options.track&&null!==state.tag&&options.track(input.path(),input.offset,input.length,"content"),result=state.any?result:null===state.choice?this._decodeGeneric(state.tag,input,options):this._decodeChoice(input,options),input.isError(result))return result;if(state.any||null!==state.choice||null===state.children||state.children.forEach(function(child){child._decode(input,options)}),state.contains&&("octstr"===state.tag||"bitstr"===state.tag)){var data=new DecoderBuffer(result);result=this._getUse(state.contains,input._reporterState.obj)._decode(data,options)}}return state.obj&&present&&(result=input.leaveObject(prevObj)),null===state.key||null===result&&!0!==present?null!==prevKey&&input.exitKey(prevKey):input.leaveKey(prevKey,state.key,result),result},Node.prototype._decodeGeneric=function(tag,input,options){var state=this._baseState;return"seq"===tag||"set"===tag?null:"seqof"===tag||"setof"===tag?this._decodeList(input,tag,state.args[0],options):/str$/.test(tag)?this._decodeStr(input,tag,options):"objid"===tag&&state.args?this._decodeObjid(input,state.args[0],state.args[1],options):"objid"===tag?this._decodeObjid(input,null,null,options):"gentime"===tag||"utctime"===tag?this._decodeTime(input,tag,options):"null_"===tag?this._decodeNull(input,options):"bool"===tag?this._decodeBool(input,options):"objDesc"===tag?this._decodeStr(input,tag,options):"int"===tag||"enum"===tag?this._decodeInt(input,state.args&&state.args[0],options):null!==state.use?this._getUse(state.use,input._reporterState.obj)._decode(input,options):input.error("unknown tag: "+tag)},Node.prototype._getUse=function(entity,obj){var state=this._baseState;return state.useDecoder=this._use(entity,obj),assert(null===state.useDecoder._baseState.parent),state.useDecoder=state.useDecoder._baseState.children[0],state.implicit!==state.useDecoder._baseState.implicit&&(state.useDecoder=state.useDecoder.clone(),state.useDecoder._baseState.implicit=state.implicit),state.useDecoder},Node.prototype._decodeChoice=function(input,options){var state=this._baseState,result=null,match=!1;return Object.keys(state.choice).some(function(key){var save=input.save(),node=state.choice[key];try{var value=node._decode(input,options);if(input.isError(value))return!1;result={type:key,value:value},match=!0}catch(e){return input.restore(save),!1}return!0},this),match?result:input.error("Choice not matched")},Node.prototype._createEncoderBuffer=function(data){return new EncoderBuffer(data,this.reporter)},Node.prototype._encode=function(data,reporter,parent){var state=this._baseState;if(null===state.default||state.default!==data){var result=this._encodeValue(data,reporter,parent);if(void 0!==result&&!this._skipDefault(result,reporter,parent))return result}},Node.prototype._encodeValue=function(data,reporter,parent){var state=this._baseState;if(null===state.parent)return state.children[0]._encode(data,reporter||new Reporter);var result=null;if(this.reporter=reporter,state.optional&&void 0===data){if(null===state.default)return;data=state.default}var content=null,primitive=!1;if(state.any)result=this._createEncoderBuffer(data);else if(state.choice)result=this._encodeChoice(data,reporter);else if(state.contains)content=this._getUse(state.contains,parent)._encode(data,reporter),primitive=!0;else if(state.children)content=state.children.map(function(child){if("null_"===child._baseState.tag)return child._encode(null,reporter,data);if(null===child._baseState.key)return reporter.error("Child should have a key");var prevKey=reporter.enterKey(child._baseState.key);if("object"!=typeof data)return reporter.error("Child expected, but input is not object");var res=child._encode(data[child._baseState.key],reporter,data);return reporter.leaveKey(prevKey),res},this).filter(function(child){return child}),content=this._createEncoderBuffer(content);else if("seqof"===state.tag||"setof"===state.tag){if(!state.args||1!==state.args.length)return reporter.error("Too many args for : "+state.tag);if(!Array.isArray(data))return reporter.error("seqof/setof, but data is not Array");var child=this.clone();child._baseState.implicit=null,content=this._createEncoderBuffer(data.map(function(item){var state=this._baseState;return this._getUse(state.args[0],data)._encode(item,reporter)},child))}else null!==state.use?result=this._getUse(state.use,parent)._encode(data,reporter):(content=this._encodePrimitive(state.tag,data),primitive=!0);if(!state.any&&null===state.choice){var tag=null!==state.implicit?state.implicit:state.tag,cls=null===state.implicit?"universal":"context";null===tag?null===state.use&&reporter.error("Tag could be omitted only for .use()"):null===state.use&&(result=this._encodeComposite(tag,primitive,cls,content))}return null!==state.explicit&&(result=this._encodeComposite(state.explicit,!1,"context",result)),result},Node.prototype._encodeChoice=function(data,reporter){var state=this._baseState,node=state.choice[data.type];return node||assert(!1,data.type+" not found in "+JSON.stringify(Object.keys(state.choice))),node._encode(data.value,reporter)},Node.prototype._encodePrimitive=function(tag,data){var state=this._baseState;if(/str$/.test(tag))return this._encodeStr(data,tag);if("objid"===tag&&state.args)return this._encodeObjid(data,state.reverseArgs[0],state.args[1]);if("objid"===tag)return this._encodeObjid(data,null,null);if("gentime"===tag||"utctime"===tag)return this._encodeTime(data,tag);if("null_"===tag)return this._encodeNull();if("int"===tag||"enum"===tag)return this._encodeInt(data,state.args&&state.reverseArgs[0]);if("bool"===tag)return this._encodeBool(data);if("objDesc"===tag)return this._encodeStr(data,tag);throw new Error("Unsupported tag: "+tag)},Node.prototype._isNumstr=function(str){return/^[0-9 ]*$/.test(str)},Node.prototype._isPrintstr=function(str){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(str)}},{"../base":15,"minimalistic-assert":720}],17:[function(require,module,exports){var inherits=require("inherits");function Reporter(options){this._reporterState={obj:null,path:[],options:options||{},errors:[]}}function ReporterError(path,msg){this.path=path,this.rethrow(msg)}exports.Reporter=Reporter,Reporter.prototype.isError=function(obj){return obj instanceof ReporterError},Reporter.prototype.save=function(){var state=this._reporterState;return{obj:state.obj,pathLen:state.path.length}},Reporter.prototype.restore=function(data){var state=this._reporterState;state.obj=data.obj,state.path=state.path.slice(0,data.pathLen)},Reporter.prototype.enterKey=function(key){return this._reporterState.path.push(key)},Reporter.prototype.exitKey=function(index){var state=this._reporterState;state.path=state.path.slice(0,index-1)},Reporter.prototype.leaveKey=function(index,key,value){var state=this._reporterState;this.exitKey(index),null!==state.obj&&(state.obj[key]=value)},Reporter.prototype.path=function(){return this._reporterState.path.join("/")},Reporter.prototype.enterObject=function(){var state=this._reporterState,prev=state.obj;return state.obj={},prev},Reporter.prototype.leaveObject=function(prev){var state=this._reporterState,now=state.obj;return state.obj=prev,now},Reporter.prototype.error=function(msg){var err,state=this._reporterState,inherited=msg instanceof ReporterError;if(err=inherited?msg:new ReporterError(state.path.map(function(elem){return"["+JSON.stringify(elem)+"]"}).join(""),msg.message||msg,msg.stack),!state.options.partial)throw err;return inherited||state.errors.push(err),err},Reporter.prototype.wrapResult=function(result){var state=this._reporterState;return state.options.partial?{result:this.isError(result)?null:result,errors:state.errors}:result},inherits(ReporterError,Error),ReporterError.prototype.rethrow=function(msg){if(this.message=msg+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,ReporterError),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:477}],18:[function(require,module,exports){var constants=require("../constants");exports.tagClass={0:"universal",1:"application",2:"context",3:"private"},exports.tagClassByName=constants._reverse(exports.tagClass),exports.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},exports.tagByName=constants._reverse(exports.tag)},{"../constants":19}],19:[function(require,module,exports){var constants=exports;constants._reverse=function(map){var res={};return Object.keys(map).forEach(function(key){(0|key)==key&&(key|=0);var value=map[key];res[value]=key}),res},constants.der=require("./der")},{"./der":18}],20:[function(require,module,exports){var inherits=require("inherits"),asn1=require("../../asn1"),base=asn1.base,bignum=asn1.bignum,der=asn1.constants.der;function DERDecoder(entity){this.enc="der",this.name=entity.name,this.entity=entity,this.tree=new DERNode,this.tree._init(entity.body)}function DERNode(parent){base.Node.call(this,"der",parent)}function derDecodeTag(buf,fail){var tag=buf.readUInt8(fail);if(buf.isError(tag))return tag;var cls=der.tagClass[tag>>6],primitive=0==(32&tag);if(31==(31&tag)){var oct=tag;for(tag=0;128==(128&oct);){if(oct=buf.readUInt8(fail),buf.isError(oct))return oct;tag<<=7,tag|=127&oct}}else tag&=31;return{cls:cls,primitive:primitive,tag:tag,tagStr:der.tag[tag]}}function derDecodeLen(buf,primitive,fail){var len=buf.readUInt8(fail);if(buf.isError(len))return len;if(!primitive&&128===len)return null;if(0==(128&len))return len;var num=127&len;if(num>4)return buf.error("length octect is too long");len=0;for(var i=0;i=31)return reporter.error("Multi-octet tag encoding unsupported");primitive||(res|=32);return res|=der.tagClassByName[cls||"universal"]<<6}(tag,primitive,cls,this.reporter);if(content.length<128)return(header=new Buffer(2))[0]=encodedTag,header[1]=content.length,this._createEncoderBuffer([header,content]);for(var lenOctets=1,i=content.length;i>=256;i>>=8)lenOctets++;(header=new Buffer(2+lenOctets))[0]=encodedTag,header[1]=128|lenOctets;i=1+lenOctets;for(var j=content.length;j>0;i--,j>>=8)header[i]=255&j;return this._createEncoderBuffer([header,content])},DERNode.prototype._encodeStr=function(str,tag){if("bitstr"===tag)return this._createEncoderBuffer([0|str.unused,str.data]);if("bmpstr"===tag){for(var buf=new Buffer(2*str.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");id.splice(0,2,40*id[0]+id[1])}var size=0;for(i=0;i=128;ident>>=7)size++}var objid=new Buffer(size),offset=objid.length-1;for(i=id.length-1;i>=0;i--){ident=id[i];for(objid[offset--]=127&ident;(ident>>=7)>0;)objid[offset--]=128|127&ident}return this._createEncoderBuffer(objid)},DERNode.prototype._encodeTime=function(time,tag){var str,date=new Date(time);return"gentime"===tag?str=[two(date.getFullYear()),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join(""):"utctime"===tag?str=[two(date.getFullYear()%100),two(date.getUTCMonth()+1),two(date.getUTCDate()),two(date.getUTCHours()),two(date.getUTCMinutes()),two(date.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+tag+" time is not supported yet"),this._encodeStr(str,"octstr")},DERNode.prototype._encodeNull=function(){return this._createEncoderBuffer("")},DERNode.prototype._encodeInt=function(num,values){if("string"==typeof num){if(!values)return this.reporter.error("String int or enum given, but no values map");if(!values.hasOwnProperty(num))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(num));num=values[num]}if("number"!=typeof num&&!Buffer.isBuffer(num)){var numArray=num.toArray();!num.sign&&128&numArray[0]&&numArray.unshift(0),num=new Buffer(numArray)}if(Buffer.isBuffer(num)){var size=num.length;0===num.length&&size++;var out=new Buffer(size);return num.copy(out),0===num.length&&(out[0]=0),this._createEncoderBuffer(out)}if(num<128)return this._createEncoderBuffer(num);if(num<256)return this._createEncoderBuffer([0,num]);size=1;for(var i=num;i>=256;i>>=8)size++;for(i=(out=new Array(size)).length-1;i>=0;i--)out[i]=255&num,num>>=8;return 128&out[0]&&out.unshift(0),this._createEncoderBuffer(new Buffer(out))},DERNode.prototype._encodeBool=function(value){return this._createEncoderBuffer(value?255:0)},DERNode.prototype._use=function(entity,obj){return"function"==typeof entity&&(entity=entity(obj)),entity._getEncoder("der").tree},DERNode.prototype._skipDefault=function(dataBuffer,reporter,parent){var i,state=this._baseState;if(null===state.default)return!1;var data=dataBuffer.join();if(void 0===state.defaultBuffer&&(state.defaultBuffer=this._encodeValue(state.default,reporter,parent).join()),data.length!==state.defaultBuffer.length)return!1;for(i=0;i=0;i--)if(ka[i]!==kb[i])return!1;for(i=ka.length-1;i>=0;i--)if(key=ka[i],!_deepEqual(a[key],b[key],strict,actualVisitedObjects))return!1;return!0}(actual,expected,strict,memos))}return strict?actual===expected:actual==expected}function isArguments(object){return"[object Arguments]"==Object.prototype.toString.call(object)}function expectedException(actual,expected){if(!actual||!expected)return!1;if("[object RegExp]"==Object.prototype.toString.call(expected))return expected.test(actual);try{if(actual instanceof expected)return!0}catch(e){}return!Error.isPrototypeOf(expected)&&!0===expected.call({},actual)}function _throws(shouldThrow,block,expected,message){var actual;if("function"!=typeof block)throw new TypeError('"block" argument must be a function');"string"==typeof expected&&(message=expected,expected=null),actual=function(block){var error;try{block()}catch(e){error=e}return error}(block),message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:"."),shouldThrow&&!actual&&fail(actual,expected,"Missing expected exception"+message);var userProvidedMessage="string"==typeof message,isUnwantedException=!shouldThrow&&util.isError(actual),isUnexpectedException=!shouldThrow&&actual&&!expected;if((isUnwantedException&&userProvidedMessage&&expectedException(actual,expected)||isUnexpectedException)&&fail(actual,expected,"Got unwanted exception"+message),shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual)throw actual}assert.AssertionError=function(options){var self;this.name="AssertionError",this.actual=options.actual,this.expected=options.expected,this.operator=options.operator,options.message?(this.message=options.message,this.generatedMessage=!1):(this.message=truncate(inspect((self=this).actual),128)+" "+self.operator+" "+truncate(inspect(self.expected),128),this.generatedMessage=!0);var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace)Error.captureStackTrace(this,stackStartFunction);else{var err=new Error;if(err.stack){var out=err.stack,fn_name=getName(stackStartFunction),idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}},util.inherits(assert.AssertionError,Error),assert.fail=fail,assert.ok=ok,assert.equal=function(actual,expected,message){actual!=expected&&fail(actual,expected,message,"==",assert.equal)},assert.notEqual=function(actual,expected,message){actual==expected&&fail(actual,expected,message,"!=",assert.notEqual)},assert.deepEqual=function(actual,expected,message){_deepEqual(actual,expected,!1)||fail(actual,expected,message,"deepEqual",assert.deepEqual)},assert.deepStrictEqual=function(actual,expected,message){_deepEqual(actual,expected,!0)||fail(actual,expected,message,"deepStrictEqual",assert.deepStrictEqual)},assert.notDeepEqual=function(actual,expected,message){_deepEqual(actual,expected,!1)&&fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)},assert.notDeepStrictEqual=function notDeepStrictEqual(actual,expected,message){_deepEqual(actual,expected,!0)&&fail(actual,expected,message,"notDeepStrictEqual",notDeepStrictEqual)},assert.strictEqual=function(actual,expected,message){actual!==expected&&fail(actual,expected,message,"===",assert.strictEqual)},assert.notStrictEqual=function(actual,expected,message){actual===expected&&fail(actual,expected,message,"!==",assert.notStrictEqual)},assert.throws=function(block,error,message){_throws(!0,block,error,message)},assert.doesNotThrow=function(block,error,message){_throws(!1,block,error,message)},assert.ifError=function(err){if(err)throw err},assert.strict=objectAssign(function strict(value,message){value||fail(value,!0,message,"==",strict)},assert,{equal:assert.strictEqual,deepEqual:assert.deepStrictEqual,notEqual:assert.notStrictEqual,notDeepEqual:assert.notDeepStrictEqual}),assert.strict.strict=assert.strict;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)hasOwn.call(obj,key)&&keys.push(key);return keys}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":761,"util/":29}],27:[function(require,module,exports){"function"==typeof Object.create?module.exports=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})}:module.exports=function(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}},{}],28:[function(require,module,exports){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},{}],29:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}}),x=args[i];i=3&&(ctx.depth=arguments[2]),arguments.length>=4&&(ctx.colors=arguments[3]),isBoolean(opts)?ctx.showHidden=opts:opts&&exports._extend(ctx,opts),isUndefined(ctx.showHidden)&&(ctx.showHidden=!1),isUndefined(ctx.depth)&&(ctx.depth=2),isUndefined(ctx.colors)&&(ctx.colors=!1),isUndefined(ctx.customInspect)&&(ctx.customInspect=!0),ctx.colors&&(ctx.stylize=stylizeWithColor),formatValue(ctx,obj,ctx.depth)}function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];return style?"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m":str}function stylizeNoColor(str,styleType){return str}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&(!value.constructor||value.constructor.prototype!==value)){var ret=value.inspect(recurseTimes,ctx);return isString(ret)||(ret=formatValue(ctx,ret,recurseTimes)),ret}var primitive=function(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=function(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}(keys);if(ctx.showHidden&&(keys=Object.getOwnPropertyNames(value)),isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0))return formatError(value);if(0===keys.length){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value))return ctx.stylize(RegExp.prototype.toString.call(value),"regexp");if(isDate(value))return ctx.stylize(Date.prototype.toString.call(value),"date");if(isError(value))return formatError(value)}var output,base="",array=!1,braces=["{","}"];(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value))&&(base=" [Function"+(value.name?": "+value.name:"")+"]");return isRegExp(value)&&(base=" "+RegExp.prototype.toString.call(value)),isDate(value)&&(base=" "+Date.prototype.toUTCString.call(value)),isError(value)&&(base=" "+formatError(value)),0!==keys.length||array&&0!=value.length?recurseTimes<0?isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special"):(ctx.seen.push(value),output=array?function(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i=0&&0,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1];return braces[0]+base+" "+output.join(", ")+" "+braces[1]}(output,base,braces)):braces[0]+base+braces[1]}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if((desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]}).get?str=desc.set?ctx.stylize("[Getter/Setter]","special"):ctx.stylize("[Getter]","special"):desc.set&&(str=ctx.stylize("[Setter]","special")),hasOwnProperty(visibleKeys,key)||(name="["+key+"]"),str||(ctx.seen.indexOf(desc.value)<0?(str=isNull(recurseTimes)?formatValue(ctx,desc.value,null):formatValue(ctx,desc.value,recurseTimes-1)).indexOf("\n")>-1&&(str=array?str.split("\n").map(function(line){return" "+line}).join("\n").substr(2):"\n"+str.split("\n").map(function(line){return" "+line}).join("\n")):str=ctx.stylize("[Circular]","special")),isUndefined(name)){if(array&&key.match(/^\d+$/))return str;(name=JSON.stringify(""+key)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(name=name.substr(1,name.length-2),name=ctx.stylize(name,"name")):(name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),name=ctx.stylize(name,"string"))}return name+": "+str}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return isObject(re)&&"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return isObject(d)&&"[object Date]"===objectToString(d)}function isError(e){return isObject(e)&&("[object Error]"===objectToString(e)||e instanceof Error)}function isFunction(arg){return"function"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}exports.debuglog=function(set){if(isUndefined(debugEnviron)&&(debugEnviron=process.env.NODE_DEBUG||""),set=set.toUpperCase(),!debugs[set])if(new RegExp("\\b"+set+"\\b","i").test(debugEnviron)){var pid=process.pid;debugs[set]=function(){var msg=exports.format.apply(exports,arguments);console.error("%s %d: %s",set,pid,msg)}}else debugs[set]=function(){};return debugs[set]},exports.inspect=inspect,inspect.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]},inspect.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=function(arg){return null==arg},exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=function(arg){return"symbol"==typeof arg},exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=function(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||void 0===arg},exports.isBuffer=require("./support/isBuffer");var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}exports.log=function(){var d,time;console.log("%s - %s",(d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":"),[d.getDate(),months[d.getMonth()],time].join(" ")),exports.format.apply(exports,arguments))},exports.inherits=require("inherits"),exports._extend=function(origin,add){if(!add||!isObject(add))return origin;for(var keys=Object.keys(add),i=keys.length;i--;)origin[keys[i]]=add[keys[i]];return origin}}).call(this,require("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":28,_process:774,inherits:27}],30:[function(require,module,exports){module.exports=require("./lib/axios")},{"./lib/axios":32}],31:[function(require,module,exports){"use strict";var utils=require("./../utils"),settle=require("./../core/settle"),buildURL=require("./../helpers/buildURL"),parseHeaders=require("./../helpers/parseHeaders"),isURLSameOrigin=require("./../helpers/isURLSameOrigin"),createError=require("../core/createError");module.exports=function(config){return new Promise(function(resolve,reject){var requestData=config.data,requestHeaders=config.headers;utils.isFormData(requestData)&&delete requestHeaders["Content-Type"];var request=new XMLHttpRequest;if(config.auth){var username=config.auth.username||"",password=config.auth.password||"";requestHeaders.Authorization="Basic "+btoa(username+":"+password)}if(request.open(config.method.toUpperCase(),buildURL(config.url,config.params,config.paramsSerializer),!0),request.timeout=config.timeout,request.onreadystatechange=function(){if(request&&4===request.readyState&&(0!==request.status||request.responseURL&&0===request.responseURL.indexOf("file:"))){var responseHeaders="getAllResponseHeaders"in request?parseHeaders(request.getAllResponseHeaders()):null,response={data:config.responseType&&"text"!==config.responseType?request.response:request.responseText,status:request.status,statusText:request.statusText,headers:responseHeaders,config:config,request:request};settle(resolve,reject,response),request=null}},request.onerror=function(){reject(createError("Network Error",config,null,request)),request=null},request.ontimeout=function(){reject(createError("timeout of "+config.timeout+"ms exceeded",config,"ECONNABORTED",request)),request=null},utils.isStandardBrowserEnv()){var cookies=require("./../helpers/cookies"),xsrfValue=(config.withCredentials||isURLSameOrigin(config.url))&&config.xsrfCookieName?cookies.read(config.xsrfCookieName):void 0;xsrfValue&&(requestHeaders[config.xsrfHeaderName]=xsrfValue)}if("setRequestHeader"in request&&utils.forEach(requestHeaders,function(val,key){void 0===requestData&&"content-type"===key.toLowerCase()?delete requestHeaders[key]:request.setRequestHeader(key,val)}),config.withCredentials&&(request.withCredentials=!0),config.responseType)try{request.responseType=config.responseType}catch(e){if("json"!==config.responseType)throw e}"function"==typeof config.onDownloadProgress&&request.addEventListener("progress",config.onDownloadProgress),"function"==typeof config.onUploadProgress&&request.upload&&request.upload.addEventListener("progress",config.onUploadProgress),config.cancelToken&&config.cancelToken.promise.then(function(cancel){request&&(request.abort(),reject(cancel),request=null)}),void 0===requestData&&(requestData=null),request.send(requestData)})}},{"../core/createError":38,"./../core/settle":41,"./../helpers/buildURL":45,"./../helpers/cookies":47,"./../helpers/isURLSameOrigin":49,"./../helpers/parseHeaders":51,"./../utils":53}],32:[function(require,module,exports){"use strict";var utils=require("./utils"),bind=require("./helpers/bind"),Axios=require("./core/Axios"),defaults=require("./defaults");function createInstance(defaultConfig){var context=new Axios(defaultConfig),instance=bind(Axios.prototype.request,context);return utils.extend(instance,Axios.prototype,context),utils.extend(instance,context),instance}var axios=createInstance(defaults);axios.Axios=Axios,axios.create=function(instanceConfig){return createInstance(utils.merge(defaults,instanceConfig))},axios.Cancel=require("./cancel/Cancel"),axios.CancelToken=require("./cancel/CancelToken"),axios.isCancel=require("./cancel/isCancel"),axios.all=function(promises){return Promise.all(promises)},axios.spread=require("./helpers/spread"),module.exports=axios,module.exports.default=axios},{"./cancel/Cancel":33,"./cancel/CancelToken":34,"./cancel/isCancel":35,"./core/Axios":36,"./defaults":43,"./helpers/bind":44,"./helpers/spread":52,"./utils":53}],33:[function(require,module,exports){"use strict";function Cancel(message){this.message=message}Cancel.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0,module.exports=Cancel},{}],34:[function(require,module,exports){"use strict";var Cancel=require("./Cancel");function CancelToken(executor){if("function"!=typeof executor)throw new TypeError("executor must be a function.");var resolvePromise;this.promise=new Promise(function(resolve){resolvePromise=resolve});var token=this;executor(function(message){token.reason||(token.reason=new Cancel(message),resolvePromise(token.reason))})}CancelToken.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},CancelToken.source=function(){var cancel;return{token:new CancelToken(function(c){cancel=c}),cancel:cancel}},module.exports=CancelToken},{"./Cancel":33}],35:[function(require,module,exports){"use strict";module.exports=function(value){return!(!value||!value.__CANCEL__)}},{}],36:[function(require,module,exports){"use strict";var defaults=require("./../defaults"),utils=require("./../utils"),InterceptorManager=require("./InterceptorManager"),dispatchRequest=require("./dispatchRequest");function Axios(instanceConfig){this.defaults=instanceConfig,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}Axios.prototype.request=function(config){"string"==typeof config&&(config=utils.merge({url:arguments[0]},arguments[1])),(config=utils.merge(defaults,{method:"get"},this.defaults,config)).method=config.method.toLowerCase();var chain=[dispatchRequest,void 0],promise=Promise.resolve(config);for(this.interceptors.request.forEach(function(interceptor){chain.unshift(interceptor.fulfilled,interceptor.rejected)}),this.interceptors.response.forEach(function(interceptor){chain.push(interceptor.fulfilled,interceptor.rejected)});chain.length;)promise=promise.then(chain.shift(),chain.shift());return promise},utils.forEach(["delete","get","head","options"],function(method){Axios.prototype[method]=function(url,config){return this.request(utils.merge(config||{},{method:method,url:url}))}}),utils.forEach(["post","put","patch"],function(method){Axios.prototype[method]=function(url,data,config){return this.request(utils.merge(config||{},{method:method,url:url,data:data}))}}),module.exports=Axios},{"./../defaults":43,"./../utils":53,"./InterceptorManager":37,"./dispatchRequest":39}],37:[function(require,module,exports){"use strict";var utils=require("./../utils");function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function(fulfilled,rejected){return this.handlers.push({fulfilled:fulfilled,rejected:rejected}),this.handlers.length-1},InterceptorManager.prototype.eject=function(id){this.handlers[id]&&(this.handlers[id]=null)},InterceptorManager.prototype.forEach=function(fn){utils.forEach(this.handlers,function(h){null!==h&&fn(h)})},module.exports=InterceptorManager},{"./../utils":53}],38:[function(require,module,exports){"use strict";var enhanceError=require("./enhanceError");module.exports=function(message,config,code,request,response){var error=new Error(message);return enhanceError(error,config,code,request,response)}},{"./enhanceError":40}],39:[function(require,module,exports){"use strict";var utils=require("./../utils"),transformData=require("./transformData"),isCancel=require("../cancel/isCancel"),defaults=require("../defaults"),isAbsoluteURL=require("./../helpers/isAbsoluteURL"),combineURLs=require("./../helpers/combineURLs");function throwIfCancellationRequested(config){config.cancelToken&&config.cancelToken.throwIfRequested()}module.exports=function(config){return throwIfCancellationRequested(config),config.baseURL&&!isAbsoluteURL(config.url)&&(config.url=combineURLs(config.baseURL,config.url)),config.headers=config.headers||{},config.data=transformData(config.data,config.headers,config.transformRequest),config.headers=utils.merge(config.headers.common||{},config.headers[config.method]||{},config.headers||{}),utils.forEach(["delete","get","head","post","put","patch","common"],function(method){delete config.headers[method]}),(config.adapter||defaults.adapter)(config).then(function(response){return throwIfCancellationRequested(config),response.data=transformData(response.data,response.headers,config.transformResponse),response},function(reason){return isCancel(reason)||(throwIfCancellationRequested(config),reason&&reason.response&&(reason.response.data=transformData(reason.response.data,reason.response.headers,config.transformResponse))),Promise.reject(reason)})}},{"../cancel/isCancel":35,"../defaults":43,"./../helpers/combineURLs":46,"./../helpers/isAbsoluteURL":48,"./../utils":53,"./transformData":42}],40:[function(require,module,exports){"use strict";module.exports=function(error,config,code,request,response){return error.config=config,code&&(error.code=code),error.request=request,error.response=response,error}},{}],41:[function(require,module,exports){"use strict";var createError=require("./createError");module.exports=function(resolve,reject,response){var validateStatus=response.config.validateStatus;response.status&&validateStatus&&!validateStatus(response.status)?reject(createError("Request failed with status code "+response.status,response.config,null,response.request,response)):resolve(response)}},{"./createError":38}],42:[function(require,module,exports){"use strict";var utils=require("./../utils");module.exports=function(data,headers,fns){return utils.forEach(fns,function(fn){data=fn(data,headers)}),data}},{"./../utils":53}],43:[function(require,module,exports){(function(process){"use strict";var utils=require("./utils"),normalizeHeaderName=require("./helpers/normalizeHeaderName"),DEFAULT_CONTENT_TYPE={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(headers,value){!utils.isUndefined(headers)&&utils.isUndefined(headers["Content-Type"])&&(headers["Content-Type"]=value)}var adapter,defaults={adapter:("undefined"!=typeof XMLHttpRequest?adapter=require("./adapters/xhr"):void 0!==process&&(adapter=require("./adapters/http")),adapter),transformRequest:[function(data,headers){return normalizeHeaderName(headers,"Content-Type"),utils.isFormData(data)||utils.isArrayBuffer(data)||utils.isBuffer(data)||utils.isStream(data)||utils.isFile(data)||utils.isBlob(data)?data:utils.isArrayBufferView(data)?data.buffer:utils.isURLSearchParams(data)?(setContentTypeIfUnset(headers,"application/x-www-form-urlencoded;charset=utf-8"),data.toString()):utils.isObject(data)?(setContentTypeIfUnset(headers,"application/json;charset=utf-8"),JSON.stringify(data)):data}],transformResponse:[function(data){if("string"==typeof data)try{data=JSON.parse(data)}catch(e){}return data}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(status){return status>=200&&status<300}};defaults.headers={common:{Accept:"application/json, text/plain, */*"}},utils.forEach(["delete","get","head"],function(method){defaults.headers[method]={}}),utils.forEach(["post","put","patch"],function(method){defaults.headers[method]=utils.merge(DEFAULT_CONTENT_TYPE)}),module.exports=defaults}).call(this,require("_process"))},{"./adapters/http":31,"./adapters/xhr":31,"./helpers/normalizeHeaderName":50,"./utils":53,_process:774}],44:[function(require,module,exports){"use strict";module.exports=function(fn,thisArg){return function(){for(var args=new Array(arguments.length),i=0;i=0)return;parsed[key]="set-cookie"===key?(parsed[key]?parsed[key]:[]).concat([val]):parsed[key]?parsed[key]+", "+val:val}}),parsed):parsed}},{"./../utils":53}],52:[function(require,module,exports){"use strict";module.exports=function(callback){return function(arr){return callback.apply(null,arr)}}},{}],53:[function(require,module,exports){"use strict";var bind=require("./helpers/bind"),isBuffer=require("is-buffer"),toString=Object.prototype.toString;function isArray(val){return"[object Array]"===toString.call(val)}function isObject(val){return null!==val&&"object"==typeof val}function isFunction(val){return"[object Function]"===toString.call(val)}function forEach(obj,fn){if(null!==obj&&void 0!==obj)if("object"!=typeof obj&&(obj=[obj]),isArray(obj))for(var i=0,l=obj.length;i=255)throw new TypeError("Alphabet too long");var BASE_MAP=new Uint8Array(256);BASE_MAP.fill(255);for(var i=0;i>>0,b256=new Uint8Array(size);source[psz];){var carry=BASE_MAP[source.charCodeAt(psz)];if(255===carry)return;for(var i=0,it3=size-1;(0!==carry||i>>0,b256[it3]=carry%256>>>0,carry=carry/256>>>0;if(0!==carry)throw new Error("Non-zero carry");length=i,psz++}if(" "!==source[psz]){for(var it4=size-length;it4!==size&&0===b256[it4];)it4++;var vch=_Buffer.allocUnsafe(zeroes+(size-it4));vch.fill(0,0,zeroes);for(var j=zeroes;it4!==size;)vch[j++]=b256[it4++];return vch}}}return{encode:function(source){if(!_Buffer.isBuffer(source))throw new TypeError("Expected Buffer");if(0===source.length)return"";for(var zeroes=0,length=0,pbegin=0,pend=source.length;pbegin!==pend&&0===source[pbegin];)pbegin++,zeroes++;for(var size=(pend-pbegin)*iFACTOR+1>>>0,b58=new Uint8Array(size);pbegin!==pend;){for(var carry=source[pbegin],i=0,it1=size-1;(0!==carry||i>>0,b58[it1]=carry%BASE>>>0,carry=carry/BASE>>>0;if(0!==carry)throw new Error("Non-zero carry");length=i,pbegin++}for(var it2=size-length;it2!==size&&0===b58[it2];)it2++;for(var str=LEADER.repeat(zeroes);it20?validLen-4:validLen;for(i=0;i>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp;2===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[curByte++]=255&tmp);1===placeHoldersLen&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=255&tmp);return arr},exports.fromByteArray=function(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,parts=[],i=0,len2=len-extraBytes;ilen2?len2:i+16383));1===extraBytes?(tmp=uint8[len-1],parts.push(lookup[tmp>>2]+lookup[tmp<<4&63]+"==")):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],parts.push(lookup[tmp>>10]+lookup[tmp>>4&63]+lookup[tmp<<2&63]+"="));return parts.join("")};for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i0)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");return-1===validLen&&(validLen=len),[validLen,validLen===len?0:4-validLen%4]}function encodeChunk(uint8,start,end){for(var tmp,num,output=[],i=start;i>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]);return output.join("")}revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},{}],58:[function(require,module,exports){(function(Buffer){var bs58check=require("bs58check"),cashaddr=require("cashaddrjs-slp"),Format={Legacy:"legacy",Bitpay:"bitpay",Cashaddr:"cashaddr",Slpaddr:"slpaddr"},Network={Mainnet:"mainnet",Testnet:"testnet"},Type={};function detectAddressFormat(address){return decodeAddress(address).format}function detectAddressNetwork(address){return decodeAddress(address).network}function detectAddressType(address){return decodeAddress(address).type}Type.P2PKH="p2pkh",Type.P2SH="p2sh";var VERSION_BYTE={};function decodeAddress(address){try{return function(address){try{var payload=bs58check.decode(address);if(payload.length!==BASE_58_CHECK_PAYLOAD_LENGTH)throw new InvalidAddressError;var versionByte=payload[0],hash=Array.prototype.slice.call(payload,1);switch(versionByte){case VERSION_BYTE[Format.Legacy][Network.Mainnet][Type.P2PKH]:return{hash:hash,format:Format.Legacy,network:Network.Mainnet,type:Type.P2PKH};case VERSION_BYTE[Format.Legacy][Network.Mainnet][Type.P2SH]:return{hash:hash,format:Format.Legacy,network:Network.Mainnet,type:Type.P2SH};case VERSION_BYTE[Format.Legacy][Network.Testnet][Type.P2PKH]:return{hash:hash,format:Format.Legacy,network:Network.Testnet,type:Type.P2PKH};case VERSION_BYTE[Format.Legacy][Network.Testnet][Type.P2SH]:return{hash:hash,format:Format.Legacy,network:Network.Testnet,type:Type.P2SH};case VERSION_BYTE[Format.Bitpay][Network.Mainnet][Type.P2PKH]:return{hash:hash,format:Format.Bitpay,network:Network.Mainnet,type:Type.P2PKH};case VERSION_BYTE[Format.Bitpay][Network.Mainnet][Type.P2SH]:return{hash:hash,format:Format.Bitpay,network:Network.Mainnet,type:Type.P2SH}}}catch(error){}throw new InvalidAddressError}(address)}catch(error){}try{return function(address){if(-1!==address.indexOf(":"))try{return decodeCashAddressWithPrefix(address)}catch(error){}else for(var prefixes=["bitcoincash","bchtest","regtest","bchreg"],i=0;i>25;return(33554431&pre)<<5^996825010&-(b>>0&1)^642813549&-(b>>1&1)^513874426&-(b>>2&1)^1027748829&-(b>>3&1)^705979059&-(b>>4&1)}function prefixChk(prefix){for(var chk=1,i=0;i126)return"Invalid prefix ("+prefix+")";chk=polymodStep(chk)^c>>5}for(chk=polymodStep(chk),i=0;iLIMIT)return"Exceeds length limit";var lowered=str.toLowerCase(),uppered=str.toUpperCase();if(str!==lowered&&str!==uppered)return"Mixed-case string "+str;var split=(str=lowered).lastIndexOf("1");if(-1===split)return"No separator character for "+str;if(0===split)return"Missing prefix for "+str;var prefix=str.slice(0,split),wordChars=str.slice(split+1);if(wordChars.length<6)return"Data too short";var chk=prefixChk(prefix);if("string"==typeof chk)return chk;for(var words=[],i=0;i=wordChars.length||words.push(v)}return 1!==chk?"Invalid checksum for "+str:{prefix:prefix,words:words}}function convert(data,inBits,outBits,pad){for(var value=0,bits=0,maxV=(1<=outBits;)bits-=outBits,result.push(value>>bits&maxV);if(pad)bits>0&&result.push(value<=inBits)return"Excess padding";if(value<LIMIT)throw new TypeError("Exceeds length limit");var chk=prefixChk(prefix=prefix.toLowerCase());if("string"==typeof chk)throw new Error(chk);for(var result=prefix+"1",i=0;i>5!=0)throw new Error("Non 5-bit word");chk=polymodStep(chk)^x,result+=ALPHABET.charAt(x)}for(i=0;i<6;++i)chk=polymodStep(chk);for(chk^=1,i=0;i<6;++i){var v=chk>>5*(5-i)&31;result+=ALPHABET.charAt(v)}return result},toWordsUnsafe:function(bytes){var res=convert(bytes,8,5,!0);if(Array.isArray(res))return res},toWords:function(bytes){var res=convert(bytes,8,5,!0);if(Array.isArray(res))return res;throw new Error(res)},fromWordsUnsafe:function(words){var res=convert(words,5,8,!1);if(Array.isArray(res))return res},fromWords:function(words){var res=convert(words,5,8,!1);if(Array.isArray(res))return res;throw new Error(res)}}},{}],61:[function(require,module,exports){var bigInt=function(undefined){"use strict";var BASE=1e7,LOG_BASE=7,MAX_INT=9007199254740992,MAX_INT_ARR=smallToArray(MAX_INT),LOG_MAX_INT=Math.log(MAX_INT);function Integer(v,radix){return void 0===v?Integer[0]:void 0!==radix?10==+radix?parseValue(v):parseBase(v,radix):parseValue(v)}function BigInteger(value,sign){this.value=value,this.sign=sign,this.isSmall=!1}function SmallInteger(value){this.value=value,this.sign=value<0,this.isSmall=!0}function isPrecise(n){return-MAX_INT0?Math.floor(n):Math.ceil(n)}function add(a,b){var sum,i,l_a=a.length,l_b=b.length,r=new Array(l_a),carry=0,base=BASE;for(i=0;i=base?1:0,r[i]=sum-carry*base;for(;i0&&r.push(carry),r}function addAny(a,b){return a.length>=b.length?add(a,b):add(b,a)}function addSmall(a,carry){var sum,i,l=a.length,r=new Array(l),base=BASE;for(i=0;i0;)r[i++]=carry%base,carry=Math.floor(carry/base);return r}function subtract(a,b){var i,difference,a_l=a.length,b_l=b.length,r=new Array(a_l),borrow=0,base=BASE;for(i=0;i0;)r[i++]=carry%base,carry=Math.floor(carry/base);return r}function shiftLeft(x,n){for(var r=[];n-- >0;)r.push(0);return r.concat(x)}function multiplySmallAndArray(a,b,sign){return new BigInteger(a=0;--i)remainder=(divisor=remainder*base+value[i])-(q=truncate(divisor/lambda))*lambda,quotient[i]=0|q;return[quotient,0|remainder]}function divModAny(self,v){var value,quotient,n=parseValue(v),a=self.value,b=n.value;if(0===b)throw new Error("Cannot divide by zero");if(self.isSmall)return n.isSmall?[new SmallInteger(truncate(a/b)),new SmallInteger(a%b)]:[Integer[0],self];if(n.isSmall){if(1===b)return[self,Integer[0]];if(-1==b)return[self.negate(),Integer[0]];var abs=Math.abs(b);if(abs=0;shift--){for(quotientDigit=base-1,remainder[shift+b_l]!==divisorMostSignificantDigit&&(quotientDigit=Math.floor((remainder[shift+b_l]*base+remainder[shift+b_l-1])/divisorMostSignificantDigit)),carry=0,borrow=0,l=divisor.length,i=0;ib_l&&(highx=(highx+1)*base),guess=Math.ceil(highx/highy);do{if(compareAbs(check=multiplySmall(b,guess),part)<=0)break;guess--}while(guess);result.push(guess),part=subtract(part,check)}return result.reverse(),[arrayToSmall(result),arrayToSmall(part)]}(a,b))[0];var qSign=self.sign!==n.sign,mod=value[1],mSign=self.sign;return"number"==typeof quotient?(qSign&&(quotient=-quotient),quotient=new SmallInteger(quotient)):quotient=new BigInteger(quotient,qSign),"number"==typeof mod?(mSign&&(mod=-mod),mod=new SmallInteger(mod)):mod=new BigInteger(mod,mSign),[quotient,mod]}function compareAbs(a,b){if(a.length!==b.length)return a.length>b.length?1:-1;for(var i=a.length-1;i>=0;i--)if(a[i]!==b[i])return a[i]>b[i]?1:-1;return 0}function isBasicPrime(v){var n=v.abs();return!n.isUnit()&&(!!(n.equals(2)||n.equals(3)||n.equals(5))||!(n.isEven()||n.isDivisibleBy(3)||n.isDivisibleBy(5))&&(!!n.lesser(49)||void 0))}function millerRabinTest(n,a){for(var d,i,x,nPrev=n.prev(),b=nPrev,r=0;b.isEven();)b=b.divide(2),r++;next:for(i=0;i=0?value=subtract(a,b):(value=subtract(b,a),sign=!sign),"number"==typeof(value=arrayToSmall(value))?(sign&&(value=-value),new SmallInteger(value)):new BigInteger(value,sign)}(a,b,this.sign)},BigInteger.prototype.minus=BigInteger.prototype.subtract,SmallInteger.prototype.subtract=function(v){var n=parseValue(v),a=this.value;if(a<0!==n.sign)return this.add(n.negate());var b=n.value;return n.isSmall?new SmallInteger(a-b):subtractSmall(b,Math.abs(a),a>=0)},SmallInteger.prototype.minus=SmallInteger.prototype.subtract,BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)},SmallInteger.prototype.negate=function(){var sign=this.sign,small=new SmallInteger(-this.value);return small.sign=!sign,small},BigInteger.prototype.abs=function(){return new BigInteger(this.value,!1)},SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))},BigInteger.prototype.multiply=function(v){var abs,l1,l2,n=parseValue(v),a=this.value,b=n.value,sign=this.sign!==n.sign;if(n.isSmall){if(0===b)return Integer[0];if(1===b)return this;if(-1===b)return this.negate();if((abs=Math.abs(b))0?function multiplyKaratsuba(x,y){var n=Math.max(x.length,y.length);if(n<=30)return multiplyLong(x,y);n=Math.ceil(n/2);var b=x.slice(n),a=x.slice(0,n),d=y.slice(n),c=y.slice(0,n),ac=multiplyKaratsuba(a,c),bd=multiplyKaratsuba(b,d),product=addAny(addAny(ac,shiftLeft(subtract(subtract(multiplyKaratsuba(addAny(a,b),addAny(c,d)),ac),bd),n)),shiftLeft(bd,2*n));return trim(product),product}(a,b):multiplyLong(a,b),sign)},BigInteger.prototype.times=BigInteger.prototype.multiply,SmallInteger.prototype._multiplyBySmall=function(a){return isPrecise(a.value*this.value)?new SmallInteger(a.value*this.value):multiplySmallAndArray(Math.abs(a.value),smallToArray(Math.abs(this.value)),this.sign!==a.sign)},BigInteger.prototype._multiplyBySmall=function(a){return 0===a.value?Integer[0]:1===a.value?this:-1===a.value?this.negate():multiplySmallAndArray(Math.abs(a.value),this.value,this.sign!==a.sign)},SmallInteger.prototype.multiply=function(v){return parseValue(v)._multiplyBySmall(this)},SmallInteger.prototype.times=SmallInteger.prototype.multiply,BigInteger.prototype.square=function(){return new BigInteger(square(this.value),!1)},SmallInteger.prototype.square=function(){var value=this.value*this.value;return isPrecise(value)?new SmallInteger(value):new BigInteger(square(smallToArray(Math.abs(this.value))),!1)},BigInteger.prototype.divmod=function(v){var result=divModAny(this,v);return{quotient:result[0],remainder:result[1]}},SmallInteger.prototype.divmod=BigInteger.prototype.divmod,BigInteger.prototype.divide=function(v){return divModAny(this,v)[0]},SmallInteger.prototype.over=SmallInteger.prototype.divide=BigInteger.prototype.over=BigInteger.prototype.divide,BigInteger.prototype.mod=function(v){return divModAny(this,v)[1]},SmallInteger.prototype.remainder=SmallInteger.prototype.mod=BigInteger.prototype.remainder=BigInteger.prototype.mod,BigInteger.prototype.pow=function(v){var value,x,y,n=parseValue(v),a=this.value,b=n.value;if(0===b)return Integer[1];if(0===a)return Integer[0];if(1===a)return Integer[1];if(-1===a)return n.isEven()?Integer[1]:Integer[-1];if(n.sign)return Integer[0];if(!n.isSmall)throw new Error("The exponent "+n.toString()+" is too large.");if(this.isSmall&&isPrecise(value=Math.pow(a,b)))return new SmallInteger(truncate(value));for(x=this,y=Integer[1];!0&b&&(y=y.times(x),--b),0!==b;)b/=2,x=x.square();return y},SmallInteger.prototype.pow=BigInteger.prototype.pow,BigInteger.prototype.modPow=function(exp,mod){if(exp=parseValue(exp),(mod=parseValue(mod)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var r=Integer[1],base=this.mod(mod);exp.isPositive();){if(base.isZero())return Integer[0];exp.isOdd()&&(r=r.multiply(base).mod(mod)),exp=exp.divide(2),base=base.square().mod(mod)}return r},SmallInteger.prototype.modPow=BigInteger.prototype.modPow,BigInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=this.value,b=n.value;return n.isSmall?1:compareAbs(a,b)},SmallInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=Math.abs(this.value),b=n.value;return n.isSmall?a===(b=Math.abs(b))?0:a>b?1:-1:-1},BigInteger.prototype.compare=function(v){if(v===1/0)return-1;if(v===-1/0)return 1;var n=parseValue(v),a=this.value,b=n.value;return this.sign!==n.sign?n.sign?1:-1:n.isSmall?this.sign?-1:1:compareAbs(a,b)*(this.sign?-1:1)},BigInteger.prototype.compareTo=BigInteger.prototype.compare,SmallInteger.prototype.compare=function(v){if(v===1/0)return-1;if(v===-1/0)return 1;var n=parseValue(v),a=this.value,b=n.value;return n.isSmall?a==b?0:a>b?1:-1:a<0!==n.sign?a<0?-1:1:a<0?1:-1},SmallInteger.prototype.compareTo=SmallInteger.prototype.compare,BigInteger.prototype.equals=function(v){return 0===this.compare(v)},SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals,BigInteger.prototype.notEquals=function(v){return 0!==this.compare(v)},SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals,BigInteger.prototype.greater=function(v){return this.compare(v)>0},SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater,BigInteger.prototype.lesser=function(v){return this.compare(v)<0},SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser,BigInteger.prototype.greaterOrEquals=function(v){return this.compare(v)>=0},SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals,BigInteger.prototype.lesserOrEquals=function(v){return this.compare(v)<=0},SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals,BigInteger.prototype.isEven=function(){return 0==(1&this.value[0])},SmallInteger.prototype.isEven=function(){return 0==(1&this.value)},BigInteger.prototype.isOdd=function(){return 1==(1&this.value[0])},SmallInteger.prototype.isOdd=function(){return 1==(1&this.value)},BigInteger.prototype.isPositive=function(){return!this.sign},SmallInteger.prototype.isPositive=function(){return this.value>0},BigInteger.prototype.isNegative=function(){return this.sign},SmallInteger.prototype.isNegative=function(){return this.value<0},BigInteger.prototype.isUnit=function(){return!1},SmallInteger.prototype.isUnit=function(){return 1===Math.abs(this.value)},BigInteger.prototype.isZero=function(){return!1},SmallInteger.prototype.isZero=function(){return 0===this.value},BigInteger.prototype.isDivisibleBy=function(v){var n=parseValue(v),value=n.value;return 0!==value&&(1===value||(2===value?this.isEven():this.mod(n).equals(Integer[0])))},SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy,BigInteger.prototype.isPrime=function(strict){var isPrime=isBasicPrime(this);if(void 0!==isPrime)return isPrime;var n=this.abs(),bits=n.bitLength();if(bits<=64)return millerRabinTest(n,[2,325,9375,28178,450775,9780504,1795265022]);for(var logN=Math.log(2)*bits,t=Math.ceil(!0===strict?2*Math.pow(logN,2):logN),a=[],i=0;i-MAX_INT?new SmallInteger(value-1):new BigInteger(MAX_INT_ARR,!0)};for(var powersOfTwo=[1];2*powersOfTwo[powersOfTwo.length-1]<=BASE;)powersOfTwo.push(2*powersOfTwo[powersOfTwo.length-1]);var powers2Length=powersOfTwo.length,highestPower2=powersOfTwo[powers2Length-1];function shift_isSmall(n){return("number"==typeof n||"string"==typeof n)&&+Math.abs(n)<=BASE||n instanceof BigInteger&&n.value.length<=1}function bitwise(x,y,fn){y=parseValue(y);for(var xSign=x.isNegative(),ySign=y.isNegative(),xRem=xSign?x.not():x,yRem=ySign?y.not():y,xDigit=0,yDigit=0,xDivMod=null,yDivMod=null,result=[];!xRem.isZero()||!yRem.isZero();)xDigit=(xDivMod=divModAny(xRem,highestPower2))[1].toJSNumber(),xSign&&(xDigit=highestPower2-1-xDigit),yDigit=(yDivMod=divModAny(yRem,highestPower2))[1].toJSNumber(),ySign&&(yDigit=highestPower2-1-yDigit),xRem=xDivMod[0],yRem=yDivMod[0],result.push(fn(xDigit,yDigit));for(var sum=0!==fn(xSign?1:0,ySign?1:0)?bigInt(-1):bigInt(0),i=result.length-1;i>=0;i-=1)sum=sum.multiply(highestPower2).add(bigInt(result[i]));return sum}BigInteger.prototype.shiftLeft=function(n){if(!shift_isSmall(n))throw new Error(String(n)+" is too large for shifting.");if((n=+n)<0)return this.shiftRight(-n);var result=this;if(result.isZero())return result;for(;n>=powers2Length;)result=result.multiply(highestPower2),n-=powers2Length-1;return result.multiply(powersOfTwo[n])},SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft,BigInteger.prototype.shiftRight=function(n){var remQuo;if(!shift_isSmall(n))throw new Error(String(n)+" is too large for shifting.");if((n=+n)<0)return this.shiftLeft(-n);for(var result=this;n>=powers2Length;){if(result.isZero()||result.isNegative()&&result.isUnit())return result;result=(remQuo=divModAny(result,highestPower2))[1].isNegative()?remQuo[0].prev():remQuo[0],n-=powers2Length-1}return(remQuo=divModAny(result,powersOfTwo[n]))[1].isNegative()?remQuo[0].prev():remQuo[0]},SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight,BigInteger.prototype.not=function(){return this.negate().prev()},SmallInteger.prototype.not=BigInteger.prototype.not,BigInteger.prototype.and=function(n){return bitwise(this,n,function(a,b){return a&b})},SmallInteger.prototype.and=BigInteger.prototype.and,BigInteger.prototype.or=function(n){return bitwise(this,n,function(a,b){return a|b})},SmallInteger.prototype.or=BigInteger.prototype.or,BigInteger.prototype.xor=function(n){return bitwise(this,n,function(a,b){return a^b})},SmallInteger.prototype.xor=BigInteger.prototype.xor;var LOBMASK_I=1<<30,LOBMASK_BI=(BASE&-BASE)*(BASE&-BASE)|LOBMASK_I;function roughLOB(n){var v=n.value,x="number"==typeof v?v|LOBMASK_I:v[0]+v[1]*BASE|LOBMASK_BI;return x&-x}function max(a,b){return a=parseValue(a),b=parseValue(b),a.greater(b)?a:b}function min(a,b){return a=parseValue(a),b=parseValue(b),a.lesser(b)?a:b}function gcd(a,b){if(a=parseValue(a).abs(),b=parseValue(b).abs(),a.equals(b))return a;if(a.isZero())return b;if(b.isZero())return a;for(var d,t,c=Integer[1];a.isEven()&&b.isEven();)d=Math.min(roughLOB(a),roughLOB(b)),a=a.divide(d),b=b.divide(d),c=c.multiply(d);for(;a.isEven();)a=a.divide(roughLOB(a));do{for(;b.isEven();)b=b.divide(roughLOB(b));a.greater(b)&&(t=b,b=a,a=t),b=b.subtract(a)}while(!b.isZero());return c.isUnit()?a:a.multiply(c)}BigInteger.prototype.bitLength=function(){var n=this;return n.compareTo(bigInt(0))<0&&(n=n.negate().subtract(bigInt(1))),0===n.compareTo(bigInt(0))?bigInt(0):bigInt(function integerLogarithm(value,base){if(base.compareTo(value)<=0){var tmp=integerLogarithm(value,base.square(base)),p=tmp.p,e=tmp.e,t=p.multiply(base);return t.compareTo(value)<=0?{p:t,e:2*e+1}:{p:p,e:2*e}}return{p:bigInt(1),e:0}}(n,bigInt(2)).e).add(bigInt(1))},SmallInteger.prototype.bitLength=BigInteger.prototype.bitLength;var parseBase=function(text,base){for(var length=text.length,absBase=Math.abs(base),i=0;i=absBase){if("1"===c&&1===absBase)continue;throw new Error(c+" is not a valid digit in base "+base+".")}if(c.charCodeAt(0)-87>=absBase)throw new Error(c+" is not a valid digit in base "+base+".")}}if(2<=base&&base<=36&&length<=LOG_MAX_INT/Math.log(base)){var result=parseInt(text,base);if(isNaN(result))throw new Error(c+" is not a valid digit in base "+base+".");return new SmallInteger(parseInt(text,base))}base=parseValue(base);var digits=[],isNegative="-"===text[0];for(i=isNegative?1:0;i"!==text[i]);digits.push(parseValue(text.slice(start+1,i)))}}return parseBaseFromArray(digits,base,isNegative)};function parseBaseFromArray(digits,base,isNegative){var i,val=Integer[0],pow=Integer[1];for(i=digits.length-1;i>=0;i--)val=val.add(digits[i].times(pow)),pow=pow.times(base);return isNegative?val.negate():val}function stringify(digit){return digit<=35?"0123456789abcdefghijklmnopqrstuvwxyz".charAt(digit):"<"+digit+">"}function toBase(n,base){if((base=bigInt(base)).isZero()){if(n.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(base.equals(-1)){if(n.isZero())return{value:[0],isNegative:!1};if(n.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-n)).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var arr=Array.apply(null,Array(+n-1)).map(Array.prototype.valueOf,[0,1]);return arr.unshift([1]),{value:[].concat.apply([],arr),isNegative:!1}}var neg=!1;if(n.isNegative()&&base.isPositive()&&(neg=!0,n=n.abs()),base.equals(1))return n.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(+n)).map(Number.prototype.valueOf,1),isNegative:neg};for(var divmod,out=[],left=n;left.isNegative()||left.compareAbs(base)>=0;){left=(divmod=left.divmod(base)).quotient;var digit=divmod.remainder;digit.isNegative()&&(digit=base.minus(digit).abs(),left=left.next()),out.push(digit.toJSNumber())}return out.push(left.toJSNumber()),{value:out.reverse(),isNegative:neg}}function toBaseString(n,base){var arr=toBase(n,base);return(arr.isNegative?"-":"")+arr.value.map(stringify).join("")}function parseStringValue(v){if(isPrecise(+v)){var x=+v;if(x===truncate(x))return new SmallInteger(x);throw new Error("Invalid integer: "+v)}var sign="-"===v[0];sign&&(v=v.slice(1));var split=v.split(/e/i);if(split.length>2)throw new Error("Invalid integer: "+split.join("e"));if(2===split.length){var exp=split[1];if("+"===exp[0]&&(exp=exp.slice(1)),(exp=+exp)!==truncate(exp)||!isPrecise(exp))throw new Error("Invalid integer: "+exp+" is not a valid exponent.");var text=split[0],decimalPlace=text.indexOf(".");if(decimalPlace>=0&&(exp-=text.length-decimalPlace-1,text=text.slice(0,decimalPlace)+text.slice(decimalPlace+1)),exp<0)throw new Error("Cannot include negative exponent part for integers");v=text+=new Array(exp+1).join("0")}if(!/^([0-9][0-9]*)$/.test(v))throw new Error("Invalid integer: "+v);for(var r=[],max=v.length,l=LOG_BASE,min=max-l;max>0;)r.push(+v.slice(min,max)),(min-=l)<0&&(min=0),max-=l;return trim(r),new BigInteger(r,sign)}function parseValue(v){return"number"==typeof v?function(v){if(isPrecise(v)){if(v!==truncate(v))throw new Error(v+" is not an integer.");return new SmallInteger(v)}return parseStringValue(v.toString())}(v):"string"==typeof v?parseStringValue(v):v}BigInteger.prototype.toArray=function(radix){return toBase(this,radix)},SmallInteger.prototype.toArray=function(radix){return toBase(this,radix)},BigInteger.prototype.toString=function(radix){if(void 0===radix&&(radix=10),10!==radix)return toBaseString(this,radix);for(var digit,v=this.value,l=v.length,str=String(v[--l]);--l>=0;)digit=String(v[l]),str+="0000000".slice(digit.length)+digit;return(this.sign?"-":"")+str},SmallInteger.prototype.toString=function(radix){return void 0===radix&&(radix=10),10!=radix?toBaseString(this,radix):String(this.value)},BigInteger.prototype.toJSON=SmallInteger.prototype.toJSON=function(){return this.toString()},BigInteger.prototype.valueOf=function(){return parseInt(this.toString(),10)},BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf,SmallInteger.prototype.valueOf=function(){return this.value},SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;for(var i=0;i<1e3;i++)Integer[i]=new SmallInteger(i),i>0&&(Integer[-i]=new SmallInteger(-i));return Integer.one=Integer[1],Integer.zero=Integer[0],Integer.minusOne=Integer[-1],Integer.max=max,Integer.min=min,Integer.gcd=gcd,Integer.lcm=function(a,b){return a=parseValue(a).abs(),b=parseValue(b).abs(),a.divide(gcd(a,b)).multiply(b)},Integer.isInstance=function(x){return x instanceof BigInteger||x instanceof SmallInteger},Integer.randBetween=function(a,b){var low=min(a=parseValue(a),b=parseValue(b)),range=max(a,b).subtract(low).add(1);if(range.isSmall)return low.add(Math.floor(Math.random()*range));for(var result=[],restricted=!0,i=range.value.length-1;i>=0;i--){var top=restricted?range.value[i]:BASE,digit=truncate(Math.random()*top);result.unshift(digit),digit=0;){var v=x*this[i++]+w[j]+c;c=Math.floor(v/67108864),w[j++]=67108863&v}return c},BigInteger.prototype.DB=26,BigInteger.prototype.DM=67108863;var DV=BigInteger.prototype.DV=1<<26;BigInteger.prototype.FV=Math.pow(2,52),BigInteger.prototype.F1=26,BigInteger.prototype.F2=0;var rr,vv,BI_RM="0123456789abcdefghijklmnopqrstuvwxyz",BI_RC=new Array;for(rr="0".charCodeAt(0),vv=0;vv<=9;++vv)BI_RC[rr++]=vv;for(rr="a".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;for(rr="A".charCodeAt(0),vv=10;vv<36;++vv)BI_RC[rr++]=vv;function int2char(n){return BI_RM.charAt(n)}function intAt(s,i){var c=BI_RC[s.charCodeAt(i)];return null==c?-1:c}function nbv(i){var r=new BigInteger;return r.fromInt(i),r}function nbits(x){var t,r=1;return 0!=(t=x>>>16)&&(x=t,r+=16),0!=(t=x>>8)&&(x=t,r+=8),0!=(t=x>>4)&&(x=t,r+=4),0!=(t=x>>2)&&(x=t,r+=2),0!=(t=x>>1)&&(x=t,r+=1),r}function Classic(m){this.m=m}function Montgomery(m){this.m=m,this.mp=m.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,r+=16),0==(255&x)&&(x>>=8,r+=8),0==(15&x)&&(x>>=4,r+=4),0==(3&x)&&(x>>=2,r+=2),0==(1&x)&&++r,r}function cbit(x){for(var r=0;0!=x;)x&=x-1,++r;return r}function NullExp(){}function nNop(x){return x}function Barrett(m){this.r2=new BigInteger,this.q3=new BigInteger,BigInteger.ONE.dlShiftTo(2*m.t,this.r2),this.mu=this.r2.divide(m),this.m=m}Classic.prototype.convert=function(x){return x.s<0||x.compareTo(this.m)>=0?x.mod(this.m):x},Classic.prototype.revert=function(x){return x},Classic.prototype.reduce=function(x){x.divRemTo(this.m,null,x)},Classic.prototype.mulTo=function(x,y,r){x.multiplyTo(y,r),this.reduce(r)},Classic.prototype.sqrTo=function(x,r){x.squareTo(r),this.reduce(r)},Montgomery.prototype.convert=function(x){var r=new BigInteger;return x.abs().dlShiftTo(this.m.t,r),r.divRemTo(this.m,null,r),x.s<0&&r.compareTo(BigInteger.ZERO)>0&&this.m.subTo(r,r),r},Montgomery.prototype.revert=function(x){var r=new BigInteger;return x.copyTo(r),this.reduce(r),r},Montgomery.prototype.reduce=function(x){for(;x.t<=this.mt2;)x[x.t++]=0;for(var i=0;i>15)*this.mpl&this.um)<<15)&x.DM;for(x[j=i+this.m.t]+=this.m.am(0,u0,x,i,0,this.m.t);x[j]>=x.DV;)x[j]-=x.DV,x[++j]++}x.clamp(),x.drShiftTo(this.m.t,x),x.compareTo(this.m)>=0&&x.subTo(this.m,x)},Montgomery.prototype.mulTo=function(x,y,r){x.multiplyTo(y,r),this.reduce(r)},Montgomery.prototype.sqrTo=function(x,r){x.squareTo(r),this.reduce(r)},proto.copyTo=function(r){for(var i=this.t-1;i>=0;--i)r[i]=this[i];r.t=this.t,r.s=this.s},proto.fromInt=function(x){this.t=1,this.s=x<0?-1:0,x>0?this[0]=x:x<-1?this[0]=x+DV:this.t=0},proto.fromString=function(s,b){var k;if(16==b)k=4;else if(8==b)k=3;else if(256==b)k=8;else if(2==b)k=1;else if(32==b)k=5;else{if(4!=b)return void this.fromRadix(s,b);k=2}this.t=0,this.s=0;for(var i=s.length,mi=!1,sh=0;--i>=0;){var x=8==k?255&s[i]:intAt(s,i);x<0?"-"==s.charAt(i)&&(mi=!0):(mi=!1,0==sh?this[this.t++]=x:sh+k>this.DB?(this[this.t-1]|=(x&(1<>this.DB-sh):this[this.t-1]|=x<=this.DB&&(sh-=this.DB))}8==k&&0!=(128&s[0])&&(this.s=-1,sh>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==c;)--this.t},proto.dlShiftTo=function(n,r){var i;for(i=this.t-1;i>=0;--i)r[i+n]=this[i];for(i=n-1;i>=0;--i)r[i]=0;r.t=this.t+n,r.s=this.s},proto.drShiftTo=function(n,r){for(var i=n;i=0;--i)r[i+ds+1]=this[i]>>cbs|c,c=(this[i]&bm)<=0;--i)r[i]=0;r[ds]=c,r.t=this.t+ds+1,r.s=this.s,r.clamp()},proto.rShiftTo=function(n,r){r.s=this.s;var ds=Math.floor(n/this.DB);if(ds>=this.t)r.t=0;else{var bs=n%this.DB,cbs=this.DB-bs,bm=(1<>bs;for(var i=ds+1;i>bs;bs>0&&(r[this.t-ds-1]|=(this.s&bm)<>=this.DB;if(a.t>=this.DB;c+=this.s}else{for(c+=this.s;i>=this.DB;c-=a.s}r.s=c<0?-1:0,c<-1?r[i++]=this.DV+c:c>0&&(r[i++]=c),r.t=i,r.clamp()},proto.multiplyTo=function(a,r){var x=this.abs(),y=a.abs(),i=x.t;for(r.t=i+y.t;--i>=0;)r[i]=0;for(i=0;i=0;)r[i]=0;for(i=0;i=x.DV&&(r[i+x.t]-=x.DV,r[i+x.t+1]=1)}r.t>0&&(r[r.t-1]+=x.am(i,x[i],r,2*i,0,1)),r.s=0,r.clamp()},proto.divRemTo=function(m,q,r){var pm=m.abs();if(!(pm.t<=0)){var pt=this.abs();if(pt.t0?(pm.lShiftTo(nsh,y),pt.lShiftTo(nsh,r)):(pm.copyTo(y),pt.copyTo(r));var ys=y.t,y0=y[ys-1];if(0!=y0){var yt=y0*(1<1?y[ys-2]>>this.F2:0),d1=this.FV/yt,d2=(1<=0&&(r[r.t++]=1,r.subTo(t,r)),BigInteger.ONE.dlShiftTo(ys,t),t.subTo(y,y);y.t=0;){var qd=r[--i]==y0?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);if((r[i]+=y.am(0,qd,r,j,0,ys))0&&r.rShiftTo(nsh,r),ts<0&&BigInteger.ZERO.subTo(r,r)}}},proto.invDigit=function(){if(this.t<1)return 0;var x=this[0];if(0==(1&x))return 0;var y=3&x;return(y=(y=(y=(y=y*(2-(15&x)*y)&15)*(2-(255&x)*y)&255)*(2-((65535&x)*y&65535))&65535)*(2-x*y%this.DV)%this.DV)>0?this.DV-y:-y},proto.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},proto.exp=function(e,z){if(e>4294967295||e<1)return BigInteger.ONE;var r=new BigInteger,r2=new BigInteger,g=z.convert(this),i=nbits(e)-1;for(g.copyTo(r);--i>=0;)if(z.sqrTo(r,r2),(e&1<0)z.mulTo(r2,g,r);else{var t=r;r=r2,r2=t}return z.revert(r)},proto.toString=function(b){var k;if(this.s<0)return"-"+this.negate().toString(b);if(16==b)k=4;else if(8==b)k=3;else if(2==b)k=1;else if(32==b)k=5;else{if(4!=b)return this.toRadix(b);k=2}var d,km=(1<0)for(p>p)>0&&(m=!0,r=int2char(d));i>=0;)p>(p+=this.DB-k)):(d=this[i]>>(p-=k)&km,p<=0&&(p+=this.DB,--i)),d>0&&(m=!0),m&&(r+=int2char(d));return m?r:"0"},proto.negate=function(){var r=new BigInteger;return BigInteger.ZERO.subTo(this,r),r},proto.abs=function(){return this.s<0?this.negate():this},proto.compareTo=function(a){var r=this.s-a.s;if(0!=r)return r;var i=this.t;if(0!=(r=i-a.t))return this.s<0?-r:r;for(;--i>=0;)if(0!=(r=this[i]-a[i]))return r;return 0},proto.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)},proto.byteLength=function(){return this.bitLength()>>3},proto.mod=function(a){var r=new BigInteger;return this.abs().divRemTo(a,null,r),this.s<0&&r.compareTo(BigInteger.ZERO)>0&&a.subTo(r,r),r},proto.modPowInt=function(e,m){var z;return z=e<256||m.isEven()?new Classic(m):new Montgomery(m),this.exp(e,z)},NullExp.prototype.convert=nNop,NullExp.prototype.revert=nNop,NullExp.prototype.mulTo=function(x,y,r){x.multiplyTo(y,r)},NullExp.prototype.sqrTo=function(x,r){x.squareTo(r)},Barrett.prototype.convert=function(x){if(x.s<0||x.t>2*this.m.t)return x.mod(this.m);if(x.compareTo(this.m)<0)return x;var r=new BigInteger;return x.copyTo(r),this.reduce(r),r},Barrett.prototype.revert=function(x){return x},Barrett.prototype.reduce=function(x){for(x.drShiftTo(this.m.t-1,this.r2),x.t>this.m.t+1&&(x.t=this.m.t+1,x.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);x.compareTo(this.r2)<0;)x.dAddOffset(1,this.m.t+1);for(x.subTo(this.r2,x);x.compareTo(this.m)>=0;)x.subTo(this.m,x)},Barrett.prototype.mulTo=function(x,y,r){x.multiplyTo(y,r),this.reduce(r)},Barrett.prototype.sqrTo=function(x,r){x.squareTo(r),this.reduce(r)};var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=(1<<26)/lowprimes[lowprimes.length-1];proto.chunkSize=function(r){return Math.floor(Math.LN2*this.DB/Math.log(r))},proto.toRadix=function(b){if(null==b&&(b=10),0==this.signum()||b<2||b>36)return"0";var cs=this.chunkSize(b),a=Math.pow(b,cs),d=nbv(a),y=new BigInteger,z=new BigInteger,r="";for(this.divRemTo(d,y,z);y.signum()>0;)r=(a+z.intValue()).toString(b).substr(1)+r,y.divRemTo(d,y,z);return z.intValue().toString(b)+r},proto.fromRadix=function(s,b){this.fromInt(0),null==b&&(b=10);for(var cs=this.chunkSize(b),d=Math.pow(b,cs),mi=!1,j=0,w=0,i=0;i=cs&&(this.dMultiply(d),this.dAddOffset(w,0),j=0,w=0))}j>0&&(this.dMultiply(Math.pow(b,j)),this.dAddOffset(w,0)),mi&&BigInteger.ZERO.subTo(this,this)},proto.fromNumber=function(a,b,c){if("number"==typeof b)if(a<2)this.fromInt(1);else for(this.fromNumber(a,c),this.testBit(a-1)||this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(BigInteger.ONE.shiftLeft(a-1),this);else{var x=new Array,t=7&a;x.length=1+(a>>3),b.nextBytes(x),t>0?x[0]&=(1<>=this.DB;if(a.t>=this.DB;c+=this.s}else{for(c+=this.s;i>=this.DB;c+=a.s}r.s=c<0?-1:0,c>0?r[i++]=c:c<-1&&(r[i++]=this.DV+c),r.t=i,r.clamp()},proto.dMultiply=function(n){this[this.t]=this.am(0,n-1,this,0,0,this.t),++this.t,this.clamp()},proto.dAddOffset=function(n,w){if(0!=n){for(;this.t<=w;)this[this.t++]=0;for(this[w]+=n;this[w]>=this.DV;)this[w]-=this.DV,++w>=this.t&&(this[this.t++]=0),++this[w]}},proto.multiplyLowerTo=function(a,n,r){var j,i=Math.min(this.t+a.t,n);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(j=r.t-this.t;i=0;)r[i]=0;for(i=Math.max(n-this.t,0);i0)if(0==d)r=this[0]%n;else for(var i=this.t-1;i>=0;--i)r=(d*r+this[i])%n;return r},proto.millerRabin=function(t){var n1=this.subtract(BigInteger.ONE),k=n1.getLowestSetBit();if(k<=0)return!1;var r=n1.shiftRight(k);(t=t+1>>1)>lowprimes.length&&(t=lowprimes.length);for(var a=new BigInteger(null),bases=[],i=0;i>24},proto.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},proto.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},proto.toByteArray=function(){var i=this.t,r=new Array;r[0]=this.s;var d,p=this.DB-i*this.DB%8,k=0;if(i-- >0)for(p>p)!=(this.s&this.DM)>>p&&(r[k++]=d|this.s<=0;)p<8?(d=(this[i]&(1<>(p+=this.DB-8)):(d=this[i]>>(p-=8)&255,p<=0&&(p+=this.DB,--i)),0!=(128&d)&&(d|=-256),0===k&&(128&this.s)!=(128&d)&&++k,(k>0||d!=this.s)&&(r[k++]=d);return r},proto.equals=function(a){return 0==this.compareTo(a)},proto.min=function(a){return this.compareTo(a)<0?this:a},proto.max=function(a){return this.compareTo(a)>0?this:a},proto.and=function(a){var r=new BigInteger;return this.bitwiseTo(a,op_and,r),r},proto.or=function(a){var r=new BigInteger;return this.bitwiseTo(a,op_or,r),r},proto.xor=function(a){var r=new BigInteger;return this.bitwiseTo(a,op_xor,r),r},proto.andNot=function(a){var r=new BigInteger;return this.bitwiseTo(a,op_andnot,r),r},proto.not=function(){for(var r=new BigInteger,i=0;i=this.t?0!=this.s:0!=(this[j]&1<1){var g2=new BigInteger;for(z.sqrTo(g[1],g2);n<=km;)g[n]=new BigInteger,z.mulTo(g2,g[n-2],g[n]),n+=2}var w,t,j=e.t-1,is1=!0,r2=new BigInteger;for(i=nbits(e[j])-1;j>=0;){for(i>=k1?w=e[j]>>i-k1&km:(w=(e[j]&(1<0&&(w|=e[j-1]>>this.DB+i-k1)),n=k;0==(1&w);)w>>=1,--n;if((i-=n)<0&&(i+=this.DB,--j),is1)g[w].copyTo(r),is1=!1;else{for(;n>1;)z.sqrTo(r,r2),z.sqrTo(r2,r),n-=2;n>0?z.sqrTo(r,r2):(t=r,r=r2,r2=t),z.mulTo(r2,g[w],r)}for(;j>=0&&0==(e[j]&1<=0?(u.subTo(v,u),ac&&a.subTo(c,a),b.subTo(d,b)):(v.subTo(u,v),ac&&c.subTo(a,c),d.subTo(b,d))}if(0!=v.compareTo(BigInteger.ONE))return BigInteger.ZERO;for(;d.compareTo(m)>=0;)d.subTo(m,d);for(;d.signum()<0;)d.addTo(m,d);return d},proto.pow=function(e){return this.exp(e,new NullExp)},proto.gcd=function(a){var x=this.s<0?this.negate():this.clone(),y=a.s<0?a.negate():a.clone();if(x.compareTo(y)<0){var t=x;x=y,y=t}var i=x.getLowestSetBit(),g=y.getLowestSetBit();if(g<0)return x;for(i0&&(x.rShiftTo(g,x),y.rShiftTo(g,y));x.signum()>0;)(i=x.getLowestSetBit())>0&&x.rShiftTo(i,x),(i=y.getLowestSetBit())>0&&y.rShiftTo(i,y),x.compareTo(y)>=0?(x.subTo(y,x),x.rShiftTo(1,x)):(y.subTo(x,y),y.rShiftTo(1,y));return g>0&&y.lShiftTo(g,y),y},proto.isProbablePrime=function(t){var i,x=this.abs();if(1==x.t&&x[0]<=lowprimes[lowprimes.length-1]){for(i=0;i0||n===i?i:i-1}function coeffToString(a){for(var s,z,i=1,j=a.length,r=a[0]+"";il^a?1:-1;for(j=(k=xc.length)<(l=yc.length)?k:l,i=0;iyc[i]^a?1:-1;return k==l?0:k>l^a?1:-1}function intValidatorNoErrors(n,min,max){return(n=truncate(n))>=min&&n<=max}function isArray(obj){return"[object Array]"==Object.prototype.toString.call(obj)}function toBaseOut(str,baseIn,baseOut){for(var j,arrL,arr=[0],i=0,len=str.length;ibaseOut-1&&(null==arr[j+1]&&(arr[j+1]=0),arr[j+1]+=arr[j]/baseOut|0,arr[j]%=baseOut)}return arr.reverse()}function toExponential(str,e){return(str.length>1?str.charAt(0)+"."+str.slice(1):str)+(e<0?"e":"e+")+e}function toFixedPoint(str,e){var len,z;if(e<0){for(z="0.";++e;z+="0");str=z+str}else if(++e>(len=str.length)){for(z="0",e-=len;--e;z+="0");str+=z}else e15&&raise(id,tooManyDigits,n),num=!1):x.s=45===str.charCodeAt(0)?(str=str.slice(1),-1):1,str=convertBase(str,10,b,x.s)}else{if(n instanceof BigNumber)return x.s=n.s,x.e=n.e,x.c=(n=n.c)?n.slice():n,void(id=0);if((num="number"==typeof n)&&0*n==0){if(x.s=1/n<0?(n=-n,-1):1,n===~~n){for(e=0,i=n;i>=10;i/=10,e++);return x.e=e,x.c=[n],void(id=0)}str=n+""}else{if(!isNumeric.test(str=n+""))return parseNumeric(x,str,num);x.s=45===str.charCodeAt(0)?(str=str.slice(1),-1):1}}for((e=str.indexOf("."))>-1&&(str=str.replace(".","")),(i=str.search(/e/i))>0?(e<0&&(e=i),e+=+str.slice(i+1),str=str.substring(0,i)):e<0&&(e=str.length),i=0;48===str.charCodeAt(i);i++);for(len=str.length;48===str.charCodeAt(--len););if(str=str.slice(i,len+1))if(len=str.length,num&&ERRORS&&len>15&&(n>MAX_SAFE_INTEGER||n!==mathfloor(n))&&raise(id,tooManyDigits,x.s*n),(e=e-i-1)>MAX_EXP)x.c=x.e=null;else if(e=0&&(k=POW_PRECISION,POW_PRECISION=0,str=str.replace(".",""),x=(y=new BigNumber(baseIn)).pow(str.length-i),POW_PRECISION=k,y.c=toBaseOut(toFixedPoint(coeffToString(x.c),x.e),10,baseOut),y.e=y.c.length),e=k=(xc=toBaseOut(str,baseIn,baseOut)).length;0==xc[--k];xc.pop());if(!xc[0])return"0";if(i<0?--e:(x.c=xc,x.e=e,x.s=sign,xc=(x=div(x,y,dp,rm,baseOut)).c,r=x.r,e=x.e),i=xc[d=e+dp+1],k=baseOut/2,r=r||d<0||null!=xc[d+1],r=rm<4?(null!=i||r)&&(0==rm||rm==(x.s<0?3:2)):i>k||i==k&&(4==rm||r||6==rm&&1&xc[d-1]||rm==(x.s<0?8:7)),d<1||!xc[0])str=r?toFixedPoint("1",-dp):"0";else{if(xc.length=d,r)for(--baseOut;++xc[--d]>baseOut;)xc[d]=0,d||(++e,xc=[1].concat(xc));for(k=xc.length;!xc[--k];);for(i=0,str="";i<=k;str+=ALPHABET.charAt(xc[i++]));str=toFixedPoint(str,e)}return str}function format(n,i,rm,caller){var c0,e,ne,len,str;if(rm=null!=rm&&isValidInt(rm,0,8,caller,roundingMode)?0|rm:ROUNDING_MODE,!n.c)return n.toString();if(c0=n.c[0],ne=n.e,null==i)str=coeffToString(n.c),str=19==caller||24==caller&&ne<=TO_EXP_NEG?toExponential(str,ne):toFixedPoint(str,ne);else if(e=(n=round(new BigNumber(n),i,rm)).e,len=(str=coeffToString(n.c)).length,19==caller||24==caller&&(i<=e||e<=TO_EXP_NEG)){for(;lenlen){if(--i>0)for(str+=".";i--;str+="0");}else if((i+=e-len)>0)for(e+1==len&&(str+=".");i--;str+="0");return n.s<0&&c0?"-"+str:str}function maxOrMin(args,method){var m,n,i=0;for(isArray(args[0])&&(args=args[0]),m=new BigNumber(args[0]);++imax||n!=truncate(n))&&raise(caller,(name||"decimal places")+(nmax?" out of range":" not an integer"),n),!0}function normalise(n,c,e){for(var i=1,j=c.length;!c[--j];c.pop());for(j=c[0];j>=10;j/=10,i++);return(e=i+e*LOG_BASE-1)>MAX_EXP?n.c=n.e=null:e=10;k/=10,d++);if((i=sd-d)<0)i+=LOG_BASE,j=sd,rd=(n=xc[ni=0])/pows10[d-j-1]%10|0;else if((ni=mathceil((i+1)/LOG_BASE))>=xc.length){if(!r)break out;for(;xc.length<=ni;xc.push(0));n=rd=0,d=1,j=(i%=LOG_BASE)-LOG_BASE+1}else{for(n=k=xc[ni],d=1;k>=10;k/=10,d++);rd=(j=(i%=LOG_BASE)-LOG_BASE+d)<0?0:n/pows10[d-j-1]%10|0}if(r=r||sd<0||null!=xc[ni+1]||(j<0?n:n%pows10[d-j-1]),r=rm<4?(rd||r)&&(0==rm||rm==(x.s<0?3:2)):rd>5||5==rd&&(4==rm||r||6==rm&&(i>0?j>0?n/pows10[d-j]:0:xc[ni-1])%10&1||rm==(x.s<0?8:7)),sd<1||!xc[0])return xc.length=0,r?(sd-=x.e+1,xc[0]=pows10[(LOG_BASE-sd%LOG_BASE)%LOG_BASE],x.e=-sd||0):xc[0]=x.e=0,x;if(0==i?(xc.length=ni,k=1,ni--):(xc.length=ni+1,k=pows10[LOG_BASE-i],xc[ni]=j>0?mathfloor(n/pows10[d-j]%pows10[j])*k:0),r)for(;;){if(0==ni){for(i=1,j=xc[0];j>=10;j/=10,i++);for(j=xc[0]+=k,k=1;j>=10;j/=10,k++);i!=k&&(x.e++,xc[0]==BASE&&(xc[0]=1));break}if(xc[ni]+=k,xc[ni]!=BASE)break;xc[ni--]=0,k=1}for(i=xc.length;0===xc[--i];xc.pop());}x.e>MAX_EXP?x.c=x.e=null:x.ei)return null!=(v=a[i++])};return has(p="DECIMAL_PLACES")&&isValidInt(v,0,MAX,2,p)&&(DECIMAL_PLACES=0|v),r[p]=DECIMAL_PLACES,has(p="ROUNDING_MODE")&&isValidInt(v,0,8,2,p)&&(ROUNDING_MODE=0|v),r[p]=ROUNDING_MODE,has(p="EXPONENTIAL_AT")&&(isArray(v)?isValidInt(v[0],-MAX,0,2,p)&&isValidInt(v[1],0,MAX,2,p)&&(TO_EXP_NEG=0|v[0],TO_EXP_POS=0|v[1]):isValidInt(v,-MAX,MAX,2,p)&&(TO_EXP_NEG=-(TO_EXP_POS=0|(v<0?-v:v)))),r[p]=[TO_EXP_NEG,TO_EXP_POS],has(p="RANGE")&&(isArray(v)?isValidInt(v[0],-MAX,-1,2,p)&&isValidInt(v[1],1,MAX,2,p)&&(MIN_EXP=0|v[0],MAX_EXP=0|v[1]):isValidInt(v,-MAX,MAX,2,p)&&(0|v?MIN_EXP=-(MAX_EXP=0|(v<0?-v:v)):ERRORS&&raise(2,p+" cannot be zero",v))),r[p]=[MIN_EXP,MAX_EXP],has(p="ERRORS")&&(v===!!v||1===v||0===v?(id=0,isValidInt=(ERRORS=!!v)?intValidatorWithErrors:intValidatorNoErrors):ERRORS&&raise(2,p+notBool,v)),r[p]=ERRORS,has(p="CRYPTO")&&(!0===v||!1===v||1===v||0===v?v?!(v="undefined"==typeof crypto)&&crypto&&(crypto.getRandomValues||crypto.randomBytes)?CRYPTO=!0:ERRORS?raise(2,"crypto unavailable",v?void 0:crypto):CRYPTO=!1:CRYPTO=!1:ERRORS&&raise(2,p+notBool,v)),r[p]=CRYPTO,has(p="MODULO_MODE")&&isValidInt(v,0,9,2,p)&&(MODULO_MODE=0|v),r[p]=MODULO_MODE,has(p="POW_PRECISION")&&isValidInt(v,0,MAX,2,p)&&(POW_PRECISION=0|v),r[p]=POW_PRECISION,has(p="FORMAT")&&("object"==typeof v?FORMAT=v:ERRORS&&raise(2,p+" not an object",v)),r[p]=FORMAT,r},BigNumber.max=function(){return maxOrMin(arguments,P.lt)},BigNumber.min=function(){return maxOrMin(arguments,P.gt)},BigNumber.random=(random53bitInt=9007199254740992*Math.random()&2097151?function(){return mathfloor(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(dp){var a,b,e,k,v,i=0,c=[],rand=new BigNumber(ONE);if(dp=null!=dp&&isValidInt(dp,0,MAX,14)?0|dp:DECIMAL_PLACES,k=mathceil(dp/LOG_BASE),CRYPTO)if(crypto.getRandomValues){for(a=crypto.getRandomValues(new Uint32Array(k*=2));i>>11))>=9e15?(b=crypto.getRandomValues(new Uint32Array(2)),a[i]=b[0],a[i+1]=b[1]):(c.push(v%1e14),i+=2);i=k/2}else if(crypto.randomBytes){for(a=crypto.randomBytes(k*=7);i=9e15?crypto.randomBytes(7).copy(a,i):(c.push(v%1e14),i+=7);i=k/7}else CRYPTO=!1,ERRORS&&raise(14,"crypto unavailable",crypto);if(!CRYPTO)for(;i=10;v/=10,i++);ibL?1:-1;else for(i=cmp=0;ib[i]?1:-1;break}return cmp}function subtract(a,b,aL,base){for(var i=0;aL--;)a[aL]-=i,i=a[aL]1;a.splice(0,1));}return function(x,y,dp,rm,base){var cmp,e,i,more,n,prod,prodL,q,qc,rem,remL,rem0,xi,xL,yc0,yL,yz,s=x.s==y.s?1:-1,xc=x.c,yc=y.c;if(!(xc&&xc[0]&&yc&&yc[0]))return new BigNumber(x.s&&y.s&&(xc?!yc||xc[0]!=yc[0]:yc)?xc&&0==xc[0]||!yc?0*s:s/0:NaN);for(qc=(q=new BigNumber(s)).c=[],s=dp+(e=x.e-y.e)+1,base||(base=BASE,e=bitFloor(x.e/LOG_BASE)-bitFloor(y.e/LOG_BASE),s=s/LOG_BASE|0),i=0;yc[i]==(xc[i]||0);i++);if(yc[i]>(xc[i]||0)&&e--,s<0)qc.push(1),more=!0;else{for(xL=xc.length,yL=yc.length,i=0,s+=2,(n=mathfloor(base/(yc[0]+1)))>1&&(yc=multiply(yc,n,base),xc=multiply(xc,n,base),yL=yc.length,xL=xc.length),xi=yL,remL=(rem=xc.slice(0,yL)).length;remL=base/2&&yc0++;do{if(n=0,(cmp=compare(yc,rem,yL,remL))<0){if(rem0=rem[0],yL!=remL&&(rem0=rem0*base+(rem[1]||0)),(n=mathfloor(rem0/yc0))>1)for(n>=base&&(n=base-1),prodL=(prod=multiply(yc,n,base)).length,remL=rem.length;1==compare(prod,rem,prodL,remL);)n--,subtract(prod,yL=10;s/=10,i++);round(q,dp+(q.e=i+e*LOG_BASE-1)+1,rm,more)}else q.e=e,q.r=+more;return q}}(),basePrefix=/^(-?)0([xbo])(?=\w[\w.]*$)/i,dotAfter=/^([^.]+)\.$/,dotBefore=/^\.([^.]+)$/,isInfinityOrNaN=/^-?(Infinity|NaN)$/,whitespaceOrPlus=/^\s*\+(?=[\w.])|^\s+|\s+$/g,parseNumeric=function(x,str,num,b){var base,s=num?str:str.replace(whitespaceOrPlus,"");if(isInfinityOrNaN.test(s))x.s=isNaN(s)?null:s<0?-1:1;else{if(!num&&(s=s.replace(basePrefix,function(m,p1,p2){return base="x"==(p2=p2.toLowerCase())?16:"b"==p2?2:8,b&&b!=base?m:p1}),b&&(base=b,s=s.replace(dotAfter,"$1").replace(dotBefore,"0.$1")),str!=s))return new BigNumber(s,base);ERRORS&&raise(id,"not a"+(b?" base "+b:"")+" number",str),x.s=null}x.c=x.e=null,id=0},P.absoluteValue=P.abs=function(){var x=new BigNumber(this);return x.s<0&&(x.s=1),x},P.ceil=function(){return round(new BigNumber(this),this.e+1,2)},P.comparedTo=P.cmp=function(y,b){return id=1,compare(this,new BigNumber(y,b))},P.decimalPlaces=P.dp=function(){var n,v,c=this.c;if(!c)return null;if(n=((v=c.length-1)-bitFloor(this.e/LOG_BASE))*LOG_BASE,v=c[v])for(;v%10==0;v/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(y,b){return id=3,div(this,new BigNumber(y,b),DECIMAL_PLACES,ROUNDING_MODE)},P.dividedToIntegerBy=P.divToInt=function(y,b){return id=4,div(this,new BigNumber(y,b),0,1)},P.equals=P.eq=function(y,b){return id=5,0===compare(this,new BigNumber(y,b))},P.floor=function(){return round(new BigNumber(this),this.e+1,3)},P.greaterThan=P.gt=function(y,b){return id=6,compare(this,new BigNumber(y,b))>0},P.greaterThanOrEqualTo=P.gte=function(y,b){return id=7,1===(b=compare(this,new BigNumber(y,b)))||0===b},P.isFinite=function(){return!!this.c},P.isInteger=P.isInt=function(){return!!this.c&&bitFloor(this.e/LOG_BASE)>this.c.length-2},P.isNaN=function(){return!this.s},P.isNegative=P.isNeg=function(){return this.s<0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.lessThan=P.lt=function(y,b){return id=8,compare(this,new BigNumber(y,b))<0},P.lessThanOrEqualTo=P.lte=function(y,b){return id=9,-1===(b=compare(this,new BigNumber(y,b)))||0===b},P.minus=P.sub=function(y,b){var i,j,t,xLTy,x=this,a=x.s;if(id=10,b=(y=new BigNumber(y,b)).s,!a||!b)return new BigNumber(NaN);if(a!=b)return y.s=-b,x.plus(y);var xe=x.e/LOG_BASE,ye=y.e/LOG_BASE,xc=x.c,yc=y.c;if(!xe||!ye){if(!xc||!yc)return xc?(y.s=-b,y):new BigNumber(yc?x:NaN);if(!xc[0]||!yc[0])return yc[0]?(y.s=-b,y):new BigNumber(xc[0]?x:3==ROUNDING_MODE?-0:0)}if(xe=bitFloor(xe),ye=bitFloor(ye),xc=xc.slice(),a=xe-ye){for((xLTy=a<0)?(a=-a,t=xc):(ye=xe,t=yc),t.reverse(),b=a;b--;t.push(0));t.reverse()}else for(j=(xLTy=(a=xc.length)<(b=yc.length))?a:b,a=b=0;b0)for(;b--;xc[i++]=0);for(b=BASE-1;j>a;){if(xc[--j]0?(ye=xe,t=yc):(a=-a,t=xc),t.reverse();a--;t.push(0));t.reverse()}for((a=xc.length)-(b=yc.length)<0&&(t=yc,yc=xc,xc=t,b=a),a=0;b;)a=(xc[--b]=xc[b]+yc[b]+a)/BASE|0,xc[b]=BASE===xc[b]?0:xc[b]%BASE;return a&&(xc=[a].concat(xc),++ye),normalise(y,xc,ye)},P.precision=P.sd=function(z){var n,v,x=this,c=x.c;if(null!=z&&z!==!!z&&1!==z&&0!==z&&(ERRORS&&raise(13,"argument"+notBool,z),z!=!!z&&(z=null)),!c)return null;if(n=(v=c.length-1)*LOG_BASE+1,v=c[v]){for(;v%10==0;v/=10,n--);for(v=c[0];v>=10;v/=10,n++);}return z&&x.e+1>n&&(n=x.e+1),n},P.round=function(dp,rm){var n=new BigNumber(this);return(null==dp||isValidInt(dp,0,MAX,15))&&round(n,~~dp+this.e+1,null!=rm&&isValidInt(rm,0,8,15,roundingMode)?0|rm:ROUNDING_MODE),n},P.shift=function(k){var n=this;return isValidInt(k,-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER,16,"argument")?n.times("1e"+truncate(k)):new BigNumber(n.c&&n.c[0]&&(k<-MAX_SAFE_INTEGER||k>MAX_SAFE_INTEGER)?n.s*(k<0?0:1/0):n)},P.squareRoot=P.sqrt=function(){var m,n,r,rep,t,x=this,c=x.c,s=x.s,e=x.e,dp=DECIMAL_PLACES+4,half=new BigNumber("0.5");if(1!==s||!c||!c[0])return new BigNumber(!s||s<0&&(!c||c[0])?NaN:c?x:1/0);if(0==(s=Math.sqrt(+x))||s==1/0?(((n=coeffToString(c)).length+e)%2==0&&(n+="0"),s=Math.sqrt(n),e=bitFloor((e+1)/2)-(e<0||e%2),r=new BigNumber(n=s==1/0?"1e"+e:(n=s.toExponential()).slice(0,n.indexOf("e")+1)+e)):r=new BigNumber(s+""),r.c[0])for((s=(e=r.e)+dp)<3&&(s=0);;)if(t=r,r=half.times(t.plus(div(x,t,dp,1))),coeffToString(t.c).slice(0,s)===(n=coeffToString(r.c)).slice(0,s)){if(r.e=0;){for(c=0,ylo=yc[i]%sqrtBase,yhi=yc[i]/sqrtBase|0,j=i+(k=xcL);j>i;)c=((xlo=ylo*(xlo=xc[--k]%sqrtBase)+(m=yhi*xlo+(xhi=xc[k]/sqrtBase|0)*ylo)%sqrtBase*sqrtBase+zc[j]+c)/base|0)+(m/sqrtBase|0)+yhi*xhi,zc[j--]=xlo%base;zc[j]=c}return c?++e:zc.splice(0,1),normalise(y,zc,e)},P.toDigits=function(sd,rm){var n=new BigNumber(this);return sd=null!=sd&&isValidInt(sd,1,MAX,18,"precision")?0|sd:null,rm=null!=rm&&isValidInt(rm,0,8,18,roundingMode)?0|rm:ROUNDING_MODE,sd?round(n,sd,rm):n},P.toExponential=function(dp,rm){return format(this,null!=dp&&isValidInt(dp,0,MAX,19)?1+~~dp:null,rm,19)},P.toFixed=function(dp,rm){return format(this,null!=dp&&isValidInt(dp,0,MAX,20)?~~dp+this.e+1:null,rm,20)},P.toFormat=function(dp,rm){var str=format(this,null!=dp&&isValidInt(dp,0,MAX,21)?~~dp+this.e+1:null,rm,21);if(this.c){var i,arr=str.split("."),g1=+FORMAT.groupSize,g2=+FORMAT.secondaryGroupSize,groupSeparator=FORMAT.groupSeparator,intPart=arr[0],fractionPart=arr[1],isNeg=this.s<0,intDigits=isNeg?intPart.slice(1):intPart,len=intDigits.length;if(g2&&(i=g1,g1=g2,g2=i,len-=i),g1>0&&len>0){for(i=len%g1||g1,intPart=intDigits.substr(0,i);i0&&(intPart+=groupSeparator+intDigits.slice(i)),isNeg&&(intPart="-"+intPart)}str=fractionPart?intPart+FORMAT.decimalSeparator+((g2=+FORMAT.fractionGroupSize)?fractionPart.replace(new RegExp("\\d{"+g2+"}\\B","g"),"$&"+FORMAT.fractionGroupSeparator):fractionPart):intPart}return str},P.toFraction=function(md){var arr,d0,d2,e,exp,n,n0,q,s,k=ERRORS,x=this,xc=x.c,d=new BigNumber(ONE),n1=d0=new BigNumber(ONE),d1=n0=new BigNumber(ONE);if(null!=md&&(ERRORS=!1,n=new BigNumber(md),ERRORS=k,(k=n.isInt())&&!n.lt(ONE)||(ERRORS&&raise(22,"max denominator "+(k?"out of range":"not an integer"),md),md=!k&&n.c&&round(n,n.e+1,1).gte(ONE)?n:null)),!xc)return x.toString();for(s=coeffToString(xc),e=d.e=s.length-x.e-1,d.c[0]=POWS_TEN[(exp=e%LOG_BASE)<0?LOG_BASE+exp:exp],md=!md||n.cmp(d)>0?e>0?d:n1:n,exp=MAX_EXP,MAX_EXP=1/0,n=new BigNumber(s),n0.c[0]=0;q=div(n,d,0,1),1!=(d2=d0.plus(q.times(d1))).cmp(md);)d0=d1,d1=d2,n1=n0.plus(q.times(d2=n1)),n0=d2,d=n.minus(q.times(d2=d)),n=d2;return d2=div(md.minus(d0),d1,0,1),n0=n0.plus(d2.times(n1)),d0=d0.plus(d2.times(d1)),n0.s=n1.s=x.s,arr=div(n1,d1,e*=2,ROUNDING_MODE).minus(x).abs().cmp(div(n0,d0,e,ROUNDING_MODE).minus(x).abs())<1?[n1.toString(),d1.toString()]:[n0.toString(),d0.toString()],MAX_EXP=exp,arr},P.toNumber=function(){return+this},P.toPower=P.pow=function(n,m){var k,y,z,i=mathfloor(n<0?-n:+n),x=this;if(null!=m&&(id=23,m=new BigNumber(m)),!isValidInt(n,-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER,23,"exponent")&&(!isFinite(n)||i>MAX_SAFE_INTEGER&&(n/=0)||parseFloat(n)!=n&&!(n=NaN))||0==n)return k=Math.pow(+x,n),new BigNumber(m?k%m:k);for(m?n>1&&x.gt(ONE)&&x.isInt()&&m.gt(ONE)&&m.isInt()?x=x.mod(m):(z=m,m=null):POW_PRECISION&&(k=mathceil(POW_PRECISION/LOG_BASE+2)),y=new BigNumber(ONE);;){if(i%2){if(!(y=y.times(x)).c)break;k?y.c.length>k&&(y.c.length=k):m&&(y=y.mod(m))}if(!(i=mathfloor(i/2)))break;x=x.times(x),k?x.c&&x.c.length>k&&(x.c.length=k):m&&(x=x.mod(m))}return m?y:(n<0&&(y=ONE.div(y)),z?y.mod(z):k?round(y,POW_PRECISION,ROUNDING_MODE):y)},P.toPrecision=function(sd,rm){return format(this,null!=sd&&isValidInt(sd,1,MAX,24,"precision")?0|sd:null,rm,24)},P.toString=function(b){var str,n=this,s=n.s,e=n.e;return null===e?s?(str="Infinity",s<0&&(str="-"+str)):str="NaN":(str=coeffToString(n.c),str=null!=b&&isValidInt(b,2,64,25,"base")?convertBase(toFixedPoint(str,e),0|b,10,s):e<=TO_EXP_NEG||e>=TO_EXP_POS?toExponential(str,e):toFixedPoint(str,e),s<0&&n.c[0]&&(str="-"+str)),str},P.truncated=P.trunc=function(){return round(new BigNumber(this),this.e+1,1)},P.valueOf=P.toJSON=function(){var str,n=this,e=n.e;return null===e?n.toString():(str=coeffToString(n.c),str=e<=TO_EXP_NEG||e>=TO_EXP_POS?toExponential(str,e):toFixedPoint(str,e),n.s<0?"-"+str:str)},P.isBigNumber=!0,null!=config&&BigNumber.config(config),BigNumber}()).default=BigNumber.BigNumber=BigNumber,"function"==typeof define&&define.amd?define(function(){return BigNumber}):void 0!==module&&module.exports?module.exports=BigNumber:(globalObj||(globalObj="undefined"!=typeof self?self:Function("return this")()),globalObj.BigNumber=BigNumber)}(this)},{}],67:[function(require,module,exports){(function(Buffer){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const crypto=require("./crypto"),bs58check=require("bs58check"),ecc=require("tiny-secp256k1"),typeforce=require("typeforce"),wif=require("wif"),UINT256_TYPE=typeforce.BufferN(32),NETWORK_TYPE=typeforce.compile({wif:typeforce.UInt8,bip32:{public:typeforce.UInt32,private:typeforce.UInt32}}),BITCOIN={messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},HIGHEST_BIT=2147483648,UINT31_MAX=Math.pow(2,31)-1;function BIP32Path(value){return typeforce.String(value)&&null!==value.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}function UInt31(value){return typeforce.UInt32(value)&&value<=UINT31_MAX}class BIP32{constructor(__D,__Q,chainCode,network,__DEPTH=0,__INDEX=0,__PARENT_FINGERPRINT=0){this.__D=__D,this.__Q=__Q,this.chainCode=chainCode,this.network=network,this.__DEPTH=__DEPTH,this.__INDEX=__INDEX,this.__PARENT_FINGERPRINT=__PARENT_FINGERPRINT,typeforce(NETWORK_TYPE,network),this.lowR=!1}get depth(){return this.__DEPTH}get index(){return this.__INDEX}get parentFingerprint(){return this.__PARENT_FINGERPRINT}get publicKey(){return void 0===this.__Q&&(this.__Q=ecc.pointFromScalar(this.__D,!0)),this.__Q}get privateKey(){return this.__D}get identifier(){return crypto.hash160(this.publicKey)}get fingerprint(){return this.identifier.slice(0,4)}get compressed(){return!0}isNeutered(){return void 0===this.__D}neutered(){return fromPublicKeyLocal(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}toBase58(){const network=this.network,version=this.isNeutered()?network.bip32.public:network.bip32.private,buffer=Buffer.allocUnsafe(78);return buffer.writeUInt32BE(version,0),buffer.writeUInt8(this.depth,4),buffer.writeUInt32BE(this.parentFingerprint,5),buffer.writeUInt32BE(this.index,9),this.chainCode.copy(buffer,13),this.isNeutered()?this.publicKey.copy(buffer,45):(buffer.writeUInt8(0,45),this.privateKey.copy(buffer,46)),bs58check.encode(buffer)}toWIF(){if(!this.privateKey)throw new TypeError("Missing private key");return wif.encode(this.network.wif,this.privateKey,!0)}derive(index){typeforce(typeforce.UInt32,index);const isHardened=index>=HIGHEST_BIT,data=Buffer.allocUnsafe(37);if(isHardened){if(this.isNeutered())throw new TypeError("Missing private key for hardened child key");data[0]=0,this.privateKey.copy(data,1),data.writeUInt32BE(index,33)}else this.publicKey.copy(data,0),data.writeUInt32BE(index,33);const I=crypto.hmacSHA512(this.chainCode,data),IL=I.slice(0,32),IR=I.slice(32);if(!ecc.isPrivate(IL))return this.derive(index+1);let hd;if(this.isNeutered()){const Ki=ecc.pointAddScalar(this.publicKey,IL,!0);if(null===Ki)return this.derive(index+1);hd=fromPublicKeyLocal(Ki,IR,this.network,this.depth+1,index,this.fingerprint.readUInt32BE(0))}else{const ki=ecc.privateAdd(this.privateKey,IL);if(null==ki)return this.derive(index+1);hd=fromPrivateKeyLocal(ki,IR,this.network,this.depth+1,index,this.fingerprint.readUInt32BE(0))}return hd}deriveHardened(index){return typeforce(UInt31,index),this.derive(index+HIGHEST_BIT)}derivePath(path){typeforce(BIP32Path,path);let splitPath=path.split("/");if("m"===splitPath[0]){if(this.parentFingerprint)throw new TypeError("Expected master, got child");splitPath=splitPath.slice(1)}return splitPath.reduce((prevHd,indexStr)=>{let index;return"'"===indexStr.slice(-1)?(index=parseInt(indexStr.slice(0,-1),10),prevHd.deriveHardened(index)):(index=parseInt(indexStr,10),prevHd.derive(index))},this)}sign(hash,lowR){if(!this.privateKey)throw new Error("Missing private key");if(void 0===lowR&&(lowR=this.lowR),!1===lowR)return ecc.sign(hash,this.privateKey);{let sig=ecc.sign(hash,this.privateKey);const extraData=Buffer.alloc(32,0);let counter=0;for(;sig[0]>127;)counter++,extraData.writeUIntLE(counter,0,6),sig=ecc.signWithEntropy(hash,this.privateKey,extraData);return sig}}verify(hash,signature){return ecc.verify(hash,this.publicKey,signature)}}function fromPrivateKey(privateKey,chainCode,network){return fromPrivateKeyLocal(privateKey,chainCode,network)}function fromPrivateKeyLocal(privateKey,chainCode,network,depth,index,parentFingerprint){if(typeforce({privateKey:UINT256_TYPE,chainCode:UINT256_TYPE},{privateKey:privateKey,chainCode:chainCode}),network=network||BITCOIN,!ecc.isPrivate(privateKey))throw new TypeError("Private key not in range [1, n)");return new BIP32(privateKey,void 0,chainCode,network,depth,index,parentFingerprint)}function fromPublicKeyLocal(publicKey,chainCode,network,depth,index,parentFingerprint){if(typeforce({publicKey:typeforce.BufferN(33),chainCode:UINT256_TYPE},{publicKey:publicKey,chainCode:chainCode}),network=network||BITCOIN,!ecc.isPoint(publicKey))throw new TypeError("Point is not on the curve");return new BIP32(void 0,publicKey,chainCode,network,depth,index,parentFingerprint)}exports.fromBase58=function(inString,network){const buffer=bs58check.decode(inString);if(78!==buffer.length)throw new TypeError("Invalid buffer length");network=network||BITCOIN;const version=buffer.readUInt32BE(0);if(version!==network.bip32.private&&version!==network.bip32.public)throw new TypeError("Invalid network version");const depth=buffer[4],parentFingerprint=buffer.readUInt32BE(5);if(0===depth&&0!==parentFingerprint)throw new TypeError("Invalid parent fingerprint");const index=buffer.readUInt32BE(9);if(0===depth&&0!==index)throw new TypeError("Invalid index");const chainCode=buffer.slice(13,45);let hd;if(version===network.bip32.private){if(0!==buffer.readUInt8(45))throw new TypeError("Invalid private key");hd=fromPrivateKeyLocal(buffer.slice(46,78),chainCode,network,depth,index,parentFingerprint)}else hd=fromPublicKeyLocal(buffer.slice(45,78),chainCode,network,depth,index,parentFingerprint);return hd},exports.fromPrivateKey=fromPrivateKey,exports.fromPublicKey=function(publicKey,chainCode,network){return fromPublicKeyLocal(publicKey,chainCode,network)},exports.fromSeed=function(seed,network){if(typeforce(typeforce.Buffer,seed),seed.length<16)throw new TypeError("Seed should be at least 128 bits");if(seed.length>64)throw new TypeError("Seed should be at most 512 bits");network=network||BITCOIN;const I=crypto.hmacSHA512(Buffer.from("Bitcoin seed","utf8"),seed);return fromPrivateKey(I.slice(0,32),I.slice(32),network)}}).call(this,require("buffer").Buffer)},{"./crypto":68,bs58check:230,buffer:240,"tiny-secp256k1":892,typeforce:897,wif:913}],68:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const createHash=require("create-hash"),createHmac=require("create-hmac");exports.hash160=function(buffer){const sha256Hash=createHash("sha256").update(buffer).digest();try{return createHash("rmd160").update(sha256Hash).digest()}catch(err){return createHash("ripemd160").update(sha256Hash).digest()}},exports.hmacSHA512=function(key,data){return createHmac("sha512",key).update(data).digest()}},{"create-hash":333,"create-hmac":335}],69:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var bip32_1=require("./bip32");exports.fromSeed=bip32_1.fromSeed,exports.fromBase58=bip32_1.fromBase58,exports.fromPublicKey=bip32_1.fromPublicKey,exports.fromPrivateKey=bip32_1.fromPrivateKey},{"./bip32":67}],70:[function(require,module,exports){var aes=require("browserify-aes"),assert=require("assert"),Buffer=require("safe-buffer").Buffer,bs58check=require("bs58check"),createHash=require("create-hash"),scrypt=require("scryptsy"),xor=require("buffer-xor/inplace"),curve=require("ecurve").getCurveByName("secp256k1"),BigInteger=require("bigi"),SCRYPT_PARAMS={N:16384,r:8,p:8},NULL=Buffer.alloc(0);function hash256(buffer){return createHash("sha256").update(createHash("sha256").update(buffer).digest()).digest()}function getAddress(d,compressed){var buffer,Q=curve.G.multiply(d).getEncoded(compressed),hash=(buffer=Q,createHash("rmd160").update(createHash("sha256").update(buffer).digest()).digest()),payload=Buffer.allocUnsafe(21);return payload.writeUInt8(0,0),hash.copy(payload,1),bs58check.encode(payload)}function encryptRaw(buffer,compressed,passphrase,progressCallback,scryptParams){if(32!==buffer.length)throw new Error("Invalid private key length");scryptParams=scryptParams||SCRYPT_PARAMS;var address=getAddress(BigInteger.fromBuffer(buffer),compressed),secret=Buffer.from(passphrase,"utf8"),salt=hash256(address).slice(0,4),N=scryptParams.N,r=scryptParams.r,p=scryptParams.p,scryptBuf=scrypt(secret,salt,N,r,p,64,progressCallback),derivedHalf1=scryptBuf.slice(0,32),derivedHalf2=scryptBuf.slice(32,64),xorBuf=xor(derivedHalf1,buffer),cipher=aes.createCipheriv("aes-256-ecb",derivedHalf2,NULL);cipher.setAutoPadding(!1),cipher.end(xorBuf);var cipherText=cipher.read(),result=Buffer.allocUnsafe(39);return result.writeUInt8(1,0),result.writeUInt8(66,1),result.writeUInt8(compressed?224:192,2),salt.copy(result,3),cipherText.copy(result,7),result}function decryptRaw(buffer,passphrase,progressCallback,scryptParams){if(39!==buffer.length)throw new Error("Invalid BIP38 data length");if(1!==buffer.readUInt8(0))throw new Error("Invalid BIP38 prefix");scryptParams=scryptParams||SCRYPT_PARAMS;var type=buffer.readUInt8(1);if(67===type)return decryptECMult(buffer,passphrase,progressCallback,scryptParams);if(66!==type)throw new Error("Invalid BIP38 type");passphrase=Buffer.from(passphrase,"utf8");var flagByte=buffer.readUInt8(2),compressed=224===flagByte;if(!compressed&&192!==flagByte)throw new Error("Invalid BIP38 compression flag");var N=scryptParams.N,r=scryptParams.r,p=scryptParams.p,salt=buffer.slice(3,7),scryptBuf=scrypt(passphrase,salt,N,r,p,64,progressCallback),derivedHalf1=scryptBuf.slice(0,32),derivedHalf2=scryptBuf.slice(32,64),privKeyBuf=buffer.slice(7,39),decipher=aes.createDecipheriv("aes-256-ecb",derivedHalf2,NULL);decipher.setAutoPadding(!1),decipher.end(privKeyBuf);var plainText=decipher.read(),privateKey=xor(derivedHalf1,plainText),checksum=hash256(getAddress(BigInteger.fromBuffer(privateKey),compressed)).slice(0,4);return assert.deepEqual(salt,checksum),{privateKey:privateKey,compressed:compressed}}function decryptECMult(buffer,passphrase,progressCallback,scryptParams){passphrase=Buffer.from(passphrase,"utf8"),buffer=buffer.slice(1),scryptParams=scryptParams||SCRYPT_PARAMS;var flag=buffer.readUInt8(1),compressed=0!=(32&flag),hasLotSeq=0!=(4&flag);assert.equal(36&flag,flag,"Invalid private key.");var ownerSalt,addressHash=buffer.slice(2,6),ownerEntropy=buffer.slice(6,14);ownerSalt=hasLotSeq?ownerEntropy.slice(0,4):ownerEntropy;var passFactor,encryptedPart1=buffer.slice(14,22),encryptedPart2=buffer.slice(22,38),N=scryptParams.N,r=scryptParams.r,p=scryptParams.p,preFactor=scrypt(passphrase,ownerSalt,N,r,p,32,progressCallback);hasLotSeq?passFactor=hash256(Buffer.concat([preFactor,ownerEntropy])):passFactor=preFactor;var passInt=BigInteger.fromBuffer(passFactor),passPoint=curve.G.multiply(passInt).getEncoded(!0),seedBPass=scrypt(passPoint,Buffer.concat([addressHash,ownerEntropy]),1024,1,1,64),derivedHalf1=seedBPass.slice(0,32),derivedHalf2=seedBPass.slice(32,64),decipher=aes.createDecipheriv("aes-256-ecb",derivedHalf2,Buffer.alloc(0));decipher.setAutoPadding(!1),decipher.end(encryptedPart2);var decryptedPart2=decipher.read(),tmp=xor(decryptedPart2,derivedHalf1.slice(16,32)),seedBPart2=tmp.slice(8,16),decipher2=aes.createDecipheriv("aes-256-ecb",derivedHalf2,Buffer.alloc(0));decipher2.setAutoPadding(!1),decipher2.write(encryptedPart1),decipher2.end(tmp.slice(0,8));var seedBPart1=xor(decipher2.read(),derivedHalf1.slice(0,16)),seedB=Buffer.concat([seedBPart1,seedBPart2],24),factorB=BigInteger.fromBuffer(hash256(seedB));return{privateKey:passInt.multiply(factorB).mod(curve.n).toBuffer(32),compressed:compressed}}module.exports={decrypt:function(string,passphrase,progressCallback,scryptParams){return decryptRaw(bs58check.decode(string),passphrase,progressCallback,scryptParams)},decryptECMult:decryptECMult,decryptRaw:decryptRaw,encrypt:function(buffer,compressed,passphrase,progressCallback,scryptParams){return bs58check.encode(encryptRaw(buffer,compressed,passphrase,progressCallback,scryptParams))},encryptRaw:encryptRaw,verify:function(string){var decoded=bs58check.decodeUnsafe(string);if(!decoded)return!1;if(39!==decoded.length)return!1;if(1!==decoded.readUInt8(0))return!1;var type=decoded.readUInt8(1),flag=decoded.readUInt8(2);if(66===type){if(192!==flag&&224!==flag)return!1}else{if(67!==type)return!1;if(-37&flag)return!1}return!0}}},{assert:26,bigi:64,"browserify-aes":203,bs58check:230,"buffer-xor/inplace":239,"create-hash":333,ecurve:385,"safe-buffer":839,scryptsy:840}],71:[function(require,module,exports){var aes=require("browserify-aes"),assert=require("assert"),Buffer=require("safe-buffer").Buffer,bs58check=require("bs58check"),bs58grscheck=require("bs58grscheck"),createHash=require("create-hash"),scrypt=require("scryptsy"),xor=require("buffer-xor/inplace"),curve=require("ecurve").getCurveByName("secp256k1"),BigInteger=require("bigi"),SCRYPT_PARAMS={N:16384,r:8,p:8},NULL=Buffer.alloc(0);function hash256(buffer){return createHash("sha256").update(createHash("sha256").update(buffer).digest()).digest()}function getAddress(d,compressed){var buffer,Q=curve.G.multiply(d).getEncoded(compressed),hash=(buffer=Q,createHash("rmd160").update(createHash("sha256").update(buffer).digest()).digest()),payload=Buffer.allocUnsafe(21);return payload.writeUInt8(36,0),hash.copy(payload,1),bs58grscheck.encode(payload)}function encryptRaw(buffer,compressed,passphrase,progressCallback,scryptParams){if(32!==buffer.length)throw new Error("Invalid private key length");scryptParams=scryptParams||SCRYPT_PARAMS;var address=getAddress(BigInteger.fromBuffer(buffer),compressed),secret=Buffer.from(passphrase,"utf8"),salt=hash256(address).slice(0,4),N=scryptParams.N,r=scryptParams.r,p=scryptParams.p,scryptBuf=scrypt(secret,salt,N,r,p,64,progressCallback),derivedHalf1=scryptBuf.slice(0,32),derivedHalf2=scryptBuf.slice(32,64),xorBuf=xor(derivedHalf1,buffer),cipher=aes.createCipheriv("aes-256-ecb",derivedHalf2,NULL);cipher.setAutoPadding(!1),cipher.end(xorBuf);var cipherText=cipher.read(),result=Buffer.allocUnsafe(39);return result.writeUInt8(1,0),result.writeUInt8(66,1),result.writeUInt8(compressed?224:192,2),salt.copy(result,3),cipherText.copy(result,7),result}function decryptRaw(buffer,passphrase,progressCallback,scryptParams){if(39!==buffer.length)throw new Error("Invalid BIP38 data length");if(1!==buffer.readUInt8(0))throw new Error("Invalid BIP38 prefix");scryptParams=scryptParams||SCRYPT_PARAMS;var type=buffer.readUInt8(1);if(67===type)return decryptECMult(buffer,passphrase,progressCallback,scryptParams);if(66!==type)throw new Error("Invalid BIP38 type");passphrase=Buffer.from(passphrase,"utf8");var flagByte=buffer.readUInt8(2),compressed=224===flagByte;if(!compressed&&192!==flagByte)throw new Error("Invalid BIP38 compression flag");var N=scryptParams.N,r=scryptParams.r,p=scryptParams.p,salt=buffer.slice(3,7),scryptBuf=scrypt(passphrase,salt,N,r,p,64,progressCallback),derivedHalf1=scryptBuf.slice(0,32),derivedHalf2=scryptBuf.slice(32,64),privKeyBuf=buffer.slice(7,39),decipher=aes.createDecipheriv("aes-256-ecb",derivedHalf2,NULL);decipher.setAutoPadding(!1),decipher.end(privKeyBuf);var plainText=decipher.read(),privateKey=xor(derivedHalf1,plainText),checksum=hash256(getAddress(BigInteger.fromBuffer(privateKey),compressed)).slice(0,4);return assert.deepEqual(salt,checksum),{privateKey:privateKey,compressed:compressed}}function decryptECMult(buffer,passphrase,progressCallback,scryptParams){passphrase=Buffer.from(passphrase,"utf8"),buffer=buffer.slice(1),scryptParams=scryptParams||SCRYPT_PARAMS;var flag=buffer.readUInt8(1),compressed=0!=(32&flag),hasLotSeq=0!=(4&flag);assert.equal(36&flag,flag,"Invalid private key.");var ownerSalt,addressHash=buffer.slice(2,6),ownerEntropy=buffer.slice(6,14);ownerSalt=hasLotSeq?ownerEntropy.slice(0,4):ownerEntropy;var passFactor,encryptedPart1=buffer.slice(14,22),encryptedPart2=buffer.slice(22,38),N=scryptParams.N,r=scryptParams.r,p=scryptParams.p,preFactor=scrypt(passphrase,ownerSalt,N,r,p,32,progressCallback);hasLotSeq?passFactor=hash256(Buffer.concat([preFactor,ownerEntropy])):passFactor=preFactor;var passInt=BigInteger.fromBuffer(passFactor),passPoint=curve.G.multiply(passInt).getEncoded(!0),seedBPass=scrypt(passPoint,Buffer.concat([addressHash,ownerEntropy]),1024,1,1,64),derivedHalf1=seedBPass.slice(0,32),derivedHalf2=seedBPass.slice(32,64),decipher=aes.createDecipheriv("aes-256-ecb",derivedHalf2,Buffer.alloc(0));decipher.setAutoPadding(!1),decipher.end(encryptedPart2);var decryptedPart2=decipher.read(),tmp=xor(decryptedPart2,derivedHalf1.slice(16,32)),seedBPart2=tmp.slice(8,16),decipher2=aes.createDecipheriv("aes-256-ecb",derivedHalf2,Buffer.alloc(0));decipher2.setAutoPadding(!1),decipher2.write(encryptedPart1),decipher2.end(tmp.slice(0,8));var seedBPart1=xor(decipher2.read(),derivedHalf1.slice(0,16)),seedB=Buffer.concat([seedBPart1,seedBPart2],24),factorB=BigInteger.fromBuffer(hash256(seedB));return{privateKey:passInt.multiply(factorB).mod(curve.n).toBuffer(32),compressed:compressed}}module.exports={decrypt:function(string,passphrase,progressCallback,scryptParams){return decryptRaw(bs58check.decode(string),passphrase,progressCallback,scryptParams)},decryptECMult:decryptECMult,decryptRaw:decryptRaw,encrypt:function(buffer,compressed,passphrase,progressCallback,scryptParams){return bs58check.encode(encryptRaw(buffer,compressed,passphrase,progressCallback,scryptParams))},encryptRaw:encryptRaw,verify:function(string){var decoded=bs58grscheck.decodeUnsafe(string);if(!decoded)return!1;if(39!==decoded.length)return!1;if(1!==decoded.readUInt8(0))return!1;var type=decoded.readUInt8(1),flag=decoded.readUInt8(2);if(66===type){if(192!==flag&&224!==flag)return!1}else{if(67!==type)return!1;if(-37&flag)return!1}return!0}}},{assert:26,bigi:64,"browserify-aes":203,bs58check:230,bs58grscheck:73,"buffer-xor/inplace":239,"create-hash":333,ecurve:385,"safe-buffer":839,scryptsy:840}],72:[function(require,module,exports){"use strict";var base58=require("bs58"),Buffer=require("safe-buffer").Buffer;module.exports=function(checksumFn){function decodeRaw(buffer){var payload=buffer.slice(0,-4),checksum=buffer.slice(-4),newChecksum=checksumFn(payload);if(!(checksum[0]^newChecksum[0]|checksum[1]^newChecksum[1]|checksum[2]^newChecksum[2]|checksum[3]^newChecksum[3]))return payload}return{encode:function(payload){var checksum=checksumFn(payload);return base58.encode(Buffer.concat([payload,checksum],payload.length+4))},decode:function(string){var payload=decodeRaw(base58.decode(string));if(!payload)throw new Error("Invalid checksum");return payload},decodeUnsafe:function(string){var buffer=base58.decodeUnsafe(string);if(buffer)return decodeRaw(buffer)}}}},{bs58:228,"safe-buffer":839}],73:[function(require,module,exports){(function(Buffer){"use strict";require("create-hash");var bs58grscheckBase=require("./base"),groestlhash=require("groestl-hash-js");module.exports=bs58grscheckBase(function(buffer){return Buffer(groestlhash.groestl_2(buffer,1,1))})}).call(this,require("buffer").Buffer)},{"./base":72,buffer:240,"create-hash":333,"groestl-hash-js":418}],74:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer;module.exports={check:function(buffer){if(buffer.length<8)return!1;if(buffer.length>72)return!1;if(48!==buffer[0])return!1;if(buffer[1]!==buffer.length-2)return!1;if(2!==buffer[2])return!1;var lenR=buffer[3];if(0===lenR)return!1;if(5+lenR>=buffer.length)return!1;if(2!==buffer[4+lenR])return!1;var lenS=buffer[5+lenR];return!(0===lenS||6+lenR+lenS!==buffer.length||128&buffer[4]||lenR>1&&0===buffer[4]&&!(128&buffer[5])||128&buffer[lenR+6]||lenS>1&&0===buffer[lenR+6]&&!(128&buffer[lenR+7]))},decode:function(buffer){if(buffer.length<8)throw new Error("DER sequence length is too short");if(buffer.length>72)throw new Error("DER sequence length is too long");if(48!==buffer[0])throw new Error("Expected DER sequence");if(buffer[1]!==buffer.length-2)throw new Error("DER sequence length is invalid");if(2!==buffer[2])throw new Error("Expected DER integer");var lenR=buffer[3];if(0===lenR)throw new Error("R length is zero");if(5+lenR>=buffer.length)throw new Error("R length is too long");if(2!==buffer[4+lenR])throw new Error("Expected DER integer (2)");var lenS=buffer[5+lenR];if(0===lenS)throw new Error("S length is zero");if(6+lenR+lenS!==buffer.length)throw new Error("S length is invalid");if(128&buffer[4])throw new Error("R value is negative");if(lenR>1&&0===buffer[4]&&!(128&buffer[5]))throw new Error("R value excessively padded");if(128&buffer[lenR+6])throw new Error("S value is negative");if(lenS>1&&0===buffer[lenR+6]&&!(128&buffer[lenR+7]))throw new Error("S value excessively padded");return{r:buffer.slice(4,4+lenR),s:buffer.slice(6+lenR)}},encode:function(r,s){var lenR=r.length,lenS=s.length;if(0===lenR)throw new Error("R length is zero");if(0===lenS)throw new Error("S length is zero");if(lenR>33)throw new Error("R length is too long");if(lenS>33)throw new Error("S length is too long");if(128&r[0])throw new Error("R value is negative");if(128&s[0])throw new Error("S value is negative");if(lenR>1&&0===r[0]&&!(128&r[1]))throw new Error("R value excessively padded");if(lenS>1&&0===s[0]&&!(128&s[1]))throw new Error("S value excessively padded");var signature=Buffer.allocUnsafe(6+lenR+lenS);return signature[0]=48,signature[1]=signature.length-2,signature[2]=2,signature[3]=r.length,r.copy(signature,4),signature[4+lenR]=2,signature[5+lenR]=s.length,s.copy(signature,6+lenR),signature}}},{"safe-buffer":839}],75:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const wordlists={};let _default;exports.wordlists=wordlists,exports._default=_default;try{exports._default=_default=require("./wordlists/chinese_simplified.json"),wordlists.chinese_simplified=_default}catch(err){}try{exports._default=_default=require("./wordlists/chinese_traditional.json"),wordlists.chinese_traditional=_default}catch(err){}try{exports._default=_default=require("./wordlists/korean.json"),wordlists.korean=_default}catch(err){}try{exports._default=_default=require("./wordlists/french.json"),wordlists.french=_default}catch(err){}try{exports._default=_default=require("./wordlists/italian.json"),wordlists.italian=_default}catch(err){}try{exports._default=_default=require("./wordlists/spanish.json"),wordlists.spanish=_default}catch(err){}try{exports._default=_default=require("./wordlists/japanese.json"),wordlists.japanese=_default,wordlists.JA=_default}catch(err){}try{exports._default=_default=require("./wordlists/english.json"),wordlists.english=_default,wordlists.EN=_default}catch(err){}},{"./wordlists/chinese_simplified.json":77,"./wordlists/chinese_traditional.json":78,"./wordlists/english.json":79,"./wordlists/french.json":80,"./wordlists/italian.json":81,"./wordlists/japanese.json":82,"./wordlists/korean.json":83,"./wordlists/spanish.json":84}],76:[function(require,module,exports){(function(Buffer){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const createHash=require("create-hash"),pbkdf2_1=require("pbkdf2"),randomBytes=require("randombytes"),_wordlists_1=require("./_wordlists");let DEFAULT_WORDLIST=_wordlists_1._default;const INVALID_MNEMONIC="Invalid mnemonic",INVALID_ENTROPY="Invalid entropy",INVALID_CHECKSUM="Invalid mnemonic checksum",WORDLIST_REQUIRED="A wordlist is required but a default could not be found.\nPlease explicitly pass a 2048 word array explicitly.";function lpad(str,padString,length){for(;str.lengthlpad(x.toString(2),"0",8)).join("")}function deriveChecksumBits(entropyBuffer){const CS=8*entropyBuffer.length/32;return bytesToBinary([...createHash("sha256").update(entropyBuffer).digest()]).slice(0,CS)}function salt(password){return"mnemonic"+(password||"")}function mnemonicToEntropy(mnemonic,wordlist){if(!(wordlist=wordlist||DEFAULT_WORDLIST))throw new Error(WORDLIST_REQUIRED);const words=(mnemonic||"").normalize("NFKD").split(" ");if(words.length%3!=0)throw new Error(INVALID_MNEMONIC);const bits=words.map(word=>{const index=wordlist.indexOf(word);if(-1===index)throw new Error(INVALID_MNEMONIC);return lpad(index.toString(2),"0",11)}).join(""),dividerIndex=32*Math.floor(bits.length/33),entropyBits=bits.slice(0,dividerIndex),checksumBits=bits.slice(dividerIndex),entropyBytes=entropyBits.match(/(.{1,8})/g).map(binaryToByte);if(entropyBytes.length<16)throw new Error(INVALID_ENTROPY);if(entropyBytes.length>32)throw new Error(INVALID_ENTROPY);if(entropyBytes.length%4!=0)throw new Error(INVALID_ENTROPY);const entropy=Buffer.from(entropyBytes);if(deriveChecksumBits(entropy)!==checksumBits)throw new Error(INVALID_CHECKSUM);return entropy.toString("hex")}function entropyToMnemonic(entropy,wordlist){if(Buffer.isBuffer(entropy)||(entropy=Buffer.from(entropy,"hex")),!(wordlist=wordlist||DEFAULT_WORDLIST))throw new Error(WORDLIST_REQUIRED);if(entropy.length<16)throw new TypeError(INVALID_ENTROPY);if(entropy.length>32)throw new TypeError(INVALID_ENTROPY);if(entropy.length%4!=0)throw new TypeError(INVALID_ENTROPY);const words=(bytesToBinary([...entropy])+deriveChecksumBits(entropy)).match(/(.{1,11})/g).map(binary=>{const index=binaryToByte(binary);return wordlist[index]});return"あいこくしん"===wordlist[0]?words.join(" "):words.join(" ")}exports.mnemonicToSeedSync=function(mnemonic,password){const mnemonicBuffer=Buffer.from((mnemonic||"").normalize("NFKD"),"utf8"),saltBuffer=Buffer.from(salt((password||"").normalize("NFKD")),"utf8");return pbkdf2_1.pbkdf2Sync(mnemonicBuffer,saltBuffer,2048,64,"sha512")},exports.mnemonicToSeed=function(mnemonic,password){return new Promise((resolve,reject)=>{try{const mnemonicBuffer=Buffer.from((mnemonic||"").normalize("NFKD"),"utf8"),saltBuffer=Buffer.from(salt((password||"").normalize("NFKD")),"utf8");pbkdf2_1.pbkdf2(mnemonicBuffer,saltBuffer,2048,64,"sha512",(err,data)=>err?reject(err):resolve(data))}catch(error){return reject(error)}})},exports.mnemonicToEntropy=mnemonicToEntropy,exports.entropyToMnemonic=entropyToMnemonic,exports.generateMnemonic=function(strength,rng,wordlist){if((strength=strength||128)%32!=0)throw new TypeError(INVALID_ENTROPY);return entropyToMnemonic((rng=rng||randomBytes)(strength/8),wordlist)},exports.validateMnemonic=function(mnemonic,wordlist){try{mnemonicToEntropy(mnemonic,wordlist)}catch(e){return!1}return!0},exports.setDefaultWordlist=function(language){const result=_wordlists_1.wordlists[language];if(!result)throw new Error('Could not find wordlist for language "'+language+'"');DEFAULT_WORDLIST=result},exports.getDefaultWordlist=function(){if(!DEFAULT_WORDLIST)throw new Error("No Default Wordlist set");return Object.keys(_wordlists_1.wordlists).filter(lang=>"JA"!==lang&&"EN"!==lang&&_wordlists_1.wordlists[lang].every((word,index)=>word===DEFAULT_WORDLIST[index]))[0]};var _wordlists_2=require("./_wordlists");exports.wordlists=_wordlists_2.wordlists}).call(this,require("buffer").Buffer)},{"./_wordlists":75,buffer:240,"create-hash":333,pbkdf2:768,randombytes:820}],77:[function(require,module,exports){module.exports=["的","一","是","在","不","了","有","和","人","这","中","大","为","上","个","国","我","以","要","他","时","来","用","们","生","到","作","地","于","出","就","分","对","成","会","可","主","发","年","动","同","工","也","能","下","过","子","说","产","种","面","而","方","后","多","定","行","学","法","所","民","得","经","十","三","之","进","着","等","部","度","家","电","力","里","如","水","化","高","自","二","理","起","小","物","现","实","加","量","都","两","体","制","机","当","使","点","从","业","本","去","把","性","好","应","开","它","合","还","因","由","其","些","然","前","外","天","政","四","日","那","社","义","事","平","形","相","全","表","间","样","与","关","各","重","新","线","内","数","正","心","反","你","明","看","原","又","么","利","比","或","但","质","气","第","向","道","命","此","变","条","只","没","结","解","问","意","建","月","公","无","系","军","很","情","者","最","立","代","想","已","通","并","提","直","题","党","程","展","五","果","料","象","员","革","位","入","常","文","总","次","品","式","活","设","及","管","特","件","长","求","老","头","基","资","边","流","路","级","少","图","山","统","接","知","较","将","组","见","计","别","她","手","角","期","根","论","运","农","指","几","九","区","强","放","决","西","被","干","做","必","战","先","回","则","任","取","据","处","队","南","给","色","光","门","即","保","治","北","造","百","规","热","领","七","海","口","东","导","器","压","志","世","金","增","争","济","阶","油","思","术","极","交","受","联","什","认","六","共","权","收","证","改","清","美","再","采","转","更","单","风","切","打","白","教","速","花","带","安","场","身","车","例","真","务","具","万","每","目","至","达","走","积","示","议","声","报","斗","完","类","八","离","华","名","确","才","科","张","信","马","节","话","米","整","空","元","况","今","集","温","传","土","许","步","群","广","石","记","需","段","研","界","拉","林","律","叫","且","究","观","越","织","装","影","算","低","持","音","众","书","布","复","容","儿","须","际","商","非","验","连","断","深","难","近","矿","千","周","委","素","技","备","半","办","青","省","列","习","响","约","支","般","史","感","劳","便","团","往","酸","历","市","克","何","除","消","构","府","称","太","准","精","值","号","率","族","维","划","选","标","写","存","候","毛","亲","快","效","斯","院","查","江","型","眼","王","按","格","养","易","置","派","层","片","始","却","专","状","育","厂","京","识","适","属","圆","包","火","住","调","满","县","局","照","参","红","细","引","听","该","铁","价","严","首","底","液","官","德","随","病","苏","失","尔","死","讲","配","女","黄","推","显","谈","罪","神","艺","呢","席","含","企","望","密","批","营","项","防","举","球","英","氧","势","告","李","台","落","木","帮","轮","破","亚","师","围","注","远","字","材","排","供","河","态","封","另","施","减","树","溶","怎","止","案","言","士","均","武","固","叶","鱼","波","视","仅","费","紧","爱","左","章","早","朝","害","续","轻","服","试","食","充","兵","源","判","护","司","足","某","练","差","致","板","田","降","黑","犯","负","击","范","继","兴","似","余","坚","曲","输","修","故","城","夫","够","送","笔","船","占","右","财","吃","富","春","职","觉","汉","画","功","巴","跟","虽","杂","飞","检","吸","助","升","阳","互","初","创","抗","考","投","坏","策","古","径","换","未","跑","留","钢","曾","端","责","站","简","述","钱","副","尽","帝","射","草","冲","承","独","令","限","阿","宣","环","双","请","超","微","让","控","州","良","轴","找","否","纪","益","依","优","顶","础","载","倒","房","突","坐","粉","敌","略","客","袁","冷","胜","绝","析","块","剂","测","丝","协","诉","念","陈","仍","罗","盐","友","洋","错","苦","夜","刑","移","频","逐","靠","混","母","短","皮","终","聚","汽","村","云","哪","既","距","卫","停","烈","央","察","烧","迅","境","若","印","洲","刻","括","激","孔","搞","甚","室","待","核","校","散","侵","吧","甲","游","久","菜","味","旧","模","湖","货","损","预","阻","毫","普","稳","乙","妈","植","息","扩","银","语","挥","酒","守","拿","序","纸","医","缺","雨","吗","针","刘","啊","急","唱","误","训","愿","审","附","获","茶","鲜","粮","斤","孩","脱","硫","肥","善","龙","演","父","渐","血","欢","械","掌","歌","沙","刚","攻","谓","盾","讨","晚","粒","乱","燃","矛","乎","杀","药","宁","鲁","贵","钟","煤","读","班","伯","香","介","迫","句","丰","培","握","兰","担","弦","蛋","沉","假","穿","执","答","乐","谁","顺","烟","缩","征","脸","喜","松","脚","困","异","免","背","星","福","买","染","井","概","慢","怕","磁","倍","祖","皇","促","静","补","评","翻","肉","践","尼","衣","宽","扬","棉","希","伤","操","垂","秋","宜","氢","套","督","振","架","亮","末","宪","庆","编","牛","触","映","雷","销","诗","座","居","抓","裂","胞","呼","娘","景","威","绿","晶","厚","盟","衡","鸡","孙","延","危","胶","屋","乡","临","陆","顾","掉","呀","灯","岁","措","束","耐","剧","玉","赵","跳","哥","季","课","凯","胡","额","款","绍","卷","齐","伟","蒸","殖","永","宗","苗","川","炉","岩","弱","零","杨","奏","沿","露","杆","探","滑","镇","饭","浓","航","怀","赶","库","夺","伊","灵","税","途","灭","赛","归","召","鼓","播","盘","裁","险","康","唯","录","菌","纯","借","糖","盖","横","符","私","努","堂","域","枪","润","幅","哈","竟","熟","虫","泽","脑","壤","碳","欧","遍","侧","寨","敢","彻","虑","斜","薄","庭","纳","弹","饲","伸","折","麦","湿","暗","荷","瓦","塞","床","筑","恶","户","访","塔","奇","透","梁","刀","旋","迹","卡","氯","遇","份","毒","泥","退","洗","摆","灰","彩","卖","耗","夏","择","忙","铜","献","硬","予","繁","圈","雪","函","亦","抽","篇","阵","阴","丁","尺","追","堆","雄","迎","泛","爸","楼","避","谋","吨","野","猪","旗","累","偏","典","馆","索","秦","脂","潮","爷","豆","忽","托","惊","塑","遗","愈","朱","替","纤","粗","倾","尚","痛","楚","谢","奋","购","磨","君","池","旁","碎","骨","监","捕","弟","暴","割","贯","殊","释","词","亡","壁","顿","宝","午","尘","闻","揭","炮","残","冬","桥","妇","警","综","招","吴","付","浮","遭","徐","您","摇","谷","赞","箱","隔","订","男","吹","园","纷","唐","败","宋","玻","巨","耕","坦","荣","闭","湾","键","凡","驻","锅","救","恩","剥","凝","碱","齿","截","炼","麻","纺","禁","废","盛","版","缓","净","睛","昌","婚","涉","筒","嘴","插","岸","朗","庄","街","藏","姑","贸","腐","奴","啦","惯","乘","伙","恢","匀","纱","扎","辩","耳","彪","臣","亿","璃","抵","脉","秀","萨","俄","网","舞","店","喷","纵","寸","汗","挂","洪","贺","闪","柬","爆","烯","津","稻","墙","软","勇","像","滚","厘","蒙","芳","肯","坡","柱","荡","腿","仪","旅","尾","轧","冰","贡","登","黎","削","钻","勒","逃","障","氨","郭","峰","币","港","伏","轨","亩","毕","擦","莫","刺","浪","秘","援","株","健","售","股","岛","甘","泡","睡","童","铸","汤","阀","休","汇","舍","牧","绕","炸","哲","磷","绩","朋","淡","尖","启","陷","柴","呈","徒","颜","泪","稍","忘","泵","蓝","拖","洞","授","镜","辛","壮","锋","贫","虚","弯","摩","泰","幼","廷","尊","窗","纲","弄","隶","疑","氏","宫","姐","震","瑞","怪","尤","琴","循","描","膜","违","夹","腰","缘","珠","穷","森","枝","竹","沟","催","绳","忆","邦","剩","幸","浆","栏","拥","牙","贮","礼","滤","钠","纹","罢","拍","咱","喊","袖","埃","勤","罚","焦","潜","伍","墨","欲","缝","姓","刊","饱","仿","奖","铝","鬼","丽","跨","默","挖","链","扫","喝","袋","炭","污","幕","诸","弧","励","梅","奶","洁","灾","舟","鉴","苯","讼","抱","毁","懂","寒","智","埔","寄","届","跃","渡","挑","丹","艰","贝","碰","拔","爹","戴","码","梦","芽","熔","赤","渔","哭","敬","颗","奔","铅","仲","虎","稀","妹","乏","珍","申","桌","遵","允","隆","螺","仓","魏","锐","晓","氮","兼","隐","碍","赫","拨","忠","肃","缸","牵","抢","博","巧","壳","兄","杜","讯","诚","碧","祥","柯","页","巡","矩","悲","灌","龄","伦","票","寻","桂","铺","圣","恐","恰","郑","趣","抬","荒","腾","贴","柔","滴","猛","阔","辆","妻","填","撤","储","签","闹","扰","紫","砂","递","戏","吊","陶","伐","喂","疗","瓶","婆","抚","臂","摸","忍","虾","蜡","邻","胸","巩","挤","偶","弃","槽","劲","乳","邓","吉","仁","烂","砖","租","乌","舰","伴","瓜","浅","丙","暂","燥","橡","柳","迷","暖","牌","秧","胆","详","簧","踏","瓷","谱","呆","宾","糊","洛","辉","愤","竞","隙","怒","粘","乃","绪","肩","籍","敏","涂","熙","皆","侦","悬","掘","享","纠","醒","狂","锁","淀","恨","牲","霸","爬","赏","逆","玩","陵","祝","秒","浙","貌","役","彼","悉","鸭","趋","凤","晨","畜","辈","秩","卵","署","梯","炎","滩","棋","驱","筛","峡","冒","啥","寿","译","浸","泉","帽","迟","硅","疆","贷","漏","稿","冠","嫩","胁","芯","牢","叛","蚀","奥","鸣","岭","羊","凭","串","塘","绘","酵","融","盆","锡","庙","筹","冻","辅","摄","袭","筋","拒","僚","旱","钾","鸟","漆","沈","眉","疏","添","棒","穗","硝","韩","逼","扭","侨","凉","挺","碗","栽","炒","杯","患","馏","劝","豪","辽","勃","鸿","旦","吏","拜","狗","埋","辊","掩","饮","搬","骂","辞","勾","扣","估","蒋","绒","雾","丈","朵","姆","拟","宇","辑","陕","雕","偿","蓄","崇","剪","倡","厅","咬","驶","薯","刷","斥","番","赋","奉","佛","浇","漫","曼","扇","钙","桃","扶","仔","返","俗","亏","腔","鞋","棱","覆","框","悄","叔","撞","骗","勘","旺","沸","孤","吐","孟","渠","屈","疾","妙","惜","仰","狠","胀","谐","抛","霉","桑","岗","嘛","衰","盗","渗","脏","赖","涌","甜","曹","阅","肌","哩","厉","烃","纬","毅","昨","伪","症","煮","叹","钉","搭","茎","笼","酷","偷","弓","锥","恒","杰","坑","鼻","翼","纶","叙","狱","逮","罐","络","棚","抑","膨","蔬","寺","骤","穆","冶","枯","册","尸","凸","绅","坯","牺","焰","轰","欣","晋","瘦","御","锭","锦","丧","旬","锻","垄","搜","扑","邀","亭","酯","迈","舒","脆","酶","闲","忧","酚","顽","羽","涨","卸","仗","陪","辟","惩","杭","姚","肚","捉","飘","漂","昆","欺","吾","郎","烷","汁","呵","饰","萧","雅","邮","迁","燕","撒","姻","赴","宴","烦","债","帐","斑","铃","旨","醇","董","饼","雏","姿","拌","傅","腹","妥","揉","贤","拆","歪","葡","胺","丢","浩","徽","昂","垫","挡","览","贪","慰","缴","汪","慌","冯","诺","姜","谊","凶","劣","诬","耀","昏","躺","盈","骑","乔","溪","丛","卢","抹","闷","咨","刮","驾","缆","悟","摘","铒","掷","颇","幻","柄","惠","惨","佳","仇","腊","窝","涤","剑","瞧","堡","泼","葱","罩","霍","捞","胎","苍","滨","俩","捅","湘","砍","霞","邵","萄","疯","淮","遂","熊","粪","烘","宿","档","戈","驳","嫂","裕","徙","箭","捐","肠","撑","晒","辨","殿","莲","摊","搅","酱","屏","疫","哀","蔡","堵","沫","皱","畅","叠","阁","莱","敲","辖","钩","痕","坝","巷","饿","祸","丘","玄","溜","曰","逻","彭","尝","卿","妨","艇","吞","韦","怨","矮","歇"]},{}],78:[function(require,module,exports){module.exports=["的","一","是","在","不","了","有","和","人","這","中","大","為","上","個","國","我","以","要","他","時","來","用","們","生","到","作","地","於","出","就","分","對","成","會","可","主","發","年","動","同","工","也","能","下","過","子","說","產","種","面","而","方","後","多","定","行","學","法","所","民","得","經","十","三","之","進","著","等","部","度","家","電","力","裡","如","水","化","高","自","二","理","起","小","物","現","實","加","量","都","兩","體","制","機","當","使","點","從","業","本","去","把","性","好","應","開","它","合","還","因","由","其","些","然","前","外","天","政","四","日","那","社","義","事","平","形","相","全","表","間","樣","與","關","各","重","新","線","內","數","正","心","反","你","明","看","原","又","麼","利","比","或","但","質","氣","第","向","道","命","此","變","條","只","沒","結","解","問","意","建","月","公","無","系","軍","很","情","者","最","立","代","想","已","通","並","提","直","題","黨","程","展","五","果","料","象","員","革","位","入","常","文","總","次","品","式","活","設","及","管","特","件","長","求","老","頭","基","資","邊","流","路","級","少","圖","山","統","接","知","較","將","組","見","計","別","她","手","角","期","根","論","運","農","指","幾","九","區","強","放","決","西","被","幹","做","必","戰","先","回","則","任","取","據","處","隊","南","給","色","光","門","即","保","治","北","造","百","規","熱","領","七","海","口","東","導","器","壓","志","世","金","增","爭","濟","階","油","思","術","極","交","受","聯","什","認","六","共","權","收","證","改","清","美","再","採","轉","更","單","風","切","打","白","教","速","花","帶","安","場","身","車","例","真","務","具","萬","每","目","至","達","走","積","示","議","聲","報","鬥","完","類","八","離","華","名","確","才","科","張","信","馬","節","話","米","整","空","元","況","今","集","溫","傳","土","許","步","群","廣","石","記","需","段","研","界","拉","林","律","叫","且","究","觀","越","織","裝","影","算","低","持","音","眾","書","布","复","容","兒","須","際","商","非","驗","連","斷","深","難","近","礦","千","週","委","素","技","備","半","辦","青","省","列","習","響","約","支","般","史","感","勞","便","團","往","酸","歷","市","克","何","除","消","構","府","稱","太","準","精","值","號","率","族","維","劃","選","標","寫","存","候","毛","親","快","效","斯","院","查","江","型","眼","王","按","格","養","易","置","派","層","片","始","卻","專","狀","育","廠","京","識","適","屬","圓","包","火","住","調","滿","縣","局","照","參","紅","細","引","聽","該","鐵","價","嚴","首","底","液","官","德","隨","病","蘇","失","爾","死","講","配","女","黃","推","顯","談","罪","神","藝","呢","席","含","企","望","密","批","營","項","防","舉","球","英","氧","勢","告","李","台","落","木","幫","輪","破","亞","師","圍","注","遠","字","材","排","供","河","態","封","另","施","減","樹","溶","怎","止","案","言","士","均","武","固","葉","魚","波","視","僅","費","緊","愛","左","章","早","朝","害","續","輕","服","試","食","充","兵","源","判","護","司","足","某","練","差","致","板","田","降","黑","犯","負","擊","范","繼","興","似","餘","堅","曲","輸","修","故","城","夫","夠","送","筆","船","佔","右","財","吃","富","春","職","覺","漢","畫","功","巴","跟","雖","雜","飛","檢","吸","助","昇","陽","互","初","創","抗","考","投","壞","策","古","徑","換","未","跑","留","鋼","曾","端","責","站","簡","述","錢","副","盡","帝","射","草","衝","承","獨","令","限","阿","宣","環","雙","請","超","微","讓","控","州","良","軸","找","否","紀","益","依","優","頂","礎","載","倒","房","突","坐","粉","敵","略","客","袁","冷","勝","絕","析","塊","劑","測","絲","協","訴","念","陳","仍","羅","鹽","友","洋","錯","苦","夜","刑","移","頻","逐","靠","混","母","短","皮","終","聚","汽","村","雲","哪","既","距","衛","停","烈","央","察","燒","迅","境","若","印","洲","刻","括","激","孔","搞","甚","室","待","核","校","散","侵","吧","甲","遊","久","菜","味","舊","模","湖","貨","損","預","阻","毫","普","穩","乙","媽","植","息","擴","銀","語","揮","酒","守","拿","序","紙","醫","缺","雨","嗎","針","劉","啊","急","唱","誤","訓","願","審","附","獲","茶","鮮","糧","斤","孩","脫","硫","肥","善","龍","演","父","漸","血","歡","械","掌","歌","沙","剛","攻","謂","盾","討","晚","粒","亂","燃","矛","乎","殺","藥","寧","魯","貴","鐘","煤","讀","班","伯","香","介","迫","句","豐","培","握","蘭","擔","弦","蛋","沉","假","穿","執","答","樂","誰","順","煙","縮","徵","臉","喜","松","腳","困","異","免","背","星","福","買","染","井","概","慢","怕","磁","倍","祖","皇","促","靜","補","評","翻","肉","踐","尼","衣","寬","揚","棉","希","傷","操","垂","秋","宜","氫","套","督","振","架","亮","末","憲","慶","編","牛","觸","映","雷","銷","詩","座","居","抓","裂","胞","呼","娘","景","威","綠","晶","厚","盟","衡","雞","孫","延","危","膠","屋","鄉","臨","陸","顧","掉","呀","燈","歲","措","束","耐","劇","玉","趙","跳","哥","季","課","凱","胡","額","款","紹","卷","齊","偉","蒸","殖","永","宗","苗","川","爐","岩","弱","零","楊","奏","沿","露","桿","探","滑","鎮","飯","濃","航","懷","趕","庫","奪","伊","靈","稅","途","滅","賽","歸","召","鼓","播","盤","裁","險","康","唯","錄","菌","純","借","糖","蓋","橫","符","私","努","堂","域","槍","潤","幅","哈","竟","熟","蟲","澤","腦","壤","碳","歐","遍","側","寨","敢","徹","慮","斜","薄","庭","納","彈","飼","伸","折","麥","濕","暗","荷","瓦","塞","床","築","惡","戶","訪","塔","奇","透","梁","刀","旋","跡","卡","氯","遇","份","毒","泥","退","洗","擺","灰","彩","賣","耗","夏","擇","忙","銅","獻","硬","予","繁","圈","雪","函","亦","抽","篇","陣","陰","丁","尺","追","堆","雄","迎","泛","爸","樓","避","謀","噸","野","豬","旗","累","偏","典","館","索","秦","脂","潮","爺","豆","忽","托","驚","塑","遺","愈","朱","替","纖","粗","傾","尚","痛","楚","謝","奮","購","磨","君","池","旁","碎","骨","監","捕","弟","暴","割","貫","殊","釋","詞","亡","壁","頓","寶","午","塵","聞","揭","炮","殘","冬","橋","婦","警","綜","招","吳","付","浮","遭","徐","您","搖","谷","贊","箱","隔","訂","男","吹","園","紛","唐","敗","宋","玻","巨","耕","坦","榮","閉","灣","鍵","凡","駐","鍋","救","恩","剝","凝","鹼","齒","截","煉","麻","紡","禁","廢","盛","版","緩","淨","睛","昌","婚","涉","筒","嘴","插","岸","朗","莊","街","藏","姑","貿","腐","奴","啦","慣","乘","夥","恢","勻","紗","扎","辯","耳","彪","臣","億","璃","抵","脈","秀","薩","俄","網","舞","店","噴","縱","寸","汗","掛","洪","賀","閃","柬","爆","烯","津","稻","牆","軟","勇","像","滾","厘","蒙","芳","肯","坡","柱","盪","腿","儀","旅","尾","軋","冰","貢","登","黎","削","鑽","勒","逃","障","氨","郭","峰","幣","港","伏","軌","畝","畢","擦","莫","刺","浪","秘","援","株","健","售","股","島","甘","泡","睡","童","鑄","湯","閥","休","匯","舍","牧","繞","炸","哲","磷","績","朋","淡","尖","啟","陷","柴","呈","徒","顏","淚","稍","忘","泵","藍","拖","洞","授","鏡","辛","壯","鋒","貧","虛","彎","摩","泰","幼","廷","尊","窗","綱","弄","隸","疑","氏","宮","姐","震","瑞","怪","尤","琴","循","描","膜","違","夾","腰","緣","珠","窮","森","枝","竹","溝","催","繩","憶","邦","剩","幸","漿","欄","擁","牙","貯","禮","濾","鈉","紋","罷","拍","咱","喊","袖","埃","勤","罰","焦","潛","伍","墨","欲","縫","姓","刊","飽","仿","獎","鋁","鬼","麗","跨","默","挖","鏈","掃","喝","袋","炭","污","幕","諸","弧","勵","梅","奶","潔","災","舟","鑑","苯","訟","抱","毀","懂","寒","智","埔","寄","屆","躍","渡","挑","丹","艱","貝","碰","拔","爹","戴","碼","夢","芽","熔","赤","漁","哭","敬","顆","奔","鉛","仲","虎","稀","妹","乏","珍","申","桌","遵","允","隆","螺","倉","魏","銳","曉","氮","兼","隱","礙","赫","撥","忠","肅","缸","牽","搶","博","巧","殼","兄","杜","訊","誠","碧","祥","柯","頁","巡","矩","悲","灌","齡","倫","票","尋","桂","鋪","聖","恐","恰","鄭","趣","抬","荒","騰","貼","柔","滴","猛","闊","輛","妻","填","撤","儲","簽","鬧","擾","紫","砂","遞","戲","吊","陶","伐","餵","療","瓶","婆","撫","臂","摸","忍","蝦","蠟","鄰","胸","鞏","擠","偶","棄","槽","勁","乳","鄧","吉","仁","爛","磚","租","烏","艦","伴","瓜","淺","丙","暫","燥","橡","柳","迷","暖","牌","秧","膽","詳","簧","踏","瓷","譜","呆","賓","糊","洛","輝","憤","競","隙","怒","粘","乃","緒","肩","籍","敏","塗","熙","皆","偵","懸","掘","享","糾","醒","狂","鎖","淀","恨","牲","霸","爬","賞","逆","玩","陵","祝","秒","浙","貌","役","彼","悉","鴨","趨","鳳","晨","畜","輩","秩","卵","署","梯","炎","灘","棋","驅","篩","峽","冒","啥","壽","譯","浸","泉","帽","遲","矽","疆","貸","漏","稿","冠","嫩","脅","芯","牢","叛","蝕","奧","鳴","嶺","羊","憑","串","塘","繪","酵","融","盆","錫","廟","籌","凍","輔","攝","襲","筋","拒","僚","旱","鉀","鳥","漆","沈","眉","疏","添","棒","穗","硝","韓","逼","扭","僑","涼","挺","碗","栽","炒","杯","患","餾","勸","豪","遼","勃","鴻","旦","吏","拜","狗","埋","輥","掩","飲","搬","罵","辭","勾","扣","估","蔣","絨","霧","丈","朵","姆","擬","宇","輯","陝","雕","償","蓄","崇","剪","倡","廳","咬","駛","薯","刷","斥","番","賦","奉","佛","澆","漫","曼","扇","鈣","桃","扶","仔","返","俗","虧","腔","鞋","棱","覆","框","悄","叔","撞","騙","勘","旺","沸","孤","吐","孟","渠","屈","疾","妙","惜","仰","狠","脹","諧","拋","黴","桑","崗","嘛","衰","盜","滲","臟","賴","湧","甜","曹","閱","肌","哩","厲","烴","緯","毅","昨","偽","症","煮","嘆","釘","搭","莖","籠","酷","偷","弓","錐","恆","傑","坑","鼻","翼","綸","敘","獄","逮","罐","絡","棚","抑","膨","蔬","寺","驟","穆","冶","枯","冊","屍","凸","紳","坯","犧","焰","轟","欣","晉","瘦","禦","錠","錦","喪","旬","鍛","壟","搜","撲","邀","亭","酯","邁","舒","脆","酶","閒","憂","酚","頑","羽","漲","卸","仗","陪","闢","懲","杭","姚","肚","捉","飄","漂","昆","欺","吾","郎","烷","汁","呵","飾","蕭","雅","郵","遷","燕","撒","姻","赴","宴","煩","債","帳","斑","鈴","旨","醇","董","餅","雛","姿","拌","傅","腹","妥","揉","賢","拆","歪","葡","胺","丟","浩","徽","昂","墊","擋","覽","貪","慰","繳","汪","慌","馮","諾","姜","誼","兇","劣","誣","耀","昏","躺","盈","騎","喬","溪","叢","盧","抹","悶","諮","刮","駕","纜","悟","摘","鉺","擲","頗","幻","柄","惠","慘","佳","仇","臘","窩","滌","劍","瞧","堡","潑","蔥","罩","霍","撈","胎","蒼","濱","倆","捅","湘","砍","霞","邵","萄","瘋","淮","遂","熊","糞","烘","宿","檔","戈","駁","嫂","裕","徙","箭","捐","腸","撐","曬","辨","殿","蓮","攤","攪","醬","屏","疫","哀","蔡","堵","沫","皺","暢","疊","閣","萊","敲","轄","鉤","痕","壩","巷","餓","禍","丘","玄","溜","曰","邏","彭","嘗","卿","妨","艇","吞","韋","怨","矮","歇"]},{}],79:[function(require,module,exports){module.exports=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"]},{}],80:[function(require,module,exports){module.exports=["abaisser","abandon","abdiquer","abeille","abolir","aborder","aboutir","aboyer","abrasif","abreuver","abriter","abroger","abrupt","absence","absolu","absurde","abusif","abyssal","académie","acajou","acarien","accabler","accepter","acclamer","accolade","accroche","accuser","acerbe","achat","acheter","aciduler","acier","acompte","acquérir","acronyme","acteur","actif","actuel","adepte","adéquat","adhésif","adjectif","adjuger","admettre","admirer","adopter","adorer","adoucir","adresse","adroit","adulte","adverbe","aérer","aéronef","affaire","affecter","affiche","affreux","affubler","agacer","agencer","agile","agiter","agrafer","agréable","agrume","aider","aiguille","ailier","aimable","aisance","ajouter","ajuster","alarmer","alchimie","alerte","algèbre","algue","aliéner","aliment","alléger","alliage","allouer","allumer","alourdir","alpaga","altesse","alvéole","amateur","ambigu","ambre","aménager","amertume","amidon","amiral","amorcer","amour","amovible","amphibie","ampleur","amusant","analyse","anaphore","anarchie","anatomie","ancien","anéantir","angle","angoisse","anguleux","animal","annexer","annonce","annuel","anodin","anomalie","anonyme","anormal","antenne","antidote","anxieux","apaiser","apéritif","aplanir","apologie","appareil","appeler","apporter","appuyer","aquarium","aqueduc","arbitre","arbuste","ardeur","ardoise","argent","arlequin","armature","armement","armoire","armure","arpenter","arracher","arriver","arroser","arsenic","artériel","article","aspect","asphalte","aspirer","assaut","asservir","assiette","associer","assurer","asticot","astre","astuce","atelier","atome","atrium","atroce","attaque","attentif","attirer","attraper","aubaine","auberge","audace","audible","augurer","aurore","automne","autruche","avaler","avancer","avarice","avenir","averse","aveugle","aviateur","avide","avion","aviser","avoine","avouer","avril","axial","axiome","badge","bafouer","bagage","baguette","baignade","balancer","balcon","baleine","balisage","bambin","bancaire","bandage","banlieue","bannière","banquier","barbier","baril","baron","barque","barrage","bassin","bastion","bataille","bateau","batterie","baudrier","bavarder","belette","bélier","belote","bénéfice","berceau","berger","berline","bermuda","besace","besogne","bétail","beurre","biberon","bicycle","bidule","bijou","bilan","bilingue","billard","binaire","biologie","biopsie","biotype","biscuit","bison","bistouri","bitume","bizarre","blafard","blague","blanchir","blessant","blinder","blond","bloquer","blouson","bobard","bobine","boire","boiser","bolide","bonbon","bondir","bonheur","bonifier","bonus","bordure","borne","botte","boucle","boueux","bougie","boulon","bouquin","bourse","boussole","boutique","boxeur","branche","brasier","brave","brebis","brèche","breuvage","bricoler","brigade","brillant","brioche","brique","brochure","broder","bronzer","brousse","broyeur","brume","brusque","brutal","bruyant","buffle","buisson","bulletin","bureau","burin","bustier","butiner","butoir","buvable","buvette","cabanon","cabine","cachette","cadeau","cadre","caféine","caillou","caisson","calculer","calepin","calibre","calmer","calomnie","calvaire","camarade","caméra","camion","campagne","canal","caneton","canon","cantine","canular","capable","caporal","caprice","capsule","capter","capuche","carabine","carbone","caresser","caribou","carnage","carotte","carreau","carton","cascade","casier","casque","cassure","causer","caution","cavalier","caverne","caviar","cédille","ceinture","céleste","cellule","cendrier","censurer","central","cercle","cérébral","cerise","cerner","cerveau","cesser","chagrin","chaise","chaleur","chambre","chance","chapitre","charbon","chasseur","chaton","chausson","chavirer","chemise","chenille","chéquier","chercher","cheval","chien","chiffre","chignon","chimère","chiot","chlorure","chocolat","choisir","chose","chouette","chrome","chute","cigare","cigogne","cimenter","cinéma","cintrer","circuler","cirer","cirque","citerne","citoyen","citron","civil","clairon","clameur","claquer","classe","clavier","client","cligner","climat","clivage","cloche","clonage","cloporte","cobalt","cobra","cocasse","cocotier","coder","codifier","coffre","cogner","cohésion","coiffer","coincer","colère","colibri","colline","colmater","colonel","combat","comédie","commande","compact","concert","conduire","confier","congeler","connoter","consonne","contact","convexe","copain","copie","corail","corbeau","cordage","corniche","corpus","correct","cortège","cosmique","costume","coton","coude","coupure","courage","couteau","couvrir","coyote","crabe","crainte","cravate","crayon","créature","créditer","crémeux","creuser","crevette","cribler","crier","cristal","critère","croire","croquer","crotale","crucial","cruel","crypter","cubique","cueillir","cuillère","cuisine","cuivre","culminer","cultiver","cumuler","cupide","curatif","curseur","cyanure","cycle","cylindre","cynique","daigner","damier","danger","danseur","dauphin","débattre","débiter","déborder","débrider","débutant","décaler","décembre","déchirer","décider","déclarer","décorer","décrire","décupler","dédale","déductif","déesse","défensif","défiler","défrayer","dégager","dégivrer","déglutir","dégrafer","déjeuner","délice","déloger","demander","demeurer","démolir","dénicher","dénouer","dentelle","dénuder","départ","dépenser","déphaser","déplacer","déposer","déranger","dérober","désastre","descente","désert","désigner","désobéir","dessiner","destrier","détacher","détester","détourer","détresse","devancer","devenir","deviner","devoir","diable","dialogue","diamant","dicter","différer","digérer","digital","digne","diluer","dimanche","diminuer","dioxyde","directif","diriger","discuter","disposer","dissiper","distance","divertir","diviser","docile","docteur","dogme","doigt","domaine","domicile","dompter","donateur","donjon","donner","dopamine","dortoir","dorure","dosage","doseur","dossier","dotation","douanier","double","douceur","douter","doyen","dragon","draper","dresser","dribbler","droiture","duperie","duplexe","durable","durcir","dynastie","éblouir","écarter","écharpe","échelle","éclairer","éclipse","éclore","écluse","école","économie","écorce","écouter","écraser","écrémer","écrivain","écrou","écume","écureuil","édifier","éduquer","effacer","effectif","effigie","effort","effrayer","effusion","égaliser","égarer","éjecter","élaborer","élargir","électron","élégant","éléphant","élève","éligible","élitisme","éloge","élucider","éluder","emballer","embellir","embryon","émeraude","émission","emmener","émotion","émouvoir","empereur","employer","emporter","emprise","émulsion","encadrer","enchère","enclave","encoche","endiguer","endosser","endroit","enduire","énergie","enfance","enfermer","enfouir","engager","engin","englober","énigme","enjamber","enjeu","enlever","ennemi","ennuyeux","enrichir","enrobage","enseigne","entasser","entendre","entier","entourer","entraver","énumérer","envahir","enviable","envoyer","enzyme","éolien","épaissir","épargne","épatant","épaule","épicerie","épidémie","épier","épilogue","épine","épisode","épitaphe","époque","épreuve","éprouver","épuisant","équerre","équipe","ériger","érosion","erreur","éruption","escalier","espadon","espèce","espiègle","espoir","esprit","esquiver","essayer","essence","essieu","essorer","estime","estomac","estrade","étagère","étaler","étanche","étatique","éteindre","étendoir","éternel","éthanol","éthique","ethnie","étirer","étoffer","étoile","étonnant","étourdir","étrange","étroit","étude","euphorie","évaluer","évasion","éventail","évidence","éviter","évolutif","évoquer","exact","exagérer","exaucer","exceller","excitant","exclusif","excuse","exécuter","exemple","exercer","exhaler","exhorter","exigence","exiler","exister","exotique","expédier","explorer","exposer","exprimer","exquis","extensif","extraire","exulter","fable","fabuleux","facette","facile","facture","faiblir","falaise","fameux","famille","farceur","farfelu","farine","farouche","fasciner","fatal","fatigue","faucon","fautif","faveur","favori","fébrile","féconder","fédérer","félin","femme","fémur","fendoir","féodal","fermer","féroce","ferveur","festival","feuille","feutre","février","fiasco","ficeler","fictif","fidèle","figure","filature","filetage","filière","filleul","filmer","filou","filtrer","financer","finir","fiole","firme","fissure","fixer","flairer","flamme","flasque","flatteur","fléau","flèche","fleur","flexion","flocon","flore","fluctuer","fluide","fluvial","folie","fonderie","fongible","fontaine","forcer","forgeron","formuler","fortune","fossile","foudre","fougère","fouiller","foulure","fourmi","fragile","fraise","franchir","frapper","frayeur","frégate","freiner","frelon","frémir","frénésie","frère","friable","friction","frisson","frivole","froid","fromage","frontal","frotter","fruit","fugitif","fuite","fureur","furieux","furtif","fusion","futur","gagner","galaxie","galerie","gambader","garantir","gardien","garnir","garrigue","gazelle","gazon","géant","gélatine","gélule","gendarme","général","génie","genou","gentil","géologie","géomètre","géranium","germe","gestuel","geyser","gibier","gicler","girafe","givre","glace","glaive","glisser","globe","gloire","glorieux","golfeur","gomme","gonfler","gorge","gorille","goudron","gouffre","goulot","goupille","gourmand","goutte","graduel","graffiti","graine","grand","grappin","gratuit","gravir","grenat","griffure","griller","grimper","grogner","gronder","grotte","groupe","gruger","grutier","gruyère","guépard","guerrier","guide","guimauve","guitare","gustatif","gymnaste","gyrostat","habitude","hachoir","halte","hameau","hangar","hanneton","haricot","harmonie","harpon","hasard","hélium","hématome","herbe","hérisson","hermine","héron","hésiter","heureux","hiberner","hibou","hilarant","histoire","hiver","homard","hommage","homogène","honneur","honorer","honteux","horde","horizon","horloge","hormone","horrible","houleux","housse","hublot","huileux","humain","humble","humide","humour","hurler","hydromel","hygiène","hymne","hypnose","idylle","ignorer","iguane","illicite","illusion","image","imbiber","imiter","immense","immobile","immuable","impact","impérial","implorer","imposer","imprimer","imputer","incarner","incendie","incident","incliner","incolore","indexer","indice","inductif","inédit","ineptie","inexact","infini","infliger","informer","infusion","ingérer","inhaler","inhiber","injecter","injure","innocent","inoculer","inonder","inscrire","insecte","insigne","insolite","inspirer","instinct","insulter","intact","intense","intime","intrigue","intuitif","inutile","invasion","inventer","inviter","invoquer","ironique","irradier","irréel","irriter","isoler","ivoire","ivresse","jaguar","jaillir","jambe","janvier","jardin","jauger","jaune","javelot","jetable","jeton","jeudi","jeunesse","joindre","joncher","jongler","joueur","jouissif","journal","jovial","joyau","joyeux","jubiler","jugement","junior","jupon","juriste","justice","juteux","juvénile","kayak","kimono","kiosque","label","labial","labourer","lacérer","lactose","lagune","laine","laisser","laitier","lambeau","lamelle","lampe","lanceur","langage","lanterne","lapin","largeur","larme","laurier","lavabo","lavoir","lecture","légal","léger","légume","lessive","lettre","levier","lexique","lézard","liasse","libérer","libre","licence","licorne","liège","lièvre","ligature","ligoter","ligue","limer","limite","limonade","limpide","linéaire","lingot","lionceau","liquide","lisière","lister","lithium","litige","littoral","livreur","logique","lointain","loisir","lombric","loterie","louer","lourd","loutre","louve","loyal","lubie","lucide","lucratif","lueur","lugubre","luisant","lumière","lunaire","lundi","luron","lutter","luxueux","machine","magasin","magenta","magique","maigre","maillon","maintien","mairie","maison","majorer","malaxer","maléfice","malheur","malice","mallette","mammouth","mandater","maniable","manquant","manteau","manuel","marathon","marbre","marchand","mardi","maritime","marqueur","marron","marteler","mascotte","massif","matériel","matière","matraque","maudire","maussade","mauve","maximal","méchant","méconnu","médaille","médecin","méditer","méduse","meilleur","mélange","mélodie","membre","mémoire","menacer","mener","menhir","mensonge","mentor","mercredi","mérite","merle","messager","mesure","métal","météore","méthode","métier","meuble","miauler","microbe","miette","mignon","migrer","milieu","million","mimique","mince","minéral","minimal","minorer","minute","miracle","miroiter","missile","mixte","mobile","moderne","moelleux","mondial","moniteur","monnaie","monotone","monstre","montagne","monument","moqueur","morceau","morsure","mortier","moteur","motif","mouche","moufle","moulin","mousson","mouton","mouvant","multiple","munition","muraille","murène","murmure","muscle","muséum","musicien","mutation","muter","mutuel","myriade","myrtille","mystère","mythique","nageur","nappe","narquois","narrer","natation","nation","nature","naufrage","nautique","navire","nébuleux","nectar","néfaste","négation","négliger","négocier","neige","nerveux","nettoyer","neurone","neutron","neveu","niche","nickel","nitrate","niveau","noble","nocif","nocturne","noirceur","noisette","nomade","nombreux","nommer","normatif","notable","notifier","notoire","nourrir","nouveau","novateur","novembre","novice","nuage","nuancer","nuire","nuisible","numéro","nuptial","nuque","nutritif","obéir","objectif","obliger","obscur","observer","obstacle","obtenir","obturer","occasion","occuper","océan","octobre","octroyer","octupler","oculaire","odeur","odorant","offenser","officier","offrir","ogive","oiseau","oisillon","olfactif","olivier","ombrage","omettre","onctueux","onduler","onéreux","onirique","opale","opaque","opérer","opinion","opportun","opprimer","opter","optique","orageux","orange","orbite","ordonner","oreille","organe","orgueil","orifice","ornement","orque","ortie","osciller","osmose","ossature","otarie","ouragan","ourson","outil","outrager","ouvrage","ovation","oxyde","oxygène","ozone","paisible","palace","palmarès","palourde","palper","panache","panda","pangolin","paniquer","panneau","panorama","pantalon","papaye","papier","papoter","papyrus","paradoxe","parcelle","paresse","parfumer","parler","parole","parrain","parsemer","partager","parure","parvenir","passion","pastèque","paternel","patience","patron","pavillon","pavoiser","payer","paysage","peigne","peintre","pelage","pélican","pelle","pelouse","peluche","pendule","pénétrer","pénible","pensif","pénurie","pépite","péplum","perdrix","perforer","période","permuter","perplexe","persil","perte","peser","pétale","petit","pétrir","peuple","pharaon","phobie","phoque","photon","phrase","physique","piano","pictural","pièce","pierre","pieuvre","pilote","pinceau","pipette","piquer","pirogue","piscine","piston","pivoter","pixel","pizza","placard","plafond","plaisir","planer","plaque","plastron","plateau","pleurer","plexus","pliage","plomb","plonger","pluie","plumage","pochette","poésie","poète","pointe","poirier","poisson","poivre","polaire","policier","pollen","polygone","pommade","pompier","ponctuel","pondérer","poney","portique","position","posséder","posture","potager","poteau","potion","pouce","poulain","poumon","pourpre","poussin","pouvoir","prairie","pratique","précieux","prédire","préfixe","prélude","prénom","présence","prétexte","prévoir","primitif","prince","prison","priver","problème","procéder","prodige","profond","progrès","proie","projeter","prologue","promener","propre","prospère","protéger","prouesse","proverbe","prudence","pruneau","psychose","public","puceron","puiser","pulpe","pulsar","punaise","punitif","pupitre","purifier","puzzle","pyramide","quasar","querelle","question","quiétude","quitter","quotient","racine","raconter","radieux","ragondin","raideur","raisin","ralentir","rallonge","ramasser","rapide","rasage","ratisser","ravager","ravin","rayonner","réactif","réagir","réaliser","réanimer","recevoir","réciter","réclamer","récolter","recruter","reculer","recycler","rédiger","redouter","refaire","réflexe","réformer","refrain","refuge","régalien","région","réglage","régulier","réitérer","rejeter","rejouer","relatif","relever","relief","remarque","remède","remise","remonter","remplir","remuer","renard","renfort","renifler","renoncer","rentrer","renvoi","replier","reporter","reprise","reptile","requin","réserve","résineux","résoudre","respect","rester","résultat","rétablir","retenir","réticule","retomber","retracer","réunion","réussir","revanche","revivre","révolte","révulsif","richesse","rideau","rieur","rigide","rigoler","rincer","riposter","risible","risque","rituel","rival","rivière","rocheux","romance","rompre","ronce","rondin","roseau","rosier","rotatif","rotor","rotule","rouge","rouille","rouleau","routine","royaume","ruban","rubis","ruche","ruelle","rugueux","ruiner","ruisseau","ruser","rustique","rythme","sabler","saboter","sabre","sacoche","safari","sagesse","saisir","salade","salive","salon","saluer","samedi","sanction","sanglier","sarcasme","sardine","saturer","saugrenu","saumon","sauter","sauvage","savant","savonner","scalpel","scandale","scélérat","scénario","sceptre","schéma","science","scinder","score","scrutin","sculpter","séance","sécable","sécher","secouer","sécréter","sédatif","séduire","seigneur","séjour","sélectif","semaine","sembler","semence","séminal","sénateur","sensible","sentence","séparer","séquence","serein","sergent","sérieux","serrure","sérum","service","sésame","sévir","sevrage","sextuple","sidéral","siècle","siéger","siffler","sigle","signal","silence","silicium","simple","sincère","sinistre","siphon","sirop","sismique","situer","skier","social","socle","sodium","soigneux","soldat","soleil","solitude","soluble","sombre","sommeil","somnoler","sonde","songeur","sonnette","sonore","sorcier","sortir","sosie","sottise","soucieux","soudure","souffle","soulever","soupape","source","soutirer","souvenir","spacieux","spatial","spécial","sphère","spiral","stable","station","sternum","stimulus","stipuler","strict","studieux","stupeur","styliste","sublime","substrat","subtil","subvenir","succès","sucre","suffixe","suggérer","suiveur","sulfate","superbe","supplier","surface","suricate","surmener","surprise","sursaut","survie","suspect","syllabe","symbole","symétrie","synapse","syntaxe","système","tabac","tablier","tactile","tailler","talent","talisman","talonner","tambour","tamiser","tangible","tapis","taquiner","tarder","tarif","tartine","tasse","tatami","tatouage","taupe","taureau","taxer","témoin","temporel","tenaille","tendre","teneur","tenir","tension","terminer","terne","terrible","tétine","texte","thème","théorie","thérapie","thorax","tibia","tiède","timide","tirelire","tiroir","tissu","titane","titre","tituber","toboggan","tolérant","tomate","tonique","tonneau","toponyme","torche","tordre","tornade","torpille","torrent","torse","tortue","totem","toucher","tournage","tousser","toxine","traction","trafic","tragique","trahir","train","trancher","travail","trèfle","tremper","trésor","treuil","triage","tribunal","tricoter","trilogie","triomphe","tripler","triturer","trivial","trombone","tronc","tropical","troupeau","tuile","tulipe","tumulte","tunnel","turbine","tuteur","tutoyer","tuyau","tympan","typhon","typique","tyran","ubuesque","ultime","ultrason","unanime","unifier","union","unique","unitaire","univers","uranium","urbain","urticant","usage","usine","usuel","usure","utile","utopie","vacarme","vaccin","vagabond","vague","vaillant","vaincre","vaisseau","valable","valise","vallon","valve","vampire","vanille","vapeur","varier","vaseux","vassal","vaste","vecteur","vedette","végétal","véhicule","veinard","véloce","vendredi","vénérer","venger","venimeux","ventouse","verdure","vérin","vernir","verrou","verser","vertu","veston","vétéran","vétuste","vexant","vexer","viaduc","viande","victoire","vidange","vidéo","vignette","vigueur","vilain","village","vinaigre","violon","vipère","virement","virtuose","virus","visage","viseur","vision","visqueux","visuel","vital","vitesse","viticole","vitrine","vivace","vivipare","vocation","voguer","voile","voisin","voiture","volaille","volcan","voltiger","volume","vorace","vortex","voter","vouloir","voyage","voyelle","wagon","xénon","yacht","zèbre","zénith","zeste","zoologie"]},{}],81:[function(require,module,exports){module.exports=["abaco","abbaglio","abbinato","abete","abisso","abolire","abrasivo","abrogato","accadere","accenno","accusato","acetone","achille","acido","acqua","acre","acrilico","acrobata","acuto","adagio","addebito","addome","adeguato","aderire","adipe","adottare","adulare","affabile","affetto","affisso","affranto","aforisma","afoso","africano","agave","agente","agevole","aggancio","agire","agitare","agonismo","agricolo","agrumeto","aguzzo","alabarda","alato","albatro","alberato","albo","albume","alce","alcolico","alettone","alfa","algebra","aliante","alibi","alimento","allagato","allegro","allievo","allodola","allusivo","almeno","alogeno","alpaca","alpestre","altalena","alterno","alticcio","altrove","alunno","alveolo","alzare","amalgama","amanita","amarena","ambito","ambrato","ameba","america","ametista","amico","ammasso","ammenda","ammirare","ammonito","amore","ampio","ampliare","amuleto","anacardo","anagrafe","analista","anarchia","anatra","anca","ancella","ancora","andare","andrea","anello","angelo","angolare","angusto","anima","annegare","annidato","anno","annuncio","anonimo","anticipo","anzi","apatico","apertura","apode","apparire","appetito","appoggio","approdo","appunto","aprile","arabica","arachide","aragosta","araldica","arancio","aratura","arazzo","arbitro","archivio","ardito","arenile","argento","argine","arguto","aria","armonia","arnese","arredato","arringa","arrosto","arsenico","arso","artefice","arzillo","asciutto","ascolto","asepsi","asettico","asfalto","asino","asola","aspirato","aspro","assaggio","asse","assoluto","assurdo","asta","astenuto","astice","astratto","atavico","ateismo","atomico","atono","attesa","attivare","attorno","attrito","attuale","ausilio","austria","autista","autonomo","autunno","avanzato","avere","avvenire","avviso","avvolgere","azione","azoto","azzimo","azzurro","babele","baccano","bacino","baco","badessa","badilata","bagnato","baita","balcone","baldo","balena","ballata","balzano","bambino","bandire","baraonda","barbaro","barca","baritono","barlume","barocco","basilico","basso","batosta","battuto","baule","bava","bavosa","becco","beffa","belgio","belva","benda","benevole","benigno","benzina","bere","berlina","beta","bibita","bici","bidone","bifido","biga","bilancia","bimbo","binocolo","biologo","bipede","bipolare","birbante","birra","biscotto","bisesto","bisnonno","bisonte","bisturi","bizzarro","blando","blatta","bollito","bonifico","bordo","bosco","botanico","bottino","bozzolo","braccio","bradipo","brama","branca","bravura","bretella","brevetto","brezza","briglia","brillante","brindare","broccolo","brodo","bronzina","brullo","bruno","bubbone","buca","budino","buffone","buio","bulbo","buono","burlone","burrasca","bussola","busta","cadetto","caduco","calamaro","calcolo","calesse","calibro","calmo","caloria","cambusa","camerata","camicia","cammino","camola","campale","canapa","candela","cane","canino","canotto","cantina","capace","capello","capitolo","capogiro","cappero","capra","capsula","carapace","carcassa","cardo","carisma","carovana","carretto","cartolina","casaccio","cascata","caserma","caso","cassone","castello","casuale","catasta","catena","catrame","cauto","cavillo","cedibile","cedrata","cefalo","celebre","cellulare","cena","cenone","centesimo","ceramica","cercare","certo","cerume","cervello","cesoia","cespo","ceto","chela","chiaro","chicca","chiedere","chimera","china","chirurgo","chitarra","ciao","ciclismo","cifrare","cigno","cilindro","ciottolo","circa","cirrosi","citrico","cittadino","ciuffo","civetta","civile","classico","clinica","cloro","cocco","codardo","codice","coerente","cognome","collare","colmato","colore","colposo","coltivato","colza","coma","cometa","commando","comodo","computer","comune","conciso","condurre","conferma","congelare","coniuge","connesso","conoscere","consumo","continuo","convegno","coperto","copione","coppia","copricapo","corazza","cordata","coricato","cornice","corolla","corpo","corredo","corsia","cortese","cosmico","costante","cottura","covato","cratere","cravatta","creato","credere","cremoso","crescita","creta","criceto","crinale","crisi","critico","croce","cronaca","crostata","cruciale","crusca","cucire","cuculo","cugino","cullato","cupola","curatore","cursore","curvo","cuscino","custode","dado","daino","dalmata","damerino","daniela","dannoso","danzare","datato","davanti","davvero","debutto","decennio","deciso","declino","decollo","decreto","dedicato","definito","deforme","degno","delegare","delfino","delirio","delta","demenza","denotato","dentro","deposito","derapata","derivare","deroga","descritto","deserto","desiderio","desumere","detersivo","devoto","diametro","dicembre","diedro","difeso","diffuso","digerire","digitale","diluvio","dinamico","dinnanzi","dipinto","diploma","dipolo","diradare","dire","dirotto","dirupo","disagio","discreto","disfare","disgelo","disposto","distanza","disumano","dito","divano","divelto","dividere","divorato","doblone","docente","doganale","dogma","dolce","domato","domenica","dominare","dondolo","dono","dormire","dote","dottore","dovuto","dozzina","drago","druido","dubbio","dubitare","ducale","duna","duomo","duplice","duraturo","ebano","eccesso","ecco","eclissi","economia","edera","edicola","edile","editoria","educare","egemonia","egli","egoismo","egregio","elaborato","elargire","elegante","elencato","eletto","elevare","elfico","elica","elmo","elsa","eluso","emanato","emblema","emesso","emiro","emotivo","emozione","empirico","emulo","endemico","enduro","energia","enfasi","enoteca","entrare","enzima","epatite","epilogo","episodio","epocale","eppure","equatore","erario","erba","erboso","erede","eremita","erigere","ermetico","eroe","erosivo","errante","esagono","esame","esanime","esaudire","esca","esempio","esercito","esibito","esigente","esistere","esito","esofago","esortato","esoso","espanso","espresso","essenza","esso","esteso","estimare","estonia","estroso","esultare","etilico","etnico","etrusco","etto","euclideo","europa","evaso","evidenza","evitato","evoluto","evviva","fabbrica","faccenda","fachiro","falco","famiglia","fanale","fanfara","fango","fantasma","fare","farfalla","farinoso","farmaco","fascia","fastoso","fasullo","faticare","fato","favoloso","febbre","fecola","fede","fegato","felpa","feltro","femmina","fendere","fenomeno","fermento","ferro","fertile","fessura","festivo","fetta","feudo","fiaba","fiducia","fifa","figurato","filo","finanza","finestra","finire","fiore","fiscale","fisico","fiume","flacone","flamenco","flebo","flemma","florido","fluente","fluoro","fobico","focaccia","focoso","foderato","foglio","folata","folclore","folgore","fondente","fonetico","fonia","fontana","forbito","forchetta","foresta","formica","fornaio","foro","fortezza","forzare","fosfato","fosso","fracasso","frana","frassino","fratello","freccetta","frenata","fresco","frigo","frollino","fronde","frugale","frutta","fucilata","fucsia","fuggente","fulmine","fulvo","fumante","fumetto","fumoso","fune","funzione","fuoco","furbo","furgone","furore","fuso","futile","gabbiano","gaffe","galateo","gallina","galoppo","gambero","gamma","garanzia","garbo","garofano","garzone","gasdotto","gasolio","gastrico","gatto","gaudio","gazebo","gazzella","geco","gelatina","gelso","gemello","gemmato","gene","genitore","gennaio","genotipo","gergo","ghepardo","ghiaccio","ghisa","giallo","gilda","ginepro","giocare","gioiello","giorno","giove","girato","girone","gittata","giudizio","giurato","giusto","globulo","glutine","gnomo","gobba","golf","gomito","gommone","gonfio","gonna","governo","gracile","grado","grafico","grammo","grande","grattare","gravoso","grazia","greca","gregge","grifone","grigio","grinza","grotta","gruppo","guadagno","guaio","guanto","guardare","gufo","guidare","ibernato","icona","identico","idillio","idolo","idra","idrico","idrogeno","igiene","ignaro","ignorato","ilare","illeso","illogico","illudere","imballo","imbevuto","imbocco","imbuto","immane","immerso","immolato","impacco","impeto","impiego","importo","impronta","inalare","inarcare","inattivo","incanto","incendio","inchino","incisivo","incluso","incontro","incrocio","incubo","indagine","india","indole","inedito","infatti","infilare","inflitto","ingaggio","ingegno","inglese","ingordo","ingrosso","innesco","inodore","inoltrare","inondato","insano","insetto","insieme","insonnia","insulina","intasato","intero","intonaco","intuito","inumidire","invalido","invece","invito","iperbole","ipnotico","ipotesi","ippica","iride","irlanda","ironico","irrigato","irrorare","isolato","isotopo","isterico","istituto","istrice","italia","iterare","labbro","labirinto","lacca","lacerato","lacrima","lacuna","laddove","lago","lampo","lancetta","lanterna","lardoso","larga","laringe","lastra","latenza","latino","lattuga","lavagna","lavoro","legale","leggero","lembo","lentezza","lenza","leone","lepre","lesivo","lessato","lesto","letterale","leva","levigato","libero","lido","lievito","lilla","limatura","limitare","limpido","lineare","lingua","liquido","lira","lirica","lisca","lite","litigio","livrea","locanda","lode","logica","lombare","londra","longevo","loquace","lorenzo","loto","lotteria","luce","lucidato","lumaca","luminoso","lungo","lupo","luppolo","lusinga","lusso","lutto","macabro","macchina","macero","macinato","madama","magico","maglia","magnete","magro","maiolica","malafede","malgrado","malinteso","malsano","malto","malumore","mana","mancia","mandorla","mangiare","manifesto","mannaro","manovra","mansarda","mantide","manubrio","mappa","maratona","marcire","maretta","marmo","marsupio","maschera","massaia","mastino","materasso","matricola","mattone","maturo","mazurca","meandro","meccanico","mecenate","medesimo","meditare","mega","melassa","melis","melodia","meninge","meno","mensola","mercurio","merenda","merlo","meschino","mese","messere","mestolo","metallo","metodo","mettere","miagolare","mica","micelio","michele","microbo","midollo","miele","migliore","milano","milite","mimosa","minerale","mini","minore","mirino","mirtillo","miscela","missiva","misto","misurare","mitezza","mitigare","mitra","mittente","mnemonico","modello","modifica","modulo","mogano","mogio","mole","molosso","monastero","monco","mondina","monetario","monile","monotono","monsone","montato","monviso","mora","mordere","morsicato","mostro","motivato","motosega","motto","movenza","movimento","mozzo","mucca","mucosa","muffa","mughetto","mugnaio","mulatto","mulinello","multiplo","mummia","munto","muovere","murale","musa","muscolo","musica","mutevole","muto","nababbo","nafta","nanometro","narciso","narice","narrato","nascere","nastrare","naturale","nautica","naviglio","nebulosa","necrosi","negativo","negozio","nemmeno","neofita","neretto","nervo","nessuno","nettuno","neutrale","neve","nevrotico","nicchia","ninfa","nitido","nobile","nocivo","nodo","nome","nomina","nordico","normale","norvegese","nostrano","notare","notizia","notturno","novella","nucleo","nulla","numero","nuovo","nutrire","nuvola","nuziale","oasi","obbedire","obbligo","obelisco","oblio","obolo","obsoleto","occasione","occhio","occidente","occorrere","occultare","ocra","oculato","odierno","odorare","offerta","offrire","offuscato","oggetto","oggi","ognuno","olandese","olfatto","oliato","oliva","ologramma","oltre","omaggio","ombelico","ombra","omega","omissione","ondoso","onere","onice","onnivoro","onorevole","onta","operato","opinione","opposto","oracolo","orafo","ordine","orecchino","orefice","orfano","organico","origine","orizzonte","orma","ormeggio","ornativo","orologio","orrendo","orribile","ortensia","ortica","orzata","orzo","osare","oscurare","osmosi","ospedale","ospite","ossa","ossidare","ostacolo","oste","otite","otre","ottagono","ottimo","ottobre","ovale","ovest","ovino","oviparo","ovocito","ovunque","ovviare","ozio","pacchetto","pace","pacifico","padella","padrone","paese","paga","pagina","palazzina","palesare","pallido","palo","palude","pandoro","pannello","paolo","paonazzo","paprica","parabola","parcella","parere","pargolo","pari","parlato","parola","partire","parvenza","parziale","passivo","pasticca","patacca","patologia","pattume","pavone","peccato","pedalare","pedonale","peggio","peloso","penare","pendice","penisola","pennuto","penombra","pensare","pentola","pepe","pepita","perbene","percorso","perdonato","perforare","pergamena","periodo","permesso","perno","perplesso","persuaso","pertugio","pervaso","pesatore","pesista","peso","pestifero","petalo","pettine","petulante","pezzo","piacere","pianta","piattino","piccino","picozza","piega","pietra","piffero","pigiama","pigolio","pigro","pila","pilifero","pillola","pilota","pimpante","pineta","pinna","pinolo","pioggia","piombo","piramide","piretico","pirite","pirolisi","pitone","pizzico","placebo","planare","plasma","platano","plenario","pochezza","poderoso","podismo","poesia","poggiare","polenta","poligono","pollice","polmonite","polpetta","polso","poltrona","polvere","pomice","pomodoro","ponte","popoloso","porfido","poroso","porpora","porre","portata","posa","positivo","possesso","postulato","potassio","potere","pranzo","prassi","pratica","precluso","predica","prefisso","pregiato","prelievo","premere","prenotare","preparato","presenza","pretesto","prevalso","prima","principe","privato","problema","procura","produrre","profumo","progetto","prolunga","promessa","pronome","proposta","proroga","proteso","prova","prudente","prugna","prurito","psiche","pubblico","pudica","pugilato","pugno","pulce","pulito","pulsante","puntare","pupazzo","pupilla","puro","quadro","qualcosa","quasi","querela","quota","raccolto","raddoppio","radicale","radunato","raffica","ragazzo","ragione","ragno","ramarro","ramingo","ramo","randagio","rantolare","rapato","rapina","rappreso","rasatura","raschiato","rasente","rassegna","rastrello","rata","ravveduto","reale","recepire","recinto","recluta","recondito","recupero","reddito","redimere","regalato","registro","regola","regresso","relazione","remare","remoto","renna","replica","reprimere","reputare","resa","residente","responso","restauro","rete","retina","retorica","rettifica","revocato","riassunto","ribadire","ribelle","ribrezzo","ricarica","ricco","ricevere","riciclato","ricordo","ricreduto","ridicolo","ridurre","rifasare","riflesso","riforma","rifugio","rigare","rigettato","righello","rilassato","rilevato","rimanere","rimbalzo","rimedio","rimorchio","rinascita","rincaro","rinforzo","rinnovo","rinomato","rinsavito","rintocco","rinuncia","rinvenire","riparato","ripetuto","ripieno","riportare","ripresa","ripulire","risata","rischio","riserva","risibile","riso","rispetto","ristoro","risultato","risvolto","ritardo","ritegno","ritmico","ritrovo","riunione","riva","riverso","rivincita","rivolto","rizoma","roba","robotico","robusto","roccia","roco","rodaggio","rodere","roditore","rogito","rollio","romantico","rompere","ronzio","rosolare","rospo","rotante","rotondo","rotula","rovescio","rubizzo","rubrica","ruga","rullino","rumine","rumoroso","ruolo","rupe","russare","rustico","sabato","sabbiare","sabotato","sagoma","salasso","saldatura","salgemma","salivare","salmone","salone","saltare","saluto","salvo","sapere","sapido","saporito","saraceno","sarcasmo","sarto","sassoso","satellite","satira","satollo","saturno","savana","savio","saziato","sbadiglio","sbalzo","sbancato","sbarra","sbattere","sbavare","sbendare","sbirciare","sbloccato","sbocciato","sbrinare","sbruffone","sbuffare","scabroso","scadenza","scala","scambiare","scandalo","scapola","scarso","scatenare","scavato","scelto","scenico","scettro","scheda","schiena","sciarpa","scienza","scindere","scippo","sciroppo","scivolo","sclerare","scodella","scolpito","scomparto","sconforto","scoprire","scorta","scossone","scozzese","scriba","scrollare","scrutinio","scuderia","scultore","scuola","scuro","scusare","sdebitare","sdoganare","seccatura","secondo","sedano","seggiola","segnalato","segregato","seguito","selciato","selettivo","sella","selvaggio","semaforo","sembrare","seme","seminato","sempre","senso","sentire","sepolto","sequenza","serata","serbato","sereno","serio","serpente","serraglio","servire","sestina","setola","settimana","sfacelo","sfaldare","sfamato","sfarzoso","sfaticato","sfera","sfida","sfilato","sfinge","sfocato","sfoderare","sfogo","sfoltire","sforzato","sfratto","sfruttato","sfuggito","sfumare","sfuso","sgabello","sgarbato","sgonfiare","sgorbio","sgrassato","sguardo","sibilo","siccome","sierra","sigla","signore","silenzio","sillaba","simbolo","simpatico","simulato","sinfonia","singolo","sinistro","sino","sintesi","sinusoide","sipario","sisma","sistole","situato","slitta","slogatura","sloveno","smarrito","smemorato","smentito","smeraldo","smilzo","smontare","smottato","smussato","snellire","snervato","snodo","sobbalzo","sobrio","soccorso","sociale","sodale","soffitto","sogno","soldato","solenne","solido","sollazzo","solo","solubile","solvente","somatico","somma","sonda","sonetto","sonnifero","sopire","soppeso","sopra","sorgere","sorpasso","sorriso","sorso","sorteggio","sorvolato","sospiro","sosta","sottile","spada","spalla","spargere","spatola","spavento","spazzola","specie","spedire","spegnere","spelatura","speranza","spessore","spettrale","spezzato","spia","spigoloso","spillato","spinoso","spirale","splendido","sportivo","sposo","spranga","sprecare","spronato","spruzzo","spuntino","squillo","sradicare","srotolato","stabile","stacco","staffa","stagnare","stampato","stantio","starnuto","stasera","statuto","stelo","steppa","sterzo","stiletto","stima","stirpe","stivale","stizzoso","stonato","storico","strappo","stregato","stridulo","strozzare","strutto","stuccare","stufo","stupendo","subentro","succoso","sudore","suggerito","sugo","sultano","suonare","superbo","supporto","surgelato","surrogato","sussurro","sutura","svagare","svedese","sveglio","svelare","svenuto","svezia","sviluppo","svista","svizzera","svolta","svuotare","tabacco","tabulato","tacciare","taciturno","tale","talismano","tampone","tannino","tara","tardivo","targato","tariffa","tarpare","tartaruga","tasto","tattico","taverna","tavolata","tazza","teca","tecnico","telefono","temerario","tempo","temuto","tendone","tenero","tensione","tentacolo","teorema","terme","terrazzo","terzetto","tesi","tesserato","testato","tetro","tettoia","tifare","tigella","timbro","tinto","tipico","tipografo","tiraggio","tiro","titanio","titolo","titubante","tizio","tizzone","toccare","tollerare","tolto","tombola","tomo","tonfo","tonsilla","topazio","topologia","toppa","torba","tornare","torrone","tortora","toscano","tossire","tostatura","totano","trabocco","trachea","trafila","tragedia","tralcio","tramonto","transito","trapano","trarre","trasloco","trattato","trave","treccia","tremolio","trespolo","tributo","tricheco","trifoglio","trillo","trincea","trio","tristezza","triturato","trivella","tromba","trono","troppo","trottola","trovare","truccato","tubatura","tuffato","tulipano","tumulto","tunisia","turbare","turchino","tuta","tutela","ubicato","uccello","uccisore","udire","uditivo","uffa","ufficio","uguale","ulisse","ultimato","umano","umile","umorismo","uncinetto","ungere","ungherese","unicorno","unificato","unisono","unitario","unte","uovo","upupa","uragano","urgenza","urlo","usanza","usato","uscito","usignolo","usuraio","utensile","utilizzo","utopia","vacante","vaccinato","vagabondo","vagliato","valanga","valgo","valico","valletta","valoroso","valutare","valvola","vampata","vangare","vanitoso","vano","vantaggio","vanvera","vapore","varano","varcato","variante","vasca","vedetta","vedova","veduto","vegetale","veicolo","velcro","velina","velluto","veloce","venato","vendemmia","vento","verace","verbale","vergogna","verifica","vero","verruca","verticale","vescica","vessillo","vestale","veterano","vetrina","vetusto","viandante","vibrante","vicenda","vichingo","vicinanza","vidimare","vigilia","vigneto","vigore","vile","villano","vimini","vincitore","viola","vipera","virgola","virologo","virulento","viscoso","visione","vispo","vissuto","visura","vita","vitello","vittima","vivanda","vivido","viziare","voce","voga","volatile","volere","volpe","voragine","vulcano","zampogna","zanna","zappato","zattera","zavorra","zefiro","zelante","zelo","zenzero","zerbino","zibetto","zinco","zircone","zitto","zolla","zotico","zucchero","zufolo","zulu","zuppa"]},{}],82:[function(require,module,exports){module.exports=["あいこくしん","あいさつ","あいだ","あおぞら","あかちゃん","あきる","あけがた","あける","あこがれる","あさい","あさひ","あしあと","あじわう","あずかる","あずき","あそぶ","あたえる","あたためる","あたりまえ","あたる","あつい","あつかう","あっしゅく","あつまり","あつめる","あてな","あてはまる","あひる","あぶら","あぶる","あふれる","あまい","あまど","あまやかす","あまり","あみもの","あめりか","あやまる","あゆむ","あらいぐま","あらし","あらすじ","あらためる","あらゆる","あらわす","ありがとう","あわせる","あわてる","あんい","あんがい","あんこ","あんぜん","あんてい","あんない","あんまり","いいだす","いおん","いがい","いがく","いきおい","いきなり","いきもの","いきる","いくじ","いくぶん","いけばな","いけん","いこう","いこく","いこつ","いさましい","いさん","いしき","いじゅう","いじょう","いじわる","いずみ","いずれ","いせい","いせえび","いせかい","いせき","いぜん","いそうろう","いそがしい","いだい","いだく","いたずら","いたみ","いたりあ","いちおう","いちじ","いちど","いちば","いちぶ","いちりゅう","いつか","いっしゅん","いっせい","いっそう","いったん","いっち","いってい","いっぽう","いてざ","いてん","いどう","いとこ","いない","いなか","いねむり","いのち","いのる","いはつ","いばる","いはん","いびき","いひん","いふく","いへん","いほう","いみん","いもうと","いもたれ","いもり","いやがる","いやす","いよかん","いよく","いらい","いらすと","いりぐち","いりょう","いれい","いれもの","いれる","いろえんぴつ","いわい","いわう","いわかん","いわば","いわゆる","いんげんまめ","いんさつ","いんしょう","いんよう","うえき","うえる","うおざ","うがい","うかぶ","うかべる","うきわ","うくらいな","うくれれ","うけたまわる","うけつけ","うけとる","うけもつ","うける","うごかす","うごく","うこん","うさぎ","うしなう","うしろがみ","うすい","うすぎ","うすぐらい","うすめる","うせつ","うちあわせ","うちがわ","うちき","うちゅう","うっかり","うつくしい","うったえる","うつる","うどん","うなぎ","うなじ","うなずく","うなる","うねる","うのう","うぶげ","うぶごえ","うまれる","うめる","うもう","うやまう","うよく","うらがえす","うらぐち","うらない","うりあげ","うりきれ","うるさい","うれしい","うれゆき","うれる","うろこ","うわき","うわさ","うんこう","うんちん","うんてん","うんどう","えいえん","えいが","えいきょう","えいご","えいせい","えいぶん","えいよう","えいわ","えおり","えがお","えがく","えきたい","えくせる","えしゃく","えすて","えつらん","えのぐ","えほうまき","えほん","えまき","えもじ","えもの","えらい","えらぶ","えりあ","えんえん","えんかい","えんぎ","えんげき","えんしゅう","えんぜつ","えんそく","えんちょう","えんとつ","おいかける","おいこす","おいしい","おいつく","おうえん","おうさま","おうじ","おうせつ","おうたい","おうふく","おうべい","おうよう","おえる","おおい","おおう","おおどおり","おおや","おおよそ","おかえり","おかず","おがむ","おかわり","おぎなう","おきる","おくさま","おくじょう","おくりがな","おくる","おくれる","おこす","おこなう","おこる","おさえる","おさない","おさめる","おしいれ","おしえる","おじぎ","おじさん","おしゃれ","おそらく","おそわる","おたがい","おたく","おだやか","おちつく","おっと","おつり","おでかけ","おとしもの","おとなしい","おどり","おどろかす","おばさん","おまいり","おめでとう","おもいで","おもう","おもたい","おもちゃ","おやつ","おやゆび","およぼす","おらんだ","おろす","おんがく","おんけい","おんしゃ","おんせん","おんだん","おんちゅう","おんどけい","かあつ","かいが","がいき","がいけん","がいこう","かいさつ","かいしゃ","かいすいよく","かいぜん","かいぞうど","かいつう","かいてん","かいとう","かいふく","がいへき","かいほう","かいよう","がいらい","かいわ","かえる","かおり","かかえる","かがく","かがし","かがみ","かくご","かくとく","かざる","がぞう","かたい","かたち","がちょう","がっきゅう","がっこう","がっさん","がっしょう","かなざわし","かのう","がはく","かぶか","かほう","かほご","かまう","かまぼこ","かめれおん","かゆい","かようび","からい","かるい","かろう","かわく","かわら","がんか","かんけい","かんこう","かんしゃ","かんそう","かんたん","かんち","がんばる","きあい","きあつ","きいろ","ぎいん","きうい","きうん","きえる","きおう","きおく","きおち","きおん","きかい","きかく","きかんしゃ","ききて","きくばり","きくらげ","きけんせい","きこう","きこえる","きこく","きさい","きさく","きさま","きさらぎ","ぎじかがく","ぎしき","ぎじたいけん","ぎじにってい","ぎじゅつしゃ","きすう","きせい","きせき","きせつ","きそう","きぞく","きぞん","きたえる","きちょう","きつえん","ぎっちり","きつつき","きつね","きてい","きどう","きどく","きない","きなが","きなこ","きぬごし","きねん","きのう","きのした","きはく","きびしい","きひん","きふく","きぶん","きぼう","きほん","きまる","きみつ","きむずかしい","きめる","きもだめし","きもち","きもの","きゃく","きやく","ぎゅうにく","きよう","きょうりゅう","きらい","きらく","きりん","きれい","きれつ","きろく","ぎろん","きわめる","ぎんいろ","きんかくじ","きんじょ","きんようび","ぐあい","くいず","くうかん","くうき","くうぐん","くうこう","ぐうせい","くうそう","ぐうたら","くうふく","くうぼ","くかん","くきょう","くげん","ぐこう","くさい","くさき","くさばな","くさる","くしゃみ","くしょう","くすのき","くすりゆび","くせげ","くせん","ぐたいてき","くださる","くたびれる","くちこみ","くちさき","くつした","ぐっすり","くつろぐ","くとうてん","くどく","くなん","くねくね","くのう","くふう","くみあわせ","くみたてる","くめる","くやくしょ","くらす","くらべる","くるま","くれる","くろう","くわしい","ぐんかん","ぐんしょく","ぐんたい","ぐんて","けあな","けいかく","けいけん","けいこ","けいさつ","げいじゅつ","けいたい","げいのうじん","けいれき","けいろ","けおとす","けおりもの","げきか","げきげん","げきだん","げきちん","げきとつ","げきは","げきやく","げこう","げこくじょう","げざい","けさき","げざん","けしき","けしごむ","けしょう","げすと","けたば","けちゃっぷ","けちらす","けつあつ","けつい","けつえき","けっこん","けつじょ","けっせき","けってい","けつまつ","げつようび","げつれい","けつろん","げどく","けとばす","けとる","けなげ","けなす","けなみ","けぬき","げねつ","けねん","けはい","げひん","けぶかい","げぼく","けまり","けみかる","けむし","けむり","けもの","けらい","けろけろ","けわしい","けんい","けんえつ","けんお","けんか","げんき","けんげん","けんこう","けんさく","けんしゅう","けんすう","げんそう","けんちく","けんてい","けんとう","けんない","けんにん","げんぶつ","けんま","けんみん","けんめい","けんらん","けんり","こあくま","こいぬ","こいびと","ごうい","こうえん","こうおん","こうかん","ごうきゅう","ごうけい","こうこう","こうさい","こうじ","こうすい","ごうせい","こうそく","こうたい","こうちゃ","こうつう","こうてい","こうどう","こうない","こうはい","ごうほう","ごうまん","こうもく","こうりつ","こえる","こおり","ごかい","ごがつ","ごかん","こくご","こくさい","こくとう","こくない","こくはく","こぐま","こけい","こける","ここのか","こころ","こさめ","こしつ","こすう","こせい","こせき","こぜん","こそだて","こたい","こたえる","こたつ","こちょう","こっか","こつこつ","こつばん","こつぶ","こてい","こてん","ことがら","ことし","ことば","ことり","こなごな","こねこね","このまま","このみ","このよ","ごはん","こひつじ","こふう","こふん","こぼれる","ごまあぶら","こまかい","ごますり","こまつな","こまる","こむぎこ","こもじ","こもち","こもの","こもん","こやく","こやま","こゆう","こゆび","こよい","こよう","こりる","これくしょん","ころっけ","こわもて","こわれる","こんいん","こんかい","こんき","こんしゅう","こんすい","こんだて","こんとん","こんなん","こんびに","こんぽん","こんまけ","こんや","こんれい","こんわく","ざいえき","さいかい","さいきん","ざいげん","ざいこ","さいしょ","さいせい","ざいたく","ざいちゅう","さいてき","ざいりょう","さうな","さかいし","さがす","さかな","さかみち","さがる","さぎょう","さくし","さくひん","さくら","さこく","さこつ","さずかる","ざせき","さたん","さつえい","ざつおん","ざっか","ざつがく","さっきょく","ざっし","さつじん","ざっそう","さつたば","さつまいも","さてい","さといも","さとう","さとおや","さとし","さとる","さのう","さばく","さびしい","さべつ","さほう","さほど","さます","さみしい","さみだれ","さむけ","さめる","さやえんどう","さゆう","さよう","さよく","さらだ","ざるそば","さわやか","さわる","さんいん","さんか","さんきゃく","さんこう","さんさい","ざんしょ","さんすう","さんせい","さんそ","さんち","さんま","さんみ","さんらん","しあい","しあげ","しあさって","しあわせ","しいく","しいん","しうち","しえい","しおけ","しかい","しかく","じかん","しごと","しすう","じだい","したうけ","したぎ","したて","したみ","しちょう","しちりん","しっかり","しつじ","しつもん","してい","してき","してつ","じてん","じどう","しなぎれ","しなもの","しなん","しねま","しねん","しのぐ","しのぶ","しはい","しばかり","しはつ","しはらい","しはん","しひょう","しふく","じぶん","しへい","しほう","しほん","しまう","しまる","しみん","しむける","じむしょ","しめい","しめる","しもん","しゃいん","しゃうん","しゃおん","じゃがいも","しやくしょ","しゃくほう","しゃけん","しゃこ","しゃざい","しゃしん","しゃせん","しゃそう","しゃたい","しゃちょう","しゃっきん","じゃま","しゃりん","しゃれい","じゆう","じゅうしょ","しゅくはく","じゅしん","しゅっせき","しゅみ","しゅらば","じゅんばん","しょうかい","しょくたく","しょっけん","しょどう","しょもつ","しらせる","しらべる","しんか","しんこう","じんじゃ","しんせいじ","しんちく","しんりん","すあげ","すあし","すあな","ずあん","すいえい","すいか","すいとう","ずいぶん","すいようび","すうがく","すうじつ","すうせん","すおどり","すきま","すくう","すくない","すける","すごい","すこし","ずさん","すずしい","すすむ","すすめる","すっかり","ずっしり","ずっと","すてき","すてる","すねる","すのこ","すはだ","すばらしい","ずひょう","ずぶぬれ","すぶり","すふれ","すべて","すべる","ずほう","すぼん","すまい","すめし","すもう","すやき","すらすら","するめ","すれちがう","すろっと","すわる","すんぜん","すんぽう","せあぶら","せいかつ","せいげん","せいじ","せいよう","せおう","せかいかん","せきにん","せきむ","せきゆ","せきらんうん","せけん","せこう","せすじ","せたい","せたけ","せっかく","せっきゃく","ぜっく","せっけん","せっこつ","せっさたくま","せつぞく","せつだん","せつでん","せっぱん","せつび","せつぶん","せつめい","せつりつ","せなか","せのび","せはば","せびろ","せぼね","せまい","せまる","せめる","せもたれ","せりふ","ぜんあく","せんい","せんえい","せんか","せんきょ","せんく","せんげん","ぜんご","せんさい","せんしゅ","せんすい","せんせい","せんぞ","せんたく","せんちょう","せんてい","せんとう","せんぬき","せんねん","せんぱい","ぜんぶ","ぜんぽう","せんむ","せんめんじょ","せんもん","せんやく","せんゆう","せんよう","ぜんら","ぜんりゃく","せんれい","せんろ","そあく","そいとげる","そいね","そうがんきょう","そうき","そうご","そうしん","そうだん","そうなん","そうび","そうめん","そうり","そえもの","そえん","そがい","そげき","そこう","そこそこ","そざい","そしな","そせい","そせん","そそぐ","そだてる","そつう","そつえん","そっかん","そつぎょう","そっけつ","そっこう","そっせん","そっと","そとがわ","そとづら","そなえる","そなた","そふぼ","そぼく","そぼろ","そまつ","そまる","そむく","そむりえ","そめる","そもそも","そよかぜ","そらまめ","そろう","そんかい","そんけい","そんざい","そんしつ","そんぞく","そんちょう","ぞんび","ぞんぶん","そんみん","たあい","たいいん","たいうん","たいえき","たいおう","だいがく","たいき","たいぐう","たいけん","たいこ","たいざい","だいじょうぶ","だいすき","たいせつ","たいそう","だいたい","たいちょう","たいてい","だいどころ","たいない","たいねつ","たいのう","たいはん","だいひょう","たいふう","たいへん","たいほ","たいまつばな","たいみんぐ","たいむ","たいめん","たいやき","たいよう","たいら","たいりょく","たいる","たいわん","たうえ","たえる","たおす","たおる","たおれる","たかい","たかね","たきび","たくさん","たこく","たこやき","たさい","たしざん","だじゃれ","たすける","たずさわる","たそがれ","たたかう","たたく","ただしい","たたみ","たちばな","だっかい","だっきゃく","だっこ","だっしゅつ","だったい","たてる","たとえる","たなばた","たにん","たぬき","たのしみ","たはつ","たぶん","たべる","たぼう","たまご","たまる","だむる","ためいき","ためす","ためる","たもつ","たやすい","たよる","たらす","たりきほんがん","たりょう","たりる","たると","たれる","たれんと","たろっと","たわむれる","だんあつ","たんい","たんおん","たんか","たんき","たんけん","たんご","たんさん","たんじょうび","だんせい","たんそく","たんたい","だんち","たんてい","たんとう","だんな","たんにん","だんねつ","たんのう","たんぴん","だんぼう","たんまつ","たんめい","だんれつ","だんろ","だんわ","ちあい","ちあん","ちいき","ちいさい","ちえん","ちかい","ちから","ちきゅう","ちきん","ちけいず","ちけん","ちこく","ちさい","ちしき","ちしりょう","ちせい","ちそう","ちたい","ちたん","ちちおや","ちつじょ","ちてき","ちてん","ちぬき","ちぬり","ちのう","ちひょう","ちへいせん","ちほう","ちまた","ちみつ","ちみどろ","ちめいど","ちゃんこなべ","ちゅうい","ちゆりょく","ちょうし","ちょさくけん","ちらし","ちらみ","ちりがみ","ちりょう","ちるど","ちわわ","ちんたい","ちんもく","ついか","ついたち","つうか","つうじょう","つうはん","つうわ","つかう","つかれる","つくね","つくる","つけね","つける","つごう","つたえる","つづく","つつじ","つつむ","つとめる","つながる","つなみ","つねづね","つのる","つぶす","つまらない","つまる","つみき","つめたい","つもり","つもる","つよい","つるぼ","つるみく","つわもの","つわり","てあし","てあて","てあみ","ていおん","ていか","ていき","ていけい","ていこく","ていさつ","ていし","ていせい","ていたい","ていど","ていねい","ていひょう","ていへん","ていぼう","てうち","ておくれ","てきとう","てくび","でこぼこ","てさぎょう","てさげ","てすり","てそう","てちがい","てちょう","てつがく","てつづき","でっぱ","てつぼう","てつや","でぬかえ","てぬき","てぬぐい","てのひら","てはい","てぶくろ","てふだ","てほどき","てほん","てまえ","てまきずし","てみじか","てみやげ","てらす","てれび","てわけ","てわたし","でんあつ","てんいん","てんかい","てんき","てんぐ","てんけん","てんごく","てんさい","てんし","てんすう","でんち","てんてき","てんとう","てんない","てんぷら","てんぼうだい","てんめつ","てんらんかい","でんりょく","でんわ","どあい","といれ","どうかん","とうきゅう","どうぐ","とうし","とうむぎ","とおい","とおか","とおく","とおす","とおる","とかい","とかす","ときおり","ときどき","とくい","とくしゅう","とくてん","とくに","とくべつ","とけい","とける","とこや","とさか","としょかん","とそう","とたん","とちゅう","とっきゅう","とっくん","とつぜん","とつにゅう","とどける","ととのえる","とない","となえる","となり","とのさま","とばす","どぶがわ","とほう","とまる","とめる","ともだち","ともる","どようび","とらえる","とんかつ","どんぶり","ないかく","ないこう","ないしょ","ないす","ないせん","ないそう","なおす","ながい","なくす","なげる","なこうど","なさけ","なたでここ","なっとう","なつやすみ","ななおし","なにごと","なにもの","なにわ","なのか","なふだ","なまいき","なまえ","なまみ","なみだ","なめらか","なめる","なやむ","ならう","ならび","ならぶ","なれる","なわとび","なわばり","にあう","にいがた","にうけ","におい","にかい","にがて","にきび","にくしみ","にくまん","にげる","にさんかたんそ","にしき","にせもの","にちじょう","にちようび","にっか","にっき","にっけい","にっこう","にっさん","にっしょく","にっすう","にっせき","にってい","になう","にほん","にまめ","にもつ","にやり","にゅういん","にりんしゃ","にわとり","にんい","にんか","にんき","にんげん","にんしき","にんずう","にんそう","にんたい","にんち","にんてい","にんにく","にんぷ","にんまり","にんむ","にんめい","にんよう","ぬいくぎ","ぬかす","ぬぐいとる","ぬぐう","ぬくもり","ぬすむ","ぬまえび","ぬめり","ぬらす","ぬんちゃく","ねあげ","ねいき","ねいる","ねいろ","ねぐせ","ねくたい","ねくら","ねこぜ","ねこむ","ねさげ","ねすごす","ねそべる","ねだん","ねつい","ねっしん","ねつぞう","ねったいぎょ","ねぶそく","ねふだ","ねぼう","ねほりはほり","ねまき","ねまわし","ねみみ","ねむい","ねむたい","ねもと","ねらう","ねわざ","ねんいり","ねんおし","ねんかん","ねんきん","ねんぐ","ねんざ","ねんし","ねんちゃく","ねんど","ねんぴ","ねんぶつ","ねんまつ","ねんりょう","ねんれい","のいず","のおづま","のがす","のきなみ","のこぎり","のこす","のこる","のせる","のぞく","のぞむ","のたまう","のちほど","のっく","のばす","のはら","のべる","のぼる","のみもの","のやま","のらいぬ","のらねこ","のりもの","のりゆき","のれん","のんき","ばあい","はあく","ばあさん","ばいか","ばいく","はいけん","はいご","はいしん","はいすい","はいせん","はいそう","はいち","ばいばい","はいれつ","はえる","はおる","はかい","ばかり","はかる","はくしゅ","はけん","はこぶ","はさみ","はさん","はしご","ばしょ","はしる","はせる","ぱそこん","はそん","はたん","はちみつ","はつおん","はっかく","はづき","はっきり","はっくつ","はっけん","はっこう","はっさん","はっしん","はったつ","はっちゅう","はってん","はっぴょう","はっぽう","はなす","はなび","はにかむ","はぶらし","はみがき","はむかう","はめつ","はやい","はやし","はらう","はろうぃん","はわい","はんい","はんえい","はんおん","はんかく","はんきょう","ばんぐみ","はんこ","はんしゃ","はんすう","はんだん","ぱんち","ぱんつ","はんてい","はんとし","はんのう","はんぱ","はんぶん","はんぺん","はんぼうき","はんめい","はんらん","はんろん","ひいき","ひうん","ひえる","ひかく","ひかり","ひかる","ひかん","ひくい","ひけつ","ひこうき","ひこく","ひさい","ひさしぶり","ひさん","びじゅつかん","ひしょ","ひそか","ひそむ","ひたむき","ひだり","ひたる","ひつぎ","ひっこし","ひっし","ひつじゅひん","ひっす","ひつぜん","ぴったり","ぴっちり","ひつよう","ひてい","ひとごみ","ひなまつり","ひなん","ひねる","ひはん","ひびく","ひひょう","ひほう","ひまわり","ひまん","ひみつ","ひめい","ひめじし","ひやけ","ひやす","ひよう","びょうき","ひらがな","ひらく","ひりつ","ひりょう","ひるま","ひるやすみ","ひれい","ひろい","ひろう","ひろき","ひろゆき","ひんかく","ひんけつ","ひんこん","ひんしゅ","ひんそう","ぴんち","ひんぱん","びんぼう","ふあん","ふいうち","ふうけい","ふうせん","ぷうたろう","ふうとう","ふうふ","ふえる","ふおん","ふかい","ふきん","ふくざつ","ふくぶくろ","ふこう","ふさい","ふしぎ","ふじみ","ふすま","ふせい","ふせぐ","ふそく","ぶたにく","ふたん","ふちょう","ふつう","ふつか","ふっかつ","ふっき","ふっこく","ぶどう","ふとる","ふとん","ふのう","ふはい","ふひょう","ふへん","ふまん","ふみん","ふめつ","ふめん","ふよう","ふりこ","ふりる","ふるい","ふんいき","ぶんがく","ぶんぐ","ふんしつ","ぶんせき","ふんそう","ぶんぽう","へいあん","へいおん","へいがい","へいき","へいげん","へいこう","へいさ","へいしゃ","へいせつ","へいそ","へいたく","へいてん","へいねつ","へいわ","へきが","へこむ","べにいろ","べにしょうが","へらす","へんかん","べんきょう","べんごし","へんさい","へんたい","べんり","ほあん","ほいく","ぼうぎょ","ほうこく","ほうそう","ほうほう","ほうもん","ほうりつ","ほえる","ほおん","ほかん","ほきょう","ぼきん","ほくろ","ほけつ","ほけん","ほこう","ほこる","ほしい","ほしつ","ほしゅ","ほしょう","ほせい","ほそい","ほそく","ほたて","ほたる","ぽちぶくろ","ほっきょく","ほっさ","ほったん","ほとんど","ほめる","ほんい","ほんき","ほんけ","ほんしつ","ほんやく","まいにち","まかい","まかせる","まがる","まける","まこと","まさつ","まじめ","ますく","まぜる","まつり","まとめ","まなぶ","まぬけ","まねく","まほう","まもる","まゆげ","まよう","まろやか","まわす","まわり","まわる","まんが","まんきつ","まんぞく","まんなか","みいら","みうち","みえる","みがく","みかた","みかん","みけん","みこん","みじかい","みすい","みすえる","みせる","みっか","みつかる","みつける","みてい","みとめる","みなと","みなみかさい","みねらる","みのう","みのがす","みほん","みもと","みやげ","みらい","みりょく","みわく","みんか","みんぞく","むいか","むえき","むえん","むかい","むかう","むかえ","むかし","むぎちゃ","むける","むげん","むさぼる","むしあつい","むしば","むじゅん","むしろ","むすう","むすこ","むすぶ","むすめ","むせる","むせん","むちゅう","むなしい","むのう","むやみ","むよう","むらさき","むりょう","むろん","めいあん","めいうん","めいえん","めいかく","めいきょく","めいさい","めいし","めいそう","めいぶつ","めいれい","めいわく","めぐまれる","めざす","めした","めずらしい","めだつ","めまい","めやす","めんきょ","めんせき","めんどう","もうしあげる","もうどうけん","もえる","もくし","もくてき","もくようび","もちろん","もどる","もらう","もんく","もんだい","やおや","やける","やさい","やさしい","やすい","やすたろう","やすみ","やせる","やそう","やたい","やちん","やっと","やっぱり","やぶる","やめる","ややこしい","やよい","やわらかい","ゆうき","ゆうびんきょく","ゆうべ","ゆうめい","ゆけつ","ゆしゅつ","ゆせん","ゆそう","ゆたか","ゆちゃく","ゆでる","ゆにゅう","ゆびわ","ゆらい","ゆれる","ようい","ようか","ようきゅう","ようじ","ようす","ようちえん","よかぜ","よかん","よきん","よくせい","よくぼう","よけい","よごれる","よさん","よしゅう","よそう","よそく","よっか","よてい","よどがわく","よねつ","よやく","よゆう","よろこぶ","よろしい","らいう","らくがき","らくご","らくさつ","らくだ","らしんばん","らせん","らぞく","らたい","らっか","られつ","りえき","りかい","りきさく","りきせつ","りくぐん","りくつ","りけん","りこう","りせい","りそう","りそく","りてん","りねん","りゆう","りゅうがく","りよう","りょうり","りょかん","りょくちゃ","りょこう","りりく","りれき","りろん","りんご","るいけい","るいさい","るいじ","るいせき","るすばん","るりがわら","れいかん","れいぎ","れいせい","れいぞうこ","れいとう","れいぼう","れきし","れきだい","れんあい","れんけい","れんこん","れんさい","れんしゅう","れんぞく","れんらく","ろうか","ろうご","ろうじん","ろうそく","ろくが","ろこつ","ろじうら","ろしゅつ","ろせん","ろてん","ろめん","ろれつ","ろんぎ","ろんぱ","ろんぶん","ろんり","わかす","わかめ","わかやま","わかれる","わしつ","わじまし","わすれもの","わらう","われる"]},{}],83:[function(require,module,exports){module.exports=["가격","가끔","가난","가능","가득","가르침","가뭄","가방","가상","가슴","가운데","가을","가이드","가입","가장","가정","가족","가죽","각오","각자","간격","간부","간섭","간장","간접","간판","갈등","갈비","갈색","갈증","감각","감기","감소","감수성","감자","감정","갑자기","강남","강당","강도","강력히","강변","강북","강사","강수량","강아지","강원도","강의","강제","강조","같이","개구리","개나리","개방","개별","개선","개성","개인","객관적","거실","거액","거울","거짓","거품","걱정","건강","건물","건설","건조","건축","걸음","검사","검토","게시판","게임","겨울","견해","결과","결국","결론","결석","결승","결심","결정","결혼","경계","경고","경기","경력","경복궁","경비","경상도","경영","경우","경쟁","경제","경주","경찰","경치","경향","경험","계곡","계단","계란","계산","계속","계약","계절","계층","계획","고객","고구려","고궁","고급","고등학생","고무신","고민","고양이","고장","고전","고집","고춧가루","고통","고향","곡식","골목","골짜기","골프","공간","공개","공격","공군","공급","공기","공동","공무원","공부","공사","공식","공업","공연","공원","공장","공짜","공책","공통","공포","공항","공휴일","과목","과일","과장","과정","과학","관객","관계","관광","관념","관람","관련","관리","관습","관심","관점","관찰","광경","광고","광장","광주","괴로움","굉장히","교과서","교문","교복","교실","교양","교육","교장","교직","교통","교환","교훈","구경","구름","구멍","구별","구분","구석","구성","구속","구역","구입","구청","구체적","국가","국기","국내","국립","국물","국민","국수","국어","국왕","국적","국제","국회","군대","군사","군인","궁극적","권리","권위","권투","귀국","귀신","규정","규칙","균형","그날","그냥","그늘","그러나","그룹","그릇","그림","그제서야","그토록","극복","극히","근거","근교","근래","근로","근무","근본","근원","근육","근처","글씨","글자","금강산","금고","금년","금메달","금액","금연","금요일","금지","긍정적","기간","기관","기념","기능","기독교","기둥","기록","기름","기법","기본","기분","기쁨","기숙사","기술","기억","기업","기온","기운","기원","기적","기준","기침","기혼","기획","긴급","긴장","길이","김밥","김치","김포공항","깍두기","깜빡","깨달음","깨소금","껍질","꼭대기","꽃잎","나들이","나란히","나머지","나물","나침반","나흘","낙엽","난방","날개","날씨","날짜","남녀","남대문","남매","남산","남자","남편","남학생","낭비","낱말","내년","내용","내일","냄비","냄새","냇물","냉동","냉면","냉방","냉장고","넥타이","넷째","노동","노란색","노력","노인","녹음","녹차","녹화","논리","논문","논쟁","놀이","농구","농담","농민","농부","농업","농장","농촌","높이","눈동자","눈물","눈썹","뉴욕","느낌","늑대","능동적","능력","다방","다양성","다음","다이어트","다행","단계","단골","단독","단맛","단순","단어","단위","단점","단체","단추","단편","단풍","달걀","달러","달력","달리","닭고기","담당","담배","담요","담임","답변","답장","당근","당분간","당연히","당장","대규모","대낮","대단히","대답","대도시","대략","대량","대륙","대문","대부분","대신","대응","대장","대전","대접","대중","대책","대출","대충","대통령","대학","대한민국","대합실","대형","덩어리","데이트","도대체","도덕","도둑","도망","도서관","도심","도움","도입","도자기","도저히","도전","도중","도착","독감","독립","독서","독일","독창적","동화책","뒷모습","뒷산","딸아이","마누라","마늘","마당","마라톤","마련","마무리","마사지","마약","마요네즈","마을","마음","마이크","마중","마지막","마찬가지","마찰","마흔","막걸리","막내","막상","만남","만두","만세","만약","만일","만점","만족","만화","많이","말기","말씀","말투","맘대로","망원경","매년","매달","매력","매번","매스컴","매일","매장","맥주","먹이","먼저","먼지","멀리","메일","며느리","며칠","면담","멸치","명단","명령","명예","명의","명절","명칭","명함","모금","모니터","모델","모든","모범","모습","모양","모임","모조리","모집","모퉁이","목걸이","목록","목사","목소리","목숨","목적","목표","몰래","몸매","몸무게","몸살","몸속","몸짓","몸통","몹시","무관심","무궁화","무더위","무덤","무릎","무슨","무엇","무역","무용","무조건","무지개","무척","문구","문득","문법","문서","문제","문학","문화","물가","물건","물결","물고기","물론","물리학","물음","물질","물체","미국","미디어","미사일","미술","미역","미용실","미움","미인","미팅","미혼","민간","민족","민주","믿음","밀가루","밀리미터","밑바닥","바가지","바구니","바나나","바늘","바닥","바닷가","바람","바이러스","바탕","박물관","박사","박수","반대","반드시","반말","반발","반성","반응","반장","반죽","반지","반찬","받침","발가락","발걸음","발견","발달","발레","발목","발바닥","발생","발음","발자국","발전","발톱","발표","밤하늘","밥그릇","밥맛","밥상","밥솥","방금","방면","방문","방바닥","방법","방송","방식","방안","방울","방지","방학","방해","방향","배경","배꼽","배달","배드민턴","백두산","백색","백성","백인","백제","백화점","버릇","버섯","버튼","번개","번역","번지","번호","벌금","벌레","벌써","범위","범인","범죄","법률","법원","법적","법칙","베이징","벨트","변경","변동","변명","변신","변호사","변화","별도","별명","별일","병실","병아리","병원","보관","보너스","보라색","보람","보름","보상","보안","보자기","보장","보전","보존","보통","보편적","보험","복도","복사","복숭아","복습","볶음","본격적","본래","본부","본사","본성","본인","본질","볼펜","봉사","봉지","봉투","부근","부끄러움","부담","부동산","부문","부분","부산","부상","부엌","부인","부작용","부장","부정","부족","부지런히","부친","부탁","부품","부회장","북부","북한","분노","분량","분리","분명","분석","분야","분위기","분필","분홍색","불고기","불과","불교","불꽃","불만","불법","불빛","불안","불이익","불행","브랜드","비극","비난","비닐","비둘기","비디오","비로소","비만","비명","비밀","비바람","비빔밥","비상","비용","비율","비중","비타민","비판","빌딩","빗물","빗방울","빗줄기","빛깔","빨간색","빨래","빨리","사건","사계절","사나이","사냥","사람","사랑","사립","사모님","사물","사방","사상","사생활","사설","사슴","사실","사업","사용","사월","사장","사전","사진","사촌","사춘기","사탕","사투리","사흘","산길","산부인과","산업","산책","살림","살인","살짝","삼계탕","삼국","삼십","삼월","삼촌","상관","상금","상대","상류","상반기","상상","상식","상업","상인","상자","상점","상처","상추","상태","상표","상품","상황","새벽","색깔","색연필","생각","생명","생물","생방송","생산","생선","생신","생일","생활","서랍","서른","서명","서민","서비스","서양","서울","서적","서점","서쪽","서클","석사","석유","선거","선물","선배","선생","선수","선원","선장","선전","선택","선풍기","설거지","설날","설렁탕","설명","설문","설사","설악산","설치","설탕","섭씨","성공","성당","성명","성별","성인","성장","성적","성질","성함","세금","세미나","세상","세월","세종대왕","세탁","센터","센티미터","셋째","소규모","소극적","소금","소나기","소년","소득","소망","소문","소설","소속","소아과","소용","소원","소음","소중히","소지품","소질","소풍","소형","속담","속도","속옷","손가락","손길","손녀","손님","손등","손목","손뼉","손실","손질","손톱","손해","솔직히","솜씨","송아지","송이","송편","쇠고기","쇼핑","수건","수년","수단","수돗물","수동적","수면","수명","수박","수상","수석","수술","수시로","수업","수염","수영","수입","수준","수집","수출","수컷","수필","수학","수험생","수화기","숙녀","숙소","숙제","순간","순서","순수","순식간","순위","숟가락","술병","술집","숫자","스님","스물","스스로","스승","스웨터","스위치","스케이트","스튜디오","스트레스","스포츠","슬쩍","슬픔","습관","습기","승객","승리","승부","승용차","승진","시각","시간","시골","시금치","시나리오","시댁","시리즈","시멘트","시민","시부모","시선","시설","시스템","시아버지","시어머니","시월","시인","시일","시작","시장","시절","시점","시중","시즌","시집","시청","시합","시험","식구","식기","식당","식량","식료품","식물","식빵","식사","식생활","식초","식탁","식품","신고","신규","신념","신문","신발","신비","신사","신세","신용","신제품","신청","신체","신화","실감","실내","실력","실례","실망","실수","실습","실시","실장","실정","실질적","실천","실체","실컷","실태","실패","실험","실현","심리","심부름","심사","심장","심정","심판","쌍둥이","씨름","씨앗","아가씨","아나운서","아드님","아들","아쉬움","아스팔트","아시아","아울러","아저씨","아줌마","아직","아침","아파트","아프리카","아픔","아홉","아흔","악기","악몽","악수","안개","안경","안과","안내","안녕","안동","안방","안부","안주","알루미늄","알코올","암시","암컷","압력","앞날","앞문","애인","애정","액수","앨범","야간","야단","야옹","약간","약국","약속","약수","약점","약품","약혼녀","양념","양력","양말","양배추","양주","양파","어둠","어려움","어른","어젯밤","어쨌든","어쩌다가","어쩐지","언니","언덕","언론","언어","얼굴","얼른","얼음","얼핏","엄마","업무","업종","업체","엉덩이","엉망","엉터리","엊그제","에너지","에어컨","엔진","여건","여고생","여관","여군","여권","여대생","여덟","여동생","여든","여론","여름","여섯","여성","여왕","여인","여전히","여직원","여학생","여행","역사","역시","역할","연결","연구","연극","연기","연락","연설","연세","연속","연습","연애","연예인","연인","연장","연주","연출","연필","연합","연휴","열기","열매","열쇠","열심히","열정","열차","열흘","염려","엽서","영국","영남","영상","영양","영역","영웅","영원히","영하","영향","영혼","영화","옆구리","옆방","옆집","예감","예금","예방","예산","예상","예선","예술","예습","예식장","예약","예전","예절","예정","예컨대","옛날","오늘","오락","오랫동안","오렌지","오로지","오른발","오븐","오십","오염","오월","오전","오직","오징어","오페라","오피스텔","오히려","옥상","옥수수","온갖","온라인","온몸","온종일","온통","올가을","올림픽","올해","옷차림","와이셔츠","와인","완성","완전","왕비","왕자","왜냐하면","왠지","외갓집","외국","외로움","외삼촌","외출","외침","외할머니","왼발","왼손","왼쪽","요금","요일","요즘","요청","용기","용서","용어","우산","우선","우승","우연히","우정","우체국","우편","운동","운명","운반","운전","운행","울산","울음","움직임","웃어른","웃음","워낙","원고","원래","원서","원숭이","원인","원장","원피스","월급","월드컵","월세","월요일","웨이터","위반","위법","위성","위원","위험","위협","윗사람","유난히","유럽","유명","유물","유산","유적","유치원","유학","유행","유형","육군","육상","육십","육체","은행","음력","음료","음반","음성","음식","음악","음주","의견","의논","의문","의복","의식","의심","의외로","의욕","의원","의학","이것","이곳","이념","이놈","이달","이대로","이동","이렇게","이력서","이론적","이름","이민","이발소","이별","이불","이빨","이상","이성","이슬","이야기","이용","이웃","이월","이윽고","이익","이전","이중","이튿날","이틀","이혼","인간","인격","인공","인구","인근","인기","인도","인류","인물","인생","인쇄","인연","인원","인재","인종","인천","인체","인터넷","인하","인형","일곱","일기","일단","일대","일등","일반","일본","일부","일상","일생","일손","일요일","일월","일정","일종","일주일","일찍","일체","일치","일행","일회용","임금","임무","입대","입력","입맛","입사","입술","입시","입원","입장","입학","자가용","자격","자극","자동","자랑","자부심","자식","자신","자연","자원","자율","자전거","자정","자존심","자판","작가","작년","작성","작업","작용","작은딸","작품","잔디","잔뜩","잔치","잘못","잠깐","잠수함","잠시","잠옷","잠자리","잡지","장관","장군","장기간","장래","장례","장르","장마","장면","장모","장미","장비","장사","장소","장식","장애인","장인","장점","장차","장학금","재능","재빨리","재산","재생","재작년","재정","재채기","재판","재학","재활용","저것","저고리","저곳","저녁","저런","저렇게","저번","저울","저절로","저축","적극","적당히","적성","적용","적응","전개","전공","전기","전달","전라도","전망","전문","전반","전부","전세","전시","전용","전자","전쟁","전주","전철","전체","전통","전혀","전후","절대","절망","절반","절약","절차","점검","점수","점심","점원","점점","점차","접근","접시","접촉","젓가락","정거장","정도","정류장","정리","정말","정면","정문","정반대","정보","정부","정비","정상","정성","정오","정원","정장","정지","정치","정확히","제공","제과점","제대로","제목","제발","제법","제삿날","제안","제일","제작","제주도","제출","제품","제한","조각","조건","조금","조깅","조명","조미료","조상","조선","조용히","조절","조정","조직","존댓말","존재","졸업","졸음","종교","종로","종류","종소리","종업원","종종","종합","좌석","죄인","주관적","주름","주말","주머니","주먹","주문","주민","주방","주변","주식","주인","주일","주장","주전자","주택","준비","줄거리","줄기","줄무늬","중간","중계방송","중국","중년","중단","중독","중반","중부","중세","중소기업","중순","중앙","중요","중학교","즉석","즉시","즐거움","증가","증거","증권","증상","증세","지각","지갑","지경","지극히","지금","지급","지능","지름길","지리산","지방","지붕","지식","지역","지우개","지원","지적","지점","지진","지출","직선","직업","직원","직장","진급","진동","진로","진료","진리","진짜","진찰","진출","진통","진행","질문","질병","질서","짐작","집단","집안","집중","짜증","찌꺼기","차남","차라리","차량","차림","차별","차선","차츰","착각","찬물","찬성","참가","참기름","참새","참석","참여","참외","참조","찻잔","창가","창고","창구","창문","창밖","창작","창조","채널","채점","책가방","책방","책상","책임","챔피언","처벌","처음","천국","천둥","천장","천재","천천히","철도","철저히","철학","첫날","첫째","청년","청바지","청소","청춘","체계","체력","체온","체육","체중","체험","초등학생","초반","초밥","초상화","초순","초여름","초원","초저녁","초점","초청","초콜릿","촛불","총각","총리","총장","촬영","최근","최상","최선","최신","최악","최종","추석","추억","추진","추천","추측","축구","축소","축제","축하","출근","출발","출산","출신","출연","출입","출장","출판","충격","충고","충돌","충분히","충청도","취업","취직","취향","치약","친구","친척","칠십","칠월","칠판","침대","침묵","침실","칫솔","칭찬","카메라","카운터","칼국수","캐릭터","캠퍼스","캠페인","커튼","컨디션","컬러","컴퓨터","코끼리","코미디","콘서트","콜라","콤플렉스","콩나물","쾌감","쿠데타","크림","큰길","큰딸","큰소리","큰아들","큰어머니","큰일","큰절","클래식","클럽","킬로","타입","타자기","탁구","탁자","탄생","태권도","태양","태풍","택시","탤런트","터널","터미널","테니스","테스트","테이블","텔레비전","토론","토마토","토요일","통계","통과","통로","통신","통역","통일","통장","통제","통증","통합","통화","퇴근","퇴원","퇴직금","튀김","트럭","특급","특별","특성","특수","특징","특히","튼튼히","티셔츠","파란색","파일","파출소","판결","판단","판매","판사","팔십","팔월","팝송","패션","팩스","팩시밀리","팬티","퍼센트","페인트","편견","편의","편지","편히","평가","평균","평생","평소","평양","평일","평화","포스터","포인트","포장","포함","표면","표정","표준","표현","품목","품질","풍경","풍속","풍습","프랑스","프린터","플라스틱","피곤","피망","피아노","필름","필수","필요","필자","필통","핑계","하느님","하늘","하드웨어","하룻밤","하반기","하숙집","하순","하여튼","하지만","하천","하품","하필","학과","학교","학급","학기","학년","학력","학번","학부모","학비","학생","학술","학습","학용품","학원","학위","학자","학점","한계","한글","한꺼번에","한낮","한눈","한동안","한때","한라산","한마디","한문","한번","한복","한식","한여름","한쪽","할머니","할아버지","할인","함께","함부로","합격","합리적","항공","항구","항상","항의","해결","해군","해답","해당","해물","해석","해설","해수욕장","해안","핵심","핸드백","햄버거","햇볕","햇살","행동","행복","행사","행운","행위","향기","향상","향수","허락","허용","헬기","현관","현금","현대","현상","현실","현장","현재","현지","혈액","협력","형부","형사","형수","형식","형제","형태","형편","혜택","호기심","호남","호랑이","호박","호텔","호흡","혹시","홀로","홈페이지","홍보","홍수","홍차","화면","화분","화살","화요일","화장","화학","확보","확인","확장","확정","환갑","환경","환영","환율","환자","활기","활동","활발히","활용","활짝","회견","회관","회복","회색","회원","회장","회전","횟수","횡단보도","효율적","후반","후춧가루","훈련","훨씬","휴식","휴일","흉내","흐름","흑백","흑인","흔적","흔히","흥미","흥분","희곡","희망","희생","흰색","힘껏"]},{}],84:[function(require,module,exports){module.exports=["ábaco","abdomen","abeja","abierto","abogado","abono","aborto","abrazo","abrir","abuelo","abuso","acabar","academia","acceso","acción","aceite","acelga","acento","aceptar","ácido","aclarar","acné","acoger","acoso","activo","acto","actriz","actuar","acudir","acuerdo","acusar","adicto","admitir","adoptar","adorno","aduana","adulto","aéreo","afectar","afición","afinar","afirmar","ágil","agitar","agonía","agosto","agotar","agregar","agrio","agua","agudo","águila","aguja","ahogo","ahorro","aire","aislar","ajedrez","ajeno","ajuste","alacrán","alambre","alarma","alba","álbum","alcalde","aldea","alegre","alejar","alerta","aleta","alfiler","alga","algodón","aliado","aliento","alivio","alma","almeja","almíbar","altar","alteza","altivo","alto","altura","alumno","alzar","amable","amante","amapola","amargo","amasar","ámbar","ámbito","ameno","amigo","amistad","amor","amparo","amplio","ancho","anciano","ancla","andar","andén","anemia","ángulo","anillo","ánimo","anís","anotar","antena","antiguo","antojo","anual","anular","anuncio","añadir","añejo","año","apagar","aparato","apetito","apio","aplicar","apodo","aporte","apoyo","aprender","aprobar","apuesta","apuro","arado","araña","arar","árbitro","árbol","arbusto","archivo","arco","arder","ardilla","arduo","área","árido","aries","armonía","arnés","aroma","arpa","arpón","arreglo","arroz","arruga","arte","artista","asa","asado","asalto","ascenso","asegurar","aseo","asesor","asiento","asilo","asistir","asno","asombro","áspero","astilla","astro","astuto","asumir","asunto","atajo","ataque","atar","atento","ateo","ático","atleta","átomo","atraer","atroz","atún","audaz","audio","auge","aula","aumento","ausente","autor","aval","avance","avaro","ave","avellana","avena","avestruz","avión","aviso","ayer","ayuda","ayuno","azafrán","azar","azote","azúcar","azufre","azul","baba","babor","bache","bahía","baile","bajar","balanza","balcón","balde","bambú","banco","banda","baño","barba","barco","barniz","barro","báscula","bastón","basura","batalla","batería","batir","batuta","baúl","bazar","bebé","bebida","bello","besar","beso","bestia","bicho","bien","bingo","blanco","bloque","blusa","boa","bobina","bobo","boca","bocina","boda","bodega","boina","bola","bolero","bolsa","bomba","bondad","bonito","bono","bonsái","borde","borrar","bosque","bote","botín","bóveda","bozal","bravo","brazo","brecha","breve","brillo","brinco","brisa","broca","broma","bronce","brote","bruja","brusco","bruto","buceo","bucle","bueno","buey","bufanda","bufón","búho","buitre","bulto","burbuja","burla","burro","buscar","butaca","buzón","caballo","cabeza","cabina","cabra","cacao","cadáver","cadena","caer","café","caída","caimán","caja","cajón","cal","calamar","calcio","caldo","calidad","calle","calma","calor","calvo","cama","cambio","camello","camino","campo","cáncer","candil","canela","canguro","canica","canto","caña","cañón","caoba","caos","capaz","capitán","capote","captar","capucha","cara","carbón","cárcel","careta","carga","cariño","carne","carpeta","carro","carta","casa","casco","casero","caspa","castor","catorce","catre","caudal","causa","cazo","cebolla","ceder","cedro","celda","célebre","celoso","célula","cemento","ceniza","centro","cerca","cerdo","cereza","cero","cerrar","certeza","césped","cetro","chacal","chaleco","champú","chancla","chapa","charla","chico","chiste","chivo","choque","choza","chuleta","chupar","ciclón","ciego","cielo","cien","cierto","cifra","cigarro","cima","cinco","cine","cinta","ciprés","circo","ciruela","cisne","cita","ciudad","clamor","clan","claro","clase","clave","cliente","clima","clínica","cobre","cocción","cochino","cocina","coco","código","codo","cofre","coger","cohete","cojín","cojo","cola","colcha","colegio","colgar","colina","collar","colmo","columna","combate","comer","comida","cómodo","compra","conde","conejo","conga","conocer","consejo","contar","copa","copia","corazón","corbata","corcho","cordón","corona","correr","coser","cosmos","costa","cráneo","cráter","crear","crecer","creído","crema","cría","crimen","cripta","crisis","cromo","crónica","croqueta","crudo","cruz","cuadro","cuarto","cuatro","cubo","cubrir","cuchara","cuello","cuento","cuerda","cuesta","cueva","cuidar","culebra","culpa","culto","cumbre","cumplir","cuna","cuneta","cuota","cupón","cúpula","curar","curioso","curso","curva","cutis","dama","danza","dar","dardo","dátil","deber","débil","década","decir","dedo","defensa","definir","dejar","delfín","delgado","delito","demora","denso","dental","deporte","derecho","derrota","desayuno","deseo","desfile","desnudo","destino","desvío","detalle","detener","deuda","día","diablo","diadema","diamante","diana","diario","dibujo","dictar","diente","dieta","diez","difícil","digno","dilema","diluir","dinero","directo","dirigir","disco","diseño","disfraz","diva","divino","doble","doce","dolor","domingo","don","donar","dorado","dormir","dorso","dos","dosis","dragón","droga","ducha","duda","duelo","dueño","dulce","dúo","duque","durar","dureza","duro","ébano","ebrio","echar","eco","ecuador","edad","edición","edificio","editor","educar","efecto","eficaz","eje","ejemplo","elefante","elegir","elemento","elevar","elipse","élite","elixir","elogio","eludir","embudo","emitir","emoción","empate","empeño","empleo","empresa","enano","encargo","enchufe","encía","enemigo","enero","enfado","enfermo","engaño","enigma","enlace","enorme","enredo","ensayo","enseñar","entero","entrar","envase","envío","época","equipo","erizo","escala","escena","escolar","escribir","escudo","esencia","esfera","esfuerzo","espada","espejo","espía","esposa","espuma","esquí","estar","este","estilo","estufa","etapa","eterno","ética","etnia","evadir","evaluar","evento","evitar","exacto","examen","exceso","excusa","exento","exigir","exilio","existir","éxito","experto","explicar","exponer","extremo","fábrica","fábula","fachada","fácil","factor","faena","faja","falda","fallo","falso","faltar","fama","familia","famoso","faraón","farmacia","farol","farsa","fase","fatiga","fauna","favor","fax","febrero","fecha","feliz","feo","feria","feroz","fértil","fervor","festín","fiable","fianza","fiar","fibra","ficción","ficha","fideo","fiebre","fiel","fiera","fiesta","figura","fijar","fijo","fila","filete","filial","filtro","fin","finca","fingir","finito","firma","flaco","flauta","flecha","flor","flota","fluir","flujo","flúor","fobia","foca","fogata","fogón","folio","folleto","fondo","forma","forro","fortuna","forzar","fosa","foto","fracaso","frágil","franja","frase","fraude","freír","freno","fresa","frío","frito","fruta","fuego","fuente","fuerza","fuga","fumar","función","funda","furgón","furia","fusil","fútbol","futuro","gacela","gafas","gaita","gajo","gala","galería","gallo","gamba","ganar","gancho","ganga","ganso","garaje","garza","gasolina","gastar","gato","gavilán","gemelo","gemir","gen","género","genio","gente","geranio","gerente","germen","gesto","gigante","gimnasio","girar","giro","glaciar","globo","gloria","gol","golfo","goloso","golpe","goma","gordo","gorila","gorra","gota","goteo","gozar","grada","gráfico","grano","grasa","gratis","grave","grieta","grillo","gripe","gris","grito","grosor","grúa","grueso","grumo","grupo","guante","guapo","guardia","guerra","guía","guiño","guion","guiso","guitarra","gusano","gustar","haber","hábil","hablar","hacer","hacha","hada","hallar","hamaca","harina","haz","hazaña","hebilla","hebra","hecho","helado","helio","hembra","herir","hermano","héroe","hervir","hielo","hierro","hígado","higiene","hijo","himno","historia","hocico","hogar","hoguera","hoja","hombre","hongo","honor","honra","hora","hormiga","horno","hostil","hoyo","hueco","huelga","huerta","hueso","huevo","huida","huir","humano","húmedo","humilde","humo","hundir","huracán","hurto","icono","ideal","idioma","ídolo","iglesia","iglú","igual","ilegal","ilusión","imagen","imán","imitar","impar","imperio","imponer","impulso","incapaz","índice","inerte","infiel","informe","ingenio","inicio","inmenso","inmune","innato","insecto","instante","interés","íntimo","intuir","inútil","invierno","ira","iris","ironía","isla","islote","jabalí","jabón","jamón","jarabe","jardín","jarra","jaula","jazmín","jefe","jeringa","jinete","jornada","joroba","joven","joya","juerga","jueves","juez","jugador","jugo","juguete","juicio","junco","jungla","junio","juntar","júpiter","jurar","justo","juvenil","juzgar","kilo","koala","labio","lacio","lacra","lado","ladrón","lagarto","lágrima","laguna","laico","lamer","lámina","lámpara","lana","lancha","langosta","lanza","lápiz","largo","larva","lástima","lata","látex","latir","laurel","lavar","lazo","leal","lección","leche","lector","leer","legión","legumbre","lejano","lengua","lento","leña","león","leopardo","lesión","letal","letra","leve","leyenda","libertad","libro","licor","líder","lidiar","lienzo","liga","ligero","lima","límite","limón","limpio","lince","lindo","línea","lingote","lino","linterna","líquido","liso","lista","litera","litio","litro","llaga","llama","llanto","llave","llegar","llenar","llevar","llorar","llover","lluvia","lobo","loción","loco","locura","lógica","logro","lombriz","lomo","lonja","lote","lucha","lucir","lugar","lujo","luna","lunes","lupa","lustro","luto","luz","maceta","macho","madera","madre","maduro","maestro","mafia","magia","mago","maíz","maldad","maleta","malla","malo","mamá","mambo","mamut","manco","mando","manejar","manga","maniquí","manjar","mano","manso","manta","mañana","mapa","máquina","mar","marco","marea","marfil","margen","marido","mármol","marrón","martes","marzo","masa","máscara","masivo","matar","materia","matiz","matriz","máximo","mayor","mazorca","mecha","medalla","medio","médula","mejilla","mejor","melena","melón","memoria","menor","mensaje","mente","menú","mercado","merengue","mérito","mes","mesón","meta","meter","método","metro","mezcla","miedo","miel","miembro","miga","mil","milagro","militar","millón","mimo","mina","minero","mínimo","minuto","miope","mirar","misa","miseria","misil","mismo","mitad","mito","mochila","moción","moda","modelo","moho","mojar","molde","moler","molino","momento","momia","monarca","moneda","monja","monto","moño","morada","morder","moreno","morir","morro","morsa","mortal","mosca","mostrar","motivo","mover","móvil","mozo","mucho","mudar","mueble","muela","muerte","muestra","mugre","mujer","mula","muleta","multa","mundo","muñeca","mural","muro","músculo","museo","musgo","música","muslo","nácar","nación","nadar","naipe","naranja","nariz","narrar","nasal","natal","nativo","natural","náusea","naval","nave","navidad","necio","néctar","negar","negocio","negro","neón","nervio","neto","neutro","nevar","nevera","nicho","nido","niebla","nieto","niñez","niño","nítido","nivel","nobleza","noche","nómina","noria","norma","norte","nota","noticia","novato","novela","novio","nube","nuca","núcleo","nudillo","nudo","nuera","nueve","nuez","nulo","número","nutria","oasis","obeso","obispo","objeto","obra","obrero","observar","obtener","obvio","oca","ocaso","océano","ochenta","ocho","ocio","ocre","octavo","octubre","oculto","ocupar","ocurrir","odiar","odio","odisea","oeste","ofensa","oferta","oficio","ofrecer","ogro","oído","oír","ojo","ola","oleada","olfato","olivo","olla","olmo","olor","olvido","ombligo","onda","onza","opaco","opción","ópera","opinar","oponer","optar","óptica","opuesto","oración","orador","oral","órbita","orca","orden","oreja","órgano","orgía","orgullo","oriente","origen","orilla","oro","orquesta","oruga","osadía","oscuro","osezno","oso","ostra","otoño","otro","oveja","óvulo","óxido","oxígeno","oyente","ozono","pacto","padre","paella","página","pago","país","pájaro","palabra","palco","paleta","pálido","palma","paloma","palpar","pan","panal","pánico","pantera","pañuelo","papá","papel","papilla","paquete","parar","parcela","pared","parir","paro","párpado","parque","párrafo","parte","pasar","paseo","pasión","paso","pasta","pata","patio","patria","pausa","pauta","pavo","payaso","peatón","pecado","pecera","pecho","pedal","pedir","pegar","peine","pelar","peldaño","pelea","peligro","pellejo","pelo","peluca","pena","pensar","peñón","peón","peor","pepino","pequeño","pera","percha","perder","pereza","perfil","perico","perla","permiso","perro","persona","pesa","pesca","pésimo","pestaña","pétalo","petróleo","pez","pezuña","picar","pichón","pie","piedra","pierna","pieza","pijama","pilar","piloto","pimienta","pino","pintor","pinza","piña","piojo","pipa","pirata","pisar","piscina","piso","pista","pitón","pizca","placa","plan","plata","playa","plaza","pleito","pleno","plomo","pluma","plural","pobre","poco","poder","podio","poema","poesía","poeta","polen","policía","pollo","polvo","pomada","pomelo","pomo","pompa","poner","porción","portal","posada","poseer","posible","poste","potencia","potro","pozo","prado","precoz","pregunta","premio","prensa","preso","previo","primo","príncipe","prisión","privar","proa","probar","proceso","producto","proeza","profesor","programa","prole","promesa","pronto","propio","próximo","prueba","público","puchero","pudor","pueblo","puerta","puesto","pulga","pulir","pulmón","pulpo","pulso","puma","punto","puñal","puño","pupa","pupila","puré","quedar","queja","quemar","querer","queso","quieto","química","quince","quitar","rábano","rabia","rabo","ración","radical","raíz","rama","rampa","rancho","rango","rapaz","rápido","rapto","rasgo","raspa","rato","rayo","raza","razón","reacción","realidad","rebaño","rebote","recaer","receta","rechazo","recoger","recreo","recto","recurso","red","redondo","reducir","reflejo","reforma","refrán","refugio","regalo","regir","regla","regreso","rehén","reino","reír","reja","relato","relevo","relieve","relleno","reloj","remar","remedio","remo","rencor","rendir","renta","reparto","repetir","reposo","reptil","res","rescate","resina","respeto","resto","resumen","retiro","retorno","retrato","reunir","revés","revista","rey","rezar","rico","riego","rienda","riesgo","rifa","rígido","rigor","rincón","riñón","río","riqueza","risa","ritmo","rito","rizo","roble","roce","rociar","rodar","rodeo","rodilla","roer","rojizo","rojo","romero","romper","ron","ronco","ronda","ropa","ropero","rosa","rosca","rostro","rotar","rubí","rubor","rudo","rueda","rugir","ruido","ruina","ruleta","rulo","rumbo","rumor","ruptura","ruta","rutina","sábado","saber","sabio","sable","sacar","sagaz","sagrado","sala","saldo","salero","salir","salmón","salón","salsa","salto","salud","salvar","samba","sanción","sandía","sanear","sangre","sanidad","sano","santo","sapo","saque","sardina","sartén","sastre","satán","sauna","saxofón","sección","seco","secreto","secta","sed","seguir","seis","sello","selva","semana","semilla","senda","sensor","señal","señor","separar","sepia","sequía","ser","serie","sermón","servir","sesenta","sesión","seta","setenta","severo","sexo","sexto","sidra","siesta","siete","siglo","signo","sílaba","silbar","silencio","silla","símbolo","simio","sirena","sistema","sitio","situar","sobre","socio","sodio","sol","solapa","soldado","soledad","sólido","soltar","solución","sombra","sondeo","sonido","sonoro","sonrisa","sopa","soplar","soporte","sordo","sorpresa","sorteo","sostén","sótano","suave","subir","suceso","sudor","suegra","suelo","sueño","suerte","sufrir","sujeto","sultán","sumar","superar","suplir","suponer","supremo","sur","surco","sureño","surgir","susto","sutil","tabaco","tabique","tabla","tabú","taco","tacto","tajo","talar","talco","talento","talla","talón","tamaño","tambor","tango","tanque","tapa","tapete","tapia","tapón","taquilla","tarde","tarea","tarifa","tarjeta","tarot","tarro","tarta","tatuaje","tauro","taza","tazón","teatro","techo","tecla","técnica","tejado","tejer","tejido","tela","teléfono","tema","temor","templo","tenaz","tender","tener","tenis","tenso","teoría","terapia","terco","término","ternura","terror","tesis","tesoro","testigo","tetera","texto","tez","tibio","tiburón","tiempo","tienda","tierra","tieso","tigre","tijera","tilde","timbre","tímido","timo","tinta","tío","típico","tipo","tira","tirón","titán","títere","título","tiza","toalla","tobillo","tocar","tocino","todo","toga","toldo","tomar","tono","tonto","topar","tope","toque","tórax","torero","tormenta","torneo","toro","torpedo","torre","torso","tortuga","tos","tosco","toser","tóxico","trabajo","tractor","traer","tráfico","trago","traje","tramo","trance","trato","trauma","trazar","trébol","tregua","treinta","tren","trepar","tres","tribu","trigo","tripa","triste","triunfo","trofeo","trompa","tronco","tropa","trote","trozo","truco","trueno","trufa","tubería","tubo","tuerto","tumba","tumor","túnel","túnica","turbina","turismo","turno","tutor","ubicar","úlcera","umbral","unidad","unir","universo","uno","untar","uña","urbano","urbe","urgente","urna","usar","usuario","útil","utopía","uva","vaca","vacío","vacuna","vagar","vago","vaina","vajilla","vale","válido","valle","valor","válvula","vampiro","vara","variar","varón","vaso","vecino","vector","vehículo","veinte","vejez","vela","velero","veloz","vena","vencer","venda","veneno","vengar","venir","venta","venus","ver","verano","verbo","verde","vereda","verja","verso","verter","vía","viaje","vibrar","vicio","víctima","vida","vídeo","vidrio","viejo","viernes","vigor","vil","villa","vinagre","vino","viñedo","violín","viral","virgo","virtud","visor","víspera","vista","vitamina","viudo","vivaz","vivero","vivir","vivo","volcán","volumen","volver","voraz","votar","voto","voz","vuelo","vulgar","yacer","yate","yegua","yema","yerno","yeso","yodo","yoga","yogur","zafiro","zanja","zapato","zarza","zona","zorro","zumo","zurdo"]},{}],85:[function(require,module,exports){(function(Buffer){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BIP85=exports.BIP85_APPLICATIONS=void 0;const bip32_1=require("bip32"),crypto_1=require("./crypto"),util_1=require("./util"),bip39_1=require("bip39"),BIP85Child_1=require("./BIP85Child"),BIP85_KEY="bip-entropy-from-k",BIP85_DERIVATION_PATH=83696968;var BIP85_APPLICATIONS;!function(BIP85_APPLICATIONS){BIP85_APPLICATIONS[BIP85_APPLICATIONS.BIP39=39]="BIP39",BIP85_APPLICATIONS[BIP85_APPLICATIONS.WIF=2]="WIF",BIP85_APPLICATIONS[BIP85_APPLICATIONS.XPRV=32]="XPRV",BIP85_APPLICATIONS[BIP85_APPLICATIONS.HEX=128169]="HEX"}(BIP85_APPLICATIONS=exports.BIP85_APPLICATIONS||(exports.BIP85_APPLICATIONS={}));class BIP85{constructor(node){this.node=node}deriveBIP39(language,words,index=0){if(!util_1.isValidIndex(index))throw new Error("BIP39 invalid index");if("number"!=typeof language)throw new Error("BIP39 invalid language type");if(!(language>=0&&language<=8))throw new Error("BIP39 invalid language");const entropyLength=(()=>{switch(words){case 12:return 16;case 18:return 24;case 24:return 32;default:throw new Error("BIP39 invalid mnemonic length")}})(),entropy=this.derive(`m/${BIP85_DERIVATION_PATH}'/${BIP85_APPLICATIONS.BIP39}'/${language}'/${words}'/${index}'`,entropyLength);return new BIP85Child_1.BIP85Child(entropy,BIP85_APPLICATIONS.BIP39)}deriveWIF(index=0){if(!util_1.isValidIndex(index))throw new Error("WIF invalid index");const entropy=this.derive(`m/${BIP85_DERIVATION_PATH}'/${BIP85_APPLICATIONS.WIF}'/${index}'`,32);return new BIP85Child_1.BIP85Child(entropy,BIP85_APPLICATIONS.WIF)}deriveXPRV(index=0){if(!util_1.isValidIndex(index))throw new Error("XPRV invalid index");const entropy=this.derive(`m/${BIP85_DERIVATION_PATH}'/${BIP85_APPLICATIONS.XPRV}'/${index}'`,64);return new BIP85Child_1.BIP85Child(entropy,BIP85_APPLICATIONS.XPRV)}deriveHex(numBytes,index=0){if(!util_1.isValidIndex(index))throw new Error("HEX invalid index");if("number"!=typeof numBytes)throw new Error("HEX invalid byte length type");if(numBytes<16||numBytes>64)throw new Error("HEX invalid byte length");const entropy=this.derive(`m/${BIP85_DERIVATION_PATH}'/${BIP85_APPLICATIONS.HEX}'/${numBytes}'/${index}'`,numBytes);return new BIP85Child_1.BIP85Child(entropy,BIP85_APPLICATIONS.HEX)}derive(path,bytesLength=64){const childPrivateKey=this.node.derivePath(path).privateKey;return crypto_1.hmacSHA512(Buffer.from(BIP85_KEY),childPrivateKey).slice(0,bytesLength).toString("hex")}static fromBase58(bip32seed){const node=bip32_1.fromBase58(bip32seed);if(0!==node.depth)throw new Error("Expected master, got child");return new BIP85(node)}static fromSeed(bip32seed){const node=bip32_1.fromSeed(bip32seed);if(0!==node.depth)throw new Error("Expected master, got child");return new BIP85(node)}static fromEntropy(entropy,password=""){const mnemonic=bip39_1.entropyToMnemonic(entropy);return BIP85.fromMnemonic(mnemonic,password)}static fromMnemonic(mnemonic,password=""){if(!bip39_1.validateMnemonic(mnemonic))throw new Error("Invalid mnemonic");const seed=bip39_1.mnemonicToSeedSync(mnemonic,password);return BIP85.fromSeed(seed)}}exports.BIP85=BIP85}).call(this,require("buffer").Buffer)},{"./BIP85Child":86,"./crypto":87,"./util":89,bip32:69,bip39:76,buffer:240}],86:[function(require,module,exports){(function(Buffer){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BIP85Child=void 0;const wif_1=require("wif"),bip32_1=require("bip32"),bip39_1=require("bip39"),BIP85_1=require("./BIP85");exports.BIP85Child=class{constructor(entropy,type){this.entropy=entropy,this.type=type}toEntropy(){return this.type===BIP85_1.BIP85_APPLICATIONS.XPRV?this.entropy.slice(64,128):this.entropy}toMnemonic(){if(this.type!==BIP85_1.BIP85_APPLICATIONS.BIP39)throw new Error("BIP85Child type is not BIP39");return bip39_1.entropyToMnemonic(this.entropy)}toWIF(){if(this.type!==BIP85_1.BIP85_APPLICATIONS.WIF)throw new Error("BIP85Child type is not WIF");const buf=Buffer.from(this.entropy,"hex");return wif_1.encode(128,buf,!0)}toXPRV(){if(this.type!==BIP85_1.BIP85_APPLICATIONS.XPRV)throw new Error("BIP85Child type is not XPRV");const chainCode=Buffer.from(this.entropy.slice(0,64),"hex"),privateKey=Buffer.from(this.entropy.slice(64,128),"hex");return bip32_1.fromPrivateKey(privateKey,chainCode).toBase58()}}}).call(this,require("buffer").Buffer)},{"./BIP85":85,bip32:69,bip39:76,buffer:240,wif:913}],87:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.hmacSHA512=void 0;const createHmac=require("create-hmac");exports.hmacSHA512=function(key,data){return createHmac("sha512",key).update(data).digest()}},{"create-hmac":335}],88:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BIP85Child=exports.BIP85=void 0;var BIP85_1=require("./BIP85");Object.defineProperty(exports,"BIP85",{enumerable:!0,get:function(){return BIP85_1.BIP85}});var BIP85Child_1=require("./BIP85Child");Object.defineProperty(exports,"BIP85Child",{enumerable:!0,get:function(){return BIP85Child_1.BIP85Child}})},{"./BIP85":85,"./BIP85Child":86}],89:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.isValidIndex=void 0,exports.isValidIndex=function(index){return"number"==typeof index&&index>=0}},{}],90:[function(require,module,exports){module.exports={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP1:176,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255}},{}],91:[function(require,module,exports){var OPS=require("./index.json"),map={};for(var op in OPS){map[OPS[op]]=op}module.exports=map},{"./index.json":90}],92:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,bech32=require("bech32"),bs58check=require("bs58check"),bscript=require("./script"),btemplates=require("./templates"),networks=require("./networks"),typeforce=require("typeforce"),types=require("./types");function fromBase58Check(address){var payload=bs58check.decode(address);if(payload.length<21)throw new TypeError(address+" is too short");if(payload.length>21)throw new TypeError(address+" is too long");return{version:payload.readUInt8(0),hash:payload.slice(1)}}function fromBech32(address){var result=bech32.decode(address),data=bech32.fromWords(result.words.slice(1));return{version:result.words[0],prefix:result.prefix,data:Buffer.from(data)}}function toBase58Check(hash,version){var payload;return version<256?(typeforce(types.tuple(types.Hash160bit,types.UInt8),arguments),(payload=Buffer.allocUnsafe(21)).writeUInt8(version,0),hash.copy(payload,1),bs58check.encode(payload)):(typeforce(types.tuple(types.Hash160bit,types.UInt16),arguments),(payload=Buffer.allocUnsafe(22)).writeUInt16BE(version,0),hash.copy(payload,2),bs58check.encode(payload))}function toBech32(data,version,prefix){var words=bech32.toWords(data);return words.unshift(version),bech32.encode(prefix,words)}module.exports={fromBase58Check:fromBase58Check,fromBech32:fromBech32,fromOutputScript:function(outputScript,network){if(network=network||networks.bitcoin,btemplates.pubKeyHash.output.check(outputScript))return toBase58Check(bscript.compile(outputScript).slice(3,23),network.pubKeyHash);if(btemplates.scriptHash.output.check(outputScript))return toBase58Check(bscript.compile(outputScript).slice(2,22),network.scriptHash);if(btemplates.witnessPubKeyHash.output.check(outputScript))return toBech32(bscript.compile(outputScript).slice(2,22),0,network.bech32);if(btemplates.witnessScriptHash.output.check(outputScript))return toBech32(bscript.compile(outputScript).slice(2,34),0,network.bech32);throw new Error(bscript.toASM(outputScript)+" has no matching Address")},toBase58Check:toBase58Check,toBech32:toBech32,toOutputScript:function(address,network){var decode;network=network||networks.bitcoin;try{decode=fromBase58Check(address)}catch(e){}if(decode){if(decode.version===network.pubKeyHash)return btemplates.pubKeyHash.output.encode(decode.hash);if(decode.version===network.scriptHash)return btemplates.scriptHash.output.encode(decode.hash)}else{try{decode=fromBech32(address)}catch(e){}if(decode){if(decode.prefix!==network.bech32)throw new Error(address+" has an invalid prefix");if(0===decode.version){if(20===decode.data.length)return btemplates.witnessPubKeyHash.output.encode(decode.data);if(32===decode.data.length)return btemplates.witnessScriptHash.output.encode(decode.data)}}}throw new Error(address+" has no matching Script")}}},{"./networks":101,"./script":102,"./templates":104,"./types":128,bech32:60,bs58check:230,"safe-buffer":839,typeforce:897}],93:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,bcrypto=require("./crypto"),fastMerkleRoot=require("merkle-lib/fastRoot"),typeforce=require("typeforce"),types=require("./types"),varuint=require("varuint-bitcoin"),Transaction=require("./transaction");function Block(){this.version=1,this.prevHash=null,this.merkleRoot=null,this.timestamp=0,this.bits=0,this.nonce=0}Block.fromBuffer=function(buffer){if(buffer.length<80)throw new Error("Buffer too small (< 80 bytes)");var offset=0;function readSlice(n){return offset+=n,buffer.slice(offset-n,offset)}function readUInt32(){var i=buffer.readUInt32LE(offset);return offset+=4,i}var block=new Block;if(block.version=function(){var i=buffer.readInt32LE(offset);return offset+=4,i}(),block.prevHash=readSlice(32),block.merkleRoot=readSlice(32),block.timestamp=readUInt32(),block.bits=readUInt32(),block.nonce=readUInt32(),80===buffer.length)return block;function readTransaction(){var tx=Transaction.fromBuffer(buffer.slice(offset),!0);return offset+=tx.byteLength(),tx}var vi,nTransactions=(vi=varuint.decode(buffer,offset),offset+=varuint.decode.bytes,vi);block.transactions=[];for(var i=0;i>24)-3,mantissa=8388607&bits,target=Buffer.alloc(32,0);return target.writeUInt32BE(mantissa,28-exponent),target},Block.calculateMerkleRoot=function(transactions){if(typeforce([{getHash:types.Function}],transactions),0===transactions.length)throw TypeError("Cannot compute merkle root for zero transactions");var hashes=transactions.map(function(transaction){return transaction.getHash()});return fastMerkleRoot(hashes,bcrypto.hash256)},Block.prototype.checkMerkleRoot=function(){if(!this.transactions)return!1;var actualMerkleRoot=Block.calculateMerkleRoot(this.transactions);return 0===this.merkleRoot.compare(actualMerkleRoot)},Block.prototype.checkProofOfWork=function(){var hash=this.getHash().reverse(),target=Block.calculateTarget(this.bits);return hash.compare(target)<=0},module.exports=Block},{"./crypto":95,"./transaction":126,"./types":128,"merkle-lib/fastRoot":718,"safe-buffer":839,typeforce:897,"varuint-bitcoin":911}],94:[function(require,module,exports){var pushdata=require("pushdata-bitcoin"),varuint=require("varuint-bitcoin");function verifuint(value,max){if("number"!=typeof value)throw new Error("cannot write a non-number as a number");if(value<0)throw new Error("specified a negative value for writing an unsigned value");if(value>max)throw new Error("RangeError: value out of range");if(Math.floor(value)!==value)throw new Error("value has a fractional component")}module.exports={pushDataSize:pushdata.encodingLength,readPushDataInt:pushdata.decode,readUInt64LE:function(buffer,offset){var a=buffer.readUInt32LE(offset),b=buffer.readUInt32LE(offset+4);return verifuint((b*=4294967296)+a,9007199254740991),b+a},readVarInt:function(buffer,offset){return{number:varuint.decode(buffer,offset),size:varuint.decode.bytes}},varIntBuffer:varuint.encode,varIntSize:varuint.encodingLength,writePushDataInt:pushdata.encode,writeUInt64LE:function(buffer,value,offset){return verifuint(value,9007199254740991),buffer.writeInt32LE(-1&value,offset),buffer.writeUInt32LE(Math.floor(value/4294967296),offset+4),offset+8},writeVarInt:function(buffer,number,offset){return varuint.encode(number,buffer,offset),varuint.encode.bytes}}},{"pushdata-bitcoin":816,"varuint-bitcoin":911}],95:[function(require,module,exports){var createHash=require("create-hash");function ripemd160(buffer){return createHash("rmd160").update(buffer).digest()}function sha256(buffer){return createHash("sha256").update(buffer).digest()}module.exports={hash160:function(buffer){return ripemd160(sha256(buffer))},hash256:function(buffer){return sha256(sha256(buffer))},ripemd160:ripemd160,sha1:function(buffer){return createHash("sha1").update(buffer).digest()},sha256:sha256}},{"create-hash":333}],96:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,createHmac=require("create-hmac"),typeforce=require("typeforce"),types=require("./types"),BigInteger=require("bigi"),ECSignature=require("./ecsignature"),ZERO=Buffer.alloc(1,0),ONE=Buffer.alloc(1,1),secp256k1=require("ecurve").getCurveByName("secp256k1");function deterministicGenerateK(hash,x,checkSig){typeforce(types.tuple(types.Hash256bit,types.Buffer256bit,types.Function),arguments);var k=Buffer.alloc(32,0),v=Buffer.alloc(32,1);k=createHmac("sha256",k).update(v).update(ZERO).update(x).update(hash).digest(),v=createHmac("sha256",k).update(v).digest(),k=createHmac("sha256",k).update(v).update(ONE).update(x).update(hash).digest(),v=createHmac("sha256",k).update(v).digest(),v=createHmac("sha256",k).update(v).digest();for(var T=BigInteger.fromBuffer(v);T.signum()<=0||T.compareTo(secp256k1.n)>=0||!checkSig(T);)k=createHmac("sha256",k).update(v).update(ZERO).digest(),v=createHmac("sha256",k).update(v).digest(),v=createHmac("sha256",k).update(v).digest(),T=BigInteger.fromBuffer(v);return T}var N_OVER_TWO=secp256k1.n.shiftRight(1);module.exports={deterministicGenerateK:deterministicGenerateK,sign:function(hash,d){typeforce(types.tuple(types.Hash256bit,types.BigInt),arguments);var r,s,x=d.toBuffer(32),e=BigInteger.fromBuffer(hash),n=secp256k1.n,G=secp256k1.G;return deterministicGenerateK(hash,x,function(k){var Q=G.multiply(k);return!secp256k1.isInfinity(Q)&&0!==(r=Q.affineX.mod(n)).signum()&&0!==(s=k.modInverse(n).multiply(e.add(d.multiply(r))).mod(n)).signum()}),s.compareTo(N_OVER_TWO)>0&&(s=n.subtract(s)),new ECSignature(r,s)},verify:function(hash,signature,Q){typeforce(types.tuple(types.Hash256bit,types.ECSignature,types.ECPoint),arguments);var n=secp256k1.n,G=secp256k1.G,r=signature.r,s=signature.s;if(r.signum()<=0||r.compareTo(n)>=0)return!1;if(s.signum()<=0||s.compareTo(n)>=0)return!1;var e=BigInteger.fromBuffer(hash),sInv=s.modInverse(n),u1=e.multiply(sInv).mod(n),u2=r.multiply(sInv).mod(n),R=G.multiplyTwo(u1,Q,u2);return!secp256k1.isInfinity(R)&&R.affineX.mod(n).equals(r)},__curve:secp256k1}},{"./ecsignature":98,"./types":128,bigi:64,"create-hmac":335,ecurve:385,"safe-buffer":839,typeforce:897}],97:[function(require,module,exports){var baddress=require("./address"),bcrypto=require("./crypto"),ecdsa=require("./ecdsa"),randomBytes=require("randombytes"),typeforce=require("typeforce"),types=require("./types"),wif=require("wif"),NETWORKS=require("./networks"),BigInteger=require("bigi"),ecurve=require("ecurve"),secp256k1=ecdsa.__curve;function ECPair(d,Q,options){if(options&&typeforce({compressed:types.maybe(types.Boolean),network:types.maybe(types.Network)},options),options=options||{},d){if(d.signum()<=0)throw new Error("Private key must be greater than 0");if(d.compareTo(secp256k1.n)>=0)throw new Error("Private key must be less than the curve order");if(Q)throw new TypeError("Unexpected publicKey parameter");this.d=d}else typeforce(types.ECPoint,Q),this.__Q=Q;this.compressed=void 0===options.compressed||options.compressed,this.network=options.network||NETWORKS.bitcoin}Object.defineProperty(ECPair.prototype,"Q",{get:function(){return!this.__Q&&this.d&&(this.__Q=secp256k1.G.multiply(this.d)),this.__Q}}),ECPair.fromPublicKeyBuffer=function(buffer,network){var Q=ecurve.Point.decodeFrom(secp256k1,buffer);return new ECPair(null,Q,{compressed:Q.compressed,network:network})},ECPair.fromWIF=function(string,network){var decoded=wif.decode(string),version=decoded.version;if(types.Array(network)){if(!(network=network.filter(function(x){return version===x.wif}).pop()))throw new Error("Unknown network version")}else if(network=network||NETWORKS.bitcoin,version!==network.wif)throw new Error("Invalid network version");return new ECPair(BigInteger.fromBuffer(decoded.privateKey),null,{compressed:decoded.compressed,network:network})},ECPair.makeRandom=function(options){var d,rng=(options=options||{}).rng||randomBytes;do{var buffer=rng(32);typeforce(types.Buffer256bit,buffer),d=BigInteger.fromBuffer(buffer)}while(d.signum()<=0||d.compareTo(secp256k1.n)>=0);return new ECPair(d,null,options)},ECPair.prototype.getAddress=function(){return baddress.toBase58Check(bcrypto.hash160(this.getPublicKeyBuffer()),this.getNetwork().pubKeyHash)},ECPair.prototype.getNetwork=function(){return this.network},ECPair.prototype.getPublicKeyBuffer=function(){return this.Q.getEncoded(this.compressed)},ECPair.prototype.sign=function(hash){if(!this.d)throw new Error("Missing private key");return ecdsa.sign(hash,this.d)},ECPair.prototype.toWIF=function(){if(!this.d)throw new Error("Missing private key");return wif.encode(this.network.wif,this.d.toBuffer(32),this.compressed)},ECPair.prototype.verify=function(hash,signature){return ecdsa.verify(hash,signature,this.Q)},module.exports=ECPair},{"./address":92,"./crypto":95,"./ecdsa":96,"./networks":101,"./types":128,bigi:64,ecurve:385,randombytes:820,typeforce:897,wif:913}],98:[function(require,module,exports){(function(Buffer){var bip66=require("bip66"),typeforce=require("typeforce"),types=require("./types"),BigInteger=require("bigi");function ECSignature(r,s){typeforce(types.tuple(types.BigInt,types.BigInt),arguments),this.r=r,this.s=s}ECSignature.parseCompact=function(buffer){typeforce(types.BufferN(65),buffer);var flagByte=buffer.readUInt8(0)-27;if(flagByte!==(7&flagByte))throw new Error("Invalid signature parameter");return{compressed:!!(4&flagByte),i:3&flagByte,signature:ECSignature.fromRSBuffer(buffer.slice(1))}},ECSignature.fromRSBuffer=function(buffer){return typeforce(types.BufferN(64),buffer),new ECSignature(BigInteger.fromBuffer(buffer.slice(0,32)),BigInteger.fromBuffer(buffer.slice(32,64)))},ECSignature.fromDER=function(buffer){var decode=bip66.decode(buffer);return new ECSignature(BigInteger.fromDERInteger(decode.r),BigInteger.fromDERInteger(decode.s))},ECSignature.parseScriptSignature=function(buffer){var hashType=buffer.readUInt8(buffer.length-1),hashTypeMod=-129&hashType;if(hashTypeMod<=0||hashTypeMod>=4)throw new Error("Invalid hashType "+hashType);return{signature:ECSignature.fromDER(buffer.slice(0,-1)),hashType:hashType}},ECSignature.prototype.toCompact=function(i,compressed){compressed&&(i+=4),i+=27;var buffer=Buffer.alloc(65);return buffer.writeUInt8(i,0),this.toRSBuffer(buffer,1),buffer},ECSignature.prototype.toDER=function(){var r=Buffer.from(this.r.toDERInteger()),s=Buffer.from(this.s.toDERInteger());return bip66.encode(r,s)},ECSignature.prototype.toRSBuffer=function(buffer,offset){return buffer=buffer||Buffer.alloc(64),this.r.toBuffer(32).copy(buffer,offset),this.s.toBuffer(32).copy(buffer,offset+32),buffer},ECSignature.prototype.toScriptSignature=function(hashType){var hashTypeMod=-129&hashType;if(hashTypeMod<=0||hashTypeMod>=4)throw new Error("Invalid hashType "+hashType);var hashTypeBuffer=Buffer.alloc(1);return hashTypeBuffer.writeUInt8(hashType,0),Buffer.concat([this.toDER(),hashTypeBuffer])},module.exports=ECSignature}).call(this,require("buffer").Buffer)},{"./types":128,bigi:64,bip66:74,buffer:240,typeforce:897}],99:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,base58check=require("bs58check"),bcrypto=require("./crypto"),createHmac=require("create-hmac"),typeforce=require("typeforce"),types=require("./types"),NETWORKS=require("./networks"),BigInteger=require("bigi"),ECPair=require("./ecpair"),ecurve=require("ecurve"),curve=ecurve.getCurveByName("secp256k1");function HDNode(keyPair,chainCode){if(typeforce(types.tuple("ECPair",types.Buffer256bit),arguments),!keyPair.compressed)throw new TypeError("BIP32 only allows compressed keyPairs");this.keyPair=keyPair,this.chainCode=chainCode,this.depth=0,this.index=0,this.parentFingerprint=0}HDNode.HIGHEST_BIT=2147483648,HDNode.LENGTH=78,HDNode.MASTER_SECRET=Buffer.from("Bitcoin seed","utf8"),HDNode.fromSeedBuffer=function(seed,network){if(typeforce(types.tuple(types.Buffer,types.maybe(types.Network)),arguments),seed.length<16)throw new TypeError("Seed should be at least 128 bits");if(seed.length>64)throw new TypeError("Seed should be at most 512 bits");var I=createHmac("sha512",HDNode.MASTER_SECRET).update(seed).digest(),IL=I.slice(0,32),IR=I.slice(32),pIL=BigInteger.fromBuffer(IL);return new HDNode(new ECPair(pIL,null,{network:network}),IR)},HDNode.fromSeedHex=function(hex,network){return HDNode.fromSeedBuffer(Buffer.from(hex,"hex"),network)},HDNode.fromBase58=function(string,networks){var buffer=base58check.decode(string);if(78!==buffer.length)throw new Error("Invalid buffer length");var network,version=buffer.readUInt32BE(0);if(Array.isArray(networks)){if(!(network=networks.filter(function(x){return version===x.bip32.private||version===x.bip32.public}).pop()))throw new Error("Unknown network version")}else network=networks||NETWORKS.bitcoin;if(version!==network.bip32.private&&version!==network.bip32.public)throw new Error("Invalid network version");var depth=buffer[4],parentFingerprint=buffer.readUInt32BE(5);if(0===depth&&0!==parentFingerprint)throw new Error("Invalid parent fingerprint");var index=buffer.readUInt32BE(9);if(0===depth&&0!==index)throw new Error("Invalid index");var keyPair,chainCode=buffer.slice(13,45);if(version===network.bip32.private){if(0!==buffer.readUInt8(45))throw new Error("Invalid private key");var d=BigInteger.fromBuffer(buffer.slice(46,78));keyPair=new ECPair(d,null,{network:network})}else{var Q=ecurve.Point.decodeFrom(curve,buffer.slice(45,78));curve.validate(Q),keyPair=new ECPair(null,Q,{network:network})}var hd=new HDNode(keyPair,chainCode);return hd.depth=depth,hd.index=index,hd.parentFingerprint=parentFingerprint,hd},HDNode.prototype.getAddress=function(){return this.keyPair.getAddress()},HDNode.prototype.getIdentifier=function(){return bcrypto.hash160(this.keyPair.getPublicKeyBuffer())},HDNode.prototype.getFingerprint=function(){return this.getIdentifier().slice(0,4)},HDNode.prototype.getNetwork=function(){return this.keyPair.getNetwork()},HDNode.prototype.getPublicKeyBuffer=function(){return this.keyPair.getPublicKeyBuffer()},HDNode.prototype.neutered=function(){var neutered=new HDNode(new ECPair(null,this.keyPair.Q,{network:this.keyPair.network}),this.chainCode);return neutered.depth=this.depth,neutered.index=this.index,neutered.parentFingerprint=this.parentFingerprint,neutered},HDNode.prototype.sign=function(hash){return this.keyPair.sign(hash)},HDNode.prototype.verify=function(hash,signature){return this.keyPair.verify(hash,signature)},HDNode.prototype.toBase58=function(__isPrivate){if(void 0!==__isPrivate)throw new TypeError("Unsupported argument in 2.0.0");var network=this.keyPair.network,version=this.isNeutered()?network.bip32.public:network.bip32.private,buffer=Buffer.allocUnsafe(78);return buffer.writeUInt32BE(version,0),buffer.writeUInt8(this.depth,4),buffer.writeUInt32BE(this.parentFingerprint,5),buffer.writeUInt32BE(this.index,9),this.chainCode.copy(buffer,13),this.isNeutered()?this.keyPair.getPublicKeyBuffer().copy(buffer,45):(buffer.writeUInt8(0,45),this.keyPair.d.toBuffer(32).copy(buffer,46)),base58check.encode(buffer)},HDNode.prototype.derive=function(index){typeforce(types.UInt32,index);var isHardened=index>=HDNode.HIGHEST_BIT,data=Buffer.allocUnsafe(37);if(isHardened){if(this.isNeutered())throw new TypeError("Could not derive hardened child key");data[0]=0,this.keyPair.d.toBuffer(32).copy(data,1),data.writeUInt32BE(index,33)}else this.keyPair.getPublicKeyBuffer().copy(data,0),data.writeUInt32BE(index,33);var derivedKeyPair,I=createHmac("sha512",this.chainCode).update(data).digest(),IL=I.slice(0,32),IR=I.slice(32),pIL=BigInteger.fromBuffer(IL);if(pIL.compareTo(curve.n)>=0)return this.derive(index+1);if(this.isNeutered()){var Ki=curve.G.multiply(pIL).add(this.keyPair.Q);if(curve.isInfinity(Ki))return this.derive(index+1);derivedKeyPair=new ECPair(null,Ki,{network:this.keyPair.network})}else{var ki=pIL.add(this.keyPair.d).mod(curve.n);if(0===ki.signum())return this.derive(index+1);derivedKeyPair=new ECPair(ki,null,{network:this.keyPair.network})}var hd=new HDNode(derivedKeyPair,IR);return hd.depth=this.depth+1,hd.index=index,hd.parentFingerprint=this.getFingerprint().readUInt32BE(0),hd},HDNode.prototype.deriveHardened=function(index){return typeforce(types.UInt31,index),this.derive(index+HDNode.HIGHEST_BIT)},HDNode.prototype.isNeutered=function(){return!this.keyPair.d},HDNode.prototype.derivePath=function(path){typeforce(types.BIP32Path,path);var splitPath=path.split("/");if("m"===splitPath[0]){if(this.parentFingerprint)throw new Error("Not a master node");splitPath=splitPath.slice(1)}return splitPath.reduce(function(prevHd,indexStr){var index;return"'"===indexStr.slice(-1)?(index=parseInt(indexStr.slice(0,-1),10),prevHd.deriveHardened(index)):(index=parseInt(indexStr,10),prevHd.derive(index))},this)},module.exports=HDNode},{"./crypto":95,"./ecpair":97,"./networks":101,"./types":128,bigi:64,bs58check:230,"create-hmac":335,ecurve:385,"safe-buffer":839,typeforce:897}],100:[function(require,module,exports){var script=require("./script"),templates=require("./templates");for(var key in templates)script[key]=templates[key];module.exports={bufferutils:require("./bufferutils"),Block:require("./block"),ECPair:require("./ecpair"),ECSignature:require("./ecsignature"),HDNode:require("./hdnode"),Transaction:require("./transaction"),TransactionBuilder:require("./transaction_builder"),address:require("./address"),crypto:require("./crypto"),networks:require("./networks"),opcodes:require("bitcoin-ops"),script:script}},{"./address":92,"./block":93,"./bufferutils":94,"./crypto":95,"./ecpair":97,"./ecsignature":98,"./hdnode":99,"./networks":101,"./script":102,"./templates":104,"./transaction":126,"./transaction_builder":127,"bitcoin-ops":90}],101:[function(require,module,exports){module.exports={bitcoin:{messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},testnet:{messagePrefix:"Bitcoin Signed Message:\n",bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239},litecoin:{messagePrefix:"Litecoin Signed Message:\n",bip32:{public:27108450,private:27106558},pubKeyHash:48,scriptHash:50,wif:176}}},{}],102:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,bip66=require("bip66"),pushdata=require("pushdata-bitcoin"),typeforce=require("typeforce"),types=require("./types"),scriptNumber=require("./script_number"),OPS=require("bitcoin-ops"),REVERSE_OPS=require("bitcoin-ops/map"),OP_INT_BASE=OPS.OP_RESERVED;function isPushOnlyChunk(value){return types.Buffer(value)||function(value){return types.Number(value)&&(value===OPS.OP_0||value>=OPS.OP_1&&value<=OPS.OP_16||value===OPS.OP_1NEGATE)}(value)}function isPushOnly(value){return types.Array(value)&&value.every(isPushOnlyChunk)}function asMinimalOP(buffer){return 0===buffer.length?OPS.OP_0:1===buffer.length?buffer[0]>=1&&buffer[0]<=16?OP_INT_BASE+buffer[0]:129===buffer[0]?OPS.OP_1NEGATE:void 0:void 0}function compile(chunks){if(Buffer.isBuffer(chunks))return chunks;typeforce(types.Array,chunks);var bufferSize=chunks.reduce(function(accum,chunk){return Buffer.isBuffer(chunk)?1===chunk.length&&void 0!==asMinimalOP(chunk)?accum+1:accum+pushdata.encodingLength(chunk.length)+chunk.length:accum+1},0),buffer=Buffer.allocUnsafe(bufferSize),offset=0;if(chunks.forEach(function(chunk){if(Buffer.isBuffer(chunk)){var opcode=asMinimalOP(chunk);if(void 0!==opcode)return buffer.writeUInt8(opcode,offset),void(offset+=1);offset+=pushdata.encode(buffer,chunk.length,offset),chunk.copy(buffer,offset),offset+=chunk.length}else buffer.writeUInt8(chunk,offset),offset+=1}),offset!==buffer.length)throw new Error("Could not decode chunks");return buffer}function decompile(buffer){if(types.Array(buffer))return buffer;typeforce(types.Buffer,buffer);for(var chunks=[],i=0;iOPS.OP_0&&opcode<=OPS.OP_PUSHDATA4){var d=pushdata.decode(buffer,i);if(null===d)return[];if((i+=d.size)+d.number>buffer.length)return[];var data=buffer.slice(i,i+d.number);i+=d.number;var op=asMinimalOP(data);void 0!==op?chunks.push(op):chunks.push(data)}else chunks.push(opcode),i+=1}return chunks}function isDefinedHashType(hashType){var hashTypeMod=-129&hashType;return hashTypeMod>0&&hashTypeMod<4}module.exports={compile:compile,decompile:decompile,fromASM:function(asm){return typeforce(types.String,asm),compile(asm.split(" ").map(function(chunkStr){return void 0!==OPS[chunkStr]?OPS[chunkStr]:(typeforce(types.Hex,chunkStr),Buffer.from(chunkStr,"hex"))}))},toASM:function(chunks){return Buffer.isBuffer(chunks)&&(chunks=decompile(chunks)),chunks.map(function(chunk){if(Buffer.isBuffer(chunk)){var op=asMinimalOP(chunk);if(void 0===op)return chunk.toString("hex");chunk=op}return REVERSE_OPS[chunk]}).join(" ")},toStack:function(chunks){return chunks=decompile(chunks),typeforce(isPushOnly,chunks),chunks.map(function(op){return Buffer.isBuffer(op)?op:op===OPS.OP_0?Buffer.allocUnsafe(0):scriptNumber.encode(op-OP_INT_BASE)})},number:require("./script_number"),isCanonicalPubKey:function(buffer){if(!Buffer.isBuffer(buffer))return!1;if(buffer.length<33)return!1;switch(buffer[0]){case 2:case 3:return 33===buffer.length;case 4:return 65===buffer.length}return!1},isCanonicalSignature:function(buffer){return!!Buffer.isBuffer(buffer)&&!!isDefinedHashType(buffer[buffer.length-1])&&bip66.check(buffer.slice(0,-1))},isPushOnly:isPushOnly,isDefinedHashType:isDefinedHashType}},{"./script_number":103,"./types":128,bip66:74,"bitcoin-ops":90,"bitcoin-ops/map":91,"pushdata-bitcoin":816,"safe-buffer":839,typeforce:897}],103:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer;module.exports={decode:function(buffer,maxLength,minimal){maxLength=maxLength||4,minimal=void 0===minimal||minimal;var length=buffer.length;if(0===length)return 0;if(length>maxLength)throw new TypeError("Script number overflow");if(minimal&&0==(127&buffer[length-1])&&(length<=1||0==(128&buffer[length-2])))throw new Error("Non-minimally encoded script number");if(5===length){var a=buffer.readUInt32LE(0),b=buffer.readUInt8(4);return 128&b?-(4294967296*(-129&b)+a):4294967296*b+a}for(var result=0,i=0;i2147483647?5:i>8388607?4:i>32767?3:i>127?2:i>0?1:0}(value),buffer=Buffer.allocUnsafe(size),negative=number<0,i=0;i>=8;return 128&buffer[size-1]?buffer.writeUInt8(negative?128:0,size-1):negative&&(buffer[size-1]|=128),buffer}}},{"safe-buffer":839}],104:[function(require,module,exports){var decompile=require("../script").decompile,multisig=require("./multisig"),nullData=require("./nulldata"),pubKey=require("./pubkey"),pubKeyHash=require("./pubkeyhash"),scriptHash=require("./scripthash"),witnessPubKeyHash=require("./witnesspubkeyhash"),witnessScriptHash=require("./witnessscripthash"),witnessCommitment=require("./witnesscommitment"),types={MULTISIG:"multisig",NONSTANDARD:"nonstandard",NULLDATA:"nulldata",P2PK:"pubkey",P2PKH:"pubkeyhash",P2SH:"scripthash",P2WPKH:"witnesspubkeyhash",P2WSH:"witnessscripthash",WITNESS_COMMITMENT:"witnesscommitment"};module.exports={classifyInput:function(script,allowIncomplete){var chunks=decompile(script);return pubKeyHash.input.check(chunks)?types.P2PKH:scriptHash.input.check(chunks,allowIncomplete)?types.P2SH:multisig.input.check(chunks,allowIncomplete)?types.MULTISIG:pubKey.input.check(chunks)?types.P2PK:types.NONSTANDARD},classifyOutput:function(script){if(witnessPubKeyHash.output.check(script))return types.P2WPKH;if(witnessScriptHash.output.check(script))return types.P2WSH;if(pubKeyHash.output.check(script))return types.P2PKH;if(scriptHash.output.check(script))return types.P2SH;var chunks=decompile(script);return multisig.output.check(chunks)?types.MULTISIG:pubKey.output.check(chunks)?types.P2PK:witnessCommitment.output.check(chunks)?types.WITNESS_COMMITMENT:nullData.output.check(chunks)?types.NULLDATA:types.NONSTANDARD},classifyWitness:function(script,allowIncomplete){var chunks=decompile(script);return witnessPubKeyHash.input.check(chunks)?types.P2WPKH:witnessScriptHash.input.check(chunks,allowIncomplete)?types.P2WSH:types.NONSTANDARD},multisig:multisig,nullData:nullData,pubKey:pubKey,pubKeyHash:pubKeyHash,scriptHash:scriptHash,witnessPubKeyHash:witnessPubKeyHash,witnessScriptHash:witnessScriptHash,witnessCommitment:witnessCommitment,types:types}},{"../script":102,"./multisig":105,"./nulldata":108,"./pubkey":109,"./pubkeyhash":112,"./scripthash":115,"./witnesscommitment":118,"./witnesspubkeyhash":120,"./witnessscripthash":123}],105:[function(require,module,exports){module.exports={input:require("./input"),output:require("./output")}},{"./input":106,"./output":107}],106:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,bscript=require("../../script"),p2mso=require("./output"),typeforce=require("typeforce"),OPS=require("bitcoin-ops");function partialSignature(value){return value===OPS.OP_0||bscript.isCanonicalSignature(value)}function check(script,allowIncomplete){var chunks=bscript.decompile(script);return!(chunks.length<2)&&(chunks[0]===OPS.OP_0&&(allowIncomplete?chunks.slice(1).every(partialSignature):chunks.slice(1).every(bscript.isCanonicalSignature)))}check.toJSON=function(){return"multisig input"};var EMPTY_BUFFER=Buffer.allocUnsafe(0);function encodeStack(signatures,scriptPubKey){if(typeforce([partialSignature],signatures),scriptPubKey){var scriptData=p2mso.decode(scriptPubKey);if(signatures.lengthscriptData.pubKeys.length)throw new TypeError("Too many signatures provided")}return[].concat(EMPTY_BUFFER,signatures.map(function(sig){return sig===OPS.OP_0?EMPTY_BUFFER:sig}))}function decodeStack(stack,allowIncomplete){return typeforce(typeforce.Array,stack),typeforce(check,stack,allowIncomplete),stack.slice(1)}module.exports={check:check,decode:function(buffer,allowIncomplete){return decodeStack(bscript.decompile(buffer),allowIncomplete)},decodeStack:decodeStack,encode:function(signatures,scriptPubKey){return bscript.compile(encodeStack(signatures,scriptPubKey))},encodeStack:encodeStack}},{"../../script":102,"./output":107,"bitcoin-ops":90,"safe-buffer":839,typeforce:897}],107:[function(require,module,exports){var bscript=require("../../script"),types=require("../../types"),typeforce=require("typeforce"),OPS=require("bitcoin-ops"),OP_INT_BASE=OPS.OP_RESERVED;function check(script,allowIncomplete){var chunks=bscript.decompile(script);if(chunks.length<4)return!1;if(chunks[chunks.length-1]!==OPS.OP_CHECKMULTISIG)return!1;if(!types.Number(chunks[0]))return!1;if(!types.Number(chunks[chunks.length-2]))return!1;var m=chunks[0]-OP_INT_BASE,n=chunks[chunks.length-2]-OP_INT_BASE;return!(m<=0)&&(!(n>16)&&(!(m>n)&&(n===chunks.length-3&&(!!allowIncomplete||chunks.slice(1,-2).every(bscript.isCanonicalPubKey)))))}check.toJSON=function(){return"multi-sig output"},module.exports={check:check,decode:function(buffer,allowIncomplete){var chunks=bscript.decompile(buffer);return typeforce(check,chunks,allowIncomplete),{m:chunks[0]-OP_INT_BASE,pubKeys:chunks.slice(1,-2)}},encode:function(m,pubKeys){typeforce({m:types.Number,pubKeys:[bscript.isCanonicalPubKey]},{m:m,pubKeys:pubKeys});var n=pubKeys.length;if(n1&&buffer[0]===OPS.OP_RETURN}check.toJSON=function(){return"null data output"},module.exports={output:{check:check,decode:function(buffer){return typeforce(check,buffer),buffer.slice(2)},encode:function(data){return typeforce(types.Buffer,data),bscript.compile([OPS.OP_RETURN,data])}}}},{"../script":102,"../types":128,"bitcoin-ops":90,typeforce:897}],109:[function(require,module,exports){arguments[4][105][0].apply(exports,arguments)},{"./input":110,"./output":111,dup:105}],110:[function(require,module,exports){var bscript=require("../../script"),typeforce=require("typeforce");function check(script){var chunks=bscript.decompile(script);return 1===chunks.length&&bscript.isCanonicalSignature(chunks[0])}function encodeStack(signature){return typeforce(bscript.isCanonicalSignature,signature),[signature]}function decodeStack(stack){return typeforce(typeforce.Array,stack),typeforce(check,stack),stack[0]}check.toJSON=function(){return"pubKey input"},module.exports={check:check,decode:function(buffer){return decodeStack(bscript.decompile(buffer))},decodeStack:decodeStack,encode:function(signature){return bscript.compile(encodeStack(signature))},encodeStack:encodeStack}},{"../../script":102,typeforce:897}],111:[function(require,module,exports){var bscript=require("../../script"),typeforce=require("typeforce"),OPS=require("bitcoin-ops");function check(script){var chunks=bscript.decompile(script);return 2===chunks.length&&bscript.isCanonicalPubKey(chunks[0])&&chunks[1]===OPS.OP_CHECKSIG}check.toJSON=function(){return"pubKey output"},module.exports={check:check,decode:function(buffer){var chunks=bscript.decompile(buffer);return typeforce(check,chunks),chunks[0]},encode:function(pubKey){return typeforce(bscript.isCanonicalPubKey,pubKey),bscript.compile([pubKey,OPS.OP_CHECKSIG])}}},{"../../script":102,"bitcoin-ops":90,typeforce:897}],112:[function(require,module,exports){arguments[4][105][0].apply(exports,arguments)},{"./input":113,"./output":114,dup:105}],113:[function(require,module,exports){var bscript=require("../../script"),typeforce=require("typeforce");function check(script){var chunks=bscript.decompile(script);return 2===chunks.length&&bscript.isCanonicalSignature(chunks[0])&&bscript.isCanonicalPubKey(chunks[1])}function encodeStack(signature,pubKey){return typeforce({signature:bscript.isCanonicalSignature,pubKey:bscript.isCanonicalPubKey},{signature:signature,pubKey:pubKey}),[signature,pubKey]}function decodeStack(stack){return typeforce(typeforce.Array,stack),typeforce(check,stack),{signature:stack[0],pubKey:stack[1]}}check.toJSON=function(){return"pubKeyHash input"},module.exports={check:check,decode:function(buffer){return decodeStack(bscript.decompile(buffer))},decodeStack:decodeStack,encode:function(signature,pubKey){return bscript.compile(encodeStack(signature,pubKey))},encodeStack:encodeStack}},{"../../script":102,typeforce:897}],114:[function(require,module,exports){var bscript=require("../../script"),types=require("../../types"),typeforce=require("typeforce"),OPS=require("bitcoin-ops");function check(script){var buffer=bscript.compile(script);return 25===buffer.length&&buffer[0]===OPS.OP_DUP&&buffer[1]===OPS.OP_HASH160&&20===buffer[2]&&buffer[23]===OPS.OP_EQUALVERIFY&&buffer[24]===OPS.OP_CHECKSIG}check.toJSON=function(){return"pubKeyHash output"},module.exports={check:check,decode:function(buffer){return typeforce(check,buffer),buffer.slice(3,23)},encode:function(pubKeyHash){return typeforce(types.Hash160bit,pubKeyHash),bscript.compile([OPS.OP_DUP,OPS.OP_HASH160,pubKeyHash,OPS.OP_EQUALVERIFY,OPS.OP_CHECKSIG])}}},{"../../script":102,"../../types":128,"bitcoin-ops":90,typeforce:897}],115:[function(require,module,exports){arguments[4][105][0].apply(exports,arguments)},{"./input":116,"./output":117,dup:105}],116:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,bscript=require("../../script"),typeforce=require("typeforce"),p2ms=require("../multisig/"),p2pk=require("../pubkey/"),p2pkh=require("../pubkeyhash/"),p2wpkho=require("../witnesspubkeyhash/output"),p2wsho=require("../witnessscripthash/output");function check(script,allowIncomplete){var chunks=bscript.decompile(script);if(chunks.length<1)return!1;var lastChunk=chunks[chunks.length-1];if(!Buffer.isBuffer(lastChunk))return!1;var scriptSigChunks=bscript.decompile(bscript.compile(chunks.slice(0,-1))),redeemScriptChunks=bscript.decompile(lastChunk);return 0!==redeemScriptChunks.length&&(!!bscript.isPushOnly(scriptSigChunks)&&(1===chunks.length?p2wsho.check(redeemScriptChunks)||p2wpkho.check(redeemScriptChunks):!(!p2pkh.input.check(scriptSigChunks)||!p2pkh.output.check(redeemScriptChunks))||(!(!p2ms.input.check(scriptSigChunks,allowIncomplete)||!p2ms.output.check(redeemScriptChunks))||!(!p2pk.input.check(scriptSigChunks)||!p2pk.output.check(redeemScriptChunks)))))}function encodeStack(redeemScriptStack,redeemScript){var serializedScriptPubKey=bscript.compile(redeemScript);return[].concat(redeemScriptStack,serializedScriptPubKey)}function decodeStack(stack){return typeforce(typeforce.Array,stack),typeforce(check,stack),{redeemScriptStack:stack.slice(0,-1),redeemScript:stack[stack.length-1]}}check.toJSON=function(){return"scriptHash input"},module.exports={check:check,decode:function(buffer){var result=decodeStack(bscript.decompile(buffer));return result.redeemScriptSig=bscript.compile(result.redeemScriptStack),delete result.redeemScriptStack,result},decodeStack:decodeStack,encode:function(redeemScriptSig,redeemScript){var redeemScriptStack=bscript.decompile(redeemScriptSig);return bscript.compile(encodeStack(redeemScriptStack,redeemScript))},encodeStack:encodeStack}},{"../../script":102,"../multisig/":105,"../pubkey/":109,"../pubkeyhash/":112,"../witnesspubkeyhash/output":122,"../witnessscripthash/output":125,"safe-buffer":839,typeforce:897}],117:[function(require,module,exports){var bscript=require("../../script"),types=require("../../types"),typeforce=require("typeforce"),OPS=require("bitcoin-ops");function check(script){var buffer=bscript.compile(script);return 23===buffer.length&&buffer[0]===OPS.OP_HASH160&&20===buffer[1]&&buffer[22]===OPS.OP_EQUAL}check.toJSON=function(){return"scriptHash output"},module.exports={check:check,decode:function(buffer){return typeforce(check,buffer),buffer.slice(2,22)},encode:function(scriptHash){return typeforce(types.Hash160bit,scriptHash),bscript.compile([OPS.OP_HASH160,scriptHash,OPS.OP_EQUAL])}}},{"../../script":102,"../../types":128,"bitcoin-ops":90,typeforce:897}],118:[function(require,module,exports){module.exports={output:require("./output")}},{"./output":119}],119:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,bscript=require("../../script"),types=require("../../types"),typeforce=require("typeforce"),OPS=require("bitcoin-ops"),HEADER=Buffer.from("aa21a9ed","hex");function check(script){var buffer=bscript.compile(script);return buffer.length>37&&buffer[0]===OPS.OP_RETURN&&36===buffer[1]&&buffer.slice(2,6).equals(HEADER)}check.toJSON=function(){return"Witness commitment output"},module.exports={check:check,decode:function(buffer){return typeforce(check,buffer),bscript.decompile(buffer)[1].slice(4,36)},encode:function(commitment){typeforce(types.Hash256bit,commitment);var buffer=Buffer.allocUnsafe(36);return HEADER.copy(buffer,0),commitment.copy(buffer,4),bscript.compile([OPS.OP_RETURN,buffer])}}},{"../../script":102,"../../types":128,"bitcoin-ops":90,"safe-buffer":839,typeforce:897}],120:[function(require,module,exports){arguments[4][105][0].apply(exports,arguments)},{"./input":121,"./output":122,dup:105}],121:[function(require,module,exports){var bscript=require("../../script"),typeforce=require("typeforce");function isCompressedCanonicalPubKey(pubKey){return bscript.isCanonicalPubKey(pubKey)&&33===pubKey.length}function check(script){var chunks=bscript.decompile(script);return 2===chunks.length&&bscript.isCanonicalSignature(chunks[0])&&isCompressedCanonicalPubKey(chunks[1])}check.toJSON=function(){return"witnessPubKeyHash input"},module.exports={check:check,decodeStack:function(stack){return typeforce(typeforce.Array,stack),typeforce(check,stack),{signature:stack[0],pubKey:stack[1]}},encodeStack:function(signature,pubKey){return typeforce({signature:bscript.isCanonicalSignature,pubKey:isCompressedCanonicalPubKey},{signature:signature,pubKey:pubKey}),[signature,pubKey]}}},{"../../script":102,typeforce:897}],122:[function(require,module,exports){var bscript=require("../../script"),types=require("../../types"),typeforce=require("typeforce"),OPS=require("bitcoin-ops");function check(script){var buffer=bscript.compile(script);return 22===buffer.length&&buffer[0]===OPS.OP_0&&20===buffer[1]}check.toJSON=function(){return"Witness pubKeyHash output"},module.exports={check:check,decode:function(buffer){return typeforce(check,buffer),buffer.slice(2)},encode:function(pubKeyHash){return typeforce(types.Hash160bit,pubKeyHash),bscript.compile([OPS.OP_0,pubKeyHash])}}},{"../../script":102,"../../types":128,"bitcoin-ops":90,typeforce:897}],123:[function(require,module,exports){arguments[4][105][0].apply(exports,arguments)},{"./input":124,"./output":125,dup:105}],124:[function(require,module,exports){(function(Buffer){var bscript=require("../../script"),types=require("../../types"),typeforce=require("typeforce"),p2ms=require("../multisig/"),p2pk=require("../pubkey/"),p2pkh=require("../pubkeyhash/");function check(chunks,allowIncomplete){if(typeforce(types.Array,chunks),chunks.length<1)return!1;var witnessScript=chunks[chunks.length-1];if(!Buffer.isBuffer(witnessScript))return!1;var witnessScriptChunks=bscript.decompile(witnessScript);if(0===witnessScriptChunks.length)return!1;var witnessRawScriptSig=bscript.compile(chunks.slice(0,-1));return!(!p2pkh.input.check(witnessRawScriptSig)||!p2pkh.output.check(witnessScriptChunks))||(!(!p2ms.input.check(witnessRawScriptSig,allowIncomplete)||!p2ms.output.check(witnessScriptChunks))||!(!p2pk.input.check(witnessRawScriptSig)||!p2pk.output.check(witnessScriptChunks)))}check.toJSON=function(){return"witnessScriptHash input"},module.exports={check:check,decodeStack:function(stack){return typeforce(typeforce.Array,stack),typeforce(check,stack),{witnessData:stack.slice(0,-1),witnessScript:stack[stack.length-1]}},encodeStack:function(witnessData,witnessScript){return typeforce({witnessData:[types.Buffer],witnessScript:types.Buffer},{witnessData:witnessData,witnessScript:witnessScript}),[].concat(witnessData,witnessScript)}}}).call(this,{isBuffer:require("../../../../is-buffer/index.js")})},{"../../../../is-buffer/index.js":478,"../../script":102,"../../types":128,"../multisig/":105,"../pubkey/":109,"../pubkeyhash/":112,typeforce:897}],125:[function(require,module,exports){var bscript=require("../../script"),types=require("../../types"),typeforce=require("typeforce"),OPS=require("bitcoin-ops");function check(script){var buffer=bscript.compile(script);return 34===buffer.length&&buffer[0]===OPS.OP_0&&32===buffer[1]}check.toJSON=function(){return"Witness scriptHash output"},module.exports={check:check,decode:function(buffer){return typeforce(check,buffer),buffer.slice(2)},encode:function(scriptHash){return typeforce(types.Hash256bit,scriptHash),bscript.compile([OPS.OP_0,scriptHash])}}},{"../../script":102,"../../types":128,"bitcoin-ops":90,typeforce:897}],126:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,bcrypto=require("./crypto"),bscript=require("./script"),bufferutils=require("./bufferutils"),opcodes=require("bitcoin-ops"),typeforce=require("typeforce"),types=require("./types"),varuint=require("varuint-bitcoin");function varSliceSize(someScript){var length=someScript.length;return varuint.encodingLength(length)+length}function Transaction(){this.version=1,this.locktime=0,this.ins=[],this.outs=[]}Transaction.DEFAULT_SEQUENCE=4294967295,Transaction.SIGHASH_ALL=1,Transaction.SIGHASH_NONE=2,Transaction.SIGHASH_SINGLE=3,Transaction.SIGHASH_ANYONECANPAY=128,Transaction.ADVANCED_TRANSACTION_MARKER=0,Transaction.ADVANCED_TRANSACTION_FLAG=1;var EMPTY_SCRIPT=Buffer.allocUnsafe(0),EMPTY_WITNESS=[],ZERO=Buffer.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),ONE=Buffer.from("0000000000000000000000000000000000000000000000000000000000000001","hex"),VALUE_UINT64_MAX=Buffer.from("ffffffffffffffff","hex"),BLANK_OUTPUT={script:EMPTY_SCRIPT,valueBuffer:VALUE_UINT64_MAX};Transaction.fromBuffer=function(buffer,__noStrict){var offset=0;function readSlice(n){return offset+=n,buffer.slice(offset-n,offset)}function readUInt32(){var i=buffer.readUInt32LE(offset);return offset+=4,i}function readUInt64(){var i=bufferutils.readUInt64LE(buffer,offset);return offset+=8,i}function readVarInt(){var vi=varuint.decode(buffer,offset);return offset+=varuint.decode.bytes,vi}function readVarSlice(){return readSlice(readVarInt())}function readVector(){for(var count=readVarInt(),vector=[],i=0;i=this.ins.length)return ONE;var ourScript=bscript.compile(bscript.decompile(prevOutScript).filter(function(x){return x!==opcodes.OP_CODESEPARATOR})),txTmp=this.clone();if((31&hashType)===Transaction.SIGHASH_NONE)txTmp.outs=[],txTmp.ins.forEach(function(input,i){i!==inIndex&&(input.sequence=0)});else if((31&hashType)===Transaction.SIGHASH_SINGLE){if(inIndex>=this.outs.length)return ONE;txTmp.outs.length=inIndex+1;for(var i=0;i0)return signatures=signatures.map(function(signature){return signature||ops.OP_0}),allowIncomplete||(signatures=signatures.filter(function(x){return x!==ops.OP_0})),btemplates.multisig.input.encodeStack(signatures)}if(!allowIncomplete)throw new Error("Not enough signatures provided");return[]}function TransactionBuilder(network,maximumFeeRate){this.prevTxMap={},this.network=network||networks.bitcoin,this.maximumFeeRate=maximumFeeRate||2500,this.inputs=[],this.tx=new Transaction}function canSign(input){return void 0!==input.prevOutScript&&void 0!==input.signScript&&void 0!==input.pubKeys&&void 0!==input.signatures&&input.signatures.length===input.pubKeys.length&&input.pubKeys.length>0&&(!1===input.witness||!0===input.witness&&void 0!==input.value)}function signatureHashType(buffer){return buffer.readUInt8(buffer.length-1)}TransactionBuilder.prototype.setLockTime=function(locktime){if(typeforce(types.UInt32,locktime),this.inputs.some(function(input){return!!input.signatures&&input.signatures.some(function(s){return s})}))throw new Error("No, this would invalidate signatures");this.tx.locktime=locktime},TransactionBuilder.prototype.setVersion=function(version){typeforce(types.UInt32,version),this.tx.version=version},TransactionBuilder.fromTransaction=function(transaction,network){var txb=new TransactionBuilder(network);return txb.setVersion(transaction.version),txb.setLockTime(transaction.locktime),transaction.outs.forEach(function(txOut){txb.addOutput(txOut.script,txOut.value)}),transaction.ins.forEach(function(txIn){txb.__addInputUnsafe(txIn.hash,txIn.index,{sequence:txIn.sequence,script:txIn.script,witness:txIn.witness})}),txb.inputs.forEach(function(input,i){!function(input,transaction,vin){if(input.redeemScriptType===scriptTypes.MULTISIG&&input.redeemScript&&input.pubKeys.length!==input.signatures.length){var unmatched=input.signatures.concat();input.signatures=input.pubKeys.map(function(pubKey){var match,keyPair=ECPair.fromPublicKeyBuffer(pubKey);return unmatched.some(function(signature,i){if(!signature)return!1;var parsed=ECSignature.parseScriptSignature(signature),hash=transaction.hashForSignature(vin,input.redeemScript,parsed.hashType);return!!keyPair.verify(hash,parsed.signature)&&(unmatched[i]=void 0,match=signature,!0)}),match})}}(input,transaction,i)}),txb},TransactionBuilder.prototype.addInput=function(txHash,vout,sequence,prevOutScript){if(!this.__canModifyInputs())throw new Error("No, this would invalidate signatures");var value;if("string"==typeof txHash)txHash=Buffer.from(txHash,"hex").reverse();else if(txHash instanceof Transaction){var txOut=txHash.outs[vout];prevOutScript=txOut.script,value=txOut.value,txHash=txHash.getHash()}return this.__addInputUnsafe(txHash,vout,{sequence:sequence,prevOutScript:prevOutScript,value:value})},TransactionBuilder.prototype.__addInputUnsafe=function(txHash,vout,options){if(Transaction.isCoinbaseHash(txHash))throw new Error("coinbase inputs not supported");var prevTxOut=txHash.toString("hex")+":"+vout;if(void 0!==this.prevTxMap[prevTxOut])throw new Error("Duplicate TxOut: "+prevTxOut);var input={};if(void 0!==options.script&&(input=expandInput(options.script,options.witness||[])),void 0!==options.value&&(input.value=options.value),!input.prevOutScript&&options.prevOutScript){var prevOutType;if(!input.pubKeys&&!input.signatures){var expanded=expandOutput(options.prevOutScript);expanded.pubKeys&&(input.pubKeys=expanded.pubKeys,input.signatures=expanded.signatures),prevOutType=expanded.scriptType}input.prevOutScript=options.prevOutScript,input.prevOutType=prevOutType||btemplates.classifyOutput(options.prevOutScript)}var vin=this.tx.addInput(txHash,vout,options.sequence,options.scriptSig);return this.inputs[vin]=input,this.prevTxMap[prevTxOut]=vin,vin},TransactionBuilder.prototype.addOutput=function(scriptPubKey,value){if(!this.__canModifyOutputs())throw new Error("No, this would invalidate signatures");return"string"==typeof scriptPubKey&&(scriptPubKey=baddress.toOutputScript(scriptPubKey,this.network)),this.tx.addOutput(scriptPubKey,value)},TransactionBuilder.prototype.build=function(){return this.__build(!1)},TransactionBuilder.prototype.buildIncomplete=function(){return this.__build(!0)},TransactionBuilder.prototype.__build=function(allowIncomplete){if(!allowIncomplete){if(!this.tx.ins.length)throw new Error("Transaction has no inputs");if(!this.tx.outs.length)throw new Error("Transaction has no outputs")}var tx=this.tx.clone();if(this.inputs.forEach(function(input,i){if(!(input.witnessScriptType||input.redeemScriptType||input.prevOutType)&&!allowIncomplete)throw new Error("Transaction is not complete");var result=function(input,allowIncomplete){var scriptType=input.prevOutType,sig=[],witness=[];supportedType(scriptType)&&(sig=buildStack(scriptType,input.signatures,input.pubKeys,allowIncomplete));var p2sh=!1;if(scriptType===btemplates.types.P2SH){if(!allowIncomplete&&!supportedP2SHType(input.redeemScriptType))throw new Error("Impossible to sign this type");supportedType(input.redeemScriptType)&&(sig=buildStack(input.redeemScriptType,input.signatures,input.pubKeys,allowIncomplete)),input.redeemScriptType&&(p2sh=!0,scriptType=input.redeemScriptType)}switch(scriptType){case btemplates.types.P2WPKH:witness=buildStack(btemplates.types.P2PKH,input.signatures,input.pubKeys,allowIncomplete);break;case btemplates.types.P2WSH:if(!allowIncomplete&&!supportedType(input.witnessScriptType))throw new Error("Impossible to sign this type");supportedType(input.witnessScriptType)&&((witness=buildStack(input.witnessScriptType,input.signatures,input.pubKeys,allowIncomplete)).push(input.witnessScript),scriptType=input.witnessScriptType)}return p2sh&&sig.push(input.redeemScript),{type:scriptType,script:bscript.compile(sig),witness:witness}}(input,allowIncomplete);if(!allowIncomplete&&!supportedType(result.type)&&result.type!==btemplates.types.P2WPKH)throw new Error(result.type+" not supported");tx.setInputScript(i,result.script),tx.setWitness(i,result.witness)}),!allowIncomplete&&this.__overMaximumFees(tx.virtualSize()))throw new Error("Transaction has absurd fees");return tx},TransactionBuilder.prototype.sign=function(vin,keyPair,redeemScript,hashType,witnessValue,witnessScript){if(keyPair.network&&keyPair.network!==this.network)throw new TypeError("Inconsistent network");if(!this.inputs[vin])throw new Error("No input at index: "+vin);hashType=hashType||Transaction.SIGHASH_ALL;var input=this.inputs[vin];if(void 0!==input.redeemScript&&redeemScript&&!input.redeemScript.equals(redeemScript))throw new Error("Inconsistent redeemScript");var signatureHash,kpPubKey=keyPair.publicKey||keyPair.getPublicKeyBuffer();if(!canSign(input)){if(void 0!==witnessValue){if(void 0!==input.value&&input.value!==witnessValue)throw new Error("Input didn't match witnessValue");typeforce(types.Satoshi,witnessValue),input.value=witnessValue}if(canSign(input)||prepareInput(input,kpPubKey,redeemScript,0,witnessScript),!canSign(input))throw Error(input.prevOutType+" not supported")}if(signatureHash=input.witness?this.tx.hashForWitnessV0(vin,input.signScript,input.value,hashType):this.tx.hashForSignature(vin,input.signScript,hashType),!input.pubKeys.some(function(pubKey,i){if(!kpPubKey.equals(pubKey))return!1;if(input.signatures[i])throw new Error("Signature already exists");if(33!==kpPubKey.length&&input.signType===scriptTypes.P2WPKH)throw new Error("BIP143 rejects uncompressed public keys in P2WPKH or P2WSH");var signature=keyPair.sign(signatureHash);return Buffer.isBuffer(signature)&&(signature=ECSignature.fromRSBuffer(signature)),input.signatures[i]=signature.toScriptSignature(hashType),!0}))throw new Error("Key pair cannot sign for this input")},TransactionBuilder.prototype.__canModifyInputs=function(){return this.inputs.every(function(input){return void 0===input.signatures||input.signatures.every(function(signature){return!signature||signatureHashType(signature)&Transaction.SIGHASH_ANYONECANPAY})})},TransactionBuilder.prototype.__canModifyOutputs=function(){var nInputs=this.tx.ins.length,nOutputs=this.tx.outs.length;return this.inputs.every(function(input){return void 0===input.signatures||input.signatures.every(function(signature){if(!signature)return!0;var hashTypeMod=31&signatureHashType(signature);return hashTypeMod===Transaction.SIGHASH_NONE||(hashTypeMod===Transaction.SIGHASH_SINGLE?nInputs<=nOutputs:void 0)})})},TransactionBuilder.prototype.__overMaximumFees=function(bytes){return(this.inputs.reduce(function(a,x){return a+(x.value>>>0)},0)-this.tx.outs.reduce(function(a,x){return a+x.value},0))/bytes>this.maximumFeeRate},module.exports=TransactionBuilder},{"./address":92,"./crypto":95,"./ecpair":97,"./ecsignature":98,"./networks":101,"./script":102,"./templates":104,"./transaction":126,"./types":128,"bitcoin-ops":90,"safe-buffer":839,typeforce:897}],128:[function(require,module,exports){var typeforce=require("typeforce"),UINT31_MAX=Math.pow(2,31)-1;function BIP32Path(value){return typeforce.String(value)&&value.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}BIP32Path.toJSON=function(){return"BIP32 derivation path"};var SATOSHI_MAX=21e14;var BigInt=typeforce.quacksLike("BigInteger"),ECPoint=typeforce.quacksLike("Point"),ECSignature=typeforce.compile({r:BigInt,s:BigInt}),Network=typeforce.compile({messagePrefix:typeforce.oneOf(typeforce.Buffer,typeforce.String),bip32:{public:typeforce.UInt32,private:typeforce.UInt32},pubKeyHash:typeforce.oneOf(typeforce.UInt8,typeforce.UInt16),scriptHash:typeforce.oneOf(typeforce.UInt8,typeforce.UInt16),wif:typeforce.UInt8}),types={BigInt:BigInt,BIP32Path:BIP32Path,Buffer256bit:typeforce.BufferN(32),ECPoint:ECPoint,ECSignature:ECSignature,Hash160bit:typeforce.BufferN(20),Hash256bit:typeforce.BufferN(32),Network:Network,Satoshi:function(value){return typeforce.UInt53(value)&&value<=SATOSHI_MAX},UInt31:function(value){return typeforce.UInt32(value)&&value<=UINT31_MAX}};for(var typeName in typeforce)types[typeName]=typeforce[typeName];module.exports=types},{typeforce:897}],129:[function(require,module,exports){(function(global,Buffer){"use strict";var bitcore=module.exports;bitcore.version="v"+require("./package.json").version,bitcore.versionGuard=function(version){if(void 0!==version){throw new Error("More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.")}},bitcore.versionGuard(global._bitcore),global._bitcore=bitcore.version,bitcore.crypto={},bitcore.crypto.BN=require("./lib/crypto/bn"),bitcore.crypto.ECDSA=require("./lib/crypto/ecdsa"),bitcore.crypto.Hash=require("./lib/crypto/hash"),bitcore.crypto.Random=require("./lib/crypto/random"),bitcore.crypto.Point=require("./lib/crypto/point"),bitcore.crypto.Signature=require("./lib/crypto/signature"),bitcore.encoding={},bitcore.encoding.Base58=require("./lib/encoding/base58"),bitcore.encoding.Base58Check=require("./lib/encoding/base58check"),bitcore.encoding.BufferReader=require("./lib/encoding/bufferreader"),bitcore.encoding.BufferWriter=require("./lib/encoding/bufferwriter"),bitcore.encoding.Varint=require("./lib/encoding/varint"),bitcore.util={},bitcore.util.buffer=require("./lib/util/buffer"),bitcore.util.js=require("./lib/util/js"),bitcore.util.preconditions=require("./lib/util/preconditions"),bitcore.errors=require("./lib/errors"),bitcore.Address=require("./lib/address"),bitcore.Block=require("./lib/block"),bitcore.MerkleBlock=require("./lib/block/merkleblock"),bitcore.BlockHeader=require("./lib/block/blockheader"),bitcore.HDPrivateKey=require("./lib/hdprivatekey.js"),bitcore.HDPublicKey=require("./lib/hdpublickey.js"),bitcore.Networks=require("./lib/networks"),bitcore.Opcode=require("./lib/opcode"),bitcore.PrivateKey=require("./lib/privatekey"),bitcore.PublicKey=require("./lib/publickey"),bitcore.Script=require("./lib/script"),bitcore.Transaction=require("./lib/transaction"),bitcore.URI=require("./lib/uri"),bitcore.Unit=require("./lib/unit"),bitcore.deps={},bitcore.deps.bnjs=require("bn.js"),bitcore.deps.bs58=require("bs58"),bitcore.deps.Buffer=Buffer,bitcore.deps.elliptic=require("elliptic"),bitcore.deps._=require("lodash"),bitcore.Transaction.sighash=require("./lib/transaction/sighash")}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},require("buffer").Buffer)},{"./lib/address":130,"./lib/block":133,"./lib/block/blockheader":132,"./lib/block/merkleblock":134,"./lib/crypto/bn":135,"./lib/crypto/ecdsa":136,"./lib/crypto/hash":137,"./lib/crypto/point":138,"./lib/crypto/random":139,"./lib/crypto/signature":140,"./lib/encoding/base58":141,"./lib/encoding/base58check":142,"./lib/encoding/bufferreader":143,"./lib/encoding/bufferwriter":144,"./lib/encoding/varint":145,"./lib/errors":146,"./lib/hdprivatekey.js":148,"./lib/hdpublickey.js":149,"./lib/networks":150,"./lib/opcode":151,"./lib/privatekey":152,"./lib/publickey":153,"./lib/script":154,"./lib/transaction":157,"./lib/transaction/sighash":165,"./lib/unit":170,"./lib/uri":171,"./lib/util/buffer":172,"./lib/util/js":173,"./lib/util/preconditions":174,"./package.json":193,"bn.js":198,bs58:228,buffer:240,elliptic:175,lodash:192}],130:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),$=require("./util/preconditions"),errors=require("./errors"),Base58Check=require("./encoding/base58check"),Networks=require("./networks"),Hash=require("./crypto/hash"),JSUtil=require("./util/js"),PublicKey=require("./publickey");function Address(data,network,type){if(!(this instanceof Address))return new Address(data,network,type);if(_.isArray(data)&&_.isNumber(network))return Address.createMultisig(data,network,type);if(data instanceof Address)return data;if($.checkArgument(data,"First argument is required, please include address data.","guide/address.html"),network&&!Networks.get(network))throw new TypeError('Second argument must be "livenet" or "testnet".');if(type&&type!==Address.PayToPublicKeyHash&&type!==Address.PayToScriptHash)throw new TypeError('Third argument must be "pubkeyhash" or "scripthash".');var info=this._classifyArguments(data,network,type);return info.network=info.network||Networks.get(network)||Networks.defaultNetwork,info.type=info.type||type||Address.PayToPublicKeyHash,JSUtil.defineImmutable(this,{hashBuffer:info.hashBuffer,network:info.network,type:info.type}),this}Address.prototype._classifyArguments=function(data,network,type){if((data instanceof Buffer||data instanceof Uint8Array)&&20===data.length)return Address._transformHash(data);if((data instanceof Buffer||data instanceof Uint8Array)&&21===data.length)return Address._transformBuffer(data,network,type);if(data instanceof PublicKey)return Address._transformPublicKey(data);if(data instanceof Script)return Address._transformScript(data,network);if("string"==typeof data)return Address._transformString(data,network,type);if(_.isObject(data))return Address._transformObject(data);throw new TypeError("First argument is an unrecognized data format.")},Address.PayToPublicKeyHash="pubkeyhash",Address.PayToScriptHash="scripthash",Address._transformHash=function(hash){var info={};if(!(hash instanceof Buffer||hash instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(20!==hash.length)throw new TypeError("Address hashbuffers must be exactly 20 bytes.");return info.hashBuffer=hash,info},Address._transformObject=function(data){return $.checkArgument(data.hash||data.hashBuffer,"Must provide a `hash` or `hashBuffer` property"),$.checkArgument(data.type,"Must provide a `type` property"),{hashBuffer:data.hash?Buffer.from(data.hash,"hex"):data.hashBuffer,network:Networks.get(data.network)||Networks.defaultNetwork,type:data.type}},Address._classifyFromVersion=function(buffer){var version={},pubkeyhashNetwork=Networks.get(buffer[0],"pubkeyhash"),scripthashNetwork=Networks.get(buffer[0],"scripthash");return pubkeyhashNetwork?(version.network=pubkeyhashNetwork,version.type=Address.PayToPublicKeyHash):scripthashNetwork&&(version.network=scripthashNetwork,version.type=Address.PayToScriptHash),version},Address._transformBuffer=function(buffer,network,type){var info={};if(!(buffer instanceof Buffer||buffer instanceof Uint8Array))throw new TypeError("Address supplied is not a buffer.");if(21!==buffer.length)throw new TypeError("Address buffers must be exactly 21 bytes.");var networkObj=Networks.get(network),bufferVersion=Address._classifyFromVersion(buffer);if(network&&!networkObj)throw new TypeError("Unknown network");if(!bufferVersion.network||networkObj&&networkObj!==bufferVersion.network)throw new TypeError("Address has mismatched network type.");if(!bufferVersion.type||type&&type!==bufferVersion.type)throw new TypeError("Address has mismatched type.");return info.hashBuffer=buffer.slice(1),info.network=bufferVersion.network,info.type=bufferVersion.type,info},Address._transformPublicKey=function(pubkey){var info={};if(!(pubkey instanceof PublicKey))throw new TypeError("Address must be an instance of PublicKey.");return info.hashBuffer=Hash.sha256ripemd160(pubkey.toBuffer()),info.type=Address.PayToPublicKeyHash,info},Address._transformScript=function(script,network){$.checkArgument(script instanceof Script,"script must be a Script instance");var info=script.getAddressInfo(network);if(!info)throw new errors.Script.CantDeriveAddress(script);return info},Address.createMultisig=function(publicKeys,threshold,network,nestedWitness){network=network||publicKeys[0].network||Networks.defaultNetwork;var redeemScript=Script.buildMultisigOut(publicKeys,threshold);return nestedWitness?Address.payingTo(Script.buildWitnessMultisigOutFromScript(redeemScript),network):Address.payingTo(redeemScript,network)},Address._transformString=function(data,network,type){if("string"!=typeof data)throw new TypeError("data parameter supplied is not a string.");data=data.trim();var addressBuffer=Base58Check.decode(data);return Address._transformBuffer(addressBuffer,network,type)},Address.fromPublicKey=function(data,network){var info=Address._transformPublicKey(data);return network=network||Networks.defaultNetwork,new Address(info.hashBuffer,network,info.type)},Address.fromPublicKeyHash=function(hash,network){return new Address(Address._transformHash(hash).hashBuffer,network,Address.PayToPublicKeyHash)},Address.fromScriptHash=function(hash,network){return $.checkArgument(hash,"hash parameter is required"),new Address(Address._transformHash(hash).hashBuffer,network,Address.PayToScriptHash)},Address.payingTo=function(script,network){return $.checkArgument(script,"script is required"),$.checkArgument(script instanceof Script,"script must be instance of Script"),Address.fromScriptHash(Hash.sha256ripemd160(script.toBuffer()),network)},Address.fromScript=function(script,network){$.checkArgument(script instanceof Script,"script must be a Script instance");var info=Address._transformScript(script,network);return new Address(info.hashBuffer,network,info.type)},Address.fromBuffer=function(buffer,network,type){var info=Address._transformBuffer(buffer,network,type);return new Address(info.hashBuffer,info.network,info.type)},Address.fromString=function(str,network,type){var info=Address._transformString(str,network,type);return new Address(info.hashBuffer,info.network,info.type)},Address.fromObject=function(obj){return $.checkState(JSUtil.isHexa(obj.hash),'Unexpected hash property, "'+obj.hash+'", expected to be hex.'),new Address(Buffer.from(obj.hash,"hex"),obj.network,obj.type)},Address.getValidationError=function(data,network,type){var error;try{new Address(data,network,type)}catch(e){error=e}return error},Address.isValid=function(data,network,type){return!Address.getValidationError(data,network,type)},Address.prototype.isPayToPublicKeyHash=function(){return this.type===Address.PayToPublicKeyHash},Address.prototype.isPayToScriptHash=function(){return this.type===Address.PayToScriptHash},Address.prototype.toBuffer=function(){var version=Buffer.from([this.network[this.type]]);return Buffer.concat([version,this.hashBuffer])},Address.prototype.toObject=Address.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}},Address.prototype.toString=function(){return Base58Check.encode(this.toBuffer())},Address.prototype.inspect=function(){return""},module.exports=Address;var Script=require("./script")}).call(this,require("buffer").Buffer)},{"./crypto/hash":137,"./encoding/base58check":142,"./errors":146,"./networks":150,"./publickey":153,"./script":154,"./util/js":173,"./util/preconditions":174,buffer:240,lodash:192}],131:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),BlockHeader=require("./blockheader"),BN=require("../crypto/bn"),BufferUtil=require("../util/buffer"),BufferReader=require("../encoding/bufferreader"),BufferWriter=require("../encoding/bufferwriter"),Hash=require("../crypto/hash"),Transaction=require("../transaction"),$=require("../util/preconditions");function Block(arg){return this instanceof Block?(_.extend(this,Block._from(arg)),this):new Block(arg)}Block.MAX_BLOCK_SIZE=1e6,Block._from=function(arg){var info={};if(BufferUtil.isBuffer(arg))info=Block._fromBufferReader(BufferReader(arg));else{if(!_.isObject(arg))throw new TypeError("Unrecognized argument for Block");info=Block._fromObject(arg)}return info},Block._fromObject=function(data){var transactions=[];return data.transactions.forEach(function(tx){tx instanceof Transaction?transactions.push(tx):transactions.push(Transaction().fromObject(tx))}),{header:BlockHeader.fromObject(data.header),transactions:transactions}},Block.fromObject=function(obj){return new Block(Block._fromObject(obj))},Block._fromBufferReader=function(br){var info={};$.checkState(!br.finished(),"No block data received"),info.header=BlockHeader.fromBufferReader(br);var transactions=br.readVarintNum();info.transactions=[];for(var i=0;i1;size=Math.floor((size+1)/2)){for(var i=0;i"},Block.Values={START_OF_BLOCK:8,NULL_HASH:Buffer.from("0000000000000000000000000000000000000000000000000000000000000000","hex")},module.exports=Block}).call(this,require("buffer").Buffer)},{"../crypto/bn":135,"../crypto/hash":137,"../encoding/bufferreader":143,"../encoding/bufferwriter":144,"../transaction":157,"../util/buffer":172,"../util/preconditions":174,"./blockheader":132,buffer:240,lodash:192}],132:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),BN=require("../crypto/bn"),BufferUtil=require("../util/buffer"),BufferReader=require("../encoding/bufferreader"),BufferWriter=require("../encoding/bufferwriter"),Hash=require("../crypto/hash"),$=(require("../util/js"),require("../util/preconditions")),BlockHeader=function BlockHeader(arg){if(!(this instanceof BlockHeader))return new BlockHeader(arg);var info=BlockHeader._from(arg);return this.version=info.version,this.prevHash=info.prevHash,this.merkleRoot=info.merkleRoot,this.time=info.time,this.timestamp=info.time,this.bits=info.bits,this.nonce=info.nonce,info.hash&&$.checkState(this.hash===info.hash,"Argument object hash property does not match block hash."),this};BlockHeader._from=function(arg){var info={};if(BufferUtil.isBuffer(arg))info=BlockHeader._fromBufferReader(BufferReader(arg));else{if(!_.isObject(arg))throw new TypeError("Unrecognized argument for BlockHeader");info=BlockHeader._fromObject(arg)}return info},BlockHeader._fromObject=function(data){$.checkArgument(data,"data is required");var prevHash=data.prevHash,merkleRoot=data.merkleRoot;return _.isString(data.prevHash)&&(prevHash=BufferUtil.reverse(Buffer.from(data.prevHash,"hex"))),_.isString(data.merkleRoot)&&(merkleRoot=BufferUtil.reverse(Buffer.from(data.merkleRoot,"hex"))),{hash:data.hash,version:data.version,prevHash:prevHash,merkleRoot:merkleRoot,time:data.time,timestamp:data.time,bits:data.bits,nonce:data.nonce}},BlockHeader.fromObject=function(obj){var info=BlockHeader._fromObject(obj);return new BlockHeader(info)},BlockHeader.fromRawBlock=function(data){BufferUtil.isBuffer(data)||(data=Buffer.from(data,"binary"));var br=BufferReader(data);br.pos=BlockHeader.Constants.START_OF_HEADER;var info=BlockHeader._fromBufferReader(br);return new BlockHeader(info)},BlockHeader.fromBuffer=function(buf){var info=BlockHeader._fromBufferReader(BufferReader(buf));return new BlockHeader(info)},BlockHeader.fromString=function(str){var buf=Buffer.from(str,"hex");return BlockHeader.fromBuffer(buf)},BlockHeader._fromBufferReader=function(br){var info={};return info.version=br.readInt32LE(),info.prevHash=br.read(32),info.merkleRoot=br.read(32),info.time=br.readUInt32LE(),info.bits=br.readUInt32LE(),info.nonce=br.readUInt32LE(),info},BlockHeader.fromBufferReader=function(br){var info=BlockHeader._fromBufferReader(br);return new BlockHeader(info)},BlockHeader.prototype.toObject=BlockHeader.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:BufferUtil.reverse(this.prevHash).toString("hex"),merkleRoot:BufferUtil.reverse(this.merkleRoot).toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}},BlockHeader.prototype.toBuffer=function(){return this.toBufferWriter().concat()},BlockHeader.prototype.toString=function(){return this.toBuffer().toString("hex")},BlockHeader.prototype.toBufferWriter=function(bw){return bw||(bw=new BufferWriter),bw.writeInt32LE(this.version),bw.write(this.prevHash),bw.write(this.merkleRoot),bw.writeUInt32LE(this.time),bw.writeUInt32LE(this.bits),bw.writeUInt32LE(this.nonce),bw},BlockHeader.prototype.getTargetDifficulty=function(bits){bits=bits||this.bits;for(var target=new BN(16777215&bits),mov=8*((bits>>>24)-3);mov-- >0;)target=target.mul(new BN(2));return target},BlockHeader.prototype.getDifficulty=function(){var difficulty1TargetBN=this.getTargetDifficulty(486604799).mul(new BN(Math.pow(10,8))),currentTargetBN=this.getTargetDifficulty(),difficultyString=difficulty1TargetBN.div(currentTargetBN).toString(10),decimalPos=difficultyString.length-8;return difficultyString=difficultyString.slice(0,decimalPos)+"."+difficultyString.slice(decimalPos),parseFloat(difficultyString)},BlockHeader.prototype._getHash=function(){var buf=this.toBuffer();return Hash.sha256sha256(buf)};var idProperty={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=BufferReader(this._getHash()).readReverse().toString("hex")),this._id},set:_.noop};Object.defineProperty(BlockHeader.prototype,"id",idProperty),Object.defineProperty(BlockHeader.prototype,"hash",idProperty),BlockHeader.prototype.validTimestamp=function(){var currentTime=Math.round((new Date).getTime()/1e3);return!(this.time>currentTime+BlockHeader.Constants.MAX_TIME_OFFSET)},BlockHeader.prototype.validProofOfWork=function(){var pow=new BN(this.id,"hex"),target=this.getTargetDifficulty();return!(pow.cmp(target)>0)},BlockHeader.prototype.inspect=function(){return""},BlockHeader.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:7200,LARGEST_HASH:new BN("10000000000000000000000000000000000000000000000000000000000000000","hex")},module.exports=BlockHeader}).call(this,require("buffer").Buffer)},{"../crypto/bn":135,"../crypto/hash":137,"../encoding/bufferreader":143,"../encoding/bufferwriter":144,"../util/buffer":172,"../util/js":173,"../util/preconditions":174,buffer:240,lodash:192}],133:[function(require,module,exports){module.exports=require("./block"),module.exports.BlockHeader=require("./blockheader"),module.exports.MerkleBlock=require("./merkleblock")},{"./block":131,"./blockheader":132,"./merkleblock":134}],134:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),BlockHeader=require("./blockheader"),BufferUtil=require("../util/buffer"),BufferReader=require("../encoding/bufferreader"),BufferWriter=require("../encoding/bufferwriter"),Hash=require("../crypto/hash"),Transaction=(require("../util/js"),require("../transaction")),errors=require("../errors"),$=require("../util/preconditions");function MerkleBlock(arg){if(!(this instanceof MerkleBlock))return new MerkleBlock(arg);var info={};if(BufferUtil.isBuffer(arg))info=MerkleBlock._fromBufferReader(BufferReader(arg));else{if(!_.isObject(arg))throw new TypeError("Unrecognized argument for MerkleBlock");info={header:arg.header instanceof BlockHeader?arg.header:BlockHeader.fromObject(arg.header),numTransactions:arg.numTransactions,hashes:arg.hashes,flags:arg.flags}}return _.extend(this,info),this._flagBitsUsed=0,this._hashesUsed=0,this}MerkleBlock.fromBuffer=function(buf){return MerkleBlock.fromBufferReader(BufferReader(buf))},MerkleBlock.fromBufferReader=function(br){return new MerkleBlock(MerkleBlock._fromBufferReader(br))},MerkleBlock.prototype.toBuffer=function(){return this.toBufferWriter().concat()},MerkleBlock.prototype.toBufferWriter=function(bw){bw||(bw=new BufferWriter),bw.write(this.header.toBuffer()),bw.writeUInt32LE(this.numTransactions),bw.writeVarintNum(this.hashes.length);for(var i=0;ithis.numTransactions)return!1;if(8*this.flags.lengththis.numTransactions)throw new errors.MerkleBlock.InvalidMerkleTree;if(8*this.flags.length8*this.flags.length)return null;var isParentOfMatch=this.flags[opts.flagBitsUsed>>3]>>>(7&opts.flagBitsUsed++)&1;if(0!==depth&&isParentOfMatch){var left=this._traverseMerkleTree(depth-1,2*pos,opts),right=left;return 2*pos+1=this.hashes.length)return null;var hash=this.hashes[opts.hashesUsed++];return 0===depth&&isParentOfMatch&&opts.txs.push(hash),Buffer.from(hash,"hex")},MerkleBlock.prototype._calcTreeWidth=function(height){return this.numTransactions+(1<>height},MerkleBlock.prototype._calcTreeHeight=function(){for(var height=0;this._calcTreeWidth(height)>1;)height++;return height},MerkleBlock.prototype.hasTransaction=function(tx){$.checkArgument(!_.isUndefined(tx),"tx cannot be undefined"),$.checkArgument(tx instanceof Transaction||"string"==typeof tx,'Invalid tx given, tx must be a "string" or "Transaction"');var hash=tx;tx instanceof Transaction&&(hash=BufferUtil.reverse(Buffer.from(tx.id,"hex")).toString("hex"));var txs=[],height=this._calcTreeHeight();return this._traverseMerkleTree(height,0,{txs:txs}),-1!==txs.indexOf(hash)},MerkleBlock._fromBufferReader=function(br){$.checkState(!br.finished(),"No merkleblock data received");var info={};info.header=BlockHeader.fromBufferReader(br),info.numTransactions=br.readUInt32LE();var numHashes=br.readVarintNum();info.hashes=[];for(var i=0;iopts.size?buf=BN.trim(buf,natlen):natlen0&&0==(127&buf[buf.length-1])&&(buf.length<=1||0==(128&buf[buf.length-2])))throw new Error("non-minimally encoded script number");return BN.fromSM(buf,{endian:"little"})},BN.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})},BN.trim=function(buf,natlen){return buf.slice(natlen-buf.length,buf.length)},BN.pad=function(buf,natlen,size){for(var rbuf=Buffer.alloc(size),i=0;i>1,n=Point.getN(),G=Point.getG(),x=isSecondKey?r.add(n):r,R=Point.fromX(isYOdd,x);if(!R.mul(n).isInfinity())throw new Error("nR is not a valid curve point");var eNeg=e.neg().umod(n),rInv=r.invm(n),Q=R.mul(s).add(G.mul(eNeg)).mul(rInv);return PublicKey.fromPoint(Q,this.sig.compressed)},ECDSA.prototype.sigError=function(){if(!BufferUtil.isBuffer(this.hashbuf)||32!==this.hashbuf.length)return"hashbuf must be a 32 byte buffer";var r=this.sig.r,s=this.sig.s;if(!(r.gt(BN.Zero)&&r.lt(Point.getN())&&s.gt(BN.Zero)&&s.lt(Point.getN())))return"r and s not in range";var e=BN.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),n=Point.getN(),sinv=s.invm(n),u1=sinv.mul(e).umod(n),u2=sinv.mul(r).umod(n),p=Point.getG().mulAdd(u1,this.pubkey.point,u2);return p.isInfinity()?"p is infinity":0!==p.getX().umod(n).cmp(r)&&"Invalid signature"},ECDSA.toLowS=function(s){return s.gt(BN.fromBuffer(Buffer.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(s=Point.getN().sub(s)),s},ECDSA.prototype._findSignature=function(d,e){var k,r,s,N=Point.getN(),G=Point.getG(),badrs=0;do{(!this.k||badrs>0)&&this.deterministicK(badrs),badrs++,k=this.k,r=G.mul(k).x.umod(N),s=k.invm(N).mul(e.add(d.mul(r))).umod(N)}while(r.cmp(BN.Zero)<=0||s.cmp(BN.Zero)<=0);return{s:s=ECDSA.toLowS(s),r:r}},ECDSA.prototype.sign=function(){var hashbuf=this.hashbuf,privkey=this.privkey,d=privkey.bn;$.checkState(hashbuf&&privkey&&d,new Error("invalid parameters")),$.checkState(BufferUtil.isBuffer(hashbuf)&&32===hashbuf.length,new Error("hashbuf must be a 32 byte buffer"));var e=BN.fromBuffer(hashbuf,this.endian?{endian:this.endian}:void 0),obj=this._findSignature(d,e);return obj.compressed=this.pubkey.compressed,this.sig=new Signature(obj),this},ECDSA.prototype.signRandomK=function(){return this.randomK(),this.sign()},ECDSA.prototype.toString=function(){var obj={};return this.hashbuf&&(obj.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(obj.privkey=this.privkey.toString()),this.pubkey&&(obj.pubkey=this.pubkey.toString()),this.sig&&(obj.sig=this.sig.toString()),this.k&&(obj.k=this.k.toString()),JSON.stringify(obj)},ECDSA.prototype.verify=function(){return this.sigError()?this.verified=!1:this.verified=!0,this},ECDSA.sign=function(hashbuf,privkey,endian){return ECDSA().set({hashbuf:hashbuf,endian:endian,privkey:privkey}).sign().sig},ECDSA.verify=function(hashbuf,sig,pubkey,endian){return ECDSA().set({hashbuf:hashbuf,endian:endian,sig:sig,pubkey:pubkey}).verify().verified},module.exports=ECDSA}).call(this,require("buffer").Buffer)},{"../publickey":153,"../util/buffer":172,"../util/preconditions":174,"./bn":135,"./hash":137,"./point":138,"./random":139,"./signature":140,buffer:240,lodash:192}],137:[function(require,module,exports){(function(Buffer){"use strict";var crypto=require("crypto"),BufferUtil=require("../util/buffer"),$=require("../util/preconditions"),Hash=module.exports;Hash.sha1=function(buf){return $.checkArgument(BufferUtil.isBuffer(buf)),crypto.createHash("sha1").update(buf).digest()},Hash.sha1.blocksize=512,Hash.sha256=function(buf){return $.checkArgument(BufferUtil.isBuffer(buf)),crypto.createHash("sha256").update(buf).digest()},Hash.sha256.blocksize=512,Hash.sha256sha256=function(buf){return $.checkArgument(BufferUtil.isBuffer(buf)),Hash.sha256(Hash.sha256(buf))},Hash.ripemd160=function(buf){return $.checkArgument(BufferUtil.isBuffer(buf)),crypto.createHash("ripemd160").update(buf).digest()},Hash.sha256ripemd160=function(buf){return $.checkArgument(BufferUtil.isBuffer(buf)),Hash.ripemd160(Hash.sha256(buf))},Hash.sha512=function(buf){return $.checkArgument(BufferUtil.isBuffer(buf)),crypto.createHash("sha512").update(buf).digest()},Hash.sha512.blocksize=1024,Hash.hmac=function(hashf,data,key){$.checkArgument(BufferUtil.isBuffer(data)),$.checkArgument(BufferUtil.isBuffer(key)),$.checkArgument(hashf.blocksize);var blocksize=hashf.blocksize/8;if(key.length>blocksize)key=hashf(key);else if(key>>=8)}return b},module.exports=Random}).call(this,require("_process"),require("buffer").Buffer)},{_process:774,buffer:240,crypto:337}],140:[function(require,module,exports){(function(Buffer){"use strict";var BN=require("./bn"),_=require("lodash"),$=require("../util/preconditions"),BufferUtil=require("../util/buffer"),JSUtil=require("../util/js"),Signature=function Signature(r,s){if(!(this instanceof Signature))return new Signature(r,s);if(r instanceof BN)this.set({r:r,s:s});else if(r){var obj=r;this.set(obj)}};Signature.prototype.set=function(obj){return this.r=obj.r||this.r||void 0,this.s=obj.s||this.s||void 0,this.i=void 0!==obj.i?obj.i:this.i,this.compressed=void 0!==obj.compressed?obj.compressed:this.compressed,this.nhashtype=obj.nhashtype||this.nhashtype||void 0,this},Signature.fromCompact=function(buf){$.checkArgument(BufferUtil.isBuffer(buf),"Argument is expected to be a Buffer");var sig=new Signature,compressed=!0,i=buf.slice(0,1)[0]-27-4;i<0&&(compressed=!1,i+=4);var b2=buf.slice(1,33),b3=buf.slice(33,65);return $.checkArgument(0===i||1===i||2===i||3===i,new Error("i must be 0, 1, 2, or 3")),$.checkArgument(32===b2.length,new Error("r must be 32 bytes")),$.checkArgument(32===b3.length,new Error("s must be 32 bytes")),sig.compressed=compressed,sig.i=i,sig.r=BN.fromBuffer(b2),sig.s=BN.fromBuffer(b3),sig},Signature.fromDER=Signature.fromBuffer=function(buf,strict){var obj=Signature.parseDER(buf,strict),sig=new Signature;return sig.r=obj.r,sig.s=obj.s,sig},Signature.fromTxFormat=function(buf){var nhashtype=buf.readUInt8(buf.length-1),derbuf=buf.slice(0,buf.length-1),sig=new Signature.fromDER(derbuf,!1);return sig.nhashtype=nhashtype,sig},Signature.fromString=function(str){var buf=Buffer.from(str,"hex");return Signature.fromDER(buf)},Signature.parseDER=function(buf,strict){$.checkArgument(BufferUtil.isBuffer(buf),new Error("DER formatted signature should be a buffer")),_.isUndefined(strict)&&(strict=!0);var header=buf[0];$.checkArgument(48===header,new Error("Header byte should be 0x30"));var length=buf[1],buflength=buf.slice(2).length;$.checkArgument(!strict||length===buflength,new Error("Length byte should length of what follows")),length=length73)return!1;if(48!==buf[0])return!1;if(buf[1]!==buf.length-3)return!1;var nLenR=buf[3];if(5+nLenR>=buf.length)return!1;var nLenS=buf[5+nLenR];if(nLenR+nLenS+7!==buf.length)return!1;var R=buf.slice(4);if(2!==buf[2])return!1;if(0===nLenR)return!1;if(128&R[0])return!1;if(nLenR>1&&0===R[0]&&!(128&R[1]))return!1;var S=buf.slice(6+nLenR);return 2===buf[6+nLenR-2]&&(0!==nLenS&&(!(128&S[0])&&!(nLenS>1&&0===S[0]&&!(128&S[1]))))},Signature.prototype.hasLowS=function(){return!this.s.lt(new BN(1))&&!this.s.gt(new BN("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex"))},Signature.prototype.hasDefinedHashtype=function(){if(!JSUtil.isNaturalNumber(this.nhashtype))return!1;var temp=this.nhashtype&~Signature.SIGHASH_ANYONECANPAY;return!(tempSignature.SIGHASH_SINGLE)},Signature.prototype.toTxFormat=function(){var derbuf=this.toDER(),buf=Buffer.alloc(1);return buf.writeUInt8(this.nhashtype,0),Buffer.concat([derbuf,buf])},Signature.SIGHASH_ALL=1,Signature.SIGHASH_NONE=2,Signature.SIGHASH_SINGLE=3,Signature.SIGHASH_ANYONECANPAY=128,module.exports=Signature}).call(this,require("buffer").Buffer)},{"../util/buffer":172,"../util/js":173,"../util/preconditions":174,"./bn":135,buffer:240,lodash:192}],141:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),bs58=require("bs58"),buffer=require("buffer"),ALPHABET="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),Base58=function Base58(obj){if(!(this instanceof Base58))return new Base58(obj);if(Buffer.isBuffer(obj)){var buf=obj;this.fromBuffer(buf)}else if("string"==typeof obj){var str=obj;this.fromString(str)}else obj&&this.set(obj)};Base58.validCharacters=function(chars){return buffer.Buffer.isBuffer(chars)&&(chars=chars.toString()),_.every(_.map(chars,function(char){return _.includes(ALPHABET,char)}))},Base58.prototype.set=function(obj){return this.buf=obj.buf||this.buf||void 0,this},Base58.encode=function(buf){if(!buffer.Buffer.isBuffer(buf))throw new Error("Input should be a buffer");return bs58.encode(buf)},Base58.decode=function(str){if("string"!=typeof str)throw new Error("Input should be a string");return Buffer.from(bs58.decode(str))},Base58.prototype.fromBuffer=function(buf){return this.buf=buf,this},Base58.prototype.fromString=function(str){var buf=Base58.decode(str);return this.buf=buf,this},Base58.prototype.toBuffer=function(){return this.buf},Base58.prototype.toString=function(){return Base58.encode(this.buf)},module.exports=Base58}).call(this,require("buffer").Buffer)},{bs58:228,buffer:240,lodash:192}],142:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),Base58=require("./base58"),buffer=require("buffer"),sha256sha256=require("../crypto/hash").sha256sha256,Base58Check=function Base58Check(obj){if(!(this instanceof Base58Check))return new Base58Check(obj);if(Buffer.isBuffer(obj)){var buf=obj;this.fromBuffer(buf)}else if("string"==typeof obj){var str=obj;this.fromString(str)}else obj&&this.set(obj)};Base58Check.prototype.set=function(obj){return this.buf=obj.buf||this.buf||void 0,this},Base58Check.validChecksum=function(data,checksum){return _.isString(data)&&(data=new buffer.Buffer(Base58.decode(data))),_.isString(checksum)&&(checksum=new buffer.Buffer(Base58.decode(checksum))),checksum||(checksum=data.slice(-4),data=data.slice(0,-4)),Base58Check.checksum(data).toString("hex")===checksum.toString("hex")},Base58Check.decode=function(s){if("string"!=typeof s)throw new Error("Input must be a string");var buf=Buffer.from(Base58.decode(s));if(buf.length<4)throw new Error("Input string too short");var data=buf.slice(0,-4),csum=buf.slice(-4),hash4=sha256sha256(data).slice(0,4);if(csum.toString("hex")!==hash4.toString("hex"))throw new Error("Checksum mismatch");return data},Base58Check.checksum=function(buffer){return sha256sha256(buffer).slice(0,4)},Base58Check.encode=function(buf){if(!Buffer.isBuffer(buf))throw new Error("Input must be a buffer");var checkedBuf=Buffer.alloc(buf.length+4),hash=Base58Check.checksum(buf);return buf.copy(checkedBuf),hash.copy(checkedBuf,buf.length),Base58.encode(checkedBuf)},Base58Check.prototype.fromBuffer=function(buf){return this.buf=buf,this},Base58Check.prototype.fromString=function(str){var buf=Base58Check.decode(str);return this.buf=buf,this},Base58Check.prototype.toBuffer=function(){return this.buf},Base58Check.prototype.toString=function(){return Base58Check.encode(this.buf)},module.exports=Base58Check}).call(this,require("buffer").Buffer)},{"../crypto/hash":137,"./base58":141,buffer:240,lodash:192}],143:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),$=require("../util/preconditions"),BufferUtil=require("../util/buffer"),BN=require("../crypto/bn"),BufferReader=function BufferReader(buf){if(!(this instanceof BufferReader))return new BufferReader(buf);if(!_.isUndefined(buf))if(Buffer.isBuffer(buf))this.set({buf:buf});else if(_.isString(buf))this.set({buf:Buffer.from(buf,"hex")});else{if(!_.isObject(buf))throw new TypeError("Unrecognized argument for BufferReader");var obj=buf;this.set(obj)}};BufferReader.prototype.set=function(obj){return this.buf=obj.buf||this.buf||void 0,this.pos=obj.pos||this.pos||0,this},BufferReader.prototype.eof=function(){return this.pos>=this.buf.length},BufferReader.prototype.finished=BufferReader.prototype.eof,BufferReader.prototype.read=function(len){$.checkArgument(!_.isUndefined(len),"Must specify a length");var buf=this.buf.slice(this.pos,this.pos+len);return this.pos=this.pos+len,buf},BufferReader.prototype.readAll=function(){var buf=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,buf},BufferReader.prototype.readUInt8=function(){var val=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,val},BufferReader.prototype.readUInt16BE=function(){var val=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,val},BufferReader.prototype.readUInt16LE=function(){var val=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,val},BufferReader.prototype.readUInt32BE=function(){var val=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,val},BufferReader.prototype.readUInt32LE=function(){var val=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,val},BufferReader.prototype.readInt32LE=function(){var val=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,val},BufferReader.prototype.readUInt64BEBN=function(){var buf=this.buf.slice(this.pos,this.pos+8),bn=BN.fromBuffer(buf);return this.pos=this.pos+8,bn},BufferReader.prototype.readUInt64LEBN=function(){var bn,second=this.buf.readUInt32LE(this.pos),combined=4294967296*this.buf.readUInt32LE(this.pos+4)+second;if(combined<=9007199254740991)bn=new BN(combined);else{var data=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);bn=new BN(data,10,"le")}return this.pos=this.pos+8,bn},BufferReader.prototype.readVarintNum=function(){var first=this.readUInt8();switch(first){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var n=this.readUInt64LEBN().toNumber();if(n<=Math.pow(2,53))return n;throw new Error("number too large to retain precision - use readVarintBN");default:return first}},BufferReader.prototype.readVarLengthBuffer=function(){var len=this.readVarintNum(),buf=this.read(len);return $.checkState(buf.length===len,"Invalid length while reading varlength buffer. Expected to read: "+len+" and read "+buf.length),buf},BufferReader.prototype.readVarintBuf=function(){switch(this.buf.readUInt8(this.pos)){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}},BufferReader.prototype.readVarintBN=function(){var first=this.readUInt8();switch(first){case 253:return new BN(this.readUInt16LE());case 254:return new BN(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new BN(first)}},BufferReader.prototype.reverse=function(){for(var buf=Buffer.alloc(this.buf.length),i=0;i=0&&arg=HDPrivateKey.Hardened||hardened,index64)throw new hdErrors.InvalidEntropyArgument.TooMuchEntropy(hexa);var hash=Hash.sha512hmac(hexa,new buffer.Buffer("Bitcoin seed"));return new HDPrivateKey({network:Network.get(network)||Network.defaultNetwork,depth:0,parentFingerPrint:0,childIndex:0,privateKey:hash.slice(0,32),chainCode:hash.slice(32,64)})},HDPrivateKey.prototype._calcHDPublicKey=function(){if(!this._hdPublicKey){var HDPublicKey=require("./hdpublickey");this._hdPublicKey=new HDPublicKey(this)}},HDPrivateKey.prototype._buildFromBuffers=function(arg){HDPrivateKey._validateBufferArguments(arg),JSUtil.defineImmutable(this,{_buffers:arg});var sequence=[arg.version,arg.depth,arg.parentFingerPrint,arg.childIndex,arg.chainCode,BufferUtil.emptyBuffer(1),arg.privateKey],concat=buffer.Buffer.concat(sequence);if(arg.checksum&&arg.checksum.length){if(arg.checksum.toString()!==Base58Check.checksum(concat).toString())throw new errors.InvalidB58Checksum(concat)}else arg.checksum=Base58Check.checksum(concat);var xprivkey,network=Network.get(BufferUtil.integerFromBuffer(arg.version));xprivkey=Base58Check.encode(buffer.Buffer.concat(sequence)),arg.xprivkey=Buffer.from(xprivkey);var privateKey=new PrivateKey(BN.fromBuffer(arg.privateKey),network),publicKey=privateKey.toPublicKey(),size=HDPrivateKey.ParentFingerPrintSize,fingerPrint=Hash.sha256ripemd160(publicKey.toBuffer()).slice(0,size);return JSUtil.defineImmutable(this,{xprivkey:xprivkey,network:network,depth:BufferUtil.integerFromSingleByteBuffer(arg.depth),privateKey:privateKey,publicKey:publicKey,fingerPrint:fingerPrint}),this._hdPublicKey=null,Object.defineProperty(this,"hdPublicKey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey}}),Object.defineProperty(this,"xpubkey",{configurable:!1,enumerable:!0,get:function(){return this._calcHDPublicKey(),this._hdPublicKey.xpubkey}}),this},HDPrivateKey._validateBufferArguments=function(arg){var checkBuffer=function(name,size){var buff=arg[name];assert(BufferUtil.isBuffer(buff),name+" argument is not a buffer"),assert(buff.length===size,name+" has not the expected size: found "+buff.length+", expected "+size)};checkBuffer("version",HDPrivateKey.VersionSize),checkBuffer("depth",HDPrivateKey.DepthSize),checkBuffer("parentFingerPrint",HDPrivateKey.ParentFingerPrintSize),checkBuffer("childIndex",HDPrivateKey.ChildIndexSize),checkBuffer("chainCode",HDPrivateKey.ChainCodeSize),checkBuffer("privateKey",HDPrivateKey.PrivateKeySize),arg.checksum&&arg.checksum.length&&checkBuffer("checksum",HDPrivateKey.CheckSumSize)},HDPrivateKey.prototype.toString=function(){return this.xprivkey},HDPrivateKey.prototype.inspect=function(){return""},HDPrivateKey.prototype.toObject=HDPrivateKey.prototype.toJSON=function(){return{network:Network.get(BufferUtil.integerFromBuffer(this._buffers.version),"xprivkey").name,depth:BufferUtil.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:BufferUtil.integerFromBuffer(this.fingerPrint),parentFingerPrint:BufferUtil.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:BufferUtil.integerFromBuffer(this._buffers.childIndex),chainCode:BufferUtil.bufferToHex(this._buffers.chainCode),privateKey:this.privateKey.toBuffer().toString("hex"),checksum:BufferUtil.integerFromBuffer(this._buffers.checksum),xprivkey:this.xprivkey}},HDPrivateKey.fromBuffer=function(arg){return new HDPrivateKey(arg.toString())},HDPrivateKey.prototype.toBuffer=function(){return BufferUtil.copy(this._buffers.xprivkey)},HDPrivateKey.DefaultDepth=0,HDPrivateKey.DefaultFingerprint=0,HDPrivateKey.DefaultChildIndex=0,HDPrivateKey.Hardened=2147483648,HDPrivateKey.MaxIndex=2*HDPrivateKey.Hardened,HDPrivateKey.RootElementAlias=["m","M","m'","M'"],HDPrivateKey.VersionSize=4,HDPrivateKey.DepthSize=1,HDPrivateKey.ParentFingerPrintSize=4,HDPrivateKey.ChildIndexSize=4,HDPrivateKey.ChainCodeSize=32,HDPrivateKey.PrivateKeySize=32,HDPrivateKey.CheckSumSize=4,HDPrivateKey.DataLength=78,HDPrivateKey.SerializedByteSize=82,HDPrivateKey.VersionStart=0,HDPrivateKey.VersionEnd=HDPrivateKey.VersionStart+HDPrivateKey.VersionSize,HDPrivateKey.DepthStart=HDPrivateKey.VersionEnd,HDPrivateKey.DepthEnd=HDPrivateKey.DepthStart+HDPrivateKey.DepthSize,HDPrivateKey.ParentFingerPrintStart=HDPrivateKey.DepthEnd,HDPrivateKey.ParentFingerPrintEnd=HDPrivateKey.ParentFingerPrintStart+HDPrivateKey.ParentFingerPrintSize,HDPrivateKey.ChildIndexStart=HDPrivateKey.ParentFingerPrintEnd,HDPrivateKey.ChildIndexEnd=HDPrivateKey.ChildIndexStart+HDPrivateKey.ChildIndexSize,HDPrivateKey.ChainCodeStart=HDPrivateKey.ChildIndexEnd,HDPrivateKey.ChainCodeEnd=HDPrivateKey.ChainCodeStart+HDPrivateKey.ChainCodeSize,HDPrivateKey.PrivateKeyStart=HDPrivateKey.ChainCodeEnd+1,HDPrivateKey.PrivateKeyEnd=HDPrivateKey.PrivateKeyStart+HDPrivateKey.PrivateKeySize,HDPrivateKey.ChecksumStart=HDPrivateKey.PrivateKeyEnd,HDPrivateKey.ChecksumEnd=HDPrivateKey.ChecksumStart+HDPrivateKey.CheckSumSize,assert(HDPrivateKey.ChecksumEnd===HDPrivateKey.SerializedByteSize),module.exports=HDPrivateKey}).call(this,require("buffer").Buffer)},{"./crypto/bn":135,"./crypto/hash":137,"./crypto/point":138,"./crypto/random":139,"./encoding/base58":141,"./encoding/base58check":142,"./errors":146,"./hdpublickey":149,"./networks":150,"./privatekey":152,"./util/buffer":172,"./util/js":173,"./util/preconditions":174,assert:26,buffer:240,lodash:192}],149:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),$=require("./util/preconditions"),BN=require("./crypto/bn"),Base58=require("./encoding/base58"),Base58Check=require("./encoding/base58check"),Hash=require("./crypto/hash"),HDPrivateKey=require("./hdprivatekey"),Network=require("./networks"),Point=require("./crypto/point"),PublicKey=require("./publickey"),bitcoreErrors=require("./errors"),errors=bitcoreErrors,hdErrors=bitcoreErrors.HDPublicKey,assert=require("assert"),JSUtil=require("./util/js"),BufferUtil=require("./util/buffer");function HDPublicKey(arg){if(arg instanceof HDPublicKey)return arg;if(!(this instanceof HDPublicKey))return new HDPublicKey(arg);if(arg){if(_.isString(arg)||BufferUtil.isBuffer(arg)){var error=HDPublicKey.getSerializedError(arg);if(error){if(BufferUtil.isBuffer(arg)&&!HDPublicKey.getSerializedError(arg.toString()))return this._buildFromSerialized(arg.toString());if(error instanceof hdErrors.ArgumentIsPrivateExtended)return new HDPrivateKey(arg).hdPublicKey;throw error}return this._buildFromSerialized(arg)}if(_.isObject(arg))return arg instanceof HDPrivateKey?this._buildFromPrivate(arg):this._buildFromObject(arg);throw new hdErrors.UnrecognizedArgument(arg)}throw new hdErrors.MustSupplyArgument}HDPublicKey.isValidPath=function(arg){if(_.isString(arg)){var indexes=HDPrivateKey._getDerivationIndexes(arg);return null!==indexes&&_.every(indexes,HDPublicKey.isValidPath)}return!!_.isNumber(arg)&&(arg>=0&&arg=HDPublicKey.Hardened||hardened)throw new hdErrors.InvalidIndexCantDeriveHardened;if(index<0)throw new hdErrors.InvalidPath(index);var publicKey,indexBuffer=BufferUtil.integerAsBuffer(index),data=BufferUtil.concat([this.publicKey.toBuffer(),indexBuffer]),hash=Hash.sha512hmac(data,this._buffers.chainCode),leftPart=BN.fromBuffer(hash.slice(0,32),{size:32}),chainCode=hash.slice(32,64);try{publicKey=PublicKey.fromPoint(Point.getG().mul(leftPart).add(this.publicKey.point))}catch(e){return this._deriveWithNumber(index+1)}return new HDPublicKey({network:this.network,depth:this.depth+1,parentFingerPrint:this.fingerPrint,childIndex:index,chainCode:chainCode,publicKey:publicKey})},HDPublicKey.prototype._deriveFromString=function(path){if(_.includes(path,"'"))throw new hdErrors.InvalidIndexCantDeriveHardened;if(!HDPublicKey.isValidPath(path))throw new hdErrors.InvalidPath(path);return HDPrivateKey._getDerivationIndexes(path).reduce(function(prev,index){return prev._deriveWithNumber(index)},this)},HDPublicKey.isValidSerialized=function(data,network){return _.isNull(HDPublicKey.getSerializedError(data,network))},HDPublicKey.getSerializedError=function(data,network){if(!_.isString(data)&&!BufferUtil.isBuffer(data))return new hdErrors.UnrecognizedArgument("expected buffer or string");if(!Base58.validCharacters(data))return new errors.InvalidB58Char("(unknown)",data);try{data=Base58Check.decode(data)}catch(e){return new errors.InvalidB58Checksum(data)}if(data.length!==HDPublicKey.DataSize)return new hdErrors.InvalidLength(data);if(!_.isUndefined(network)){var error=HDPublicKey._validateNetwork(data,network);if(error)return error}var version=BufferUtil.integerFromBuffer(data.slice(0,4));return version===Network.livenet.xprivkey||version===Network.testnet.xprivkey?new hdErrors.ArgumentIsPrivateExtended:null},HDPublicKey._validateNetwork=function(data,networkArg){var network=Network.get(networkArg);if(!network)return new errors.InvalidNetworkArgument(networkArg);var version=data.slice(HDPublicKey.VersionStart,HDPublicKey.VersionEnd);return BufferUtil.integerFromBuffer(version)!==network.xpubkey?new errors.InvalidNetwork(version):null},HDPublicKey.prototype._buildFromPrivate=function(arg){var args=_.clone(arg._buffers),point=Point.getG().mul(BN.fromBuffer(args.privateKey));return args.publicKey=Point.pointToCompressed(point),args.version=BufferUtil.integerAsBuffer(Network.get(BufferUtil.integerFromBuffer(args.version)).xpubkey),args.privateKey=void 0,args.checksum=void 0,args.xprivkey=void 0,this._buildFromBuffers(args)},HDPublicKey.prototype._buildFromObject=function(arg){var buffers={version:arg.network?BufferUtil.integerAsBuffer(Network.get(arg.network).xpubkey):arg.version,depth:_.isNumber(arg.depth)?BufferUtil.integerAsSingleByteBuffer(arg.depth):arg.depth,parentFingerPrint:_.isNumber(arg.parentFingerPrint)?BufferUtil.integerAsBuffer(arg.parentFingerPrint):arg.parentFingerPrint,childIndex:_.isNumber(arg.childIndex)?BufferUtil.integerAsBuffer(arg.childIndex):arg.childIndex,chainCode:_.isString(arg.chainCode)?BufferUtil.hexToBuffer(arg.chainCode):arg.chainCode,publicKey:_.isString(arg.publicKey)?BufferUtil.hexToBuffer(arg.publicKey):BufferUtil.isBuffer(arg.publicKey)?arg.publicKey:arg.publicKey.toBuffer(),checksum:_.isNumber(arg.checksum)?BufferUtil.integerAsBuffer(arg.checksum):arg.checksum};return this._buildFromBuffers(buffers)},HDPublicKey.prototype._buildFromSerialized=function(arg){var decoded=Base58Check.decode(arg),buffers={version:decoded.slice(HDPublicKey.VersionStart,HDPublicKey.VersionEnd),depth:decoded.slice(HDPublicKey.DepthStart,HDPublicKey.DepthEnd),parentFingerPrint:decoded.slice(HDPublicKey.ParentFingerPrintStart,HDPublicKey.ParentFingerPrintEnd),childIndex:decoded.slice(HDPublicKey.ChildIndexStart,HDPublicKey.ChildIndexEnd),chainCode:decoded.slice(HDPublicKey.ChainCodeStart,HDPublicKey.ChainCodeEnd),publicKey:decoded.slice(HDPublicKey.PublicKeyStart,HDPublicKey.PublicKeyEnd),checksum:decoded.slice(HDPublicKey.ChecksumStart,HDPublicKey.ChecksumEnd),xpubkey:arg};return this._buildFromBuffers(buffers)},HDPublicKey.prototype._buildFromBuffers=function(arg){HDPublicKey._validateBufferArguments(arg),JSUtil.defineImmutable(this,{_buffers:arg});var sequence=[arg.version,arg.depth,arg.parentFingerPrint,arg.childIndex,arg.chainCode,arg.publicKey],concat=BufferUtil.concat(sequence),checksum=Base58Check.checksum(concat);if(arg.checksum&&arg.checksum.length){if(arg.checksum.toString("hex")!==checksum.toString("hex"))throw new errors.InvalidB58Checksum(concat,checksum)}else arg.checksum=checksum;var xpubkey,network=Network.get(BufferUtil.integerFromBuffer(arg.version));xpubkey=Base58Check.encode(BufferUtil.concat(sequence)),arg.xpubkey=Buffer.from(xpubkey);var publicKey=new PublicKey(arg.publicKey,{network:network}),size=HDPublicKey.ParentFingerPrintSize,fingerPrint=Hash.sha256ripemd160(publicKey.toBuffer()).slice(0,size);return JSUtil.defineImmutable(this,{xpubkey:xpubkey,network:network,depth:BufferUtil.integerFromSingleByteBuffer(arg.depth),publicKey:publicKey,fingerPrint:fingerPrint}),this},HDPublicKey._validateBufferArguments=function(arg){var checkBuffer=function(name,size){var buff=arg[name];assert(BufferUtil.isBuffer(buff),name+" argument is not a buffer, it's "+typeof buff),assert(buff.length===size,name+" has not the expected size: found "+buff.length+", expected "+size)};checkBuffer("version",HDPublicKey.VersionSize),checkBuffer("depth",HDPublicKey.DepthSize),checkBuffer("parentFingerPrint",HDPublicKey.ParentFingerPrintSize),checkBuffer("childIndex",HDPublicKey.ChildIndexSize),checkBuffer("chainCode",HDPublicKey.ChainCodeSize),checkBuffer("publicKey",HDPublicKey.PublicKeySize),arg.checksum&&arg.checksum.length&&checkBuffer("checksum",HDPublicKey.CheckSumSize)},HDPublicKey.fromString=function(arg){return $.checkArgument(_.isString(arg),"No valid string was provided"),new HDPublicKey(arg)},HDPublicKey.fromObject=function(arg){return $.checkArgument(_.isObject(arg),"No valid argument was provided"),new HDPublicKey(arg)},HDPublicKey.prototype.toString=function(){return this.xpubkey},HDPublicKey.prototype.inspect=function(){return""},HDPublicKey.prototype.toObject=HDPublicKey.prototype.toJSON=function(){return{network:Network.get(BufferUtil.integerFromBuffer(this._buffers.version)).name,depth:BufferUtil.integerFromSingleByteBuffer(this._buffers.depth),fingerPrint:BufferUtil.integerFromBuffer(this.fingerPrint),parentFingerPrint:BufferUtil.integerFromBuffer(this._buffers.parentFingerPrint),childIndex:BufferUtil.integerFromBuffer(this._buffers.childIndex),chainCode:BufferUtil.bufferToHex(this._buffers.chainCode),publicKey:this.publicKey.toString(),checksum:BufferUtil.integerFromBuffer(this._buffers.checksum),xpubkey:this.xpubkey}},HDPublicKey.fromBuffer=function(arg){return new HDPublicKey(arg)},HDPublicKey.prototype.toBuffer=function(){return BufferUtil.copy(this._buffers.xpubkey)},HDPublicKey.Hardened=2147483648,HDPublicKey.RootElementAlias=["m","M"],HDPublicKey.VersionSize=4,HDPublicKey.DepthSize=1,HDPublicKey.ParentFingerPrintSize=4,HDPublicKey.ChildIndexSize=4,HDPublicKey.ChainCodeSize=32,HDPublicKey.PublicKeySize=33,HDPublicKey.CheckSumSize=4,HDPublicKey.DataSize=78,HDPublicKey.SerializedByteSize=82,HDPublicKey.VersionStart=0,HDPublicKey.VersionEnd=HDPublicKey.VersionStart+HDPublicKey.VersionSize,HDPublicKey.DepthStart=HDPublicKey.VersionEnd,HDPublicKey.DepthEnd=HDPublicKey.DepthStart+HDPublicKey.DepthSize,HDPublicKey.ParentFingerPrintStart=HDPublicKey.DepthEnd,HDPublicKey.ParentFingerPrintEnd=HDPublicKey.ParentFingerPrintStart+HDPublicKey.ParentFingerPrintSize,HDPublicKey.ChildIndexStart=HDPublicKey.ParentFingerPrintEnd,HDPublicKey.ChildIndexEnd=HDPublicKey.ChildIndexStart+HDPublicKey.ChildIndexSize,HDPublicKey.ChainCodeStart=HDPublicKey.ChildIndexEnd,HDPublicKey.ChainCodeEnd=HDPublicKey.ChainCodeStart+HDPublicKey.ChainCodeSize,HDPublicKey.PublicKeyStart=HDPublicKey.ChainCodeEnd,HDPublicKey.PublicKeyEnd=HDPublicKey.PublicKeyStart+HDPublicKey.PublicKeySize,HDPublicKey.ChecksumStart=HDPublicKey.PublicKeyEnd,HDPublicKey.ChecksumEnd=HDPublicKey.ChecksumStart+HDPublicKey.CheckSumSize,assert(HDPublicKey.PublicKeyEnd===HDPublicKey.DataSize),assert(HDPublicKey.ChecksumEnd===HDPublicKey.SerializedByteSize),module.exports=HDPublicKey}).call(this,require("buffer").Buffer)},{"./crypto/bn":135,"./crypto/hash":137,"./crypto/point":138,"./encoding/base58":141,"./encoding/base58check":142,"./errors":146,"./hdprivatekey":148,"./networks":150,"./publickey":153,"./util/buffer":172,"./util/js":173,"./util/preconditions":174,assert:26,buffer:240,lodash:192}],150:[function(require,module,exports){"use strict";var _=require("lodash"),BufferUtil=require("./util/buffer"),JSUtil=require("./util/js"),networks=[],networkMaps={};function Network(){}function get(arg,keys){if(~networks.indexOf(arg))return arg;if(!keys)return networkMaps[arg];_.isArray(keys)||(keys=[keys]);var containsArg=function(key){return networks[index][key]===arg};for(var index in networks)if(_.some(keys,containsArg))return networks[index]}function addNetwork(data){var network=new Network;return JSUtil.defineImmutable(network,{name:data.name,alias:data.alias,pubkeyhash:data.pubkeyhash,privatekey:data.privatekey,scripthash:data.scripthash,xpubkey:data.xpubkey,xprivkey:data.xprivkey}),data.networkMagic&&JSUtil.defineImmutable(network,{networkMagic:BufferUtil.integerAsBuffer(data.networkMagic)}),data.port&&JSUtil.defineImmutable(network,{port:data.port}),data.dnsSeeds&&JSUtil.defineImmutable(network,{dnsSeeds:data.dnsSeeds}),_.each(network,function(value){_.isUndefined(value)||_.isObject(value)||(networkMaps[value]=network)}),networks.push(network),network}Network.prototype.toString=function(){return this.name},addNetwork({name:"livenet",alias:"mainnet",pubkeyhash:0,privatekey:128,scripthash:5,xpubkey:76067358,xprivkey:76066276,networkMagic:4190024921,port:8333,dnsSeeds:["seed.bitcoin.sipa.be","dnsseed.bluematt.me","dnsseed.bitcoin.dashjr.org","seed.bitcoinstats.com","seed.bitnodes.io","bitseed.xf2.org"]});var livenet=get("livenet");addNetwork({name:"testnet",alias:"regtest",pubkeyhash:111,privatekey:239,scripthash:196,xpubkey:70617039,xprivkey:70615956});var testnet=get("testnet"),TESTNET={PORT:18333,NETWORK_MAGIC:BufferUtil.integerAsBuffer(185665799),DNS_SEEDS:["testnet-seed.bitcoin.petertodd.org","testnet-seed.bluematt.me","testnet-seed.alexykot.me","testnet-seed.bitcoin.schildbach.de"]};for(var key in TESTNET)_.isObject(TESTNET[key])||(networkMaps[TESTNET[key]]=testnet);var REGTEST={PORT:18444,NETWORK_MAGIC:BufferUtil.integerAsBuffer(4206867930),DNS_SEEDS:[]};for(var key in REGTEST)_.isObject(REGTEST[key])||(networkMaps[REGTEST[key]]=testnet);Object.defineProperty(testnet,"port",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?REGTEST.PORT:TESTNET.PORT}}),Object.defineProperty(testnet,"networkMagic",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?REGTEST.NETWORK_MAGIC:TESTNET.NETWORK_MAGIC}}),Object.defineProperty(testnet,"dnsSeeds",{enumerable:!0,configurable:!1,get:function(){return this.regtestEnabled?REGTEST.DNS_SEEDS:TESTNET.DNS_SEEDS}}),module.exports={add:addNetwork,remove:function(network){for(var i=0;i=0&&n<=16,"Invalid Argument: n must be between 0 and 16"),0===n?Opcode("OP_0"):new Opcode(Opcode.map.OP_1+n-1)},Opcode.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SUBSTR:127,OP_LEFT:128,OP_RIGHT:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_CHECKLOCKTIMEVERIFY:177,OP_CHECKSEQUENCEVERIFY:178,OP_NOP1:176,OP_NOP2:177,OP_NOP3:178,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255},Opcode.reverseMap=[],Opcode.map)Opcode.reverseMap[Opcode.map[k]]=k;_.extend(Opcode,Opcode.map),Opcode.isSmallIntOp=function(opcode){return opcode instanceof Opcode&&(opcode=opcode.toNumber()),opcode===Opcode.map.OP_0||opcode>=Opcode.map.OP_1&&opcode<=Opcode.map.OP_16},Opcode.prototype.inspect=function(){return""},module.exports=Opcode}).call(this,require("buffer").Buffer)},{"./util/buffer":172,"./util/js":173,"./util/preconditions":174,buffer:240,lodash:192}],152:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),Address=require("./address"),Base58Check=require("./encoding/base58check"),BN=require("./crypto/bn"),JSUtil=require("./util/js"),Networks=require("./networks"),Point=require("./crypto/point"),PublicKey=require("./publickey"),Random=require("./crypto/random"),$=require("./util/preconditions");function PrivateKey(data,network){if(!(this instanceof PrivateKey))return new PrivateKey(data,network);if(data instanceof PrivateKey)return data;var info=this._classifyArguments(data,network);if(!info.bn||0===info.bn.cmp(new BN(0)))throw new TypeError("Number can not be equal to zero, undefined, null or false");if(!info.bn.lt(Point.getN()))throw new TypeError("Number must be less than N");if(void 0===info.network)throw new TypeError('Must specify the network ("livenet" or "testnet")');return JSUtil.defineImmutable(this,{bn:info.bn,compressed:info.compressed,network:info.network}),Object.defineProperty(this,"publicKey",{configurable:!1,enumerable:!0,get:this.toPublicKey.bind(this)}),this}PrivateKey.prototype._classifyArguments=function(data,network){var info={compressed:!0,network:network?Networks.get(network):Networks.defaultNetwork};if(_.isUndefined(data)||_.isNull(data))info.bn=PrivateKey._getRandomBN();else if(data instanceof BN)info.bn=data;else if(data instanceof Buffer||data instanceof Uint8Array)info=PrivateKey._transformBuffer(data,network);else if(data.bn&&data.network)info=PrivateKey._transformObject(data);else if(!network&&Networks.get(data))info.bn=PrivateKey._getRandomBN(),info.network=Networks.get(data);else{if("string"!=typeof data)throw new TypeError("First argument is an unrecognized data type.");JSUtil.isHexa(data)?info.bn=new BN(Buffer.from(data,"hex")):info=PrivateKey._transformWIF(data,network)}return info},PrivateKey._getRandomBN=function(){var condition,bn;do{var privbuf=Random.getRandomBuffer(32);condition=(bn=BN.fromBuffer(privbuf)).lt(Point.getN())}while(!condition);return bn},PrivateKey._transformBuffer=function(buf,network){var info={};if(32===buf.length)return PrivateKey._transformBNBuffer(buf,network);if(info.network=Networks.get(buf[0],"privatekey"),!info.network)throw new Error("Invalid network");if(network&&info.network!==Networks.get(network))throw new TypeError("Private key network mismatch");if(34===buf.length&&1===buf[33])info.compressed=!0;else{if(33!==buf.length)throw new Error("Length of buffer must be 33 (uncompressed) or 34 (compressed)");info.compressed=!1}return info.bn=BN.fromBuffer(buf.slice(1,33)),info},PrivateKey._transformBNBuffer=function(buf,network){var info={};return info.network=Networks.get(network)||Networks.defaultNetwork,info.bn=BN.fromBuffer(buf),info.compressed=!1,info},PrivateKey._transformWIF=function(str,network){return PrivateKey._transformBuffer(Base58Check.decode(str),network)},PrivateKey.fromBuffer=function(arg,network){return new PrivateKey(arg,network)},PrivateKey._transformObject=function(json){return{bn:new BN(json.bn,"hex"),network:Networks.get(json.network),compressed:json.compressed}},PrivateKey.fromString=PrivateKey.fromWIF=function(str){return $.checkArgument(_.isString(str),"First argument is expected to be a string."),new PrivateKey(str)},PrivateKey.fromObject=function(obj){return $.checkArgument(_.isObject(obj),"First argument is expected to be an object."),new PrivateKey(obj)},PrivateKey.fromRandom=function(network){return new PrivateKey(PrivateKey._getRandomBN(),network)},PrivateKey.getValidationError=function(data,network){var error;try{new PrivateKey(data,network)}catch(e){error=e}return error},PrivateKey.isValid=function(data,network){return!!data&&!PrivateKey.getValidationError(data,network)},PrivateKey.prototype.toString=function(){return this.toBuffer().toString("hex")},PrivateKey.prototype.toWIF=function(){var buf,network=this.network;return buf=this.compressed?Buffer.concat([Buffer.from([network.privatekey]),this.bn.toBuffer({size:32}),Buffer.from([1])]):Buffer.concat([Buffer.from([network.privatekey]),this.bn.toBuffer({size:32})]),Base58Check.encode(buf)},PrivateKey.prototype.toBigNumber=function(){return this.bn},PrivateKey.prototype.toBuffer=function(){return this.bn.toBuffer()},PrivateKey.prototype.toBufferNoPadding=function(){return this.bn.toBuffer()},PrivateKey.prototype.toPublicKey=function(){return this._pubkey||(this._pubkey=PublicKey.fromPrivateKey(this)),this._pubkey},PrivateKey.prototype.toAddress=function(network){var pubkey=this.toPublicKey();return Address.fromPublicKey(pubkey,network||this.network)},PrivateKey.prototype.toObject=PrivateKey.prototype.toJSON=function(){return{bn:this.bn.toString("hex"),compressed:this.compressed,network:this.network.toString()}},PrivateKey.prototype.inspect=function(){var uncompressed=this.compressed?"":", uncompressed";return""},module.exports=PrivateKey}).call(this,require("buffer").Buffer)},{"./address":130,"./crypto/bn":135,"./crypto/point":138,"./crypto/random":139,"./encoding/base58check":142,"./networks":150,"./publickey":153,"./util/js":173,"./util/preconditions":174,buffer:240,lodash:192}],153:[function(require,module,exports){(function(Buffer){"use strict";var BN=require("./crypto/bn"),Point=require("./crypto/point"),Hash=require("./crypto/hash"),JSUtil=require("./util/js"),Network=require("./networks"),_=require("lodash"),$=require("./util/preconditions");function PublicKey(data,extra){if(!(this instanceof PublicKey))return new PublicKey(data,extra);if($.checkArgument(data,"First argument is required, please include public key data."),data instanceof PublicKey)return data;extra=extra||{};var info=this._classifyArgs(data,extra);return info.point.validate(),JSUtil.defineImmutable(this,{point:info.point,compressed:info.compressed,network:info.network||Network.defaultNetwork}),this}PublicKey.prototype._classifyArgs=function(data,extra){var info={compressed:_.isUndefined(extra.compressed)||extra.compressed};if(data instanceof Point)info.point=data;else if(data.x&&data.y)info=PublicKey._transformObject(data);else if("string"==typeof data)info=PublicKey._transformDER(Buffer.from(data,"hex"));else if(PublicKey._isBuffer(data))info=PublicKey._transformDER(data);else{if(!PublicKey._isPrivateKey(data))throw new TypeError("First argument is an unrecognized data format.");info=PublicKey._transformPrivateKey(data)}return info.network||(info.network=_.isUndefined(extra.network)?void 0:Network.get(extra.network)),info},PublicKey._isPrivateKey=function(param){return param instanceof require("./privatekey")},PublicKey._isBuffer=function(param){return param instanceof Buffer||param instanceof Uint8Array},PublicKey._transformPrivateKey=function(privkey){$.checkArgument(PublicKey._isPrivateKey(privkey),"Must be an instance of PrivateKey");var info={};return info.point=Point.getG().mul(privkey.bn),info.compressed=privkey.compressed,info.network=privkey.network,info},PublicKey._transformDER=function(buf,strict){$.checkArgument(PublicKey._isBuffer(buf),"Must be a hex buffer of DER encoded public key");var x,y,xbuf,ybuf,info={};if(strict=!!_.isUndefined(strict)||strict,4!==buf[0]&&(strict||6!==buf[0]&&7!==buf[0]))if(3===buf[0])xbuf=buf.slice(1),x=new BN(xbuf),(info=PublicKey._transformX(!0,x)).compressed=!0;else{if(2!==buf[0])throw new TypeError("Invalid DER format public key");xbuf=buf.slice(1),x=new BN(xbuf),(info=PublicKey._transformX(!1,x)).compressed=!0}else{if(xbuf=buf.slice(1,33),ybuf=buf.slice(33,65),32!==xbuf.length||32!==ybuf.length||65!==buf.length)throw new TypeError("Length of x and y must be 32 bytes");x=new BN(xbuf),y=new BN(ybuf),info.point=new Point(x,y),info.compressed=!1}return info},PublicKey._transformX=function(odd,x){$.checkArgument("boolean"==typeof odd,"Must specify whether y is odd or not (true or false)");var info={};return info.point=Point.fromX(odd,x),info},PublicKey._transformObject=function(json){var x=new BN(json.x,"hex"),y=new BN(json.y,"hex");return new PublicKey(new Point(x,y),{compressed:json.compressed})},PublicKey.fromPrivateKey=function(privkey){$.checkArgument(PublicKey._isPrivateKey(privkey),"Must be an instance of PrivateKey");var info=PublicKey._transformPrivateKey(privkey);return new PublicKey(info.point,{compressed:info.compressed,network:info.network})},PublicKey.fromDER=PublicKey.fromBuffer=function(buf,strict){$.checkArgument(PublicKey._isBuffer(buf),"Must be a hex buffer of DER encoded public key");var info=PublicKey._transformDER(buf,strict);return new PublicKey(info.point,{compressed:info.compressed})},PublicKey.fromPoint=function(point,compressed){return $.checkArgument(point instanceof Point,"First argument must be an instance of Point."),new PublicKey(point,{compressed:compressed})},PublicKey.fromString=function(str,encoding){var buf=Buffer.from(str,encoding||"hex"),info=PublicKey._transformDER(buf);return new PublicKey(info.point,{compressed:info.compressed})},PublicKey.fromX=function(odd,x){var info=PublicKey._transformX(odd,x);return new PublicKey(info.point,{compressed:info.compressed})},PublicKey.getValidationError=function(data){var error;try{new PublicKey(data)}catch(e){error=e}return error},PublicKey.isValid=function(data){return!PublicKey.getValidationError(data)},PublicKey.prototype.toObject=PublicKey.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}},PublicKey.prototype.toBuffer=PublicKey.prototype.toDER=function(){var prefix,x=this.point.getX(),y=this.point.getY(),xbuf=x.toBuffer({size:32}),ybuf=y.toBuffer({size:32});return this.compressed?(prefix=ybuf[ybuf.length-1]%2?Buffer.from([3]):Buffer.from([2]),Buffer.concat([prefix,xbuf])):(prefix=Buffer.from([4]),Buffer.concat([prefix,xbuf,ybuf]))},PublicKey.prototype._getID=function(){return Hash.sha256ripemd160(this.toBuffer())},PublicKey.prototype.toAddress=function(network){return require("./address").fromPublicKey(this,network||this.network)},PublicKey.prototype.toString=function(){return this.toDER().toString("hex")},PublicKey.prototype.inspect=function(){return""},module.exports=PublicKey}).call(this,require("buffer").Buffer)},{"./address":130,"./crypto/bn":135,"./crypto/hash":137,"./crypto/point":138,"./networks":150,"./privatekey":152,"./util/js":173,"./util/preconditions":174,buffer:240,lodash:192}],154:[function(require,module,exports){module.exports=require("./script"),module.exports.Interpreter=require("./interpreter")},{"./interpreter":155,"./script":156}],155:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),Script=require("./script"),Opcode=require("../opcode"),BN=require("../crypto/bn"),Hash=require("../crypto/hash"),Signature=require("../crypto/signature"),PublicKey=require("../publickey"),Interpreter=function Interpreter(obj){if(!(this instanceof Interpreter))return new Interpreter(obj);obj?(this.initialize(),this.set(obj)):this.initialize()};Interpreter.prototype.verifyWitnessProgram=function(version,program,witness,satoshis,flags){var scriptPubKey=new Script,stack=[];if(0!==version)return!(flags&Interpreter.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM)||(this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM",!1);if(32===program.length){if(0===witness.length)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WITNESS_EMPTY",!1;var scriptPubKeyBuffer=witness[witness.length-1];if(scriptPubKey=new Script(scriptPubKeyBuffer),Hash.sha256(scriptPubKeyBuffer).toString("hex")!==program.toString("hex"))return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1;stack=witness.slice(0,-1)}else{if(20!==program.length)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_WRONG_LENGTH",!1;if(2!==witness.length)return this.errstr="SCRIPT_ERR_WITNESS_PROGRAM_MISMATCH",!1;scriptPubKey.add(Opcode.OP_DUP),scriptPubKey.add(Opcode.OP_HASH160),scriptPubKey.add(program),scriptPubKey.add(Opcode.OP_EQUALVERIFY),scriptPubKey.add(Opcode.OP_CHECKSIG),stack=witness}if(this.initialize(),this.set({script:scriptPubKey,stack:stack,sigversion:1,satoshis:satoshis,flags:flags}),!this.evaluate())return!1;if(1!==this.stack.length)return this.errstr="SCRIPT_ERR_EVAL_FALSE",!1;var buf=this.stack[this.stack.length-1];return!!Interpreter.castToBool(buf)||(this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1)},Interpreter.prototype.verify=function(scriptSig,scriptPubkey,tx,nin,flags,witness,satoshis){var stackCopy,Transaction=require("../transaction");if(_.isUndefined(tx)&&(tx=new Transaction),_.isUndefined(nin)&&(nin=0),_.isUndefined(flags)&&(flags=0),_.isUndefined(witness)&&(witness=null),_.isUndefined(satoshis)&&(satoshis=0),this.set({script:scriptSig,tx:tx,nin:nin,sigversion:0,satoshis:0,flags:flags}),0!=(flags&Interpreter.SCRIPT_VERIFY_SIGPUSHONLY)&&!scriptSig.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(!this.evaluate())return!1;flags&Interpreter.SCRIPT_VERIFY_P2SH&&(stackCopy=this.stack.slice());var stack=this.stack;if(this.initialize(),this.set({script:scriptPubkey,stack:stack,tx:tx,nin:nin,flags:flags}),!this.evaluate())return!1;if(0===this.stack.length)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_RESULT",!1;var buf=this.stack[this.stack.length-1];if(!Interpreter.castToBool(buf))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_STACK",!1;var hadWitness=!1;if(flags&Interpreter.SCRIPT_VERIFY_WITNESS){var witnessValues={};if(scriptPubkey.isWitnessProgram(witnessValues)){if(hadWitness=!0,0!==scriptSig.toBuffer().length)return!1;if(!this.verifyWitnessProgram(witnessValues.version,witnessValues.program,witness,satoshis,this.flags))return!1}}if(flags&Interpreter.SCRIPT_VERIFY_P2SH&&scriptPubkey.isScriptHashOut()){if(!scriptSig.isPushOnly())return this.errstr="SCRIPT_ERR_SIG_PUSHONLY",!1;if(0===stackCopy.length)throw new Error("internal error - stack copy empty");var redeemScriptSerialized=stackCopy[stackCopy.length-1],redeemScript=Script.fromBuffer(redeemScriptSerialized);if(stackCopy.pop(),this.initialize(),this.set({script:redeemScript,stack:stackCopy,tx:tx,nin:nin,flags:flags}),!this.evaluate())return!1;if(0===stackCopy.length)return this.errstr="SCRIPT_ERR_EVAL_FALSE_NO_P2SH_STACK",!1;if(!Interpreter.castToBool(stackCopy[stackCopy.length-1]))return this.errstr="SCRIPT_ERR_EVAL_FALSE_IN_P2SH_STACK",!1;if(flags&Interpreter.SCRIPT_VERIFY_WITNESS){var p2shWitnessValues={};if(redeemScript.isWitnessProgram(p2shWitnessValues)){hadWitness=!0;var redeemScriptPush=new Script;if(redeemScriptPush.add(redeemScript.toBuffer()),scriptSig.toHex()!==redeemScriptPush.toHex())return this.errstr="SCRIPT_ERR_WITNESS_MALLEATED_P2SH",!1;if(!this.verifyWitnessProgram(p2shWitnessValues.version,p2shWitnessValues.program,witness,satoshis,this.flags))return!1;stack=[stack[0]]}}}if(0!=(this.flags&Interpreter.SCRIPT_VERIFY_CLEANSTACK)){if(0==(this.flags&Interpreter.SCRIPT_VERIFY_P2SH))throw"flags & SCRIPT_VERIFY_P2SH";if(1!=stackCopy.length)return this.errstr="SCRIPT_ERR_CLEANSTACK",!1}return!(this.flags&Interpreter.SCRIPT_VERIFY_WITNESS&&!hadWitness&&witness.length>0)||(this.errstr="SCRIPT_ERR_WITNESS_UNEXPECTED",!1)},module.exports=Interpreter,Interpreter.prototype.initialize=function(obj){this.stack=[],this.altstack=[],this.pc=0,this.satoshis=0,this.sigversion=0,this.pbegincodehash=0,this.nOpCount=0,this.vfExec=[],this.errstr="",this.flags=0},Interpreter.prototype.set=function(obj){this.script=obj.script||this.script,this.tx=obj.tx||this.tx,this.nin=void 0!==obj.nin?obj.nin:this.nin,this.stack=obj.stack||this.stack,this.altstack=obj.altack||this.altstack,this.pc=void 0!==obj.pc?obj.pc:this.pc,this.pbegincodehash=void 0!==obj.pbegincodehash?obj.pbegincodehash:this.pbegincodehash,this.sigversion=void 0!==obj.sigversion?obj.sigversion:this.sigversion,this.satoshis=void 0!==obj.satoshis?obj.satoshis:this.satoshis,this.nOpCount=void 0!==obj.nOpCount?obj.nOpCount:this.nOpCount,this.vfExec=obj.vfExec||this.vfExec,this.errstr=obj.errstr||this.errstr,this.flags=void 0!==obj.flags?obj.flags:this.flags},Interpreter.true=Buffer.from([1]),Interpreter.false=Buffer.from([]),Interpreter.MAX_SCRIPT_ELEMENT_SIZE=520,Interpreter.LOCKTIME_THRESHOLD_BN=new BN(Interpreter.LOCKTIME_THRESHOLD=5e8),Interpreter.SCRIPT_VERIFY_NONE=0,Interpreter.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM=4096,Interpreter.SCRIPT_VERIFY_P2SH=1,Interpreter.SCRIPT_VERIFY_STRICTENC=2,Interpreter.SCRIPT_VERIFY_DERSIG=4,Interpreter.SCRIPT_VERIFY_LOW_S=8,Interpreter.SCRIPT_VERIFY_NULLDUMMY=16,Interpreter.SCRIPT_VERIFY_SIGPUSHONLY=32,Interpreter.SCRIPT_VERIFY_MINIMALDATA=64,Interpreter.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=128,Interpreter.SCRIPT_VERIFY_CLEANSTACK=256,Interpreter.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY=512,Interpreter.SCRIPT_VERIFY_WITNESS=1024,Interpreter.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS=2048,Interpreter.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY=1024,Interpreter.SCRIPT_VERIFY_MINIMALIF=8192,Interpreter.SCRIPT_VERIFY_NULLFAIL=16384,Interpreter.SCRIPT_VERIFY_WITNESS_PUBKEYTYPE=32768,Interpreter.SCRIPT_ENABLE_SIGHASH_FORKID=65536,Interpreter.SCRIPT_ENABLE_REPLAY_PROTECTION=1<<17,Interpreter.SCRIPT_ENABLE_MONOLITH_OPCODES=1<<18,Interpreter.SEQUENCE_LOCKTIME_DISABLE_FLAG=1<<31,Interpreter.SEQUENCE_LOCKTIME_TYPE_FLAG=1<<22,Interpreter.SEQUENCE_LOCKTIME_MASK=65535,Interpreter.castToBool=function(buf){for(var i=0;i1e4)return this.errstr="SCRIPT_ERR_SCRIPT_SIZE",!1;try{for(;this.pc1e3)return this.errstr="SCRIPT_ERR_STACK_SIZE",!1}catch(e){return this.errstr="SCRIPT_ERR_UNKNOWN_ERROR: "+e,!1}return!(this.vfExec.length>0)||(this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1)},Interpreter.prototype.checkLockTime=function(nLockTime){return!!(this.tx.nLockTime=Interpreter.LOCKTIME_THRESHOLD&&nLockTime.gte(Interpreter.LOCKTIME_THRESHOLD_BN))&&(!nLockTime.gt(new BN(this.tx.nLockTime))&&!!this.tx.inputs[this.nin].isFinal())},Interpreter.prototype.checkSequence=function(nSequence){var txToSequence=this.tx.inputs[this.nin].sequenceNumber;if(this.tx.version<2)return!1;if(txToSequence&SEQUENCE_LOCKTIME_DISABLE_FLAG)return!1;var nLockTimeMask=Interpreter.SEQUENCE_LOCKTIME_TYPE_FLAG|Interpreter.SEQUENCE_LOCKTIME_MASK,txToSequenceMasked=new BN(txToSequence&nLockTimeMask),nSequenceMasked=nSequence.and(nLockTimeMask),SEQUENCE_LOCKTIME_TYPE_FLAG_BN=new BN(Interpreter.SEQUENCE_LOCKTIME_TYPE_FLAG);return!!(txToSequenceMasked.lt(SEQUENCE_LOCKTIME_TYPE_FLAG_BN)&&nSequenceMasked.lt(SEQUENCE_LOCKTIME_TYPE_FLAG_BN)||txToSequenceMasked.gte(SEQUENCE_LOCKTIME_TYPE_FLAG_BN)&&nSequenceMasked.gte(SEQUENCE_LOCKTIME_TYPE_FLAG_BN))&&!nSequenceMasked.gt(txToSequenceMasked)},Interpreter.prototype.step=function(){var buf,buf1,buf2,spliced,n,x1,x2,bn,bn1,bn2,bufSig,bufPubkey,subscript,sig,pubkey,fValue,fSuccess,fRequireMinimal=0!=(this.flags&Interpreter.SCRIPT_VERIFY_MINIMALDATA),fExec=-1===this.vfExec.indexOf(!1),chunk=this.script.chunks[this.pc];this.pc++;var opcodenum=chunk.opcodenum;if(_.isUndefined(opcodenum))return this.errstr="SCRIPT_ERR_UNDEFINED_OPCODE",!1;if(chunk.buf&&chunk.buf.length>Interpreter.MAX_SCRIPT_ELEMENT_SIZE)return this.errstr="SCRIPT_ERR_PUSH_SIZE",!1;if(opcodenum>Opcode.OP_16&&++this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;if(opcodenum===Opcode.OP_CAT||opcodenum===Opcode.OP_SUBSTR||opcodenum===Opcode.OP_LEFT||opcodenum===Opcode.OP_RIGHT||opcodenum===Opcode.OP_INVERT||opcodenum===Opcode.OP_AND||opcodenum===Opcode.OP_OR||opcodenum===Opcode.OP_XOR||opcodenum===Opcode.OP_2MUL||opcodenum===Opcode.OP_2DIV||opcodenum===Opcode.OP_MUL||opcodenum===Opcode.OP_DIV||opcodenum===Opcode.OP_MOD||opcodenum===Opcode.OP_LSHIFT||opcodenum===Opcode.OP_RSHIFT)return this.errstr="SCRIPT_ERR_DISABLED_OPCODE",!1;if(fExec&&0<=opcodenum&&opcodenum<=Opcode.OP_PUSHDATA4){if(fRequireMinimal&&!this.script.checkMinimalPush(this.pc-1))return this.errstr="SCRIPT_ERR_MINIMALDATA",!1;if(chunk.buf){if(chunk.len!==chunk.buf.length)throw new Error("Length of push value not equal to length of data");this.stack.push(chunk.buf)}else this.stack.push(Interpreter.false)}else if(fExec||Opcode.OP_IF<=opcodenum&&opcodenum<=Opcode.OP_ENDIF)switch(opcodenum){case Opcode.OP_1NEGATE:case Opcode.OP_1:case Opcode.OP_2:case Opcode.OP_3:case Opcode.OP_4:case Opcode.OP_5:case Opcode.OP_6:case Opcode.OP_7:case Opcode.OP_8:case Opcode.OP_9:case Opcode.OP_10:case Opcode.OP_11:case Opcode.OP_12:case Opcode.OP_13:case Opcode.OP_14:case Opcode.OP_15:case Opcode.OP_16:n=opcodenum-(Opcode.OP_1-1),buf=new BN(n).toScriptNumBuffer(),this.stack.push(buf);break;case Opcode.OP_NOP:break;case Opcode.OP_NOP2:case Opcode.OP_CHECKLOCKTIMEVERIFY:if(!(this.flags&Interpreter.SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)){if(this.flags&Interpreter.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var nLockTime=BN.fromScriptNumBuffer(this.stack[this.stack.length-1],fRequireMinimal,5);if(nLockTime.lt(new BN(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(!this.checkLockTime(nLockTime))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case Opcode.OP_NOP3:case Opcode.OP_CHECKSEQUENCEVERIFY:if(!(this.flags&Interpreter.SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)){if(this.flags&Interpreter.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var nSequence=BN.fromScriptNumBuffer(this.stack[this.stack.length-1],fRequireMinimal,5);if(nSequence.lt(new BN(0)))return this.errstr="SCRIPT_ERR_NEGATIVE_LOCKTIME",!1;if(0!=(nSequence&Interpreter.SEQUENCE_LOCKTIME_DISABLE_FLAG))break;if(!this.checkSequence(nSequence))return this.errstr="SCRIPT_ERR_UNSATISFIED_LOCKTIME",!1;break;case Opcode.OP_NOP1:case Opcode.OP_NOP4:case Opcode.OP_NOP5:case Opcode.OP_NOP6:case Opcode.OP_NOP7:case Opcode.OP_NOP8:case Opcode.OP_NOP9:case Opcode.OP_NOP10:if(this.flags&Interpreter.SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)return this.errstr="SCRIPT_ERR_DISCOURAGE_UPGRADABLE_NOPS",!1;break;case Opcode.OP_IF:case Opcode.OP_NOTIF:if(fValue=!1,fExec){if(this.stack.length<1)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;if(buf=this.stack[this.stack.length-1],this.flags&Interpreter.SCRIPT_VERIFY_MINIMALIF){if((buf=this.stack[this.stack.length-1]).length>1)return this.errstr="SCRIPT_ERR_MINIMALIF",!1;if(1==buf.length&&1!=buf[0])return this.errstr="SCRIPT_ERR_MINIMALIF",!1}fValue=Interpreter.castToBool(buf),opcodenum===Opcode.OP_NOTIF&&(fValue=!fValue),this.stack.pop()}this.vfExec.push(fValue);break;case Opcode.OP_ELSE:if(0===this.vfExec.length)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec[this.vfExec.length-1]=!this.vfExec[this.vfExec.length-1];break;case Opcode.OP_ENDIF:if(0===this.vfExec.length)return this.errstr="SCRIPT_ERR_UNBALANCED_CONDITIONAL",!1;this.vfExec.pop();break;case Opcode.OP_VERIFY:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(buf=this.stack[this.stack.length-1],!(fValue=Interpreter.castToBool(buf)))return this.errstr="SCRIPT_ERR_VERIFY",!1;this.stack.pop();break;case Opcode.OP_RETURN:return this.errstr="SCRIPT_ERR_OP_RETURN",!1;case Opcode.OP_TOALTSTACK:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.altstack.push(this.stack.pop());break;case Opcode.OP_FROMALTSTACK:if(this.altstack.length<1)return this.errstr="SCRIPT_ERR_INVALID_ALTSTACK_OPERATION",!1;this.stack.push(this.altstack.pop());break;case Opcode.OP_2DROP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop(),this.stack.pop();break;case Opcode.OP_2DUP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;buf1=this.stack[this.stack.length-2],buf2=this.stack[this.stack.length-1],this.stack.push(buf1),this.stack.push(buf2);break;case Opcode.OP_3DUP:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;buf1=this.stack[this.stack.length-3],buf2=this.stack[this.stack.length-2];var buf3=this.stack[this.stack.length-1];this.stack.push(buf1),this.stack.push(buf2),this.stack.push(buf3);break;case Opcode.OP_2OVER:if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;buf1=this.stack[this.stack.length-4],buf2=this.stack[this.stack.length-3],this.stack.push(buf1),this.stack.push(buf2);break;case Opcode.OP_2ROT:if(this.stack.length<6)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;spliced=this.stack.splice(this.stack.length-6,2),this.stack.push(spliced[0]),this.stack.push(spliced[1]);break;case Opcode.OP_2SWAP:if(this.stack.length<4)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;spliced=this.stack.splice(this.stack.length-4,2),this.stack.push(spliced[0]),this.stack.push(spliced[1]);break;case Opcode.OP_IFDUP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;buf=this.stack[this.stack.length-1],(fValue=Interpreter.castToBool(buf))&&this.stack.push(buf);break;case Opcode.OP_DEPTH:buf=new BN(this.stack.length).toScriptNumBuffer(),this.stack.push(buf);break;case Opcode.OP_DROP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.pop();break;case Opcode.OP_DUP:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-1]);break;case Opcode.OP_NIP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,1);break;case Opcode.OP_OVER:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.push(this.stack[this.stack.length-2]);break;case Opcode.OP_PICK:case Opcode.OP_ROLL:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(buf=this.stack[this.stack.length-1],n=(bn=BN.fromScriptNumBuffer(buf,fRequireMinimal)).toNumber(),this.stack.pop(),n<0||n>=this.stack.length)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;buf=this.stack[this.stack.length-n-1],opcodenum===Opcode.OP_ROLL&&this.stack.splice(this.stack.length-n-1,1),this.stack.push(buf);break;case Opcode.OP_ROT:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;x1=this.stack[this.stack.length-3],x2=this.stack[this.stack.length-2];var x3=this.stack[this.stack.length-1];this.stack[this.stack.length-3]=x2,this.stack[this.stack.length-2]=x3,this.stack[this.stack.length-1]=x1;break;case Opcode.OP_SWAP:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;x1=this.stack[this.stack.length-2],x2=this.stack[this.stack.length-1],this.stack[this.stack.length-2]=x2,this.stack[this.stack.length-1]=x1;break;case Opcode.OP_TUCK:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;this.stack.splice(this.stack.length-2,0,this.stack[this.stack.length-1]);break;case Opcode.OP_SIZE:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;bn=new BN(this.stack[this.stack.length-1].length),this.stack.push(bn.toScriptNumBuffer());break;case Opcode.OP_EQUAL:case Opcode.OP_EQUALVERIFY:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;buf1=this.stack[this.stack.length-2],buf2=this.stack[this.stack.length-1];var fEqual=buf1.toString("hex")===buf2.toString("hex");if(this.stack.pop(),this.stack.pop(),this.stack.push(fEqual?Interpreter.true:Interpreter.false),opcodenum===Opcode.OP_EQUALVERIFY){if(!fEqual)return this.errstr="SCRIPT_ERR_EQUALVERIFY",!1;this.stack.pop()}break;case Opcode.OP_1ADD:case Opcode.OP_1SUB:case Opcode.OP_NEGATE:case Opcode.OP_ABS:case Opcode.OP_NOT:case Opcode.OP_0NOTEQUAL:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(buf=this.stack[this.stack.length-1],bn=BN.fromScriptNumBuffer(buf,fRequireMinimal),opcodenum){case Opcode.OP_1ADD:bn=bn.add(BN.One);break;case Opcode.OP_1SUB:bn=bn.sub(BN.One);break;case Opcode.OP_NEGATE:bn=bn.neg();break;case Opcode.OP_ABS:bn.cmp(BN.Zero)<0&&(bn=bn.neg());break;case Opcode.OP_NOT:bn=new BN((0===bn.cmp(BN.Zero))+0);break;case Opcode.OP_0NOTEQUAL:bn=new BN((0!==bn.cmp(BN.Zero))+0)}this.stack.pop(),this.stack.push(bn.toScriptNumBuffer());break;case Opcode.OP_ADD:case Opcode.OP_SUB:case Opcode.OP_BOOLAND:case Opcode.OP_BOOLOR:case Opcode.OP_NUMEQUAL:case Opcode.OP_NUMEQUALVERIFY:case Opcode.OP_NUMNOTEQUAL:case Opcode.OP_LESSTHAN:case Opcode.OP_GREATERTHAN:case Opcode.OP_LESSTHANOREQUAL:case Opcode.OP_GREATERTHANOREQUAL:case Opcode.OP_MIN:case Opcode.OP_MAX:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;switch(bn1=BN.fromScriptNumBuffer(this.stack[this.stack.length-2],fRequireMinimal),bn2=BN.fromScriptNumBuffer(this.stack[this.stack.length-1],fRequireMinimal),bn=new BN(0),opcodenum){case Opcode.OP_ADD:bn=bn1.add(bn2);break;case Opcode.OP_SUB:bn=bn1.sub(bn2);break;case Opcode.OP_BOOLAND:bn=new BN((0!==bn1.cmp(BN.Zero)&&0!==bn2.cmp(BN.Zero))+0);break;case Opcode.OP_BOOLOR:bn=new BN((0!==bn1.cmp(BN.Zero)||0!==bn2.cmp(BN.Zero))+0);break;case Opcode.OP_NUMEQUAL:case Opcode.OP_NUMEQUALVERIFY:bn=new BN((0===bn1.cmp(bn2))+0);break;case Opcode.OP_NUMNOTEQUAL:bn=new BN((0!==bn1.cmp(bn2))+0);break;case Opcode.OP_LESSTHAN:bn=new BN((bn1.cmp(bn2)<0)+0);break;case Opcode.OP_GREATERTHAN:bn=new BN((bn1.cmp(bn2)>0)+0);break;case Opcode.OP_LESSTHANOREQUAL:bn=new BN((bn1.cmp(bn2)<=0)+0);break;case Opcode.OP_GREATERTHANOREQUAL:bn=new BN((bn1.cmp(bn2)>=0)+0);break;case Opcode.OP_MIN:bn=bn1.cmp(bn2)<0?bn1:bn2;break;case Opcode.OP_MAX:bn=bn1.cmp(bn2)>0?bn1:bn2}if(this.stack.pop(),this.stack.pop(),this.stack.push(bn.toScriptNumBuffer()),opcodenum===Opcode.OP_NUMEQUALVERIFY){if(!Interpreter.castToBool(this.stack[this.stack.length-1]))return this.errstr="SCRIPT_ERR_NUMEQUALVERIFY",!1;this.stack.pop()}break;case Opcode.OP_WITHIN:if(this.stack.length<3)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;bn1=BN.fromScriptNumBuffer(this.stack[this.stack.length-3],fRequireMinimal),bn2=BN.fromScriptNumBuffer(this.stack[this.stack.length-2],fRequireMinimal);var bn3=BN.fromScriptNumBuffer(this.stack[this.stack.length-1],fRequireMinimal);fValue=bn2.cmp(bn1)<=0&&bn1.cmp(bn3)<0,this.stack.pop(),this.stack.pop(),this.stack.pop(),this.stack.push(fValue?Interpreter.true:Interpreter.false);break;case Opcode.OP_RIPEMD160:case Opcode.OP_SHA1:case Opcode.OP_SHA256:case Opcode.OP_HASH160:case Opcode.OP_HASH256:if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;var bufHash;buf=this.stack[this.stack.length-1],opcodenum===Opcode.OP_RIPEMD160?bufHash=Hash.ripemd160(buf):opcodenum===Opcode.OP_SHA1?bufHash=Hash.sha1(buf):opcodenum===Opcode.OP_SHA256?bufHash=Hash.sha256(buf):opcodenum===Opcode.OP_HASH160?bufHash=Hash.sha256ripemd160(buf):opcodenum===Opcode.OP_HASH256&&(bufHash=Hash.sha256sha256(buf)),this.stack.pop(),this.stack.push(bufHash);break;case Opcode.OP_CODESEPARATOR:this.pbegincodehash=this.pc;break;case Opcode.OP_CHECKSIG:case Opcode.OP_CHECKSIGVERIFY:if(this.stack.length<2)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(bufSig=this.stack[this.stack.length-2],bufPubkey=this.stack[this.stack.length-1],!this.checkSignatureEncoding(bufSig)||!this.checkPubkeyEncoding(bufPubkey))return!1;subscript=(new Script).set({chunks:this.script.chunks.slice(this.pbegincodehash)});var tmpScript=(new Script).add(bufSig);subscript.findAndDelete(tmpScript);try{sig=Signature.fromTxFormat(bufSig),pubkey=PublicKey.fromBuffer(bufPubkey,!1),fSuccess=this.tx.verifySignature(sig,pubkey,this.nin,subscript,this.sigversion,this.satoshis)}catch(e){fSuccess=!1}if(!fSuccess&&this.flags&Interpreter.SCRIPT_VERIFY_NULLFAIL&&bufSig.length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;if(this.stack.pop(),this.stack.pop(),this.stack.push(fSuccess?Interpreter.true:Interpreter.false),opcodenum===Opcode.OP_CHECKSIGVERIFY){if(!fSuccess)return this.errstr="SCRIPT_ERR_CHECKSIGVERIFY",!1;this.stack.pop()}break;case Opcode.OP_CHECKMULTISIG:case Opcode.OP_CHECKMULTISIGVERIFY:var i=1;if(this.stack.length20)return this.errstr="SCRIPT_ERR_PUBKEY_COUNT",!1;if(this.nOpCount+=nKeysCount,this.nOpCount>201)return this.errstr="SCRIPT_ERR_OP_COUNT",!1;var ikey=++i;i+=nKeysCount;var ikey2=nKeysCount+2;if(this.stack.lengthnKeysCount)return this.errstr="SCRIPT_ERR_SIG_COUNT",!1;var isig=++i;if(i+=nSigsCount,this.stack.length0;){if(bufSig=this.stack[this.stack.length-isig],bufPubkey=this.stack[this.stack.length-ikey],!this.checkSignatureEncoding(bufSig)||!this.checkPubkeyEncoding(bufPubkey))return!1;var fOk;try{sig=Signature.fromTxFormat(bufSig),pubkey=PublicKey.fromBuffer(bufPubkey,!1),fOk=this.tx.verifySignature(sig,pubkey,this.nin,subscript,this.sigversion,this.satoshis)}catch(e){fOk=!1}fOk&&(isig++,nSigsCount--),ikey++,nSigsCount>--nKeysCount&&(fSuccess=!1)}for(;i-- >1;){if(!fSuccess&&this.flags&Interpreter.SCRIPT_VERIFY_NULLFAIL&&!ikey2&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_NULLFAIL",!1;ikey2>0&&ikey2--,this.stack.pop()}if(this.stack.length<1)return this.errstr="SCRIPT_ERR_INVALID_STACK_OPERATION",!1;if(this.flags&Interpreter.SCRIPT_VERIFY_NULLDUMMY&&this.stack[this.stack.length-1].length)return this.errstr="SCRIPT_ERR_SIG_NULLDUMMY",!1;if(this.stack.pop(),this.stack.push(fSuccess?Interpreter.true:Interpreter.false),opcodenum===Opcode.OP_CHECKMULTISIGVERIFY){if(!fSuccess)return this.errstr="SCRIPT_ERR_CHECKMULTISIGVERIFY",!1;this.stack.pop()}break;default:return this.errstr="SCRIPT_ERR_BAD_OPCODE",!1}return!0}}).call(this,require("buffer").Buffer)},{"../crypto/bn":135,"../crypto/hash":137,"../crypto/signature":140,"../opcode":151,"../publickey":153,"../transaction":157,"./script":156,buffer:240,lodash:192}],156:[function(require,module,exports){(function(Buffer){"use strict";var Address=require("../address"),BufferReader=require("../encoding/bufferreader"),BufferWriter=require("../encoding/bufferwriter"),Hash=require("../crypto/hash"),Opcode=require("../opcode"),PublicKey=require("../publickey"),Signature=require("../crypto/signature"),Networks=require("../networks"),$=require("../util/preconditions"),_=require("lodash"),errors=require("../errors"),buffer=require("buffer"),BufferUtil=require("../util/buffer"),JSUtil=require("../util/js"),Script=function Script(from){return this instanceof Script?(this.chunks=[],BufferUtil.isBuffer(from)?Script.fromBuffer(from):from instanceof Address?Script.fromAddress(from):from instanceof Script?Script.fromBuffer(from.toBuffer()):_.isString(from)?Script.fromString(from):void(_.isObject(from)&&_.isArray(from.chunks)&&this.set(from))):new Script(from)};Script.prototype.set=function(obj){return $.checkArgument(_.isObject(obj)),$.checkArgument(_.isArray(obj.chunks)),this.chunks=obj.chunks,this},Script.fromBuffer=function(buffer){var script=new Script;script.chunks=[];for(var br=new BufferReader(buffer);!br.finished();)try{var len,buf,opcodenum=br.readUInt8();opcodenum>0&&opcodenum0&&opcodenum0&&(str=asm?str+" "+chunk.buf.toString("hex"):str+" "+chunk.len+" 0x"+chunk.buf.toString("hex"));else if(void 0!==Opcode.reverseMap[opcodenum])asm?0===opcodenum?str+=" 0":79===opcodenum?str+=" -1":str=str+" "+Opcode(opcodenum).toString():str=str+" "+Opcode(opcodenum).toString();else{var numstr=opcodenum.toString(16);numstr.length%2!=0&&(numstr="0"+numstr),str=asm?str+" "+numstr:str+" 0x"+numstr}return str},Script.prototype.toASM=function(){for(var str="",i=0;i"},Script.prototype.isPublicKeyHashOut=function(){return!(5!==this.chunks.length||this.chunks[0].opcodenum!==Opcode.OP_DUP||this.chunks[1].opcodenum!==Opcode.OP_HASH160||!this.chunks[2].buf||20!==this.chunks[2].buf.length||this.chunks[3].opcodenum!==Opcode.OP_EQUALVERIFY||this.chunks[4].opcodenum!==Opcode.OP_CHECKSIG)},Script.prototype.isPublicKeyHashIn=function(){if(2===this.chunks.length){var signatureBuf=this.chunks[0].buf,pubkeyBuf=this.chunks[1].buf;if(signatureBuf&&signatureBuf.length&&48===signatureBuf[0]&&pubkeyBuf&&pubkeyBuf.length){var version=pubkeyBuf[0];if((4===version||6===version||7===version)&&65===pubkeyBuf.length)return!0;if((3===version||2===version)&&33===pubkeyBuf.length)return!0}}return!1},Script.prototype.getPublicKey=function(){return $.checkState(this.isPublicKeyOut(),"Can't retrieve PublicKey from a non-PK output"),this.chunks[0].buf},Script.prototype.getPublicKeyHash=function(){return $.checkState(this.isPublicKeyHashOut(),"Can't retrieve PublicKeyHash from a non-PKH output"),this.chunks[2].buf},Script.prototype.isPublicKeyOut=function(){if(2===this.chunks.length&&this.chunks[0].buf&&this.chunks[0].buf.length&&this.chunks[1].opcodenum===Opcode.OP_CHECKSIG){var pubkeyBuf=this.chunks[0].buf,version=pubkeyBuf[0],isVersion=!1;if((4!==version&&6!==version&&7!==version||65!==pubkeyBuf.length)&&(3!==version&&2!==version||33!==pubkeyBuf.length)||(isVersion=!0),isVersion)return PublicKey.isValid(pubkeyBuf)}return!1},Script.prototype.isPublicKeyIn=function(){if(1===this.chunks.length){var signatureBuf=this.chunks[0].buf;if(signatureBuf&&signatureBuf.length&&48===signatureBuf[0])return!0}return!1},Script.prototype.isScriptHashOut=function(){var buf=this.toBuffer();return 23===buf.length&&buf[0]===Opcode.OP_HASH160&&20===buf[1]&&buf[buf.length-1]===Opcode.OP_EQUAL},Script.prototype.isWitnessScriptHashOut=function(){var buf=this.toBuffer();return 34===buf.length&&0===buf[0]&&32===buf[1]},Script.prototype.isWitnessPublicKeyHashOut=function(){var buf=this.toBuffer();return 22===buf.length&&0===buf[0]&&20===buf[1]},Script.prototype.isWitnessProgram=function(values){values||(values={});var buf=this.toBuffer();return!(buf.length<4||buf.length>42)&&((buf[0]===Opcode.OP_0||buf[0]>=Opcode.OP_1&&buf[0]<=Opcode.OP_16)&&(buf.length===buf[1]+2&&(values.version=buf[0],values.program=buf.slice(2,buf.length),!0)))},Script.prototype.isScriptHashIn=function(){if(this.chunks.length<=1)return!1;var redeemScript,redeemBuf=this.chunks[this.chunks.length-1].buf;if(!redeemBuf)return!1;try{redeemScript=Script.fromBuffer(redeemBuf)}catch(e){if(e instanceof errors.Script.InvalidBuffer)return!1;throw e}return redeemScript.classify()!==Script.types.UNKNOWN},Script.prototype.isMultisigOut=function(){return this.chunks.length>3&&Opcode.isSmallIntOp(this.chunks[0].opcodenum)&&this.chunks.slice(1,this.chunks.length-2).every(function(obj){return obj.buf&&BufferUtil.isBuffer(obj.buf)})&&Opcode.isSmallIntOp(this.chunks[this.chunks.length-2].opcodenum)&&this.chunks[this.chunks.length-1].opcodenum===Opcode.OP_CHECKMULTISIG},Script.prototype.isMultisigIn=function(){return this.chunks.length>=2&&0===this.chunks[0].opcodenum&&this.chunks.slice(1,this.chunks.length).every(function(obj){return obj.buf&&BufferUtil.isBuffer(obj.buf)&&Signature.isTxDER(obj.buf)})},Script.prototype.isDataOut=function(){return this.chunks.length>=1&&this.chunks[0].opcodenum===Opcode.OP_RETURN&&(1===this.chunks.length||2===this.chunks.length&&this.chunks[1].buf&&this.chunks[1].buf.length<=Script.OP_RETURN_STANDARD_SIZE&&this.chunks[1].length===this.chunks.len)},Script.prototype.getData=function(){if(this.isDataOut()||this.isScriptHashOut())return _.isUndefined(this.chunks[1])?Buffer.alloc(0):Buffer.from(this.chunks[1].buf);if(this.isPublicKeyHashOut())return Buffer.from(this.chunks[2].buf);throw new Error("Unrecognized script type to get data from")},Script.prototype.isPushOnly=function(){return _.every(this.chunks,function(chunk){return chunk.opcodenum<=Opcode.OP_16})},(Script.types={}).UNKNOWN="Unknown",Script.types.PUBKEY_OUT="Pay to public key",Script.types.PUBKEY_IN="Spend from public key",Script.types.PUBKEYHASH_OUT="Pay to public key hash",Script.types.PUBKEYHASH_IN="Spend from public key hash",Script.types.SCRIPTHASH_OUT="Pay to script hash",Script.types.SCRIPTHASH_IN="Spend from script hash",Script.types.MULTISIG_OUT="Pay to multisig",Script.types.MULTISIG_IN="Spend from multisig",Script.types.DATA_OUT="Data push",Script.OP_RETURN_STANDARD_SIZE=80,Script.prototype.classify=function(){if(this._isInput)return this.classifyInput();if(this._isOutput)return this.classifyOutput();var outputType=this.classifyOutput();return outputType!=Script.types.UNKNOWN?outputType:this.classifyInput()},(Script.outputIdentifiers={}).PUBKEY_OUT=Script.prototype.isPublicKeyOut,Script.outputIdentifiers.PUBKEYHASH_OUT=Script.prototype.isPublicKeyHashOut,Script.outputIdentifiers.MULTISIG_OUT=Script.prototype.isMultisigOut,Script.outputIdentifiers.SCRIPTHASH_OUT=Script.prototype.isScriptHashOut,Script.outputIdentifiers.DATA_OUT=Script.prototype.isDataOut,Script.prototype.classifyOutput=function(){for(var type in Script.outputIdentifiers)if(Script.outputIdentifiers[type].bind(this)())return Script.types[type];return Script.types.UNKNOWN},(Script.inputIdentifiers={}).PUBKEY_IN=Script.prototype.isPublicKeyIn,Script.inputIdentifiers.PUBKEYHASH_IN=Script.prototype.isPublicKeyHashIn,Script.inputIdentifiers.MULTISIG_IN=Script.prototype.isMultisigIn,Script.inputIdentifiers.SCRIPTHASH_IN=Script.prototype.isScriptHashIn,Script.prototype.classifyInput=function(){for(var type in Script.inputIdentifiers)if(Script.inputIdentifiers[type].bind(this)())return Script.types[type];return Script.types.UNKNOWN},Script.prototype.isStandard=function(){return this.classify()!==Script.types.UNKNOWN},Script.prototype.prepend=function(obj){return this._addByType(obj,!0),this},Script.prototype.equals=function(script){if($.checkState(script instanceof Script,"Must provide another script"),this.chunks.length!==script.chunks.length)return!1;var i;for(i=0;i=0&&len=1&&buf[0]<=16?opcodenum===Opcode.OP_1+(buf[0]-1):1===buf.length&&129===buf[0]?opcodenum===Opcode.OP_1NEGATE:buf.length<=75?opcodenum===buf.length:buf.length<=255?opcodenum===Opcode.OP_PUSHDATA1:!(buf.length<=65535)||opcodenum===Opcode.OP_PUSHDATA2)},Script.prototype._decodeOP_N=function(opcode){if(opcode===Opcode.OP_0)return 0;if(opcode>=Opcode.OP_1&&opcode<=Opcode.OP_16)return opcode-(Opcode.OP_1-1);throw new Error("Invalid opcode: "+JSON.stringify(opcode))},Script.prototype.getSignatureOperationsCount=function(accurate){accurate=!!_.isUndefined(accurate)||accurate;var self=this,n=0,lastOpcode=Opcode.OP_INVALIDOPCODE;return _.each(self.chunks,function(chunk){var opcode=chunk.opcodenum;opcode==Opcode.OP_CHECKSIG||opcode==Opcode.OP_CHECKSIGVERIFY?n++:opcode!=Opcode.OP_CHECKMULTISIG&&opcode!=Opcode.OP_CHECKMULTISIGVERIFY||(accurate&&lastOpcode>=Opcode.OP_1&&lastOpcode<=Opcode.OP_16?n+=self._decodeOP_N(lastOpcode):n+=20),lastOpcode=opcode}),n},module.exports=Script}).call(this,require("buffer").Buffer)},{"../address":130,"../crypto/hash":137,"../crypto/signature":140,"../encoding/bufferreader":143,"../encoding/bufferwriter":144,"../errors":146,"../networks":150,"../opcode":151,"../publickey":153,"../util/buffer":172,"../util/js":173,"../util/preconditions":174,buffer:240,lodash:192}],157:[function(require,module,exports){module.exports=require("./transaction"),module.exports.Input=require("./input"),module.exports.Output=require("./output"),module.exports.UnspentOutput=require("./unspentoutput"),module.exports.Signature=require("./signature"),module.exports.Sighash=require("./sighash"),module.exports.SighashWitness=require("./sighashwitness")},{"./input":158,"./output":164,"./sighash":165,"./sighashwitness":166,"./signature":167,"./transaction":168,"./unspentoutput":169}],158:[function(require,module,exports){module.exports=require("./input"),module.exports.PublicKey=require("./publickey"),module.exports.PublicKeyHash=require("./publickeyhash"),module.exports.MultiSig=require("./multisig.js"),module.exports.MultiSigScriptHash=require("./multisigscripthash.js")},{"./input":159,"./multisig.js":160,"./multisigscripthash.js":161,"./publickey":162,"./publickeyhash":163}],159:[function(require,module,exports){"use strict";var _=require("lodash"),$=require("../../util/preconditions"),errors=require("../../errors"),BufferWriter=require("../../encoding/bufferwriter"),buffer=require("buffer"),BufferUtil=require("../../util/buffer"),JSUtil=require("../../util/js"),Script=require("../../script"),Sighash=require("../sighash"),Output=require("../output");function Input(params){return this instanceof Input?params?this._fromObject(params):void 0:new Input(params)}Input.MAXINT=4294967295,Input.DEFAULT_SEQNUMBER=4294967295,Input.DEFAULT_LOCKTIME_SEQNUMBER=4294967294,Input.DEFAULT_RBF_SEQNUMBER=4294967293,Object.defineProperty(Input.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new Script(this._scriptBuffer),this._script._isInput=!0),this._script)}}),Input.fromObject=function(obj){return $.checkArgument(_.isObject(obj)),(new Input)._fromObject(obj)},Input.prototype._fromObject=function(params){var prevTxId;if(prevTxId=_.isString(params.prevTxId)&&JSUtil.isHexa(params.prevTxId)?new buffer.Buffer(params.prevTxId,"hex"):params.prevTxId,this.witnesses=[],this.output=params.output?params.output instanceof Output?params.output:new Output(params.output):void 0,this.prevTxId=prevTxId||params.txidbuf,this.outputIndex=_.isUndefined(params.outputIndex)?params.txoutnum:params.outputIndex,this.sequenceNumber=_.isUndefined(params.sequenceNumber)?_.isUndefined(params.seqnum)?4294967295:params.seqnum:params.sequenceNumber,_.isUndefined(params.script)&&_.isUndefined(params.scriptBuffer))throw new errors.Transaction.Input.MissingScript;return this.setScript(params.scriptBuffer||params.script),this},Input.prototype.toObject=Input.prototype.toJSON=function(){var obj={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(obj.scriptString=this.script.toString()),this.output&&(obj.output=this.output.toObject()),obj},Input.fromBufferReader=function(br){var input=new Input;return input.prevTxId=br.readReverse(32),input.outputIndex=br.readUInt32LE(),input._scriptBuffer=br.readVarLengthBuffer(),input.sequenceNumber=br.readUInt32LE(),input},Input.prototype.toBufferWriter=function(writer){writer||(writer=new BufferWriter),writer.writeReverse(this.prevTxId),writer.writeUInt32LE(this.outputIndex);var script=this._scriptBuffer;return writer.writeVarintNum(script.length),writer.write(script),writer.writeUInt32LE(this.sequenceNumber),writer},Input.prototype.setScript=function(script){if(this._script=null,script instanceof Script)this._script=script,this._script._isInput=!0,this._scriptBuffer=script.toBuffer();else if(JSUtil.isHexa(script))this._scriptBuffer=new buffer.Buffer(script,"hex");else if(_.isString(script))this._script=new Script(script),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else{if(!BufferUtil.isBuffer(script))throw new TypeError("Invalid argument type: script");this._scriptBuffer=new buffer.Buffer(script)}return this},Input.prototype.getSignatures=function(){throw new errors.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))},Input.prototype.getSatoshisBuffer=function(){return $.checkState(this.output instanceof Output),$.checkState(this.output._satoshisBN),(new BufferWriter).writeUInt64LEBN(this.output._satoshisBN).toBuffer()},Input.prototype.isFullySigned=function(){throw new errors.AbstractMethodInvoked("Input#isFullySigned")},Input.prototype.isFinal=function(){return 4294967295!==this.sequenceNumber},Input.prototype.addSignature=function(){throw new errors.AbstractMethodInvoked("Input#addSignature")},Input.prototype.clearSignatures=function(){throw new errors.AbstractMethodInvoked("Input#clearSignatures")},Input.prototype.hasWitnesses=function(){return!!(this.witnesses&&this.witnesses.length>0)},Input.prototype.getWitnesses=function(){return this.witnesses},Input.prototype.setWitnesses=function(witnesses){this.witnesses=witnesses},Input.prototype.isValidSignature=function(transaction,signature){return signature.signature.nhashtype=signature.sigtype,Sighash.verify(transaction,signature.signature,signature.publicKey,signature.inputIndex,this.output.script)},Input.prototype.isNull=function(){return"0000000000000000000000000000000000000000000000000000000000000000"===this.prevTxId.toString("hex")&&4294967295===this.outputIndex},Input.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length},module.exports=Input},{"../../encoding/bufferwriter":144,"../../errors":146,"../../script":154,"../../util/buffer":172,"../../util/js":173,"../../util/preconditions":174,"../output":164,"../sighash":165,buffer:240,lodash:192}],160:[function(require,module,exports){"use strict";var _=require("lodash"),inherits=require("inherits"),Input=(require("../transaction"),require("./input")),Output=require("../output"),$=require("../../util/preconditions"),Script=require("../../script"),Signature=require("../../crypto/signature"),Sighash=require("../sighash"),BufferUtil=(require("../../publickey"),require("../../util/buffer")),TransactionSignature=require("../signature");function MultiSigInput(input,pubkeys,threshold,signatures,opts){opts=opts||{},Input.apply(this,arguments);var self=this;pubkeys=pubkeys||input.publicKeys,threshold=threshold||input.threshold,signatures=signatures||input.signatures,opts.noSorting?this.publicKeys=pubkeys:this.publicKeys=_.sortBy(pubkeys,function(publicKey){return publicKey.toString("hex")}),$.checkState(Script.buildMultisigOut(this.publicKeys,threshold).equals(this.output.script),"Provided public keys don't match to the provided output script"),this.publicKeyIndex={},_.each(this.publicKeys,function(publicKey,index){self.publicKeyIndex[publicKey.toString()]=index}),this.threshold=threshold,this.signatures=signatures?this._deserializeSignatures(signatures):new Array(this.publicKeys.length)}inherits(MultiSigInput,Input),MultiSigInput.prototype.toObject=function(){var obj=Input.prototype.toObject.apply(this,arguments);return obj.threshold=this.threshold,obj.publicKeys=_.map(this.publicKeys,function(publicKey){return publicKey.toString()}),obj.signatures=this._serializeSignatures(),obj},MultiSigInput.prototype._deserializeSignatures=function(signatures){return _.map(signatures,function(signature){if(signature)return new TransactionSignature(signature)})},MultiSigInput.prototype._serializeSignatures=function(){return _.map(this.signatures,function(signature){if(signature)return signature.toObject()})},MultiSigInput.prototype.getSignatures=function(transaction,privateKey,index,sigtype){$.checkState(this.output instanceof Output),sigtype=sigtype||Signature.SIGHASH_ALL;var self=this,results=[];return _.each(this.publicKeys,function(publicKey){publicKey.toString()===privateKey.publicKey.toString()&&results.push(new TransactionSignature({publicKey:privateKey.publicKey,prevTxId:self.prevTxId,outputIndex:self.outputIndex,inputIndex:index,signature:Sighash.sign(transaction,privateKey,sigtype,index,self.output.script),sigtype:sigtype}))}),results},MultiSigInput.prototype.addSignature=function(transaction,signature){return $.checkState(!this.isFullySigned(),"All needed signatures have already been added"),$.checkArgument(!_.isUndefined(this.publicKeyIndex[signature.publicKey.toString()]),"Signature has no matching public key"),$.checkState(this.isValidSignature(transaction,signature)),this.signatures[this.publicKeyIndex[signature.publicKey.toString()]]=signature,this._updateScript(),this},MultiSigInput.prototype._updateScript=function(){return this.setScript(Script.buildMultisigIn(this.publicKeys,this.threshold,this._createSignatures())),this},MultiSigInput.prototype._createSignatures=function(){return _.map(_.filter(this.signatures,function(signature){return!_.isUndefined(signature)}),function(signature){return BufferUtil.concat([signature.signature.toDER(),BufferUtil.integerAsSingleByteBuffer(signature.sigtype)])})},MultiSigInput.prototype.clearSignatures=function(){this.signatures=new Array(this.publicKeys.length),this._updateScript()},MultiSigInput.prototype.isFullySigned=function(){return this.countSignatures()===this.threshold},MultiSigInput.prototype.countMissingSignatures=function(){return this.threshold-this.countSignatures()},MultiSigInput.prototype.countSignatures=function(){return _.reduce(this.signatures,function(sum,signature){return sum+!!signature},0)},MultiSigInput.prototype.publicKeysWithoutSignature=function(){var self=this;return _.filter(this.publicKeys,function(publicKey){return!self.signatures[self.publicKeyIndex[publicKey.toString()]]})},MultiSigInput.prototype.isValidSignature=function(transaction,signature){return signature.signature.nhashtype=signature.sigtype,Sighash.verify(transaction,signature.signature,signature.publicKey,signature.inputIndex,this.output.script)},MultiSigInput.normalizeSignatures=function(transaction,input,inputIndex,signatures,publicKeys){return publicKeys.map(function(pubKey){var signatureMatch=null;return signatures=signatures.filter(function(signatureBuffer){if(signatureMatch)return!0;var signature=new TransactionSignature({signature:Signature.fromTxFormat(signatureBuffer),publicKey:pubKey,prevTxId:input.prevTxId,outputIndex:input.outputIndex,inputIndex:inputIndex,sigtype:Signature.SIGHASH_ALL});return signature.signature.nhashtype=signature.sigtype,!Sighash.verify(transaction,signature.signature,signature.publicKey,signature.inputIndex,input.output.script)||(signatureMatch=signature,!1)}),signatureMatch||null})},MultiSigInput.OPCODES_SIZE=1,MultiSigInput.SIGNATURE_SIZE=73,MultiSigInput.prototype._estimateSize=function(){return MultiSigInput.OPCODES_SIZE+this.threshold*MultiSigInput.SIGNATURE_SIZE},module.exports=MultiSigInput},{"../../crypto/signature":140,"../../publickey":153,"../../script":154,"../../util/buffer":172,"../../util/preconditions":174,"../output":164,"../sighash":165,"../signature":167,"../transaction":168,"./input":159,inherits:191,lodash:192}],161:[function(require,module,exports){(function(Buffer){"use strict";var _=require("lodash"),inherits=require("inherits"),Input=require("./input"),Output=require("../output"),$=require("../../util/preconditions"),Script=require("../../script"),Signature=require("../../crypto/signature"),Sighash=require("../sighash"),SighashWitness=require("../sighashwitness"),BufferWriter=require("../../encoding/bufferwriter"),BufferUtil=require("../../util/buffer"),TransactionSignature=require("../signature");function MultiSigScriptHashInput(input,pubkeys,threshold,signatures,nestedWitness,opts){opts=opts||{},Input.apply(this,arguments);var self=this;if(pubkeys=pubkeys||input.publicKeys,threshold=threshold||input.threshold,signatures=signatures||input.signatures,this.nestedWitness=!!nestedWitness,opts.noSorting?this.publicKeys=pubkeys:this.publicKeys=_.sortBy(pubkeys,function(publicKey){return publicKey.toString("hex")}),this.redeemScript=Script.buildMultisigOut(this.publicKeys,threshold),this.nestedWitness){var nested=Script.buildWitnessMultisigOutFromScript(this.redeemScript);$.checkState(Script.buildScriptHashOut(nested).equals(this.output.script),"Provided public keys don't hash to the provided output (nested witness)");var scriptSig=new Script;scriptSig.add(nested.toBuffer()),this.setScript(scriptSig)}else $.checkState(Script.buildScriptHashOut(this.redeemScript).equals(this.output.script),"Provided public keys don't hash to the provided output");this.publicKeyIndex={},_.each(this.publicKeys,function(publicKey,index){self.publicKeyIndex[publicKey.toString()]=index}),this.threshold=threshold,this.signatures=signatures?this._deserializeSignatures(signatures):new Array(this.publicKeys.length)}inherits(MultiSigScriptHashInput,Input),MultiSigScriptHashInput.prototype.toObject=function(){var obj=Input.prototype.toObject.apply(this,arguments);return obj.threshold=this.threshold,obj.publicKeys=_.map(this.publicKeys,function(publicKey){return publicKey.toString()}),obj.signatures=this._serializeSignatures(),obj},MultiSigScriptHashInput.prototype._deserializeSignatures=function(signatures){return _.map(signatures,function(signature){if(signature)return new TransactionSignature(signature)})},MultiSigScriptHashInput.prototype._serializeSignatures=function(){return _.map(this.signatures,function(signature){if(signature)return signature.toObject()})},MultiSigScriptHashInput.prototype.getScriptCode=function(){var writer=new BufferWriter;if(this.redeemScript.hasCodeseparators())throw new Error("@TODO");var redeemScriptBuffer=this.redeemScript.toBuffer();return writer.writeVarintNum(redeemScriptBuffer.length),writer.write(redeemScriptBuffer),writer.toBuffer()},MultiSigScriptHashInput.prototype.getSighash=function(transaction,privateKey,index,sigtype){var hash;if(this.nestedWitness){var scriptCode=this.getScriptCode(),satoshisBuffer=this.getSatoshisBuffer();hash=SighashWitness.sighash(transaction,sigtype,index,scriptCode,satoshisBuffer)}else hash=Sighash.sighash(transaction,sigtype,index,this.redeemScript);return hash},MultiSigScriptHashInput.prototype.getSignatures=function(transaction,privateKey,index,sigtype){$.checkState(this.output instanceof Output),sigtype=sigtype||Signature.SIGHASH_ALL;var self=this,results=[];return _.each(this.publicKeys,function(publicKey){if(publicKey.toString()===privateKey.publicKey.toString()){var signature;if(self.nestedWitness){var scriptCode=self.getScriptCode(),satoshisBuffer=self.getSatoshisBuffer();signature=SighashWitness.sign(transaction,privateKey,sigtype,index,scriptCode,satoshisBuffer)}else signature=Sighash.sign(transaction,privateKey,sigtype,index,self.redeemScript);results.push(new TransactionSignature({publicKey:privateKey.publicKey,prevTxId:self.prevTxId,outputIndex:self.outputIndex,inputIndex:index,signature:signature,sigtype:sigtype}))}}),results},MultiSigScriptHashInput.prototype.addSignature=function(transaction,signature){return $.checkState(!this.isFullySigned(),"All needed signatures have already been added"),$.checkArgument(!_.isUndefined(this.publicKeyIndex[signature.publicKey.toString()]),"Signature has no matching public key"),$.checkState(this.isValidSignature(transaction,signature)),this.signatures[this.publicKeyIndex[signature.publicKey.toString()]]=signature,this._updateScript(),this},MultiSigScriptHashInput.prototype._updateScript=function(){if(this.nestedWitness){for(var stack=[new Buffer(0)],signatures=this._createSignatures(),i=0;i9007199254740991?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0&&"transaction txout negative"},Output.prototype.toObject=Output.prototype.toJSON=function(){var obj={satoshis:this.satoshis};return obj.script=this._scriptBuffer.toString("hex"),obj},Output.fromObject=function(data){return new Output(data)},Output.prototype.setScriptFromBuffer=function(buffer){this._scriptBuffer=buffer;try{this._script=Script.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(e){if(!(e instanceof errors.Script.InvalidBuffer))throw e;this._script=null}},Output.prototype.setScript=function(script){if(script instanceof Script)this._scriptBuffer=script.toBuffer(),this._script=script,this._script._isOutput=!0;else if(_.isString(script))this._script=Script.fromString(script),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else{if(!bufferUtil.isBuffer(script))throw new TypeError("Invalid argument type: script");this.setScriptFromBuffer(script)}return this},Output.prototype.inspect=function(){var scriptStr;return scriptStr=this.script?this.script.inspect():this._scriptBuffer.toString("hex"),""},Output.fromBufferReader=function(br){var obj={};obj.satoshis=br.readUInt64LEBN();var size=br.readVarintNum();return obj.script=0!==size?br.read(size):new buffer.Buffer([]),new Output(obj)},Output.prototype.toBufferWriter=function(writer){writer||(writer=new BufferWriter),writer.writeUInt64LEBN(this._satoshisBN);var script=this._scriptBuffer;return writer.writeVarintNum(script.length),writer.write(script),writer},module.exports=Output},{"../crypto/bn":135,"../encoding/bufferwriter":144,"../errors":146,"../script":154,"../util/buffer":172,"../util/js":173,"../util/preconditions":174,buffer:240,lodash:192}],165:[function(require,module,exports){(function(Buffer){"use strict";var buffer=require("buffer"),Signature=require("../crypto/signature"),Script=require("../script"),Output=require("./output"),BufferReader=require("../encoding/bufferreader"),BufferWriter=require("../encoding/bufferwriter"),BN=require("../crypto/bn"),Hash=require("../crypto/hash"),ECDSA=require("../crypto/ecdsa"),$=require("../util/preconditions"),_=require("lodash"),sighash=function(transaction,sighashType,inputNumber,subscript){var i,Transaction=require("./transaction"),Input=require("./input"),txcopy=Transaction.shallowCopy(transaction);for((subscript=new Script(subscript)).removeCodeseparators(),i=0;i=txcopy.outputs.length)return Buffer.from("0000000000000000000000000000000000000000000000000000000000000001","hex");for(txcopy.outputs.length=inputNumber+1,i=0;imaximumFee)return this._missingChange()?new errors.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new errors.Transaction.FeeError.TooLarge("expected less than "+maximumFee+" but got "+unspent)}if(!opts.disableSmallFees){var minimumFee=Math.ceil(this._estimateFee()/Transaction.FEE_SECURITY_MARGIN);if(unspent"},Transaction.prototype.toBuffer=function(noWitness){var writer=new BufferWriter;return this.toBufferWriter(writer,noWitness).toBuffer()},Transaction.prototype.hasWitnesses=function(){for(var i=0;i=Transaction.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new errors.Transaction.BlockHeightTooHigh;if(height<0)throw new errors.Transaction.NLockTimeOutOfRange;for(var i=0;i0?(this._changeIndex=this.outputs.length,this._addOutput(new Output({script:this._changeScript,satoshis:changeAmount}))):this._changeIndex=void 0}},Transaction.prototype.getFee=function(){return this.isCoinbase()?0:_.isUndefined(this._fee)?this._changeScript?this._estimateFee():this._getUnspentValue():this._fee},Transaction.prototype._estimateFee=function(){var estimatedSize=this._estimateSize(),available=this._getUnspentValue();return Transaction._estimateFee(estimatedSize,available,this._feePerKb)},Transaction.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()},Transaction.prototype._clearSignatures=function(){_.each(this.inputs,function(input){input.clearSignatures()})},Transaction._estimateFee=function(size,amountAvailable,feePerKb){return amountAvailable>Math.ceil(size/1e3)*(feePerKb||Transaction.FEE_PER_KB)&&(size+=Transaction.CHANGE_OUTPUT_MAX_SIZE),Math.ceil(size/1e3)*(feePerKb||Transaction.FEE_PER_KB)},Transaction.prototype._estimateSize=function(){var result=Transaction.MAXIMUM_EXTRA_SIZE;return _.each(this.inputs,function(input){result+=input._estimateSize()}),_.each(this.outputs,function(output){result+=output.script.toBuffer().length+9}),result},Transaction.prototype._removeOutput=function(index){var output=this.outputs[index];this.outputs=_.without(this.outputs,output),this._outputAmount=void 0},Transaction.prototype.removeOutput=function(index){this._removeOutput(index),this._updateChangeOutput()},Transaction.prototype.sort=function(){return this.sortInputs(function(inputs){var copy=Array.prototype.concat.apply([],inputs);return copy.sort(function(first,second){return compare(first.prevTxId,second.prevTxId)||first.outputIndex-second.outputIndex}),copy}),this.sortOutputs(function(outputs){var copy=Array.prototype.concat.apply([],outputs);return copy.sort(function(first,second){return first.satoshis-second.satoshis||compare(first.script.toBuffer(),second.script.toBuffer())}),copy}),this},Transaction.prototype.shuffleOutputs=function(){return this.sortOutputs(_.shuffle)},Transaction.prototype.sortOutputs=function(sortingFunction){var outs=sortingFunction(this.outputs);return this._newOutputOrder(outs)},Transaction.prototype.sortInputs=function(sortingFunction){return this.inputs=sortingFunction(this.inputs),this._clearSignatures(),this},Transaction.prototype._newOutputOrder=function(newOutputs){if(this.outputs.length!==newOutputs.length||0!==_.difference(this.outputs,newOutputs).length)throw new errors.Transaction.InvalidSorting;if(!_.isUndefined(this._changeIndex)){var changeOutput=this.outputs[this._changeIndex];this._changeIndex=_.findIndex(newOutputs,changeOutput)}return this.outputs=newOutputs,this},Transaction.prototype.removeInput=function(txId,outputIndex){var index;if((index=!outputIndex&&_.isNumber(txId)?txId:_.findIndex(this.inputs,function(input){return input.prevTxId.toString("hex")===txId&&input.outputIndex===outputIndex}))<0||index>=this.inputs.length)throw new errors.Transaction.InvalidIndex(index,this.inputs.length);var input=this.inputs[index];this.inputs=_.without(this.inputs,input),this._inputAmount=void 0,this._updateChangeOutput()},Transaction.prototype.sign=function(privateKey,sigtype){$.checkState(this.hasAllUtxoInfo(),"Not all utxo information is available to sign the transaction.");var self=this;return _.isArray(privateKey)?(_.each(privateKey,function(privateKey){self.sign(privateKey,sigtype)}),this):(_.each(this.getSignatures(privateKey,sigtype),function(signature){self.applySignature(signature)}),this)},Transaction.prototype.getSignatures=function(privKey,sigtype){privKey=new PrivateKey(privKey),sigtype=sigtype||Signature.SIGHASH_ALL;var transaction=this,results=[],hashData=Hash.sha256ripemd160(privKey.publicKey.toBuffer());return _.each(this.inputs,function(input,index){_.each(input.getSignatures(transaction,privKey,index,sigtype,hashData),function(signature){results.push(signature)})}),results},Transaction.prototype.applySignature=function(signature){return this.inputs[signature.inputIndex].addSignature(this,signature),this},Transaction.prototype.isFullySigned=function(){return _.each(this.inputs,function(input){if(input.isFullySigned===Input.prototype.isFullySigned)throw new errors.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction")}),_.every(_.map(this.inputs,function(input){return input.isFullySigned()}))},Transaction.prototype.isValidSignature=function(signature){if(this.inputs[signature.inputIndex].isValidSignature===Input.prototype.isValidSignature)throw new errors.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[signature.inputIndex].isValidSignature(this,signature)},Transaction.prototype.verifySignature=function(sig,pubkey,nin,subscript,sigversion,satoshis){if(_.isUndefined(sigversion)&&(sigversion=0),1===sigversion){var satoshisBuffer,subscriptBuffer=subscript.toBuffer(),scriptCodeWriter=new BufferWriter;return scriptCodeWriter.writeVarintNum(subscriptBuffer.length),scriptCodeWriter.write(subscriptBuffer),satoshis?($.checkState(JSUtil.isNaturalNumber(satoshis)),satoshisBuffer=(new BufferWriter).writeUInt64LEBN(new BN(satoshis)).toBuffer()):satoshisBuffer=this.inputs[nin].getSatoshisBuffer(),SighashWitness.verify(this,sig,pubkey,nin,scriptCodeWriter.toBuffer(),satoshisBuffer)}return Sighash.verify(this,sig,pubkey,nin,subscript)},Transaction.prototype.verify=function(){if(0===this.inputs.length)return"transaction txins empty";if(0===this.outputs.length)return"transaction txouts empty";for(var valueoutbn=new BN(0),i=0;i1e6)return"transaction over the maximum block size";var txinmap={};for(i=0;i100)return"coinbase transaction script size invalid"}else for(i=0;i=Input.MAXINT-1&&(input.sequenceNumber=Input.DEFAULT_RBF_SEQNUMBER)}return this},module.exports=Transaction}).call(this,require("buffer").Buffer)},{"../address":130,"../crypto/bn":135,"../crypto/hash":137,"../crypto/signature":140,"../encoding/bufferreader":143,"../encoding/bufferwriter":144,"../errors":146,"../privatekey":152,"../script":154,"../util/buffer":172,"../util/js":173,"../util/preconditions":174,"./input":158,"./output":164,"./sighash":165,"./sighashwitness":166,"./unspentoutput":169,buffer:240,"buffer-compare":237,lodash:192}],169:[function(require,module,exports){"use strict";var _=require("lodash"),$=require("../util/preconditions"),JSUtil=require("../util/js"),Script=require("../script"),Address=require("../address"),Unit=require("../unit");function UnspentOutput(data){if(!(this instanceof UnspentOutput))return new UnspentOutput(data);$.checkArgument(_.isObject(data),"Must provide an object from where to extract data");var address=data.address?new Address(data.address):void 0,txId=data.txid?data.txid:data.txId;if(!txId||!JSUtil.isHexaString(txId)||txId.length>64)throw new Error("Invalid TXID in object",data);var outputIndex=_.isUndefined(data.vout)?data.outputIndex:data.vout;if(!_.isNumber(outputIndex))throw new Error("Invalid outputIndex, received "+outputIndex);$.checkArgument(!_.isUndefined(data.scriptPubKey)||!_.isUndefined(data.script),"Must provide the scriptPubKey for that output!");var script=new Script(data.scriptPubKey||data.script);$.checkArgument(!_.isUndefined(data.amount)||!_.isUndefined(data.satoshis),"Must provide an amount for the output");var amount=_.isUndefined(data.amount)?data.satoshis:new Unit.fromBTC(data.amount).toSatoshis();$.checkArgument(_.isNumber(amount),"Amount must be a number"),JSUtil.defineImmutable(this,{address:address,txId:txId,outputIndex:outputIndex,script:script,satoshis:amount})}UnspentOutput.prototype.inspect=function(){return""},UnspentOutput.prototype.toString=function(){return this.txId+":"+this.outputIndex},UnspentOutput.fromObject=function(data){return new UnspentOutput(data)},UnspentOutput.prototype.toObject=UnspentOutput.prototype.toJSON=function(){return{address:this.address?this.address.toString():void 0,txid:this.txId,vout:this.outputIndex,scriptPubKey:this.script.toBuffer().toString("hex"),amount:Unit.fromSatoshis(this.satoshis).toBTC()}},module.exports=UnspentOutput},{"../address":130,"../script":154,"../unit":170,"../util/js":173,"../util/preconditions":174,lodash:192}],170:[function(require,module,exports){"use strict";var _=require("lodash"),errors=require("./errors"),$=require("./util/preconditions"),UNITS={BTC:[1e8,8],mBTC:[1e5,5],uBTC:[100,2],bits:[100,2],satoshis:[1,0]};function Unit(amount,code){if(!(this instanceof Unit))return new Unit(amount,code);if(_.isNumber(code)){if(code<=0)throw new errors.Unit.InvalidRate(code);amount/=code,code=Unit.BTC}this._value=this._from(amount,code);var self=this;Object.keys(UNITS).forEach(function(key){Object.defineProperty(self,key,{get:function(){return self.to(key)},enumerable:!0})})}Object.keys(UNITS).forEach(function(key){Unit[key]=key}),Unit.fromObject=function(data){return $.checkArgument(_.isObject(data),"Argument is expected to be an object"),new Unit(data.amount,data.code)},Unit.fromBTC=function(amount){return new Unit(amount,Unit.BTC)},Unit.fromMillis=Unit.fromMilis=function(amount){return new Unit(amount,Unit.mBTC)},Unit.fromMicros=Unit.fromBits=function(amount){return new Unit(amount,Unit.bits)},Unit.fromSatoshis=function(amount){return new Unit(amount,Unit.satoshis)},Unit.fromFiat=function(amount,rate){return new Unit(amount,rate)},Unit.prototype._from=function(amount,code){if(!UNITS[code])throw new errors.Unit.UnknownCode(code);return parseInt((amount*UNITS[code][0]).toFixed())},Unit.prototype.to=function(code){if(_.isNumber(code)){if(code<=0)throw new errors.Unit.InvalidRate(code);return parseFloat((this.BTC*code).toFixed(2))}if(!UNITS[code])throw new errors.Unit.UnknownCode(code);var value=this._value/UNITS[code][0];return parseFloat(value.toFixed(UNITS[code][1]))},Unit.prototype.toBTC=function(){return this.to(Unit.BTC)},Unit.prototype.toMillis=Unit.prototype.toMilis=function(){return this.to(Unit.mBTC)},Unit.prototype.toMicros=Unit.prototype.toBits=function(){return this.to(Unit.bits)},Unit.prototype.toSatoshis=function(){return this.to(Unit.satoshis)},Unit.prototype.atRate=function(rate){return this.to(rate)},Unit.prototype.toString=function(){return this.satoshis+" satoshis"},Unit.prototype.toObject=Unit.prototype.toJSON=function(){return{amount:this.BTC,code:Unit.BTC}},Unit.prototype.inspect=function(){return""},module.exports=Unit},{"./errors":146,"./util/preconditions":174,lodash:192}],171:[function(require,module,exports){"use strict";var _=require("lodash"),URL=require("url"),Address=require("./address"),Unit=require("./unit"),URI=function(data,knownParams){if(!(this instanceof URI))return new URI(data,knownParams);if(this.extras={},this.knownParams=knownParams||[],this.address=this.network=this.amount=this.message=null,"string"==typeof data){var params=URI.parse(data);params.amount&&(params.amount=this._parseAmount(params.amount)),this._fromObject(params)}else{if("object"!=typeof data)throw new TypeError("Unrecognized data format.");this._fromObject(data)}};URI.fromString=function(str){if("string"!=typeof str)throw new TypeError("Expected a string");return new URI(str)},URI.fromObject=function(json){return new URI(json)},URI.isValid=function(arg,knownParams){try{new URI(arg,knownParams)}catch(err){return!1}return!0},URI.parse=function(uri){var info=URL.parse(uri,!0);if("bitcoin:"!==info.protocol)throw new TypeError("Invalid bitcoin URI");var group=/[^:]*:\/?\/?([^?]*)/.exec(uri);return info.query.address=group&&group[1]||void 0,info.query},URI.Members=["address","amount","message","label","r"],URI.prototype._fromObject=function(obj){if(!Address.isValid(obj.address))throw new TypeError("Invalid bitcoin address");for(var key in this.address=new Address(obj.address),this.network=this.address.network,this.amount=obj.amount,obj)if("address"!==key&&"amount"!==key){if(/^req-/.exec(key)&&-1===this.knownParams.indexOf(key))throw Error("Unknown required argument "+key);(URI.Members.indexOf(key)>-1?this:this.extras)[key]=obj[key]}},URI.prototype._parseAmount=function(amount){if(amount=Number(amount),isNaN(amount))throw new TypeError("Invalid amount");return Unit.fromBTC(amount).toSatoshis()},URI.prototype.toObject=URI.prototype.toJSON=function(){for(var json={},i=0;i"},module.exports=URI},{"./address":130,"./unit":170,lodash:192,url:900}],172:[function(require,module,exports){(function(Buffer){"use strict";var buffer=require("buffer"),assert=require("assert"),js=require("./js"),$=require("./preconditions");function equals(a,b){if(a.length!==b.length)return!1;for(var length=a.length,i=0;i>24&255),bytes.push(integer>>16&255),bytes.push(integer>>8&255),bytes.push(255&integer),Buffer.from(bytes)},integerFromBuffer:function(buffer){return $.checkArgumentType(buffer,"Buffer","buffer"),buffer[0]<<24|buffer[1]<<16|buffer[2]<<8|buffer[3]},integerFromSingleByteBuffer:function(buffer){return $.checkArgumentType(buffer,"Buffer","buffer"),buffer[0]},bufferToHex:function(buffer){return $.checkArgumentType(buffer,"Buffer","buffer"),buffer.toString("hex")},reverse:function(param){for(var ret=new buffer.Buffer(param.length),i=0;i=0}}},{lodash:192}],174:[function(require,module,exports){"use strict";var errors=require("../errors"),_=require("lodash");module.exports={checkState:function(condition,message){if(!condition)throw new errors.InvalidState(message)},checkArgument:function(condition,argumentName,message,docsPath){if(!condition)throw new errors.InvalidArgument(argumentName,message,docsPath)},checkArgumentType:function(argument,type,argumentName){if(argumentName=argumentName||"(unknown name)",_.isString(type)){if("Buffer"===type){if(!require("buffer").Buffer.isBuffer(argument))throw new errors.InvalidArgumentType(argument,type,argumentName)}else if(typeof argument!==type)throw new errors.InvalidArgumentType(argument,type,argumentName)}else if(!(argument instanceof type))throw new errors.InvalidArgumentType(argument,type.name,argumentName)}}},{"../errors":146,buffer:240,lodash:192}],175:[function(require,module,exports){"use strict";var elliptic=exports;elliptic.version=require("../package.json").version,elliptic.utils=require("./elliptic/utils"),elliptic.rand=require("brorand"),elliptic.curve=require("./elliptic/curve"),elliptic.curves=require("./elliptic/curves"),elliptic.ec=require("./elliptic/ec"),elliptic.eddsa=require("./elliptic/eddsa")},{"../package.json":190,"./elliptic/curve":178,"./elliptic/curves":181,"./elliptic/ec":182,"./elliptic/eddsa":185,"./elliptic/utils":189,brorand:199}],176:[function(require,module,exports){"use strict";var BN=require("bn.js"),utils=require("../../elliptic").utils,getNAF=utils.getNAF,getJSF=utils.getJSF,assert=utils.assert;function BaseCurve(type,conf){this.type=type,this.p=new BN(conf.p,16),this.red=conf.prime?BN.red(conf.prime):BN.mont(this.p),this.zero=new BN(0).toRed(this.red),this.one=new BN(1).toRed(this.red),this.two=new BN(2).toRed(this.red),this.n=conf.n&&new BN(conf.n,16),this.g=conf.g&&this.pointFromJSON(conf.g,conf.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var adjustCount=this.n&&this.p.div(this.n);!adjustCount||adjustCount.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function BasePoint(curve,type){this.curve=curve,this.type=type,this.precomputed=null}module.exports=BaseCurve,BaseCurve.prototype.point=function(){throw new Error("Not implemented")},BaseCurve.prototype.validate=function(){throw new Error("Not implemented")},BaseCurve.prototype._fixedNafMul=function(p,k){assert(p.precomputed);var doubles=p._getDoubles(),naf=getNAF(k,1),I=(1<=j;k--)nafW=(nafW<<1)+naf[k];repr.push(nafW)}for(var a=this.jpoint(null,null,null),b=this.jpoint(null,null,null),i=I;i>0;i--){for(j=0;j=0;i--){for(k=0;i>=0&&0===naf[i];i--)k++;if(i>=0&&k++,acc=acc.dblp(k),i<0)break;var z=naf[i];assert(0!==z),acc="affine"===p.type?z>0?acc.mixedAdd(wnd[z-1>>1]):acc.mixedAdd(wnd[-z-1>>1].neg()):z>0?acc.add(wnd[z-1>>1]):acc.add(wnd[-z-1>>1].neg())}return"affine"===p.type?acc.toP():acc},BaseCurve.prototype._wnafMulAdd=function(defW,points,coeffs,len,jacobianResult){for(var wndWidth=this._wnafT1,wnd=this._wnafT2,naf=this._wnafT3,max=0,i=0;i=1;i-=2){var a=i-1,b=i;if(1===wndWidth[a]&&1===wndWidth[b]){var comb=[points[a],null,null,points[b]];0===points[a].y.cmp(points[b].y)?(comb[1]=points[a].add(points[b]),comb[2]=points[a].toJ().mixedAdd(points[b].neg())):0===points[a].y.cmp(points[b].y.redNeg())?(comb[1]=points[a].toJ().mixedAdd(points[b]),comb[2]=points[a].add(points[b].neg())):(comb[1]=points[a].toJ().mixedAdd(points[b]),comb[2]=points[a].toJ().mixedAdd(points[b].neg()));var index=[-3,-1,-5,-7,0,7,5,1,3],jsf=getJSF(coeffs[a],coeffs[b]);max=Math.max(jsf[0].length,max),naf[a]=new Array(max),naf[b]=new Array(max);for(var j=0;j=0;i--){for(var k=0;i>=0;){var zero=!0;for(j=0;j=0&&k++,acc=acc.dblp(k),i<0)break;for(j=0;j0?p=wnd[j][z-1>>1]:z<0&&(p=wnd[j][-z-1>>1].neg()),acc="affine"===p.type?acc.mixedAdd(p):acc.add(p))}}for(i=0;i=Math.ceil((k.bitLength()+1)/doubles.step)},BasePoint.prototype._getDoubles=function(step,power){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var doubles=[this],acc=this,i=0;i":""},Point.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},Point.prototype._extDbl=function(){var a=this.x.redSqr(),b=this.y.redSqr(),c=this.z.redSqr();c=c.redIAdd(c);var d=this.curve._mulA(a),e=this.x.redAdd(this.y).redSqr().redISub(a).redISub(b),g=d.redAdd(b),f=g.redSub(c),h=d.redSub(b),nx=e.redMul(f),ny=g.redMul(h),nt=e.redMul(h),nz=f.redMul(g);return this.curve.point(nx,ny,nz,nt)},Point.prototype._projDbl=function(){var nx,ny,nz,b=this.x.redAdd(this.y).redSqr(),c=this.x.redSqr(),d=this.y.redSqr();if(this.curve.twisted){var f=(e=this.curve._mulA(c)).redAdd(d);if(this.zOne)nx=b.redSub(c).redSub(d).redMul(f.redSub(this.curve.two)),ny=f.redMul(e.redSub(d)),nz=f.redSqr().redSub(f).redSub(f);else{var h=this.z.redSqr(),j=f.redSub(h).redISub(h);nx=b.redSub(c).redISub(d).redMul(j),ny=f.redMul(e.redSub(d)),nz=f.redMul(j)}}else{var e=c.redAdd(d);h=this.curve._mulC(this.c.redMul(this.z)).redSqr(),j=e.redSub(h).redSub(h);nx=this.curve._mulC(b.redISub(e)).redMul(j),ny=this.curve._mulC(e).redMul(c.redISub(d)),nz=e.redMul(j)}return this.curve.point(nx,ny,nz)},Point.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},Point.prototype._extAdd=function(p){var a=this.y.redSub(this.x).redMul(p.y.redSub(p.x)),b=this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)),c=this.t.redMul(this.curve.dd).redMul(p.t),d=this.z.redMul(p.z.redAdd(p.z)),e=b.redSub(a),f=d.redSub(c),g=d.redAdd(c),h=b.redAdd(a),nx=e.redMul(f),ny=g.redMul(h),nt=e.redMul(h),nz=f.redMul(g);return this.curve.point(nx,ny,nz,nt)},Point.prototype._projAdd=function(p){var ny,nz,a=this.z.redMul(p.z),b=a.redSqr(),c=this.x.redMul(p.x),d=this.y.redMul(p.y),e=this.curve.d.redMul(c).redMul(d),f=b.redSub(e),g=b.redAdd(e),tmp=this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(c).redISub(d),nx=a.redMul(f).redMul(tmp);return this.curve.twisted?(ny=a.redMul(g).redMul(d.redSub(this.curve._mulA(c))),nz=f.redMul(g)):(ny=a.redMul(g).redMul(d.redSub(c)),nz=this.curve._mulC(f).redMul(g)),this.curve.point(nx,ny,nz)},Point.prototype.add=function(p){return this.isInfinity()?p:p.isInfinity()?this:this.curve.extended?this._extAdd(p):this._projAdd(p)},Point.prototype.mul=function(k){return this._hasDoubles(k)?this.curve._fixedNafMul(this,k):this.curve._wnafMul(this,k)},Point.prototype.mulAdd=function(k1,p,k2){return this.curve._wnafMulAdd(1,[this,p],[k1,k2],2,!1)},Point.prototype.jmulAdd=function(k1,p,k2){return this.curve._wnafMulAdd(1,[this,p],[k1,k2],2,!0)},Point.prototype.normalize=function(){if(this.zOne)return this;var zi=this.z.redInvm();return this.x=this.x.redMul(zi),this.y=this.y.redMul(zi),this.t&&(this.t=this.t.redMul(zi)),this.z=this.curve.one,this.zOne=!0,this},Point.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},Point.prototype.getX=function(){return this.normalize(),this.x.fromRed()},Point.prototype.getY=function(){return this.normalize(),this.y.fromRed()},Point.prototype.eq=function(other){return this===other||0===this.getX().cmp(other.getX())&&0===this.getY().cmp(other.getY())},Point.prototype.eqXToP=function(x){var rx=x.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(rx))return!0;for(var xc=x.clone(),t=this.curve.redN.redMul(this.z);;){if(xc.iadd(this.curve.n),xc.cmp(this.curve.p)>=0)return!1;if(rx.redIAdd(t),0===this.x.cmp(rx))return!0}return!1},Point.prototype.toP=Point.prototype.normalize,Point.prototype.mixedAdd=Point.prototype.add},{"../../elliptic":175,"../curve":178,"bn.js":198,inherits:191}],178:[function(require,module,exports){"use strict";var curve=exports;curve.base=require("./base"),curve.short=require("./short"),curve.mont=require("./mont"),curve.edwards=require("./edwards")},{"./base":176,"./edwards":177,"./mont":179,"./short":180}],179:[function(require,module,exports){"use strict";var curve=require("../curve"),BN=require("bn.js"),inherits=require("inherits"),Base=curve.base,utils=require("../../elliptic").utils;function MontCurve(conf){Base.call(this,"mont",conf),this.a=new BN(conf.a,16).toRed(this.red),this.b=new BN(conf.b,16).toRed(this.red),this.i4=new BN(4).toRed(this.red).redInvm(),this.two=new BN(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function Point(curve,x,z){Base.BasePoint.call(this,curve,"projective"),null===x&&null===z?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new BN(x,16),this.z=new BN(z,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}inherits(MontCurve,Base),module.exports=MontCurve,MontCurve.prototype.validate=function(point){var x=point.normalize().x,x2=x.redSqr(),rhs=x2.redMul(x).redAdd(x2.redMul(this.a)).redAdd(x);return 0===rhs.redSqrt().redSqr().cmp(rhs)},inherits(Point,Base.BasePoint),MontCurve.prototype.decodePoint=function(bytes,enc){return this.point(utils.toArray(bytes,enc),1)},MontCurve.prototype.point=function(x,z){return new Point(this,x,z)},MontCurve.prototype.pointFromJSON=function(obj){return Point.fromJSON(this,obj)},Point.prototype.precompute=function(){},Point.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},Point.fromJSON=function(curve,obj){return new Point(curve,obj[0],obj[1]||curve.one)},Point.prototype.inspect=function(){return this.isInfinity()?"":""},Point.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},Point.prototype.dbl=function(){var aa=this.x.redAdd(this.z).redSqr(),bb=this.x.redSub(this.z).redSqr(),c=aa.redSub(bb),nx=aa.redMul(bb),nz=c.redMul(bb.redAdd(this.curve.a24.redMul(c)));return this.curve.point(nx,nz)},Point.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},Point.prototype.diffAdd=function(p,diff){var a=this.x.redAdd(this.z),b=this.x.redSub(this.z),c=p.x.redAdd(p.z),da=p.x.redSub(p.z).redMul(a),cb=c.redMul(b),nx=diff.z.redMul(da.redAdd(cb).redSqr()),nz=diff.x.redMul(da.redISub(cb).redSqr());return this.curve.point(nx,nz)},Point.prototype.mul=function(k){for(var t=k.clone(),a=this,b=this.curve.point(null,null),bits=[];0!==t.cmpn(0);t.iushrn(1))bits.push(t.andln(1));for(var i=bits.length-1;i>=0;i--)0===bits[i]?(a=a.diffAdd(b,this),b=b.dbl()):(b=a.diffAdd(b,this),a=a.dbl());return b},Point.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},Point.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},Point.prototype.eq=function(other){return 0===this.getX().cmp(other.getX())},Point.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},Point.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":175,"../curve":178,"bn.js":198,inherits:191}],180:[function(require,module,exports){"use strict";var curve=require("../curve"),elliptic=require("../../elliptic"),BN=require("bn.js"),inherits=require("inherits"),Base=curve.base,assert=elliptic.utils.assert;function ShortCurve(conf){Base.call(this,"short",conf),this.a=new BN(conf.a,16).toRed(this.red),this.b=new BN(conf.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(conf),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function Point(curve,x,y,isRed){Base.BasePoint.call(this,curve,"affine"),null===x&&null===y?(this.x=null,this.y=null,this.inf=!0):(this.x=new BN(x,16),this.y=new BN(y,16),isRed&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function JPoint(curve,x,y,z){Base.BasePoint.call(this,curve,"jacobian"),null===x&&null===y&&null===z?(this.x=this.curve.one,this.y=this.curve.one,this.z=new BN(0)):(this.x=new BN(x,16),this.y=new BN(y,16),this.z=new BN(z,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}inherits(ShortCurve,Base),module.exports=ShortCurve,ShortCurve.prototype._getEndomorphism=function(conf){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var beta,lambda;if(conf.beta)beta=new BN(conf.beta,16).toRed(this.red);else{var betas=this._getEndoRoots(this.p);beta=(beta=betas[0].cmp(betas[1])<0?betas[0]:betas[1]).toRed(this.red)}if(conf.lambda)lambda=new BN(conf.lambda,16);else{var lambdas=this._getEndoRoots(this.n);0===this.g.mul(lambdas[0]).x.cmp(this.g.x.redMul(beta))?lambda=lambdas[0]:(lambda=lambdas[1],assert(0===this.g.mul(lambda).x.cmp(this.g.x.redMul(beta))))}return{beta:beta,lambda:lambda,basis:conf.basis?conf.basis.map(function(vec){return{a:new BN(vec.a,16),b:new BN(vec.b,16)}}):this._getEndoBasis(lambda)}}},ShortCurve.prototype._getEndoRoots=function(num){var red=num===this.p?this.red:BN.mont(num),tinv=new BN(2).toRed(red).redInvm(),ntinv=tinv.redNeg(),s=new BN(3).toRed(red).redNeg().redSqrt().redMul(tinv);return[ntinv.redAdd(s).fromRed(),ntinv.redSub(s).fromRed()]},ShortCurve.prototype._getEndoBasis=function(lambda){for(var a0,b0,a1,b1,a2,b2,prevR,r,x,aprxSqrt=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=lambda,v=this.n.clone(),x1=new BN(1),y1=new BN(0),x2=new BN(0),y2=new BN(1),i=0;0!==u.cmpn(0);){var q=v.div(u);r=v.sub(q.mul(u)),x=x2.sub(q.mul(x1));var y=y2.sub(q.mul(y1));if(!a1&&r.cmp(aprxSqrt)<0)a0=prevR.neg(),b0=x1,a1=r.neg(),b1=x;else if(a1&&2==++i)break;prevR=r,v=u,u=r,x2=x1,x1=x,y2=y1,y1=y}a2=r.neg(),b2=x;var len1=a1.sqr().add(b1.sqr());return a2.sqr().add(b2.sqr()).cmp(len1)>=0&&(a2=a0,b2=b0),a1.negative&&(a1=a1.neg(),b1=b1.neg()),a2.negative&&(a2=a2.neg(),b2=b2.neg()),[{a:a1,b:b1},{a:a2,b:b2}]},ShortCurve.prototype._endoSplit=function(k){var basis=this.endo.basis,v1=basis[0],v2=basis[1],c1=v2.b.mul(k).divRound(this.n),c2=v1.b.neg().mul(k).divRound(this.n),p1=c1.mul(v1.a),p2=c2.mul(v2.a),q1=c1.mul(v1.b),q2=c2.mul(v2.b);return{k1:k.sub(p1).sub(p2),k2:q1.add(q2).neg()}},ShortCurve.prototype.pointFromX=function(x,odd){(x=new BN(x,16)).red||(x=x.toRed(this.red));var y2=x.redSqr().redMul(x).redIAdd(x.redMul(this.a)).redIAdd(this.b),y=y2.redSqrt();if(0!==y.redSqr().redSub(y2).cmp(this.zero))throw new Error("invalid point");var isOdd=y.fromRed().isOdd();return(odd&&!isOdd||!odd&&isOdd)&&(y=y.redNeg()),this.point(x,y)},ShortCurve.prototype.validate=function(point){if(point.inf)return!0;var x=point.x,y=point.y,ax=this.a.redMul(x),rhs=x.redSqr().redMul(x).redIAdd(ax).redIAdd(this.b);return 0===y.redSqr().redISub(rhs).cmpn(0)},ShortCurve.prototype._endoWnafMulAdd=function(points,coeffs,jacobianResult){for(var npoints=this._endoWnafT1,ncoeffs=this._endoWnafT2,i=0;i":""},Point.prototype.isInfinity=function(){return this.inf},Point.prototype.add=function(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(0===this.x.cmp(p.x))return this.curve.point(null,null);var c=this.y.redSub(p.y);0!==c.cmpn(0)&&(c=c.redMul(this.x.redSub(p.x).redInvm()));var nx=c.redSqr().redISub(this.x).redISub(p.x),ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)},Point.prototype.dbl=function(){if(this.inf)return this;var ys1=this.y.redAdd(this.y);if(0===ys1.cmpn(0))return this.curve.point(null,null);var a=this.curve.a,x2=this.x.redSqr(),dyinv=ys1.redInvm(),c=x2.redAdd(x2).redIAdd(x2).redIAdd(a).redMul(dyinv),nx=c.redSqr().redISub(this.x.redAdd(this.x)),ny=c.redMul(this.x.redSub(nx)).redISub(this.y);return this.curve.point(nx,ny)},Point.prototype.getX=function(){return this.x.fromRed()},Point.prototype.getY=function(){return this.y.fromRed()},Point.prototype.mul=function(k){return k=new BN(k,16),this._hasDoubles(k)?this.curve._fixedNafMul(this,k):this.curve.endo?this.curve._endoWnafMulAdd([this],[k]):this.curve._wnafMul(this,k)},Point.prototype.mulAdd=function(k1,p2,k2){var points=[this,p2],coeffs=[k1,k2];return this.curve.endo?this.curve._endoWnafMulAdd(points,coeffs):this.curve._wnafMulAdd(1,points,coeffs,2)},Point.prototype.jmulAdd=function(k1,p2,k2){var points=[this,p2],coeffs=[k1,k2];return this.curve.endo?this.curve._endoWnafMulAdd(points,coeffs,!0):this.curve._wnafMulAdd(1,points,coeffs,2,!0)},Point.prototype.eq=function(p){return this===p||this.inf===p.inf&&(this.inf||0===this.x.cmp(p.x)&&0===this.y.cmp(p.y))},Point.prototype.neg=function(_precompute){if(this.inf)return this;var res=this.curve.point(this.x,this.y.redNeg());if(_precompute&&this.precomputed){var pre=this.precomputed,negate=function(p){return p.neg()};res.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(negate)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(negate)}}}return res},Point.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},inherits(JPoint,Base.BasePoint),ShortCurve.prototype.jpoint=function(x,y,z){return new JPoint(this,x,y,z)},JPoint.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var zinv=this.z.redInvm(),zinv2=zinv.redSqr(),ax=this.x.redMul(zinv2),ay=this.y.redMul(zinv2).redMul(zinv);return this.curve.point(ax,ay)},JPoint.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},JPoint.prototype.add=function(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var pz2=p.z.redSqr(),z2=this.z.redSqr(),u1=this.x.redMul(pz2),u2=p.x.redMul(z2),s1=this.y.redMul(pz2.redMul(p.z)),s2=p.y.redMul(z2.redMul(this.z)),h=u1.redSub(u2),r=s1.redSub(s2);if(0===h.cmpn(0))return 0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=h.redSqr(),h3=h2.redMul(h),v=u1.redMul(h2),nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v),ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)),nz=this.z.redMul(p.z).redMul(h);return this.curve.jpoint(nx,ny,nz)},JPoint.prototype.mixedAdd=function(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var z2=this.z.redSqr(),u1=this.x,u2=p.x.redMul(z2),s1=this.y,s2=p.y.redMul(z2).redMul(this.z),h=u1.redSub(u2),r=s1.redSub(s2);if(0===h.cmpn(0))return 0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=h.redSqr(),h3=h2.redMul(h),v=u1.redMul(h2),nx=r.redSqr().redIAdd(h3).redISub(v).redISub(v),ny=r.redMul(v.redISub(nx)).redISub(s1.redMul(h3)),nz=this.z.redMul(h);return this.curve.jpoint(nx,ny,nz)},JPoint.prototype.dblp=function(pow){if(0===pow)return this;if(this.isInfinity())return this;if(!pow)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var r=this,i=0;i=0)return!1;if(rx.redIAdd(t),0===this.x.cmp(rx))return!0}return!1},JPoint.prototype.inspect=function(){return this.isInfinity()?"":""},JPoint.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":175,"../curve":178,"bn.js":198,inherits:191}],181:[function(require,module,exports){"use strict";var pre,curves=exports,hash=require("hash.js"),elliptic=require("../elliptic"),assert=elliptic.utils.assert;function PresetCurve(options){"short"===options.type?this.curve=new elliptic.curve.short(options):"edwards"===options.type?this.curve=new elliptic.curve.edwards(options):this.curve=new elliptic.curve.mont(options),this.g=this.curve.g,this.n=this.curve.n,this.hash=options.hash,assert(this.g.validate(),"Invalid curve"),assert(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function defineCurve(name,options){Object.defineProperty(curves,name,{configurable:!0,enumerable:!0,get:function(){var curve=new PresetCurve(options);return Object.defineProperty(curves,name,{configurable:!0,enumerable:!0,value:curve}),curve}})}curves.PresetCurve=PresetCurve,defineCurve("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:hash.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),defineCurve("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:hash.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),defineCurve("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:hash.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),defineCurve("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:hash.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),defineCurve("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:hash.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash.sha256,gRed:!1,g:["9"]}),defineCurve("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:hash.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{pre=require("./precomputed/secp256k1")}catch(e){pre=void 0}defineCurve("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:hash.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]})},{"../elliptic":175,"./precomputed/secp256k1":188,"hash.js":462}],182:[function(require,module,exports){"use strict";var BN=require("bn.js"),HmacDRBG=require("hmac-drbg"),elliptic=require("../../elliptic"),assert=elliptic.utils.assert,KeyPair=require("./key"),Signature=require("./signature");function EC(options){if(!(this instanceof EC))return new EC(options);"string"==typeof options&&(assert(elliptic.curves.hasOwnProperty(options),"Unknown curve "+options),options=elliptic.curves[options]),options instanceof elliptic.curves.PresetCurve&&(options={curve:options}),this.curve=options.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=options.curve.g,this.g.precompute(options.curve.n.bitLength()+1),this.hash=options.hash||options.curve.hash}module.exports=EC,EC.prototype.keyPair=function(options){return new KeyPair(this,options)},EC.prototype.keyFromPrivate=function(priv,enc){return KeyPair.fromPrivate(this,priv,enc)},EC.prototype.keyFromPublic=function(pub,enc){return KeyPair.fromPublic(this,pub,enc)},EC.prototype.genKeyPair=function(options){options||(options={});for(var drbg=new HmacDRBG({hash:this.hash,pers:options.pers,persEnc:options.persEnc||"utf8",entropy:options.entropy||elliptic.rand(this.hash.hmacStrength),entropyEnc:options.entropy&&options.entropyEnc||"utf8",nonce:this.n.toArray()}),bytes=this.n.byteLength(),ns2=this.n.sub(new BN(2));;){var priv=new BN(drbg.generate(bytes));if(!(priv.cmp(ns2)>0))return priv.iaddn(1),this.keyFromPrivate(priv)}},EC.prototype._truncateToN=function(msg,truncOnly){var delta=8*msg.byteLength()-this.n.bitLength();return delta>0&&(msg=msg.ushrn(delta)),!truncOnly&&msg.cmp(this.n)>=0?msg.sub(this.n):msg},EC.prototype.sign=function(msg,key,enc,options){"object"==typeof enc&&(options=enc,enc=null),options||(options={}),key=this.keyFromPrivate(key,enc),msg=this._truncateToN(new BN(msg,16));for(var bytes=this.n.byteLength(),bkey=key.getPrivate().toArray("be",bytes),nonce=msg.toArray("be",bytes),drbg=new HmacDRBG({hash:this.hash,entropy:bkey,nonce:nonce,pers:options.pers,persEnc:options.persEnc||"utf8"}),ns1=this.n.sub(new BN(1)),iter=0;;iter++){var k=options.k?options.k(iter):new BN(drbg.generate(this.n.byteLength()));if(!((k=this._truncateToN(k,!0)).cmpn(1)<=0||k.cmp(ns1)>=0)){var kp=this.g.mul(k);if(!kp.isInfinity()){var kpX=kp.getX(),r=kpX.umod(this.n);if(0!==r.cmpn(0)){var s=k.invm(this.n).mul(r.mul(key.getPrivate()).iadd(msg));if(0!==(s=s.umod(this.n)).cmpn(0)){var recoveryParam=(kp.getY().isOdd()?1:0)|(0!==kpX.cmp(r)?2:0);return options.canonical&&s.cmp(this.nh)>0&&(s=this.n.sub(s),recoveryParam^=1),new Signature({r:r,s:s,recoveryParam:recoveryParam})}}}}}},EC.prototype.verify=function(msg,signature,key,enc){msg=this._truncateToN(new BN(msg,16)),key=this.keyFromPublic(key,enc);var r=(signature=new Signature(signature,"hex")).r,s=signature.s;if(r.cmpn(1)<0||r.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var p,sinv=s.invm(this.n),u1=sinv.mul(msg).umod(this.n),u2=sinv.mul(r).umod(this.n);return this.curve._maxwellTrick?!(p=this.g.jmulAdd(u1,key.getPublic(),u2)).isInfinity()&&p.eqXToP(r):!(p=this.g.mulAdd(u1,key.getPublic(),u2)).isInfinity()&&0===p.getX().umod(this.n).cmp(r)},EC.prototype.recoverPubKey=function(msg,signature,j,enc){assert((3&j)===j,"The recovery param is more than two bits"),signature=new Signature(signature,enc);var n=this.n,e=new BN(msg),r=signature.r,s=signature.s,isYOdd=1&j,isSecondKey=j>>1;if(r.cmp(this.curve.p.umod(this.curve.n))>=0&&isSecondKey)throw new Error("Unable to find sencond key candinate");r=isSecondKey?this.curve.pointFromX(r.add(this.curve.n),isYOdd):this.curve.pointFromX(r,isYOdd);var rInv=signature.r.invm(n),s1=n.sub(e).mul(rInv).umod(n),s2=s.mul(rInv).umod(n);return this.g.mulAdd(s1,r,s2)},EC.prototype.getKeyRecoveryParam=function(e,signature,Q,enc){if(null!==(signature=new Signature(signature,enc)).recoveryParam)return signature.recoveryParam;for(var i=0;i<4;i++){var Qprime;try{Qprime=this.recoverPubKey(e,signature,i)}catch(e){continue}if(Qprime.eq(Q))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":175,"./key":183,"./signature":184,"bn.js":198,"hmac-drbg":474}],183:[function(require,module,exports){"use strict";var BN=require("bn.js"),assert=require("../../elliptic").utils.assert;function KeyPair(ec,options){this.ec=ec,this.priv=null,this.pub=null,options.priv&&this._importPrivate(options.priv,options.privEnc),options.pub&&this._importPublic(options.pub,options.pubEnc)}module.exports=KeyPair,KeyPair.fromPublic=function(ec,pub,enc){return pub instanceof KeyPair?pub:new KeyPair(ec,{pub:pub,pubEnc:enc})},KeyPair.fromPrivate=function(ec,priv,enc){return priv instanceof KeyPair?priv:new KeyPair(ec,{priv:priv,privEnc:enc})},KeyPair.prototype.validate=function(){var pub=this.getPublic();return pub.isInfinity()?{result:!1,reason:"Invalid public key"}:pub.validate()?pub.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},KeyPair.prototype.getPublic=function(compact,enc){return"string"==typeof compact&&(enc=compact,compact=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),enc?this.pub.encode(enc,compact):this.pub},KeyPair.prototype.getPrivate=function(enc){return"hex"===enc?this.priv.toString(16,2):this.priv},KeyPair.prototype._importPrivate=function(key,enc){this.priv=new BN(key,enc||16),this.priv=this.priv.umod(this.ec.curve.n)},KeyPair.prototype._importPublic=function(key,enc){if(key.x||key.y)return"mont"===this.ec.curve.type?assert(key.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||assert(key.x&&key.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(key.x,key.y));this.pub=this.ec.curve.decodePoint(key,enc)},KeyPair.prototype.derive=function(pub){return pub.mul(this.priv).getX()},KeyPair.prototype.sign=function(msg,enc,options){return this.ec.sign(msg,this,enc,options)},KeyPair.prototype.verify=function(msg,signature){return this.ec.verify(msg,signature,this)},KeyPair.prototype.inspect=function(){return""}},{"../../elliptic":175,"bn.js":198}],184:[function(require,module,exports){"use strict";var BN=require("bn.js"),utils=require("../../elliptic").utils,assert=utils.assert;function Signature(options,enc){if(options instanceof Signature)return options;this._importDER(options,enc)||(assert(options.r&&options.s,"Signature without r or s"),this.r=new BN(options.r,16),this.s=new BN(options.s,16),void 0===options.recoveryParam?this.recoveryParam=null:this.recoveryParam=options.recoveryParam)}function getLength(buf,p){var initial=buf[p.place++];if(!(128&initial))return initial;for(var octetLen=15&initial,val=0,i=0,off=p.place;i>>3);for(arr.push(128|octets);--octets;)arr.push(len>>>(octets<<3)&255);arr.push(len)}}module.exports=Signature,Signature.prototype._importDER=function(data,enc){data=utils.toArray(data,enc);var p=new function(){this.place=0};if(48!==data[p.place++])return!1;if(getLength(data,p)+p.place!==data.length)return!1;if(2!==data[p.place++])return!1;var rlen=getLength(data,p),r=data.slice(p.place,rlen+p.place);if(p.place+=rlen,2!==data[p.place++])return!1;var slen=getLength(data,p);if(data.length!==slen+p.place)return!1;var s=data.slice(p.place,slen+p.place);return 0===r[0]&&128&r[1]&&(r=r.slice(1)),0===s[0]&&128&s[1]&&(s=s.slice(1)),this.r=new BN(r),this.s=new BN(s),this.recoveryParam=null,!0},Signature.prototype.toDER=function(enc){var r=this.r.toArray(),s=this.s.toArray();for(128&r[0]&&(r=[0].concat(r)),128&s[0]&&(s=[0].concat(s)),r=rmPadding(r),s=rmPadding(s);!(s[0]||128&s[1]);)s=s.slice(1);var arr=[2];constructLength(arr,r.length),(arr=arr.concat(r)).push(2),constructLength(arr,s.length);var backHalf=arr.concat(s),res=[48];return constructLength(res,backHalf.length),res=res.concat(backHalf),utils.encode(res,enc)}},{"../../elliptic":175,"bn.js":198}],185:[function(require,module,exports){"use strict";var hash=require("hash.js"),elliptic=require("../../elliptic"),utils=elliptic.utils,assert=utils.assert,parseBytes=utils.parseBytes,KeyPair=require("./key"),Signature=require("./signature");function EDDSA(curve){if(assert("ed25519"===curve,"only tested with ed25519 so far"),!(this instanceof EDDSA))return new EDDSA(curve);curve=elliptic.curves[curve].curve;this.curve=curve,this.g=curve.g,this.g.precompute(curve.n.bitLength()+1),this.pointClass=curve.point().constructor,this.encodingLength=Math.ceil(curve.n.bitLength()/8),this.hash=hash.sha512}module.exports=EDDSA,EDDSA.prototype.sign=function(message,secret){message=parseBytes(message);var key=this.keyFromSecret(secret),r=this.hashInt(key.messagePrefix(),message),R=this.g.mul(r),Rencoded=this.encodePoint(R),s_=this.hashInt(Rencoded,key.pubBytes(),message).mul(key.priv()),S=r.add(s_).umod(this.curve.n);return this.makeSignature({R:R,S:S,Rencoded:Rencoded})},EDDSA.prototype.verify=function(message,sig,pub){message=parseBytes(message),sig=this.makeSignature(sig);var key=this.keyFromPublic(pub),h=this.hashInt(sig.Rencoded(),key.pubBytes(),message),SG=this.g.mul(sig.S());return sig.R().add(key.pub().mul(h)).eq(SG)},EDDSA.prototype.hashInt=function(){for(var hash=this.hash(),i=0;i=0;){var z;if(k.isOdd()){var mod=k.andln(ws-1);z=mod>(ws>>1)-1?(ws>>1)-mod:mod,k.isubn(z)}else z=0;naf.push(z);for(var shift=0!==k.cmpn(0)&&0===k.andln(ws-1)?w+1:1,i=1;i0||k2.cmpn(-d2)>0;){var u1,u2,m8,m14=k1.andln(3)+d1&3,m24=k2.andln(3)+d2&3;3===m14&&(m14=-1),3===m24&&(m24=-1),u1=0==(1&m14)?0:3!=(m8=k1.andln(7)+d1&7)&&5!==m8||2!==m24?m14:-m14,jsf[0].push(u1),u2=0==(1&m24)?0:3!=(m8=k2.andln(7)+d2&7)&&5!==m8||2!==m14?m24:-m24,jsf[1].push(u2),2*d1===u1+1&&(d1=1-d1),2*d2===u2+1&&(d2=1-d2),k1.iushrn(1),k2.iushrn(1)}return jsf},utils.cachedProperty=function(obj,name,computer){var key="_"+name;obj.prototype[name]=function(){return void 0!==this[key]?this[key]:this[key]=computer.call(this)}},utils.parseBytes=function(bytes){return"string"==typeof bytes?utils.toArray(bytes,"hex"):bytes},utils.intFromLE=function(bytes){return new BN(bytes,"hex","le")}},{"bn.js":198,"minimalistic-assert":720,"minimalistic-crypto-utils":721}],190:[function(require,module,exports){module.exports={name:"elliptic",version:"6.4.0",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"}}},{}],191:[function(require,module,exports){arguments[4][27][0].apply(exports,arguments)},{dup:27}],192:[function(require,module,exports){(function(global){(function(){var undefined,LARGE_ARRAY_SIZE=200,CORE_ERROR_TEXT="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",MAX_MEMOIZE_SIZE=500,PLACEHOLDER="__lodash_placeholder__",CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4,COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2,WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256,WRAP_FLIP_FLAG=512,DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION="...",HOT_COUNT=800,HOT_SPAN=16,LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2,INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=1.7976931348623157e308,NAN=NaN,MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1,wrapFlags=[["ary",WRAP_ARY_FLAG],["bind",WRAP_BIND_FLAG],["bindKey",WRAP_BIND_KEY_FLAG],["curry",WRAP_CURRY_FLAG],["curryRight",WRAP_CURRY_RIGHT_FLAG],["flip",WRAP_FLIP_FLAG],["partial",WRAP_PARTIAL_FLAG],["partialRight",WRAP_PARTIAL_RIGHT_FLAG],["rearg",WRAP_REARG_FLAG]],argsTag="[object Arguments]",arrayTag="[object Array]",asyncTag="[object AsyncFunction]",boolTag="[object Boolean]",dateTag="[object Date]",domExcTag="[object DOMException]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",nullTag="[object Null]",objectTag="[object Object]",proxyTag="[object Proxy]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",undefinedTag="[object Undefined]",weakMapTag="[object WeakMap]",weakSetTag="[object WeakSet]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g,reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source),reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g,reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source),reTrim=/^\s+|\s+$/g,reTrimStart=/^\s+/,reTrimEnd=/\s+$/,reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /,reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,reEscapeChar=/\\(\\)?/g,reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,reFlags=/\w*$/,reIsBadHex=/^[-+]0x[0-9a-f]+$/i,reIsBinary=/^0b[01]+$/i,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsOctal=/^0o[0-7]+$/i,reIsUint=/^(?:0|[1-9]\d*)$/,reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,reNoMatch=/($^)/,reUnescapedString=/['\n\r\u2028\u2029\\]/g,rsComboRange="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",rsBreakRange="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rsAstral="[\\ud800-\\udfff]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="[\\u2700-\\u27bf]",rsLower="[a-z\\xdf-\\xf6\\xf8-\\xff]",rsMisc="[^\\ud800-\\udfff"+rsBreakRange+rsDigits+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsNonAstral="[^\\ud800-\\udfff]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="[A-Z\\xc0-\\xd6\\xd8-\\xde]",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",reOptMod="(?:"+rsCombo+"|"+rsFitz+")"+"?",rsSeq="[\\ufe0e\\ufe0f]?"+reOptMod+("(?:\\u200d(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")[\\ufe0e\\ufe0f]?"+reOptMod+")*"),rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reApos=RegExp("['’]","g"),reComboMark=RegExp(rsCombo,"g"),reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g"),reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+(?:['’](?:d|ll|m|re|s|t|ve))?",rsUpper+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rsDigits,rsEmoji].join("|"),"g"),reHasUnicode=RegExp("[\\u200d\\ud800-\\udfff"+rsComboRange+"\\ufe0e\\ufe0f]"),reHasUnicodeWord=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,contextProps=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],templateCounter=-1,typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=!0,typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=!1;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},freeParseFloat=parseFloat,freeParseInt=parseInt,freeGlobal="object"==typeof global&&global&&global.Object===Object&&global,freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,freeProcess=moduleExports&&freeGlobal.process,nodeUtil=function(){try{var types=freeModule&&freeModule.require&&freeModule.require("util").types;return types||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}(),nodeIsArrayBuffer=nodeUtil&&nodeUtil.isArrayBuffer,nodeIsDate=nodeUtil&&nodeUtil.isDate,nodeIsMap=nodeUtil&&nodeUtil.isMap,nodeIsRegExp=nodeUtil&&nodeUtil.isRegExp,nodeIsSet=nodeUtil&&nodeUtil.isSet,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)}function arrayAggregator(array,setter,iteratee,accumulator){for(var index=-1,length=null==array?0:array.length;++index-1}function arrayIncludesWith(array,value,comparator){for(var index=-1,length=null==array?0:array.length;++index-1;);return index}function charsEndIndex(strSymbols,chrSymbols){for(var index=strSymbols.length;index--&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}var deburrLetter=basePropertyOf({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),escapeHtmlChar=basePropertyOf({"&":"&","<":"<",">":">",'"':""","'":"'"});function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function hasUnicode(string){return reHasUnicode.test(string)}function mapToArray(map){var index=-1,result=Array(map.size);return map.forEach(function(value,key){result[++index]=[key,value]}),result}function overArg(func,transform){return function(arg){return func(transform(arg))}}function replaceHolders(array,placeholder){for(var index=-1,length=array.length,resIndex=0,result=[];++index",""":'"',"'":"'"});var _=function runInContext(context){var uid,Array=(context=null==context?root:_.defaults(root.Object(),context,_.pick(root,contextProps))).Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=context["__core-js_shared__"],funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,idCounter=0,maskSrcKey=(uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||""))?"Symbol(src)_1."+uid:"",nativeObjectToString=objectProto.toString,objectCtorString=funcToString.call(Object),oldDash=root._,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Buffer=moduleExports?context.Buffer:undefined,Symbol=context.Symbol,Uint8Array=context.Uint8Array,allocUnsafe=Buffer?Buffer.allocUnsafe:undefined,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,spreadableSymbol=Symbol?Symbol.isConcatSpreadable:undefined,symIterator=Symbol?Symbol.iterator:undefined,symToStringTag=Symbol?Symbol.toStringTag:undefined,defineProperty=function(){try{var func=getNative(Object,"defineProperty");return func({},"",{}),func}catch(e){}}(),ctxClearTimeout=context.clearTimeout!==root.clearTimeout&&context.clearTimeout,ctxNow=Date&&Date.now!==root.Date.now&&Date.now,ctxSetTimeout=context.setTimeout!==root.setTimeout&&context.setTimeout,nativeCeil=Math.ceil,nativeFloor=Math.floor,nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined,nativeIsFinite=context.isFinite,nativeJoin=arrayProto.join,nativeKeys=overArg(Object.keys,Object),nativeMax=Math.max,nativeMin=Math.min,nativeNow=Date.now,nativeParseInt=context.parseInt,nativeRandom=Math.random,nativeReverse=arrayProto.reverse,DataView=getNative(context,"DataView"),Map=getNative(context,"Map"),Promise=getNative(context,"Promise"),Set=getNative(context,"Set"),WeakMap=getNative(context,"WeakMap"),nativeCreate=getNative(Object,"create"),metaMap=WeakMap&&new WeakMap,realNames={},dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:undefined,symbolValueOf=symbolProto?symbolProto.valueOf:undefined,symbolToString=symbolProto?symbolProto.toString:undefined;function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper)return value;if(hasOwnProperty.call(value,"__wrapped__"))return wrapperClone(value)}return new LodashWrapper(value)}var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto))return{};if(objectCreate)return objectCreate(proto);object.prototype=proto;var result=new object;return object.prototype=undefined,result}}();function baseLodash(){}function LodashWrapper(value,chainAll){this.__wrapped__=value,this.__actions__=[],this.__chain__=!!chainAll,this.__index__=0,this.__values__=undefined}function LazyWrapper(value){this.__wrapped__=value,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=MAX_ARRAY_LENGTH,this.__views__=[]}function Hash(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index=lower?number:lower)),number}function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=bitmask&CLONE_DEEP_FLAG,isFlat=bitmask&CLONE_FLAT_FLAG,isFull=bitmask&CLONE_SYMBOLS_FLAG;if(customizer&&(result=object?customizer(value,key,object,stack):customizer(value)),result!==undefined)return result;if(!isObject(value))return value;var isArr=isArray(value);if(isArr){if(result=function(array){var length=array.length,result=new array.constructor(length);return length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input),result}(value),!isDeep)return copyArray(value,result)}else{var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value))return cloneBuffer(value,isDeep);if(tag==objectTag||tag==argsTag||isFunc&&!object){if(result=isFlat||isFunc?{}:initCloneObject(value),!isDeep)return isFlat?function(source,object){return copyObject(source,getSymbolsIn(source),object)}(value,function(object,source){return object&©Object(source,keysIn(source),object)}(result,value)):function(source,object){return copyObject(source,getSymbols(source),object)}(value,baseAssign(result,value))}else{if(!cloneableTags[tag])return object?value:{};result=function(object,tag,isDeep){var symbol,regexp,result,Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return function(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return new Ctor;case numberTag:case stringTag:return new Ctor(object);case regexpTag:return(result=new(regexp=object).constructor(regexp.source,reFlags.exec(regexp))).lastIndex=regexp.lastIndex,result;case setTag:return new Ctor;case symbolTag:return symbol=object,symbolValueOf?Object(symbolValueOf.call(symbol)):{}}}(value,tag,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked)return stacked;if(stack.set(value,result),isSet(value))return value.forEach(function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack))}),result;if(isMap(value))return value.forEach(function(subValue,key){result.set(key,baseClone(subValue,bitmask,customizer,key,value,stack))}),result;var props=isArr?undefined:(isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys)(value);return arrayEach(props||value,function(subValue,key){props&&(subValue=value[key=subValue]),assignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack))}),result}function baseConformsTo(object,source,props){var length=props.length;if(null==object)return!length;for(object=Object(object);length--;){var key=props[length],predicate=source[key],value=object[key];if(value===undefined&&!(key in object)||!predicate(value))return!1}return!0}function baseDelay(func,wait,args){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return setTimeout(function(){func.apply(undefined,args)},wait)}function baseDifference(array,values,iteratee,comparator){var index=-1,includes=arrayIncludes,isCommon=!0,length=array.length,result=[],valuesLength=values.length;if(!length)return result;iteratee&&(values=arrayMap(values,baseUnary(iteratee))),comparator?(includes=arrayIncludesWith,isCommon=!1):values.length>=LARGE_ARRAY_SIZE&&(includes=cacheHas,isCommon=!1,values=new SetCache(values));outer:for(;++index-1},ListCache.prototype.set=function(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?(++this.size,data.push([key,value])):data[index][1]=value,this},MapCache.prototype.clear=function(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}},MapCache.prototype.delete=function(key){var result=getMapData(this,key).delete(key);return this.size-=result?1:0,result},MapCache.prototype.get=function(key){return getMapData(this,key).get(key)},MapCache.prototype.has=function(key){return getMapData(this,key).has(key)},MapCache.prototype.set=function(key,value){var data=getMapData(this,key),size=data.size;return data.set(key,value),this.size+=data.size==size?0:1,this},SetCache.prototype.add=SetCache.prototype.push=function(value){return this.__data__.set(value,HASH_UNDEFINED),this},SetCache.prototype.has=function(value){return this.__data__.has(value)},Stack.prototype.clear=function(){this.__data__=new ListCache,this.size=0},Stack.prototype.delete=function(key){var data=this.__data__,result=data.delete(key);return this.size=data.size,result},Stack.prototype.get=function(key){return this.__data__.get(key)},Stack.prototype.has=function(key){return this.__data__.has(key)},Stack.prototype.set=function(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length0&&predicate(value)?depth>1?baseFlatten(value,depth-1,predicate,isStrict,result):arrayPush(result,value):isStrict||(result[result.length]=value)}return result}var baseFor=createBaseFor(),baseForRight=createBaseFor(!0);function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}function baseForOwnRight(object,iteratee){return object&&baseForRight(object,iteratee,keys)}function baseFunctions(object,props){return arrayFilter(props,function(key){return isFunction(object[key])})}function baseGet(object,path){for(var index=0,length=(path=castPath(path,object)).length;null!=object&&indexother}function baseHas(object,key){return null!=object&&hasOwnProperty.call(object,key)}function baseHasIn(object,key){return null!=object&&key in Object(object)}function baseIntersection(arrays,iteratee,comparator){for(var includes=comparator?arrayIncludesWith:arrayIncludes,length=arrays[0].length,othLength=arrays.length,othIndex=othLength,caches=Array(othLength),maxLength=1/0,result=[];othIndex--;){var array=arrays[othIndex];othIndex&&iteratee&&(array=arrayMap(array,baseUnary(iteratee))),maxLength=nativeMin(array.length,maxLength),caches[othIndex]=!comparator&&(iteratee||length>=120&&array.length>=120)?new SetCache(othIndex&&array):undefined}array=arrays[0];var index=-1,seen=caches[0];outer:for(;++index=ordersLength)return result;var order=orders[index];return result*("desc"==order?-1:1)}}return object.index-other.index}(object,other,orders)})}function basePickBy(object,paths,predicate){for(var index=-1,length=paths.length,result={};++index-1;)seen!==array&&splice.call(seen,fromIndex,1),splice.call(array,fromIndex,1);return array}function basePullAt(array,indexes){for(var length=array?indexes.length:0,lastIndex=length-1;length--;){var index=indexes[length];if(length==lastIndex||index!==previous){var previous=index;isIndex(index)?splice.call(array,index,1):baseUnset(array,index)}}return array}function baseRandom(lower,upper){return lower+nativeFloor(nativeRandom()*(upper-lower+1))}function baseRepeat(string,n){var result="";if(!string||n<1||n>MAX_SAFE_INTEGER)return result;do{n%2&&(result+=string),(n=nativeFloor(n/2))&&(string+=string)}while(n);return result}function baseRest(func,start){return setToString(overRest(func,start,identity),func+"")}function baseSample(collection){return arraySample(values(collection))}function baseSampleSize(collection,n){var array=values(collection);return shuffleSelf(array,baseClamp(n,0,array.length))}function baseSet(object,path,value,customizer){if(!isObject(object))return object;for(var index=-1,length=(path=castPath(path,object)).length,lastIndex=length-1,nested=object;null!=nested&&++indexlength?0:length+start),(end=end>length?length:end)<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index>>1,computed=array[mid];null!==computed&&!isSymbol(computed)&&(retHighest?computed<=value:computed=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set)return setToArray(set);isCommon=!1,includes=cacheHas,seen=new SetCache}else seen=iteratee?[]:result;outer:for(;++index=length?array:baseSlice(array,start,end)}var clearTimeout=ctxClearTimeout||function(id){return root.clearTimeout(id)};function cloneBuffer(buffer,isDeep){if(isDeep)return buffer.slice();var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);return buffer.copy(result),result}function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);return new Uint8Array(result).set(new Uint8Array(arrayBuffer)),result}function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)}function compareAscending(value,other){if(value!==other){var valIsDefined=value!==undefined,valIsNull=null===value,valIsReflexive=value==value,valIsSymbol=isSymbol(value),othIsDefined=other!==undefined,othIsNull=null===other,othIsReflexive=other==other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol&&othIsDefined&&othIsReflexive&&!othIsNull&&!othIsSymbol||valIsNull&&othIsDefined&&othIsReflexive||!valIsDefined&&othIsReflexive||!valIsReflexive)return 1;if(!valIsNull&&!valIsSymbol&&!othIsSymbol&&value1?sources[length-1]:undefined,guard=length>2?sources[2]:undefined;for(customizer=assigner.length>3&&"function"==typeof customizer?(length--,customizer):undefined,guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?undefined:customizer,length=1),object=Object(object);++index-1?iterable[iteratee?collection[index]:index]:undefined}}function createFlow(fromRight){return flatRest(function(funcs){var length=funcs.length,index=length,prereq=LodashWrapper.prototype.thru;for(fromRight&&funcs.reverse();index--;){var func=funcs[index];if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);if(prereq&&!wrapper&&"wrapper"==getFuncName(func))var wrapper=new LodashWrapper([],!0)}for(index=wrapper?index:length;++index1&&args.reverse(),isAry&&aryarrLength))return!1;var stacked=stack.get(array);if(stacked&&stack.get(other))return stacked==other;var index=-1,result=!0,seen=bitmask&COMPARE_UNORDERED_FLAG?new SetCache:undefined;for(stack.set(array,other),stack.set(other,array);++index-1&&value%1==0&&value1?"& ":"")+details[lastIndex],details=details.join(length>2?", ":" "),source.replace(reWrapComment,"{\n/* [wrapped with "+details+"] */\n")}(source,function(details,bitmask){return arrayEach(wrapFlags,function(pair){var value="_."+pair[0];bitmask&pair[1]&&!arrayIncludes(details,value)&&details.push(value)}),details.sort()}(function(source){var match=source.match(reWrapDetails);return match?match[1].split(reSplitDetails):[]}(source),bitmask)))}function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);if(lastCalled=stamp,remaining>0){if(++count>=HOT_COUNT)return arguments[0]}else count=0;return func.apply(undefined,arguments)}}function shuffleSelf(array,size){var index=-1,length=array.length,lastIndex=length-1;for(size=size===undefined?length:size;++index1?arrays[length-1]:undefined;return unzipWith(arrays,iteratee="function"==typeof iteratee?(arrays.pop(),iteratee):undefined)});function chain(value){var result=lodash(value);return result.__chain__=!0,result}function thru(value,interceptor){return interceptor(value)}var wrapperAt=flatRest(function(paths){var length=paths.length,start=length?paths[0]:0,value=this.__wrapped__,interceptor=function(object){return baseAt(object,paths)};return!(length>1||this.__actions__.length)&&value instanceof LazyWrapper&&isIndex(start)?((value=value.slice(start,+start+(length?1:0))).__actions__.push({func:thru,args:[interceptor],thisArg:undefined}),new LodashWrapper(value,this.__chain__).thru(function(array){return length&&!array.length&&array.push(undefined),array})):this.thru(interceptor)});var countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:baseAssignValue(result,key,1)});var find=createFind(findIndex),findLast=createFind(findLastIndex);function forEach(collection,iteratee){return(isArray(collection)?arrayEach:baseEach)(collection,getIteratee(iteratee,3))}function forEachRight(collection,iteratee){return(isArray(collection)?arrayEachRight:baseEachRight)(collection,getIteratee(iteratee,3))}var groupBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key].push(value):baseAssignValue(result,key,[value])});var invokeMap=baseRest(function(collection,path,args){var index=-1,isFunc="function"==typeof path,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value){result[++index]=isFunc?apply(path,value,args):baseInvoke(value,path,args)}),result}),keyBy=createAggregator(function(result,value,key){baseAssignValue(result,key,value)});function map(collection,iteratee){return(isArray(collection)?arrayMap:baseMap)(collection,getIteratee(iteratee,3))}var partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]});var sortBy=baseRest(function(collection,iteratees){if(null==collection)return[];var length=iteratees.length;return length>1&&isIterateeCall(collection,iteratees[0],iteratees[1])?iteratees=[]:length>2&&isIterateeCall(iteratees[0],iteratees[1],iteratees[2])&&(iteratees=[iteratees[0]]),baseOrderBy(collection,baseFlatten(iteratees,1),[])}),now=ctxNow||function(){return root.Date.now()};function ary(func,n,guard){return n=guard?undefined:n,n=func&&null==n?func.length:n,createWrap(func,WRAP_ARY_FLAG,undefined,undefined,undefined,undefined,n)}function before(n,func){var result;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return n=toInteger(n),function(){return--n>0&&(result=func.apply(this,arguments)),n<=1&&(func=undefined),result}}var bind=baseRest(function(func,thisArg,partials){var bitmask=WRAP_BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bind));bitmask|=WRAP_PARTIAL_FLAG}return createWrap(func,bitmask,thisArg,partials,holders)}),bindKey=baseRest(function(object,key,partials){var bitmask=WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bindKey));bitmask|=WRAP_PARTIAL_FLAG}return createWrap(key,bitmask,object,partials,holders)});function debounce(func,wait,options){var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=!1,maxing=!1,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);function invokeFunc(time){var args=lastArgs,thisArg=lastThis;return lastArgs=lastThis=undefined,lastInvokeTime=time,result=func.apply(thisArg,args)}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime;return lastCallTime===undefined||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&time-lastInvokeTime>=maxWait}function timerExpired(){var time=now();if(shouldInvoke(time))return trailingEdge(time);timerId=setTimeout(timerExpired,function(time){var timeWaiting=wait-(time-lastCallTime);return maxing?nativeMin(timeWaiting,maxWait-(time-lastInvokeTime)):timeWaiting}(time))}function trailingEdge(time){return timerId=undefined,trailing&&lastArgs?invokeFunc(time):(lastArgs=lastThis=undefined,result)}function debounced(){var time=now(),isInvoking=shouldInvoke(time);if(lastArgs=arguments,lastThis=this,lastCallTime=time,isInvoking){if(timerId===undefined)return function(time){return lastInvokeTime=time,timerId=setTimeout(timerExpired,wait),leading?invokeFunc(time):result}(lastCallTime);if(maxing)return timerId=setTimeout(timerExpired,wait),invokeFunc(lastCallTime)}return timerId===undefined&&(timerId=setTimeout(timerExpired,wait)),result}return wait=toNumber(wait)||0,isObject(options)&&(leading=!!options.leading,maxWait=(maxing="maxWait"in options)?nativeMax(toNumber(options.maxWait)||0,wait):maxWait,trailing="trailing"in options?!!options.trailing:trailing),debounced.cancel=function(){timerId!==undefined&&clearTimeout(timerId),lastInvokeTime=0,lastArgs=lastCallTime=lastThis=timerId=undefined},debounced.flush=function(){return timerId===undefined?result:trailingEdge(now())},debounced}var defer=baseRest(function(func,args){return baseDelay(func,1,args)}),delay=baseRest(function(func,wait,args){return baseDelay(func,toNumber(wait)||0,args)});function memoize(func,resolver){if("function"!=typeof func||null!=resolver&&"function"!=typeof resolver)throw new TypeError(FUNC_ERROR_TEXT);var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key))return cache.get(key);var result=func.apply(this,args);return memoized.cache=cache.set(key,result)||cache,result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function negate(predicate){if("function"!=typeof predicate)throw new TypeError(FUNC_ERROR_TEXT);return function(){var args=arguments;switch(args.length){case 0:return!predicate.call(this);case 1:return!predicate.call(this,args[0]);case 2:return!predicate.call(this,args[0],args[1]);case 3:return!predicate.call(this,args[0],args[1],args[2])}return!predicate.apply(this,args)}}memoize.Cache=MapCache;var overArgs=castRest(function(func,transforms){var funcsLength=(transforms=1==transforms.length&&isArray(transforms[0])?arrayMap(transforms[0],baseUnary(getIteratee())):arrayMap(baseFlatten(transforms,1),baseUnary(getIteratee()))).length;return baseRest(function(args){for(var index=-1,length=nativeMin(args.length,funcsLength);++index=other}),isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")},isArray=Array.isArray,isArrayBuffer=nodeIsArrayBuffer?baseUnary(nodeIsArrayBuffer):function(value){return isObjectLike(value)&&baseGetTag(value)==arrayBufferTag};function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}var isBuffer=nativeIsBuffer||stubFalse,isDate=nodeIsDate?baseUnary(nodeIsDate):function(value){return isObjectLike(value)&&baseGetTag(value)==dateTag};function isError(value){if(!isObjectLike(value))return!1;var tag=baseGetTag(value);return tag==errorTag||tag==domExcTag||"string"==typeof value.message&&"string"==typeof value.name&&!isPlainObject(value)}function isFunction(value){if(!isObject(value))return!1;var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}function isInteger(value){return"number"==typeof value&&value==toInteger(value)}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return null!=value&&("object"==type||"function"==type)}function isObjectLike(value){return null!=value&&"object"==typeof value}var isMap=nodeIsMap?baseUnary(nodeIsMap):function(value){return isObjectLike(value)&&getTag(value)==mapTag};function isNumber(value){return"number"==typeof value||isObjectLike(value)&&baseGetTag(value)==numberTag}function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag)return!1;var proto=getPrototype(value);if(null===proto)return!0;var Ctor=hasOwnProperty.call(proto,"constructor")&&proto.constructor;return"function"==typeof Ctor&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString}var isRegExp=nodeIsRegExp?baseUnary(nodeIsRegExp):function(value){return isObjectLike(value)&&baseGetTag(value)==regexpTag};var isSet=nodeIsSet?baseUnary(nodeIsSet):function(value){return isObjectLike(value)&&getTag(value)==setTag};function isString(value){return"string"==typeof value||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&baseGetTag(value)==symbolTag}var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):function(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]};var lt=createRelationalOperation(baseLt),lte=createRelationalOperation(function(value,other){return value<=other});function toArray(value){if(!value)return[];if(isArrayLike(value))return isString(value)?stringToArray(value):copyArray(value);if(symIterator&&value[symIterator])return function(iterator){for(var data,result=[];!(data=iterator.next()).done;)result.push(data.value);return result}(value[symIterator]());var tag=getTag(value);return(tag==mapTag?mapToArray:tag==setTag?setToArray:values)(value)}function toFinite(value){return value?(value=toNumber(value))===INFINITY||value===-INFINITY?(value<0?-1:1)*MAX_INTEGER:value==value?value:0:0===value?value:0}function toInteger(value){var result=toFinite(value),remainder=result%1;return result==result?remainder?result-remainder:result:0}function toLength(value){return value?baseClamp(toInteger(value),0,MAX_ARRAY_LENGTH):0}function toNumber(value){if("number"==typeof value)return value;if(isSymbol(value))return NAN;if(isObject(value)){var other="function"==typeof value.valueOf?value.valueOf():value;value=isObject(other)?other+"":other}if("string"!=typeof value)return 0===value?value:+value;value=value.replace(reTrim,"");var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value}function toPlainObject(value){return copyObject(value,keysIn(value))}function toString(value){return null==value?"":baseToString(value)}var assign=createAssigner(function(object,source){if(isPrototype(source)||isArrayLike(source))copyObject(source,keys(source),object);else for(var key in source)hasOwnProperty.call(source,key)&&assignValue(object,key,source[key])}),assignIn=createAssigner(function(object,source){copyObject(source,keysIn(source),object)}),assignInWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keysIn(source),object,customizer)}),assignWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keys(source),object,customizer)}),at=flatRest(baseAt);var defaults=baseRest(function(object,sources){object=Object(object);var index=-1,length=sources.length,guard=length>2?sources[2]:undefined;for(guard&&isIterateeCall(sources[0],sources[1],guard)&&(length=1);++index1),path}),copyObject(object,getAllKeysIn(object),result),isDeep&&(result=baseClone(result,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone));for(var length=paths.length;length--;)baseUnset(result,paths[length]);return result});var pick=flatRest(function(object,paths){return null==object?{}:function(object,paths){return basePickBy(object,paths,function(value,path){return hasIn(object,path)})}(object,paths)});function pickBy(object,predicate){if(null==object)return{};var props=arrayMap(getAllKeysIn(object),function(prop){return[prop]});return predicate=getIteratee(predicate),basePickBy(object,props,function(value,path){return predicate(value,path[0])})}var toPairs=createToPairs(keys),toPairsIn=createToPairs(keysIn);function values(object){return null==object?[]:baseValues(object,keys(object))}var camelCase=createCompounder(function(result,word,index){return word=word.toLowerCase(),result+(index?capitalize(word):word)});function capitalize(string){return upperFirst(toString(string).toLowerCase())}function deburr(string){return(string=toString(string))&&string.replace(reLatin,deburrLetter).replace(reComboMark,"")}var kebabCase=createCompounder(function(result,word,index){return result+(index?"-":"")+word.toLowerCase()}),lowerCase=createCompounder(function(result,word,index){return result+(index?" ":"")+word.toLowerCase()}),lowerFirst=createCaseFirst("toLowerCase");var snakeCase=createCompounder(function(result,word,index){return result+(index?"_":"")+word.toLowerCase()});var startCase=createCompounder(function(result,word,index){return result+(index?" ":"")+upperFirst(word)});var upperCase=createCompounder(function(result,word,index){return result+(index?" ":"")+word.toUpperCase()}),upperFirst=createCaseFirst("toUpperCase");function words(string,pattern,guard){return string=toString(string),(pattern=guard?undefined:pattern)===undefined?function(string){return reHasUnicodeWord.test(string)}(string)?function(string){return string.match(reUnicodeWord)||[]}(string):function(string){return string.match(reAsciiWord)||[]}(string):string.match(pattern)||[]}var attempt=baseRest(function(func,args){try{return apply(func,undefined,args)}catch(e){return isError(e)?e:new Error(e)}}),bindAll=flatRest(function(object,methodNames){return arrayEach(methodNames,function(key){key=toKey(key),baseAssignValue(object,key,bind(object[key],object))}),object});function constant(value){return function(){return value}}var flow=createFlow(),flowRight=createFlow(!0);function identity(value){return value}function iteratee(func){return baseIteratee("function"==typeof func?func:baseClone(func,CLONE_DEEP_FLAG))}var method=baseRest(function(path,args){return function(object){return baseInvoke(object,path,args)}}),methodOf=baseRest(function(object,args){return function(path){return baseInvoke(object,path,args)}});function mixin(object,source,options){var props=keys(source),methodNames=baseFunctions(source,props);null!=options||isObject(source)&&(methodNames.length||!props.length)||(options=source,source=object,object=this,methodNames=baseFunctions(source,keys(source)));var chain=!(isObject(options)&&"chain"in options&&!options.chain),isFunc=isFunction(object);return arrayEach(methodNames,function(methodName){var func=source[methodName];object[methodName]=func,isFunc&&(object.prototype[methodName]=function(){var chainAll=this.__chain__;if(chain||chainAll){var result=object(this.__wrapped__);return(result.__actions__=copyArray(this.__actions__)).push({func:func,args:arguments,thisArg:object}),result.__chain__=chainAll,result}return func.apply(object,arrayPush([this.value()],arguments))})}),object}function noop(){}var over=createOver(arrayMap),overEvery=createOver(arrayEvery),overSome=createOver(arraySome);function property(path){return isKey(path)?baseProperty(toKey(path)):function(path){return function(object){return baseGet(object,path)}}(path)}var range=createRange(),rangeRight=createRange(!0);function stubArray(){return[]}function stubFalse(){return!1}var add=createMathOperation(function(augend,addend){return augend+addend},0),ceil=createRound("ceil"),divide=createMathOperation(function(dividend,divisor){return dividend/divisor},1),floor=createRound("floor");var source,multiply=createMathOperation(function(multiplier,multiplicand){return multiplier*multiplicand},1),round=createRound("round"),subtract=createMathOperation(function(minuend,subtrahend){return minuend-subtrahend},0);return lodash.after=function(n,func){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return n=toInteger(n),function(){if(--n<1)return func.apply(this,arguments)}},lodash.ary=ary,lodash.assign=assign,lodash.assignIn=assignIn,lodash.assignInWith=assignInWith,lodash.assignWith=assignWith,lodash.at=at,lodash.before=before,lodash.bind=bind,lodash.bindAll=bindAll,lodash.bindKey=bindKey,lodash.castArray=function(){if(!arguments.length)return[];var value=arguments[0];return isArray(value)?value:[value]},lodash.chain=chain,lodash.chunk=function(array,size,guard){size=(guard?isIterateeCall(array,size,guard):size===undefined)?1:nativeMax(toInteger(size),0);var length=null==array?0:array.length;if(!length||size<1)return[];for(var index=0,resIndex=0,result=Array(nativeCeil(length/size));indexlength?0:length+start),(end=end===undefined||end>length?length:toInteger(end))<0&&(end+=length),end=start>end?0:toLength(end);start>>0)?(string=toString(string))&&("string"==typeof separator||null!=separator&&!isRegExp(separator))&&!(separator=baseToString(separator))&&hasUnicode(string)?castSlice(stringToArray(string),0,limit):string.split(separator,limit):[]},lodash.spread=function(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=null==start?0:nativeMax(toInteger(start),0),baseRest(function(args){var array=args[start],otherArgs=castSlice(args,0,start);return array&&arrayPush(otherArgs,array),apply(func,this,otherArgs)})},lodash.tail=function(array){var length=null==array?0:array.length;return length?baseSlice(array,1,length):[]},lodash.take=function(array,n,guard){return array&&array.length?baseSlice(array,0,(n=guard||n===undefined?1:toInteger(n))<0?0:n):[]},lodash.takeRight=function(array,n,guard){var length=null==array?0:array.length;return length?baseSlice(array,(n=length-(n=guard||n===undefined?1:toInteger(n)))<0?0:n,length):[]},lodash.takeRightWhile=function(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!1,!0):[]},lodash.takeWhile=function(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3)):[]},lodash.tap=function(value,interceptor){return interceptor(value),value},lodash.throttle=function(func,wait,options){var leading=!0,trailing=!0;if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return isObject(options)&&(leading="leading"in options?!!options.leading:leading,trailing="trailing"in options?!!options.trailing:trailing),debounce(func,wait,{leading:leading,maxWait:wait,trailing:trailing})},lodash.thru=thru,lodash.toArray=toArray,lodash.toPairs=toPairs,lodash.toPairsIn=toPairsIn,lodash.toPath=function(value){return isArray(value)?arrayMap(value,toKey):isSymbol(value)?[value]:copyArray(stringToPath(toString(value)))},lodash.toPlainObject=toPlainObject,lodash.transform=function(object,iteratee,accumulator){var isArr=isArray(object),isArrLike=isArr||isBuffer(object)||isTypedArray(object);if(iteratee=getIteratee(iteratee,4),null==accumulator){var Ctor=object&&object.constructor;accumulator=isArrLike?isArr?new Ctor:[]:isObject(object)&&isFunction(Ctor)?baseCreate(getPrototype(object)):{}}return(isArrLike?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object)}),accumulator},lodash.unary=function(func){return ary(func,1)},lodash.union=union,lodash.unionBy=unionBy,lodash.unionWith=unionWith,lodash.uniq=function(array){return array&&array.length?baseUniq(array):[]},lodash.uniqBy=function(array,iteratee){return array&&array.length?baseUniq(array,getIteratee(iteratee,2)):[]},lodash.uniqWith=function(array,comparator){return comparator="function"==typeof comparator?comparator:undefined,array&&array.length?baseUniq(array,undefined,comparator):[]},lodash.unset=function(object,path){return null==object||baseUnset(object,path)},lodash.unzip=unzip,lodash.unzipWith=unzipWith,lodash.update=function(object,path,updater){return null==object?object:baseUpdate(object,path,castFunction(updater))},lodash.updateWith=function(object,path,updater,customizer){return customizer="function"==typeof customizer?customizer:undefined,null==object?object:baseUpdate(object,path,castFunction(updater),customizer)},lodash.values=values,lodash.valuesIn=function(object){return null==object?[]:baseValues(object,keysIn(object))},lodash.without=without,lodash.words=words,lodash.wrap=function(value,wrapper){return partial(castFunction(wrapper),value)},lodash.xor=xor,lodash.xorBy=xorBy,lodash.xorWith=xorWith,lodash.zip=zip,lodash.zipObject=function(props,values){return baseZipObject(props||[],values||[],assignValue)},lodash.zipObjectDeep=function(props,values){return baseZipObject(props||[],values||[],baseSet)},lodash.zipWith=zipWith,lodash.entries=toPairs,lodash.entriesIn=toPairsIn,lodash.extend=assignIn,lodash.extendWith=assignInWith,mixin(lodash,lodash),lodash.add=add,lodash.attempt=attempt,lodash.camelCase=camelCase,lodash.capitalize=capitalize,lodash.ceil=ceil,lodash.clamp=function(number,lower,upper){return upper===undefined&&(upper=lower,lower=undefined),upper!==undefined&&(upper=(upper=toNumber(upper))==upper?upper:0),lower!==undefined&&(lower=(lower=toNumber(lower))==lower?lower:0),baseClamp(toNumber(number),lower,upper)},lodash.clone=function(value){return baseClone(value,CLONE_SYMBOLS_FLAG)},lodash.cloneDeep=function(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)},lodash.cloneDeepWith=function(value,customizer){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG,customizer="function"==typeof customizer?customizer:undefined)},lodash.cloneWith=function(value,customizer){return baseClone(value,CLONE_SYMBOLS_FLAG,customizer="function"==typeof customizer?customizer:undefined)},lodash.conformsTo=function(object,source){return null==source||baseConformsTo(object,source,keys(source))},lodash.deburr=deburr,lodash.defaultTo=function(value,defaultValue){return null==value||value!=value?defaultValue:value},lodash.divide=divide,lodash.endsWith=function(string,target,position){string=toString(string),target=baseToString(target);var length=string.length,end=position=position===undefined?length:baseClamp(toInteger(position),0,length);return(position-=target.length)>=0&&string.slice(position,end)==target},lodash.eq=eq,lodash.escape=function(string){return(string=toString(string))&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string},lodash.escapeRegExp=function(string){return(string=toString(string))&&reHasRegExpChar.test(string)?string.replace(reRegExpChar,"\\$&"):string},lodash.every=function(collection,predicate,guard){var func=isArray(collection)?arrayEvery:baseEvery;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,getIteratee(predicate,3))},lodash.find=find,lodash.findIndex=findIndex,lodash.findKey=function(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwn)},lodash.findLast=findLast,lodash.findLastIndex=findLastIndex,lodash.findLastKey=function(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwnRight)},lodash.floor=floor,lodash.forEach=forEach,lodash.forEachRight=forEachRight,lodash.forIn=function(object,iteratee){return null==object?object:baseFor(object,getIteratee(iteratee,3),keysIn)},lodash.forInRight=function(object,iteratee){return null==object?object:baseForRight(object,getIteratee(iteratee,3),keysIn)},lodash.forOwn=function(object,iteratee){return object&&baseForOwn(object,getIteratee(iteratee,3))},lodash.forOwnRight=function(object,iteratee){return object&&baseForOwnRight(object,getIteratee(iteratee,3))},lodash.get=get,lodash.gt=gt,lodash.gte=gte,lodash.has=function(object,path){return null!=object&&hasPath(object,path,baseHas)},lodash.hasIn=hasIn,lodash.head=head,lodash.identity=identity,lodash.includes=function(collection,value,fromIndex,guard){collection=isArrayLike(collection)?collection:values(collection),fromIndex=fromIndex&&!guard?toInteger(fromIndex):0;var length=collection.length;return fromIndex<0&&(fromIndex=nativeMax(length+fromIndex,0)),isString(collection)?fromIndex<=length&&collection.indexOf(value,fromIndex)>-1:!!length&&baseIndexOf(collection,value,fromIndex)>-1},lodash.indexOf=function(array,value,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=null==fromIndex?0:toInteger(fromIndex);return index<0&&(index=nativeMax(length+index,0)),baseIndexOf(array,value,index)},lodash.inRange=function(number,start,end){return start=toFinite(start),end===undefined?(end=start,start=0):end=toFinite(end),function(number,start,end){return number>=nativeMin(start,end)&&number=-MAX_SAFE_INTEGER&&value<=MAX_SAFE_INTEGER},lodash.isSet=isSet,lodash.isString=isString,lodash.isSymbol=isSymbol,lodash.isTypedArray=isTypedArray,lodash.isUndefined=function(value){return value===undefined},lodash.isWeakMap=function(value){return isObjectLike(value)&&getTag(value)==weakMapTag},lodash.isWeakSet=function(value){return isObjectLike(value)&&baseGetTag(value)==weakSetTag},lodash.join=function(array,separator){return null==array?"":nativeJoin.call(array,separator)},lodash.kebabCase=kebabCase,lodash.last=last,lodash.lastIndexOf=function(array,value,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=length;return fromIndex!==undefined&&(index=(index=toInteger(fromIndex))<0?nativeMax(length+index,0):nativeMin(index,length-1)),value==value?function(array,value,fromIndex){for(var index=fromIndex+1;index--;)if(array[index]===value)return index;return index}(array,value,index):baseFindIndex(array,baseIsNaN,index,!0)},lodash.lowerCase=lowerCase,lodash.lowerFirst=lowerFirst,lodash.lt=lt,lodash.lte=lte,lodash.max=function(array){return array&&array.length?baseExtremum(array,identity,baseGt):undefined},lodash.maxBy=function(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseGt):undefined},lodash.mean=function(array){return baseMean(array,identity)},lodash.meanBy=function(array,iteratee){return baseMean(array,getIteratee(iteratee,2))},lodash.min=function(array){return array&&array.length?baseExtremum(array,identity,baseLt):undefined},lodash.minBy=function(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseLt):undefined},lodash.stubArray=stubArray,lodash.stubFalse=stubFalse,lodash.stubObject=function(){return{}},lodash.stubString=function(){return""},lodash.stubTrue=function(){return!0},lodash.multiply=multiply,lodash.nth=function(array,n){return array&&array.length?baseNth(array,toInteger(n)):undefined},lodash.noConflict=function(){return root._===this&&(root._=oldDash),this},lodash.noop=noop,lodash.now=now,lodash.pad=function(string,length,chars){string=toString(string);var strLength=(length=toInteger(length))?stringSize(string):0;if(!length||strLength>=length)return string;var mid=(length-strLength)/2;return createPadding(nativeFloor(mid),chars)+string+createPadding(nativeCeil(mid),chars)},lodash.padEnd=function(string,length,chars){string=toString(string);var strLength=(length=toInteger(length))?stringSize(string):0;return length&&strLengthupper){var temp=lower;lower=upper,upper=temp}if(floating||lower%1||upper%1){var rand=nativeRandom();return nativeMin(lower+rand*(upper-lower+freeParseFloat("1e-"+((rand+"").length-1))),upper)}return baseRandom(lower,upper)},lodash.reduce=function(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEach)},lodash.reduceRight=function(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduceRight:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEachRight)},lodash.repeat=function(string,n,guard){return n=(guard?isIterateeCall(string,n,guard):n===undefined)?1:toInteger(n),baseRepeat(toString(string),n)},lodash.replace=function(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2])},lodash.result=function(object,path,defaultValue){var index=-1,length=(path=castPath(path,object)).length;for(length||(length=1,object=undefined);++indexMAX_SAFE_INTEGER)return[];var index=MAX_ARRAY_LENGTH,length=nativeMin(n,MAX_ARRAY_LENGTH);iteratee=getIteratee(iteratee),n-=MAX_ARRAY_LENGTH;for(var result=baseTimes(length,iteratee);++index=strLength)return string;var end=length-stringSize(omission);if(end<1)return omission;var result=strSymbols?castSlice(strSymbols,0,end).join(""):string.slice(0,end);if(separator===undefined)return result+omission;if(strSymbols&&(end+=result.length-end),isRegExp(separator)){if(string.slice(end).search(separator)){var match,substring=result;for(separator.global||(separator=RegExp(separator.source,toString(reFlags.exec(separator))+"g")),separator.lastIndex=0;match=separator.exec(substring);)var newEnd=match.index;result=result.slice(0,newEnd===undefined?end:newEnd)}}else if(string.indexOf(baseToString(separator),end)!=end){var index=result.lastIndexOf(separator);index>-1&&(result=result.slice(0,index))}return result+omission},lodash.unescape=function(string){return(string=toString(string))&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string},lodash.uniqueId=function(prefix){var id=++idCounter;return toString(prefix)+id},lodash.upperCase=upperCase,lodash.upperFirst=upperFirst,lodash.each=forEach,lodash.eachRight=forEachRight,lodash.first=head,mixin(lodash,(source={},baseForOwn(lodash,function(func,methodName){hasOwnProperty.call(lodash.prototype,methodName)||(source[methodName]=func)}),source),{chain:!1}),lodash.VERSION="4.17.11",arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],function(methodName){lodash[methodName].placeholder=lodash}),arrayEach(["drop","take"],function(methodName,index){LazyWrapper.prototype[methodName]=function(n){n=n===undefined?1:nativeMax(toInteger(n),0);var result=this.__filtered__&&!index?new LazyWrapper(this):this.clone();return result.__filtered__?result.__takeCount__=nativeMin(n,result.__takeCount__):result.__views__.push({size:nativeMin(n,MAX_ARRAY_LENGTH),type:methodName+(result.__dir__<0?"Right":"")}),result},LazyWrapper.prototype[methodName+"Right"]=function(n){return this.reverse()[methodName](n).reverse()}}),arrayEach(["filter","map","takeWhile"],function(methodName,index){var type=index+1,isFilter=type==LAZY_FILTER_FLAG||3==type;LazyWrapper.prototype[methodName]=function(iteratee){var result=this.clone();return result.__iteratees__.push({iteratee:getIteratee(iteratee,3),type:type}),result.__filtered__=result.__filtered__||isFilter,result}}),arrayEach(["head","last"],function(methodName,index){var takeName="take"+(index?"Right":"");LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0]}}),arrayEach(["initial","tail"],function(methodName,index){var dropName="drop"+(index?"":"Right");LazyWrapper.prototype[methodName]=function(){return this.__filtered__?new LazyWrapper(this):this[dropName](1)}}),LazyWrapper.prototype.compact=function(){return this.filter(identity)},LazyWrapper.prototype.find=function(predicate){return this.filter(predicate).head()},LazyWrapper.prototype.findLast=function(predicate){return this.reverse().find(predicate)},LazyWrapper.prototype.invokeMap=baseRest(function(path,args){return"function"==typeof path?new LazyWrapper(this):this.map(function(value){return baseInvoke(value,path,args)})}),LazyWrapper.prototype.reject=function(predicate){return this.filter(negate(getIteratee(predicate)))},LazyWrapper.prototype.slice=function(start,end){start=toInteger(start);var result=this;return result.__filtered__&&(start>0||end<0)?new LazyWrapper(result):(start<0?result=result.takeRight(-start):start&&(result=result.drop(start)),end!==undefined&&(result=(end=toInteger(end))<0?result.dropRight(-end):result.take(end-start)),result)},LazyWrapper.prototype.takeRightWhile=function(predicate){return this.reverse().takeWhile(predicate).reverse()},LazyWrapper.prototype.toArray=function(){return this.take(MAX_ARRAY_LENGTH)},baseForOwn(LazyWrapper.prototype,function(func,methodName){var checkIteratee=/^(?:filter|find|map|reject)|While$/.test(methodName),isTaker=/^(?:head|last)$/.test(methodName),lodashFunc=lodash[isTaker?"take"+("last"==methodName?"Right":""):methodName],retUnwrapped=isTaker||/^find/.test(methodName);lodashFunc&&(lodash.prototype[methodName]=function(){var value=this.__wrapped__,args=isTaker?[1]:arguments,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value),interceptor=function(value){var result=lodashFunc.apply(lodash,arrayPush([value],args));return isTaker&&chainAll?result[0]:result};useLazy&&checkIteratee&&"function"==typeof iteratee&&1!=iteratee.length&&(isLazy=useLazy=!1);var chainAll=this.__chain__,isHybrid=!!this.__actions__.length,isUnwrapped=retUnwrapped&&!chainAll,onlyLazy=isLazy&&!isHybrid;if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);return result.__actions__.push({func:thru,args:[interceptor],thisArg:undefined}),new LodashWrapper(result,chainAll)}return isUnwrapped&&onlyLazy?func.apply(this,args):(result=this.thru(interceptor),isUnwrapped?isTaker?result.value()[0]:result.value():result)})}),arrayEach(["pop","push","shift","sort","splice","unshift"],function(methodName){var func=arrayProto[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?"tap":"thru",retUnwrapped=/^(?:pop|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;if(retUnwrapped&&!this.__chain__){var value=this.value();return func.apply(isArray(value)?value:[],args)}return this[chainName](function(value){return func.apply(isArray(value)?value:[],args)})}}),baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name+"";(realNames[key]||(realNames[key]=[])).push({name:methodName,func:lodashFunc})}}),realNames[createHybrid(undefined,WRAP_BIND_KEY_FLAG).name]=[{name:"wrapper",func:undefined}],LazyWrapper.prototype.clone=function(){var result=new LazyWrapper(this.__wrapped__);return result.__actions__=copyArray(this.__actions__),result.__dir__=this.__dir__,result.__filtered__=this.__filtered__,result.__iteratees__=copyArray(this.__iteratees__),result.__takeCount__=this.__takeCount__,result.__views__=copyArray(this.__views__),result},LazyWrapper.prototype.reverse=function(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1,result.__filtered__=!0}else(result=this.clone()).__dir__*=-1;return result},LazyWrapper.prototype.value=function(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=function(start,end,transforms){for(var index=-1,length=transforms.length;++index=this.__values__.length;return{done:done,value:done?undefined:this.__values__[this.__index__++]}},lodash.prototype.plant=function(value){for(var result,parent=this;parent instanceof baseLodash;){var clone=wrapperClone(parent);clone.__index__=0,clone.__values__=undefined,result?previous.__wrapped__=clone:result=clone;var previous=clone;parent=parent.__wrapped__}return previous.__wrapped__=value,result},lodash.prototype.reverse=function(){var value=this.__wrapped__;if(value instanceof LazyWrapper){var wrapped=value;return this.__actions__.length&&(wrapped=new LazyWrapper(this)),(wrapped=wrapped.reverse()).__actions__.push({func:thru,args:[reverse],thisArg:undefined}),new LodashWrapper(wrapped,this.__chain__)}return this.thru(reverse)},lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=function(){return baseWrapperValue(this.__wrapped__,this.__actions__)},lodash.prototype.first=lodash.prototype.head,symIterator&&(lodash.prototype[symIterator]=function(){return this}),lodash}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(root._=_,define(function(){return _})):freeModule?((freeModule.exports=_)._=_,freeExports._=_):root._=_}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],193:[function(require,module,exports){module.exports={name:"bitcore-lib-p256",version:"0.16.0",description:"A pure and powerful JavaScript Bitcoin library.",author:"BitPay ",main:"index.js",scripts:{lint:"gulp lint",test:"gulp test",coverage:"gulp coverage",build:"gulp"},keywords:["bitcoin","transaction","address","p2p","ecies","cryptocurrency","blockchain","payment","bip21","bip32","bip37","bip69","bip70","multisig"],repository:{type:"git",url:"https://github.com/bitpay/bitcore-lib.git"},browser:{request:"browser-request"},dependencies:{"bn.js":"=4.11.8",bs58:"=4.0.1","buffer-compare":"=1.1.1",elliptic:"=6.4.0",inherits:"=2.0.1",lodash:"=4.17.11"},devDependencies:{"bitcore-build":"https://github.com/bitpay/bitcore-build.git#1023e8a99cd42b9241ccafe8e34c52f308c10284",brfs:"^2.0.1",chai:"^4.2.0",gulp:"^4.0.0",sinon:"^7.1.1"},license:"MIT"}},{}],194:[function(require,module,exports){var util=require("./util");function ADD64AA(v,a,b){var o0=v[a]+v[b],o1=v[a+1]+v[b+1];o0>=4294967296&&o1++,v[a]=o0,v[a+1]=o1}function ADD64AC(v,a,b0,b1){var o0=v[a]+b0;b0<0&&(o0+=4294967296);var o1=v[a+1]+b1;o0>=4294967296&&o1++,v[a]=o0,v[a+1]=o1}function B2B_GET32(arr,i){return arr[i]^arr[i+1]<<8^arr[i+2]<<16^arr[i+3]<<24}function B2B_G(a,b,c,d,ix,iy){var x0=m[ix],x1=m[ix+1],y0=m[iy],y1=m[iy+1];ADD64AA(v,a,b),ADD64AC(v,a,x0,x1);var xor0=v[d]^v[a],xor1=v[d+1]^v[a+1];v[d]=xor1,v[d+1]=xor0,ADD64AA(v,c,d),xor0=v[b]^v[c],xor1=v[b+1]^v[c+1],v[b]=xor0>>>24^xor1<<8,v[b+1]=xor1>>>24^xor0<<8,ADD64AA(v,a,b),ADD64AC(v,a,y0,y1),xor0=v[d]^v[a],xor1=v[d+1]^v[a+1],v[d]=xor0>>>16^xor1<<16,v[d+1]=xor1>>>16^xor0<<16,ADD64AA(v,c,d),xor0=v[b]^v[c],xor1=v[b+1]^v[c+1],v[b]=xor1>>>31^xor0<<1,v[b+1]=xor0>>>31^xor1<<1}var BLAKE2B_IV32=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),SIGMA82=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(x){return 2*x})),v=new Uint32Array(32),m=new Uint32Array(32);function blake2bCompress(ctx,last){var i=0;for(i=0;i<16;i++)v[i]=ctx.h[i],v[i+16]=BLAKE2B_IV32[i];for(v[24]=v[24]^ctx.t,v[25]=v[25]^ctx.t/4294967296,last&&(v[28]=~v[28],v[29]=~v[29]),i=0;i<32;i++)m[i]=B2B_GET32(ctx.b,4*i);for(i=0;i<12;i++)B2B_G(0,8,16,24,SIGMA82[16*i+0],SIGMA82[16*i+1]),B2B_G(2,10,18,26,SIGMA82[16*i+2],SIGMA82[16*i+3]),B2B_G(4,12,20,28,SIGMA82[16*i+4],SIGMA82[16*i+5]),B2B_G(6,14,22,30,SIGMA82[16*i+6],SIGMA82[16*i+7]),B2B_G(0,10,20,30,SIGMA82[16*i+8],SIGMA82[16*i+9]),B2B_G(2,12,22,24,SIGMA82[16*i+10],SIGMA82[16*i+11]),B2B_G(4,14,16,26,SIGMA82[16*i+12],SIGMA82[16*i+13]),B2B_G(6,8,18,28,SIGMA82[16*i+14],SIGMA82[16*i+15]);for(i=0;i<16;i++)ctx.h[i]=ctx.h[i]^v[i]^v[i+16]}function blake2bInit(outlen,key){if(0===outlen||outlen>64)throw new Error("Illegal output length, expected 0 < length <= 64");if(key&&key.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64");for(var ctx={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:outlen},i=0;i<16;i++)ctx.h[i]=BLAKE2B_IV32[i];var keylen=key?key.length:0;return ctx.h[0]^=16842752^keylen<<8^outlen,key&&(blake2bUpdate(ctx,key),ctx.c=128),ctx}function blake2bUpdate(ctx,input){for(var i=0;i>2]>>8*(3&i);return out}function blake2b(input,key,outlen){outlen=outlen||64,input=util.normalizeInput(input);var ctx=blake2bInit(outlen,key);return blake2bUpdate(ctx,input),blake2bFinal(ctx)}module.exports={blake2b:blake2b,blake2bHex:function(input,key,outlen){var output=blake2b(input,key,outlen);return util.toHex(output)},blake2bInit:blake2bInit,blake2bUpdate:blake2bUpdate,blake2bFinal:blake2bFinal}},{"./util":197}],195:[function(require,module,exports){var util=require("./util");function B2S_GET32(v,i){return v[i]^v[i+1]<<8^v[i+2]<<16^v[i+3]<<24}function B2S_G(a,b,c,d,x,y){v[a]=v[a]+v[b]+x,v[d]=ROTR32(v[d]^v[a],16),v[c]=v[c]+v[d],v[b]=ROTR32(v[b]^v[c],12),v[a]=v[a]+v[b]+y,v[d]=ROTR32(v[d]^v[a],8),v[c]=v[c]+v[d],v[b]=ROTR32(v[b]^v[c],7)}function ROTR32(x,y){return x>>>y^x<<32-y}var BLAKE2S_IV=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),SIGMA=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),v=new Uint32Array(16),m=new Uint32Array(16);function blake2sCompress(ctx,last){var i=0;for(i=0;i<8;i++)v[i]=ctx.h[i],v[i+8]=BLAKE2S_IV[i];for(v[12]^=ctx.t,v[13]^=ctx.t/4294967296,last&&(v[14]=~v[14]),i=0;i<16;i++)m[i]=B2S_GET32(ctx.b,4*i);for(i=0;i<10;i++)B2S_G(0,4,8,12,m[SIGMA[16*i+0]],m[SIGMA[16*i+1]]),B2S_G(1,5,9,13,m[SIGMA[16*i+2]],m[SIGMA[16*i+3]]),B2S_G(2,6,10,14,m[SIGMA[16*i+4]],m[SIGMA[16*i+5]]),B2S_G(3,7,11,15,m[SIGMA[16*i+6]],m[SIGMA[16*i+7]]),B2S_G(0,5,10,15,m[SIGMA[16*i+8]],m[SIGMA[16*i+9]]),B2S_G(1,6,11,12,m[SIGMA[16*i+10]],m[SIGMA[16*i+11]]),B2S_G(2,7,8,13,m[SIGMA[16*i+12]],m[SIGMA[16*i+13]]),B2S_G(3,4,9,14,m[SIGMA[16*i+14]],m[SIGMA[16*i+15]]);for(i=0;i<8;i++)ctx.h[i]^=v[i]^v[i+8]}function blake2sInit(outlen,key){if(!(outlen>0&&outlen<=32))throw new Error("Incorrect output length, should be in [1, 32]");var keylen=key?key.length:0;if(key&&!(keylen>0&&keylen<=32))throw new Error("Incorrect key length, should be in [1, 32]");var ctx={h:new Uint32Array(BLAKE2S_IV),b:new Uint32Array(64),c:0,t:0,outlen:outlen};return ctx.h[0]^=16842752^keylen<<8^outlen,keylen>0&&(blake2sUpdate(ctx,key),ctx.c=64),ctx}function blake2sUpdate(ctx,input){for(var i=0;i>2]>>8*(3&i)&255;return out}function blake2s(input,key,outlen){outlen=outlen||32,input=util.normalizeInput(input);var ctx=blake2sInit(outlen,key);return blake2sUpdate(ctx,input),blake2sFinal(ctx)}module.exports={blake2s:blake2s,blake2sHex:function(input,key,outlen){var output=blake2s(input,key,outlen);return util.toHex(output)},blake2sInit:blake2sInit,blake2sUpdate:blake2sUpdate,blake2sFinal:blake2sFinal}},{"./util":197}],196:[function(require,module,exports){var b2b=require("./blake2b"),b2s=require("./blake2s");module.exports={blake2b:b2b.blake2b,blake2bHex:b2b.blake2bHex,blake2bInit:b2b.blake2bInit,blake2bUpdate:b2b.blake2bUpdate,blake2bFinal:b2b.blake2bFinal,blake2s:b2s.blake2s,blake2sHex:b2s.blake2sHex,blake2sInit:b2s.blake2sInit,blake2sUpdate:b2s.blake2sUpdate,blake2sFinal:b2s.blake2sFinal}},{"./blake2b":194,"./blake2s":195}],197:[function(require,module,exports){(function(Buffer){var ERROR_MSG_INPUT="Input must be an string, Buffer or Uint8Array";function uint32ToHex(val){return(4294967296+val).toString(16).substring(1)}module.exports={normalizeInput:function(input){var ret;if(input instanceof Uint8Array)ret=input;else if(input instanceof Buffer)ret=new Uint8Array(input);else{if("string"!=typeof input)throw new Error(ERROR_MSG_INPUT);ret=new Uint8Array(Buffer.from(input,"utf8"))}return ret},toHex:function(bytes){return Array.prototype.map.call(bytes,function(n){return(n<16?"0":"")+n.toString(16)}).join("")},debugPrint:function(label,arr,size){for(var msg="\n"+label+" = ",i=0;i=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:15&c}return r}function parseBase(str,start,end,mul){for(var r=0,len=Math.min(str.length,end),i=start;i=49?c-49+10:c>=17?c-17+10:c}return r}BN.isBN=function(num){return num instanceof BN||null!==num&&"object"==typeof num&&num.constructor.wordSize===BN.wordSize&&Array.isArray(num.words)},BN.max=function(left,right){return left.cmp(right)>0?left:right},BN.min=function(left,right){return left.cmp(right)<0?left:right},BN.prototype._init=function(number,base,endian){if("number"==typeof number)return this._initNumber(number,base,endian);if("object"==typeof number)return this._initArray(number,base,endian);"hex"===base&&(base=16),assert(base===(0|base)&&base>=2&&base<=36);var start=0;"-"===(number=number.toString().replace(/\s+/g,""))[0]&&start++,16===base?this._parseHex(number,start):this._parseBase(number,base,start),"-"===number[0]&&(this.negative=1),this.strip(),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initNumber=function(number,base,endian){number<0&&(this.negative=1,number=-number),number<67108864?(this.words=[67108863&number],this.length=1):number<4503599627370496?(this.words=[67108863&number,number/67108864&67108863],this.length=2):(assert(number<9007199254740992),this.words=[67108863&number,number/67108864&67108863,1],this.length=3),"le"===endian&&this._initArray(this.toArray(),base,endian)},BN.prototype._initArray=function(number,base,endian){if(assert("number"==typeof number.length),number.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(number.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i>>26-off&67108863,(off+=24)>=26&&(off-=26,j++);return this.strip()},BN.prototype._parseHex=function(number,start){this.length=Math.ceil((number.length-start)/6),this.words=new Array(this.length);for(var i=0;i=start;i-=6)w=parseHex(number,i,i+6),this.words[j]|=w<>>26-off&4194303,(off+=24)>=26&&(off-=26,j++);i+6!==start&&(w=parseHex(number,start,i+6),this.words[j]|=w<>>26-off&4194303),this.strip()},BN.prototype._parseBase=function(number,base,start){this.words=[0],this.length=1;for(var limbLen=0,limbPow=1;limbPow<=67108863;limbPow*=base)limbLen++;limbLen--,limbPow=limbPow/base|0;for(var total=number.length-start,mod=total%limbLen,end=Math.min(total,total-mod)+start,word=0,i=start;i1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function(){return(this.red?""};var zeros=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],groupSizes=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],groupBases=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function smallMulTo(self,num,out){out.negative=num.negative^self.negative;var len=self.length+num.length|0;out.length=len,len=len-1|0;var a=0|self.words[0],b=0|num.words[0],r=a*b,lo=67108863&r,carry=r/67108864|0;out.words[0]=lo;for(var k=1;k>>26,rword=67108863&carry,maxJ=Math.min(k,num.length-1),j=Math.max(0,k-self.length+1);j<=maxJ;j++){var i=k-j|0;ncarry+=(r=(a=0|self.words[i])*(b=0|num.words[j])+rword)/67108864|0,rword=67108863&r}out.words[k]=0|rword,carry=0|ncarry}return 0!==carry?out.words[k]=0|carry:out.length--,out.strip()}BN.prototype.toString=function(base,padding){var out;if(base=base||10,padding=0|padding||1,16===base||"hex"===base){out="";for(var off=0,carry=0,i=0;i>>24-off&16777215)||i!==this.length-1?zeros[6-word.length]+word+out:word+out,(off+=2)>=26&&(off-=26,i--)}for(0!==carry&&(out=carry.toString(16)+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}if(base===(0|base)&&base>=2&&base<=36){var groupSize=groupSizes[base],groupBase=groupBases[base];out="";var c=this.clone();for(c.negative=0;!c.isZero();){var r=c.modn(groupBase).toString(base);out=(c=c.idivn(groupBase)).isZero()?r+out:zeros[groupSize-r.length]+r+out}for(this.isZero()&&(out="0"+out);out.length%padding!=0;)out="0"+out;return 0!==this.negative&&(out="-"+out),out}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function(){var ret=this.words[0];return 2===this.length?ret+=67108864*this.words[1]:3===this.length&&1===this.words[2]?ret+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-ret:ret},BN.prototype.toJSON=function(){return this.toString(16)},BN.prototype.toBuffer=function(endian,length){return assert(void 0!==Buffer),this.toArrayLike(Buffer,endian,length)},BN.prototype.toArray=function(endian,length){return this.toArrayLike(Array,endian,length)},BN.prototype.toArrayLike=function(ArrayType,endian,length){var byteLength=this.byteLength(),reqLength=length||Math.max(1,byteLength);assert(byteLength<=reqLength,"byte array longer than desired length"),assert(reqLength>0,"Requested array length <= 0"),this.strip();var b,i,littleEndian="le"===endian,res=new ArrayType(reqLength),q=this.clone();if(littleEndian){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[i]=b;for(;i=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},BN.prototype._zeroBits=function(w){if(0===w)return 26;var t=w,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},BN.prototype.bitLength=function(){var w=this.words[this.length-1],hi=this._countBits(w);return 26*(this.length-1)+hi},BN.prototype.zeroBits=function(){if(this.isZero())return 0;for(var r=0,i=0;inum.length?this.clone().ior(num):num.clone().ior(this)},BN.prototype.uor=function(num){return this.length>num.length?this.clone().iuor(num):num.clone().iuor(this)},BN.prototype.iuand=function(num){var b;b=this.length>num.length?num:this;for(var i=0;inum.length?this.clone().iand(num):num.clone().iand(this)},BN.prototype.uand=function(num){return this.length>num.length?this.clone().iuand(num):num.clone().iuand(this)},BN.prototype.iuxor=function(num){var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var i=0;inum.length?this.clone().ixor(num):num.clone().ixor(this)},BN.prototype.uxor=function(num){return this.length>num.length?this.clone().iuxor(num):num.clone().iuxor(this)},BN.prototype.inotn=function(width){assert("number"==typeof width&&width>=0);var bytesNeeded=0|Math.ceil(width/26),bitsLeft=width%26;this._expand(bytesNeeded),bitsLeft>0&&bytesNeeded--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-bitsLeft),this.strip()},BN.prototype.notn=function(width){return this.clone().inotn(width)},BN.prototype.setn=function(bit,val){assert("number"==typeof bit&&bit>=0);var off=bit/26|0,wbit=bit%26;return this._expand(off+1),this.words[off]=val?this.words[off]|1<num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i>>26;for(;0!==carry&&i>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;inum.length?this.clone().iadd(num):num.clone().iadd(this)},BN.prototype.isub=function(num){if(0!==num.negative){num.negative=0;var r=this.iadd(num);return num.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(num),this.negative=1,this._normSign();var a,b,cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i>26,this.words[i]=67108863&r;for(;0!==carry&&i>26,this.words[i]=67108863&r;if(0===carry&&i>>13,a1=0|a[1],al1=8191&a1,ah1=a1>>>13,a2=0|a[2],al2=8191&a2,ah2=a2>>>13,a3=0|a[3],al3=8191&a3,ah3=a3>>>13,a4=0|a[4],al4=8191&a4,ah4=a4>>>13,a5=0|a[5],al5=8191&a5,ah5=a5>>>13,a6=0|a[6],al6=8191&a6,ah6=a6>>>13,a7=0|a[7],al7=8191&a7,ah7=a7>>>13,a8=0|a[8],al8=8191&a8,ah8=a8>>>13,a9=0|a[9],al9=8191&a9,ah9=a9>>>13,b0=0|b[0],bl0=8191&b0,bh0=b0>>>13,b1=0|b[1],bl1=8191&b1,bh1=b1>>>13,b2=0|b[2],bl2=8191&b2,bh2=b2>>>13,b3=0|b[3],bl3=8191&b3,bh3=b3>>>13,b4=0|b[4],bl4=8191&b4,bh4=b4>>>13,b5=0|b[5],bl5=8191&b5,bh5=b5>>>13,b6=0|b[6],bl6=8191&b6,bh6=b6>>>13,b7=0|b[7],bl7=8191&b7,bh7=b7>>>13,b8=0|b[8],bl8=8191&b8,bh8=b8>>>13,b9=0|b[9],bl9=8191&b9,bh9=b9>>>13;out.negative=self.negative^num.negative,out.length=19;var w0=(c+(lo=Math.imul(al0,bl0))|0)+((8191&(mid=(mid=Math.imul(al0,bh0))+Math.imul(ah0,bl0)|0))<<13)|0;c=((hi=Math.imul(ah0,bh0))+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=(mid=Math.imul(al1,bh0))+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0);var w1=(c+(lo=lo+Math.imul(al0,bl1)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh1)|0)+Math.imul(ah0,bl1)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh1)|0)+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=(mid=Math.imul(al2,bh0))+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=(mid=mid+Math.imul(al1,bh1)|0)+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0;var w2=(c+(lo=lo+Math.imul(al0,bl2)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh2)|0)+Math.imul(ah0,bl2)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh2)|0)+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=(mid=Math.imul(al3,bh0))+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=(mid=mid+Math.imul(al2,bh1)|0)+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=(mid=mid+Math.imul(al1,bh2)|0)+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0;var w3=(c+(lo=lo+Math.imul(al0,bl3)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh3)|0)+Math.imul(ah0,bl3)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh3)|0)+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=(mid=Math.imul(al4,bh0))+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=(mid=mid+Math.imul(al3,bh1)|0)+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=(mid=mid+Math.imul(al2,bh2)|0)+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=(mid=mid+Math.imul(al1,bh3)|0)+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0;var w4=(c+(lo=lo+Math.imul(al0,bl4)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh4)|0)+Math.imul(ah0,bl4)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh4)|0)+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=(mid=Math.imul(al5,bh0))+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=(mid=mid+Math.imul(al4,bh1)|0)+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=(mid=mid+Math.imul(al3,bh2)|0)+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=(mid=mid+Math.imul(al2,bh3)|0)+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=(mid=mid+Math.imul(al1,bh4)|0)+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0;var w5=(c+(lo=lo+Math.imul(al0,bl5)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh5)|0)+Math.imul(ah0,bl5)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh5)|0)+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=(mid=Math.imul(al6,bh0))+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=(mid=mid+Math.imul(al5,bh1)|0)+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=(mid=mid+Math.imul(al4,bh2)|0)+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=(mid=mid+Math.imul(al3,bh3)|0)+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=(mid=mid+Math.imul(al2,bh4)|0)+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=(mid=mid+Math.imul(al1,bh5)|0)+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0;var w6=(c+(lo=lo+Math.imul(al0,bl6)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh6)|0)+Math.imul(ah0,bl6)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh6)|0)+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=(mid=Math.imul(al7,bh0))+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=(mid=mid+Math.imul(al6,bh1)|0)+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=(mid=mid+Math.imul(al5,bh2)|0)+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=(mid=mid+Math.imul(al4,bh3)|0)+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=(mid=mid+Math.imul(al3,bh4)|0)+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=(mid=mid+Math.imul(al2,bh5)|0)+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=(mid=mid+Math.imul(al1,bh6)|0)+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0;var w7=(c+(lo=lo+Math.imul(al0,bl7)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh7)|0)+Math.imul(ah0,bl7)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh7)|0)+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=(mid=Math.imul(al8,bh0))+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=(mid=mid+Math.imul(al7,bh1)|0)+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=(mid=mid+Math.imul(al6,bh2)|0)+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=(mid=mid+Math.imul(al5,bh3)|0)+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=(mid=mid+Math.imul(al4,bh4)|0)+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=(mid=mid+Math.imul(al3,bh5)|0)+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=(mid=mid+Math.imul(al2,bh6)|0)+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=(mid=mid+Math.imul(al1,bh7)|0)+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0;var w8=(c+(lo=lo+Math.imul(al0,bl8)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh8)|0)+Math.imul(ah0,bl8)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh8)|0)+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=(mid=Math.imul(al9,bh0))+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=(mid=mid+Math.imul(al8,bh1)|0)+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=(mid=mid+Math.imul(al7,bh2)|0)+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=(mid=mid+Math.imul(al6,bh3)|0)+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=(mid=mid+Math.imul(al5,bh4)|0)+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=(mid=mid+Math.imul(al4,bh5)|0)+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=(mid=mid+Math.imul(al3,bh6)|0)+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=(mid=mid+Math.imul(al2,bh7)|0)+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=(mid=mid+Math.imul(al1,bh8)|0)+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0;var w9=(c+(lo=lo+Math.imul(al0,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al0,bh9)|0)+Math.imul(ah0,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah0,bh9)|0)+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=(mid=Math.imul(al9,bh1))+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=(mid=mid+Math.imul(al8,bh2)|0)+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=(mid=mid+Math.imul(al7,bh3)|0)+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=(mid=mid+Math.imul(al6,bh4)|0)+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=(mid=mid+Math.imul(al5,bh5)|0)+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=(mid=mid+Math.imul(al4,bh6)|0)+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=(mid=mid+Math.imul(al3,bh7)|0)+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=(mid=mid+Math.imul(al2,bh8)|0)+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0;var w10=(c+(lo=lo+Math.imul(al1,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al1,bh9)|0)+Math.imul(ah1,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah1,bh9)|0)+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=(mid=Math.imul(al9,bh2))+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=(mid=mid+Math.imul(al8,bh3)|0)+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=(mid=mid+Math.imul(al7,bh4)|0)+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=(mid=mid+Math.imul(al6,bh5)|0)+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=(mid=mid+Math.imul(al5,bh6)|0)+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=(mid=mid+Math.imul(al4,bh7)|0)+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=(mid=mid+Math.imul(al3,bh8)|0)+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0;var w11=(c+(lo=lo+Math.imul(al2,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al2,bh9)|0)+Math.imul(ah2,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah2,bh9)|0)+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=(mid=Math.imul(al9,bh3))+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=(mid=mid+Math.imul(al8,bh4)|0)+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=(mid=mid+Math.imul(al7,bh5)|0)+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=(mid=mid+Math.imul(al6,bh6)|0)+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=(mid=mid+Math.imul(al5,bh7)|0)+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=(mid=mid+Math.imul(al4,bh8)|0)+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0;var w12=(c+(lo=lo+Math.imul(al3,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al3,bh9)|0)+Math.imul(ah3,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah3,bh9)|0)+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=(mid=Math.imul(al9,bh4))+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=(mid=mid+Math.imul(al8,bh5)|0)+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=(mid=mid+Math.imul(al7,bh6)|0)+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=(mid=mid+Math.imul(al6,bh7)|0)+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=(mid=mid+Math.imul(al5,bh8)|0)+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0;var w13=(c+(lo=lo+Math.imul(al4,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al4,bh9)|0)+Math.imul(ah4,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah4,bh9)|0)+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=(mid=Math.imul(al9,bh5))+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=(mid=mid+Math.imul(al8,bh6)|0)+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=(mid=mid+Math.imul(al7,bh7)|0)+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=(mid=mid+Math.imul(al6,bh8)|0)+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0;var w14=(c+(lo=lo+Math.imul(al5,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al5,bh9)|0)+Math.imul(ah5,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah5,bh9)|0)+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=(mid=Math.imul(al9,bh6))+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=(mid=mid+Math.imul(al8,bh7)|0)+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=(mid=mid+Math.imul(al7,bh8)|0)+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0;var w15=(c+(lo=lo+Math.imul(al6,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al6,bh9)|0)+Math.imul(ah6,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah6,bh9)|0)+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=(mid=Math.imul(al9,bh7))+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=(mid=mid+Math.imul(al8,bh8)|0)+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0;var w16=(c+(lo=lo+Math.imul(al7,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al7,bh9)|0)+Math.imul(ah7,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah7,bh9)|0)+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=(mid=Math.imul(al9,bh8))+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8);var w17=(c+(lo=lo+Math.imul(al8,bl9)|0)|0)+((8191&(mid=(mid=mid+Math.imul(al8,bh9)|0)+Math.imul(ah8,bl9)|0))<<13)|0;c=((hi=hi+Math.imul(ah8,bh9)|0)+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863;var w18=(c+(lo=Math.imul(al9,bl9))|0)+((8191&(mid=(mid=Math.imul(al9,bh9))+Math.imul(ah9,bl9)|0))<<13)|0;return c=((hi=Math.imul(ah9,bh9))+(mid>>>13)|0)+(w18>>>26)|0,w18&=67108863,o[0]=w0,o[1]=w1,o[2]=w2,o[3]=w3,o[4]=w4,o[5]=w5,o[6]=w6,o[7]=w7,o[8]=w8,o[9]=w9,o[10]=w10,o[11]=w11,o[12]=w12,o[13]=w13,o[14]=w14,o[15]=w15,o[16]=w16,o[17]=w17,o[18]=w18,0!==c&&(o[19]=c,out.length++),out};function jumboMulTo(self,num,out){return(new FFTM).mulp(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function(num,out){var len=this.length+num.length;return 10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?function(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k>>26)|0)>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out.strip()}(this,num,out):jumboMulTo(this,num,out)},FFTM.prototype.makeRBT=function(N){for(var t=new Array(N),l=BN.prototype._countBits(N)-1,i=0;i>=1;return rb},FFTM.prototype.permute=function(rbt,rws,iws,rtws,itws,N){for(var i=0;i>>=1)i++;return 1<>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i>=26,carry+=w/67108864|0,carry+=lo>>>26,this.words[i]=67108863&lo}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.muln=function(num){return this.clone().imuln(num)},BN.prototype.sqr=function(){return this.mul(this)},BN.prototype.isqr=function(){return this.imul(this.clone())},BN.prototype.pow=function(num){var w=function(num){for(var w=new Array(num.bitLength()),bit=0;bit>>wbit}return w}(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i=0);var i,r=bits%26,s=(bits-r)/26,carryMask=67108863>>>26-r<<26-r;if(0!==r){var carry=0;for(i=0;i>>26-r}carry&&(this.words[i]=carry,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i=0),h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<s)for(this.length-=s,i=0;i=0&&(0!==carry||i>=h);i--){var word=0|this.words[i];this.words[i]=carry<<26-r|word>>>r,carry=word&mask}return maskedWords&&0!==carry&&(maskedWords.words[maskedWords.length++]=carry),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function(bits,hint,extended){return assert(0===this.negative),this.iushrn(bits,hint,extended)},BN.prototype.shln=function(bits){return this.clone().ishln(bits)},BN.prototype.ushln=function(bits){return this.clone().iushln(bits)},BN.prototype.shrn=function(bits){return this.clone().ishrn(bits)},BN.prototype.ushrn=function(bits){return this.clone().iushrn(bits)},BN.prototype.testn=function(bit){assert("number"==typeof bit&&bit>=0);var r=bit%26,s=(bit-r)/26,q=1<=0);var r=bits%26,s=(bits-r)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==r&&s++,this.length=Math.min(s,this.length),0!==r){var mask=67108863^67108863>>>r<=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},BN.prototype.isubn=function(num){if(assert("number"==typeof num),assert(num<67108864),num<0)return this.iaddn(-num);if(0!==this.negative)return this.negative=0,this.iaddn(num),this.negative=1,this;if(this.words[0]-=num,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i>26,this.words[i+shift]=67108863&w;if(0===carry)return this.strip();for(assert(-1===carry),carry=0,i=0;i>26,this.words[i]=67108863&w;return this.negative=1,this.strip()},BN.prototype._wordDiv=function(num,mode){var shift=(this.length,num.length),a=this.clone(),b=num,bhi=0|b.words[b.length-1];0!==(shift=26-this._countBits(bhi))&&(b=b.ushln(shift),a.iushln(shift),bhi=0|b.words[b.length-1]);var q,m=a.length-b.length;if("mod"!==mode){(q=new BN(null)).length=m+1,q.words=new Array(q.length);for(var i=0;i=0;j--){var qj=67108864*(0|a.words[b.length+j])+(0|a.words[b.length+j-1]);for(qj=Math.min(qj/bhi|0,67108863),a._ishlnsubmul(b,qj,j);0!==a.negative;)qj--,a.negative=0,a._ishlnsubmul(b,1,j),a.isZero()||(a.negative^=1);q&&(q.words[j]=qj)}return q&&q.strip(),a.strip(),"div"!==mode&&0!==shift&&a.iushrn(shift),{div:q||null,mod:a}},BN.prototype.divmod=function(num,mode,positive){return assert(!num.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===num.negative?(res=this.neg().divmod(num,mode),"mod"!==mode&&(div=res.div.neg()),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.iadd(num)),{div:div,mod:mod}):0===this.negative&&0!==num.negative?(res=this.divmod(num.neg(),mode),"mod"!==mode&&(div=res.div.neg()),{div:div,mod:res.mod}):0!=(this.negative&num.negative)?(res=this.neg().divmod(num.neg(),mode),"div"!==mode&&(mod=res.mod.neg(),positive&&0!==mod.negative&&mod.isub(num)),{div:res.div,mod:mod}):num.length>this.length||this.cmp(num)<0?{div:new BN(0),mod:this}:1===num.length?"div"===mode?{div:this.divn(num.words[0]),mod:null}:"mod"===mode?{div:null,mod:new BN(this.modn(num.words[0]))}:{div:this.divn(num.words[0]),mod:new BN(this.modn(num.words[0]))}:this._wordDiv(num,mode);var div,mod,res},BN.prototype.div=function(num){return this.divmod(num,"div",!1).div},BN.prototype.mod=function(num){return this.divmod(num,"mod",!1).mod},BN.prototype.umod=function(num){return this.divmod(num,"mod",!0).mod},BN.prototype.divRound=function(num){var dm=this.divmod(num);if(dm.mod.isZero())return dm.div;var mod=0!==dm.div.negative?dm.mod.isub(num):dm.mod,half=num.ushrn(1),r2=num.andln(1),cmp=mod.cmp(half);return cmp<0||1===r2&&0===cmp?dm.div:0!==dm.div.negative?dm.div.isubn(1):dm.div.iaddn(1)},BN.prototype.modn=function(num){assert(num<=67108863);for(var p=(1<<26)%num,acc=0,i=this.length-1;i>=0;i--)acc=(p*acc+(0|this.words[i]))%num;return acc},BN.prototype.idivn=function(num){assert(num<=67108863);for(var carry=0,i=this.length-1;i>=0;i--){var w=(0|this.words[i])+67108864*carry;this.words[i]=w/num|0,carry=w%num}return this.strip()},BN.prototype.divn=function(num){return this.clone().idivn(num)},BN.prototype.egcd=function(p){assert(0===p.negative),assert(!p.isZero());var x=this,y=p.clone();x=0!==x.negative?x.umod(p):x.clone();for(var A=new BN(1),B=new BN(0),C=new BN(0),D=new BN(1),g=0;x.isEven()&&y.isEven();)x.iushrn(1),y.iushrn(1),++g;for(var yp=y.clone(),xp=x.clone();!x.isZero();){for(var i=0,im=1;0==(x.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(x.iushrn(i);i-- >0;)(A.isOdd()||B.isOdd())&&(A.iadd(yp),B.isub(xp)),A.iushrn(1),B.iushrn(1);for(var j=0,jm=1;0==(y.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(y.iushrn(j);j-- >0;)(C.isOdd()||D.isOdd())&&(C.iadd(yp),D.isub(xp)),C.iushrn(1),D.iushrn(1);x.cmp(y)>=0?(x.isub(y),A.isub(C),B.isub(D)):(y.isub(x),C.isub(A),D.isub(B))}return{a:C,b:D,gcd:y.iushln(g)}},BN.prototype._invmp=function(p){assert(0===p.negative),assert(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var res,x1=new BN(1),x2=new BN(0),delta=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,im=1;0==(a.words[0]&im)&&i<26;++i,im<<=1);if(i>0)for(a.iushrn(i);i-- >0;)x1.isOdd()&&x1.iadd(delta),x1.iushrn(1);for(var j=0,jm=1;0==(b.words[0]&jm)&&j<26;++j,jm<<=1);if(j>0)for(b.iushrn(j);j-- >0;)x2.isOdd()&&x2.iadd(delta),x2.iushrn(1);a.cmp(b)>=0?(a.isub(b),x1.isub(x2)):(b.isub(a),x2.isub(x1))}return(res=0===a.cmpn(1)?x1:x2).cmpn(0)<0&&res.iadd(p),res},BN.prototype.gcd=function(num){if(this.isZero())return num.abs();if(num.isZero())return this.abs();var a=this.clone(),b=num.clone();a.negative=0,b.negative=0;for(var shift=0;a.isEven()&&b.isEven();shift++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var r=a.cmp(b);if(r<0){var t=a;a=b,b=t}else if(0===r||0===b.cmpn(1))break;a.isub(b)}return b.iushln(shift)},BN.prototype.invm=function(num){return this.egcd(num).a.umod(num)},BN.prototype.isEven=function(){return 0==(1&this.words[0])},BN.prototype.isOdd=function(){return 1==(1&this.words[0])},BN.prototype.andln=function(num){return this.words[0]&num},BN.prototype.bincn=function(bit){assert("number"==typeof bit);var r=bit%26,s=(bit-r)/26,q=1<>>26,w&=67108863,this.words[i]=w}return 0!==carry&&(this.words[i]=carry,this.length++),this},BN.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function(num){var res,negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;if(this.strip(),this.length>1)res=1;else{negative&&(num=-num),assert(num<=67108863,"Number is too big");var w=0|this.words[0];res=w===num?0:wnum.length)return 1;if(this.length=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){ab&&(res=1);break}}return res},BN.prototype.gtn=function(num){return 1===this.cmpn(num)},BN.prototype.gt=function(num){return 1===this.cmp(num)},BN.prototype.gten=function(num){return this.cmpn(num)>=0},BN.prototype.gte=function(num){return this.cmp(num)>=0},BN.prototype.ltn=function(num){return-1===this.cmpn(num)},BN.prototype.lt=function(num){return-1===this.cmp(num)},BN.prototype.lten=function(num){return this.cmpn(num)<=0},BN.prototype.lte=function(num){return this.cmp(num)<=0},BN.prototype.eqn=function(num){return 0===this.cmpn(num)},BN.prototype.eq=function(num){return 0===this.cmp(num)},BN.red=function(num){return new Red(num)},BN.prototype.toRed=function(ctx){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),ctx.convertTo(this)._forceRed(ctx)},BN.prototype.fromRed=function(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function(ctx){return this.red=ctx,this},BN.prototype.forceRed=function(ctx){return assert(!this.red,"Already a number in reduction context"),this._forceRed(ctx)},BN.prototype.redAdd=function(num){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,num)},BN.prototype.redIAdd=function(num){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,num)},BN.prototype.redSub=function(num){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,num)},BN.prototype.redISub=function(num){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,num)},BN.prototype.redShl=function(num){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,num)},BN.prototype.redMul=function(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.mul(this,num)},BN.prototype.redIMul=function(num){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,num),this.red.imul(this,num)},BN.prototype.redSqr=function(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function(num){return assert(this.red&&!num.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,num)};var primes={k256:null,p224:null,p192:null,p25519:null};function MPrime(name,p){this.name=name,this.p=new BN(p,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(m){if("string"==typeof m){var prime=BN._prime(m);this.m=prime.p,this.prime=prime}else assert(m.gtn(1),"modulus must be greater than 1"),this.m=m,this.prime=null}function Mont(m){Red.call(this,m),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}MPrime.prototype._tmp=function(){var tmp=new BN(null);return tmp.words=new Array(Math.ceil(this.n/13)),tmp},MPrime.prototype.ireduce=function(num){var rlen,r=num;do{this.split(r,this.tmp),rlen=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(rlen>this.n);var cmp=rlen0?r.isub(this.p):r.strip(),r},MPrime.prototype.split=function(input,out){input.iushrn(this.n,0,out)},MPrime.prototype.imulK=function(num){return num.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function(input,output){for(var outLen=Math.min(input.length,9),i=0;i>>22,prev=next}prev>>>=22,input.words[i-10]=prev,0===prev&&input.length>10?input.length-=10:input.length-=9},K256.prototype.imulK=function(num){num.words[num.length]=0,num.words[num.length+1]=0,num.length+=2;for(var lo=0,i=0;i>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function(name){if(primes[name])return primes[name];var prime;if("k256"===name)prime=new K256;else if("p224"===name)prime=new P224;else if("p192"===name)prime=new P192;else{if("p25519"!==name)throw new Error("Unknown prime "+name);prime=new P25519}return primes[name]=prime,prime},Red.prototype._verify1=function(a){assert(0===a.negative,"red works only with positives"),assert(a.red,"red works only with red numbers")},Red.prototype._verify2=function(a,b){assert(0==(a.negative|b.negative),"red works only with positives"),assert(a.red&&a.red===b.red,"red works only with red numbers")},Red.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},Red.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},Red.prototype.add=function(a,b){this._verify2(a,b);var res=a.add(b);return res.cmp(this.m)>=0&&res.isub(this.m),res._forceRed(this)},Red.prototype.iadd=function(a,b){this._verify2(a,b);var res=a.iadd(b);return res.cmp(this.m)>=0&&res.isub(this.m),res},Red.prototype.sub=function(a,b){this._verify2(a,b);var res=a.sub(b);return res.cmpn(0)<0&&res.iadd(this.m),res._forceRed(this)},Red.prototype.isub=function(a,b){this._verify2(a,b);var res=a.isub(b);return res.cmpn(0)<0&&res.iadd(this.m),res},Red.prototype.shl=function(a,num){return this._verify1(a),this.imod(a.ushln(num))},Red.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},Red.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},Red.prototype.isqr=function(a){return this.imul(a,a.clone())},Red.prototype.sqr=function(a){return this.mul(a,a)},Red.prototype.sqrt=function(a){if(a.isZero())return a.clone();var mod3=this.m.andln(3);if(assert(mod3%2==1),3===mod3){var pow=this.m.add(new BN(1)).iushrn(2);return this.pow(a,pow)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);assert(!q.isZero());var one=new BN(1).toRed(this),nOne=one.redNeg(),lpow=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new BN(2*z*z).toRed(this);0!==this.pow(z,lpow).cmp(nOne);)z.redIAdd(nOne);for(var c=this.pow(z,q),r=this.pow(a,q.addn(1).iushrn(1)),t=this.pow(a,q),m=s;0!==t.cmp(one);){for(var tmp=t,i=0;0!==tmp.cmp(one);i++)tmp=tmp.redSqr();assert(i=0;i--){for(var word=num.words[i],j=start-1;j>=0;j--){var bit=word>>j&1;res!==wnd[0]&&(res=this.sqr(res)),0!==bit||0!==current?(current<<=1,current|=bit,(4===++currentLen||0===i&&0===j)&&(res=this.mul(res,wnd[current]),currentLen=0,current=0)):currentLen=0}start=26}return res},Red.prototype.convertTo=function(num){var r=num.umod(this.m);return r===num?r.clone():r},Red.prototype.convertFrom=function(num){var res=num.clone();return res.red=null,res},BN.mont=function(num){return new Mont(num)},inherits(Mont,Red),Mont.prototype.convertTo=function(num){return this.imod(num.ushln(this.shift))},Mont.prototype.convertFrom=function(num){var r=this.imod(num.mul(this.rinv));return r.red=null,r},Mont.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var t=a.imul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new BN(0)._forceRed(this);var t=a.mul(b),c=t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=t.isub(c).iushrn(this.shift),res=u;return u.cmp(this.m)>=0?res=u.isub(this.m):u.cmpn(0)<0&&(res=u.iadd(this.m)),res._forceRed(this)},Mont.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===module||module,this)},{buffer:200}],199:[function(require,module,exports){var r;function Rand(rand){this.rand=rand}if(module.exports=function(len){return r||(r=new Rand(null)),r.generate(len)},module.exports.Rand=Rand,Rand.prototype.generate=function(len){return this._rand(len)},Rand.prototype._rand=function(n){if(this.rand.getBytes)return this.rand.getBytes(n);for(var res=new Uint8Array(n),i=0;i>>24]^SUB_MIX1[s1>>>16&255]^SUB_MIX2[s2>>>8&255]^SUB_MIX3[255&s3]^keySchedule[ksRow++],t1=SUB_MIX0[s1>>>24]^SUB_MIX1[s2>>>16&255]^SUB_MIX2[s3>>>8&255]^SUB_MIX3[255&s0]^keySchedule[ksRow++],t2=SUB_MIX0[s2>>>24]^SUB_MIX1[s3>>>16&255]^SUB_MIX2[s0>>>8&255]^SUB_MIX3[255&s1]^keySchedule[ksRow++],t3=SUB_MIX0[s3>>>24]^SUB_MIX1[s0>>>16&255]^SUB_MIX2[s1>>>8&255]^SUB_MIX3[255&s2]^keySchedule[ksRow++],s0=t0,s1=t1,s2=t2,s3=t3;return t0=(SBOX[s0>>>24]<<24|SBOX[s1>>>16&255]<<16|SBOX[s2>>>8&255]<<8|SBOX[255&s3])^keySchedule[ksRow++],t1=(SBOX[s1>>>24]<<24|SBOX[s2>>>16&255]<<16|SBOX[s3>>>8&255]<<8|SBOX[255&s0])^keySchedule[ksRow++],t2=(SBOX[s2>>>24]<<24|SBOX[s3>>>16&255]<<16|SBOX[s0>>>8&255]<<8|SBOX[255&s1])^keySchedule[ksRow++],t3=(SBOX[s3>>>24]<<24|SBOX[s0>>>16&255]<<16|SBOX[s1>>>8&255]<<8|SBOX[255&s2])^keySchedule[ksRow++],[t0>>>=0,t1>>>=0,t2>>>=0,t3>>>=0]}var RCON=[0,1,2,4,8,16,32,64,128,27,54],G=function(){for(var d=new Array(256),j=0;j<256;j++)d[j]=j<128?j<<1:j<<1^283;for(var SBOX=[],INV_SBOX=[],SUB_MIX=[[],[],[],[]],INV_SUB_MIX=[[],[],[],[]],x=0,xi=0,i=0;i<256;++i){var sx=xi^xi<<1^xi<<2^xi<<3^xi<<4;sx=sx>>>8^255&sx^99,SBOX[x]=sx,INV_SBOX[sx]=x;var x2=d[x],x4=d[x2],x8=d[x4],t=257*d[sx]^16843008*sx;SUB_MIX[0][x]=t<<24|t>>>8,SUB_MIX[1][x]=t<<16|t>>>16,SUB_MIX[2][x]=t<<8|t>>>24,SUB_MIX[3][x]=t,t=16843009*x8^65537*x4^257*x2^16843008*x,INV_SUB_MIX[0][sx]=t<<24|t>>>8,INV_SUB_MIX[1][sx]=t<<16|t>>>16,INV_SUB_MIX[2][sx]=t<<8|t>>>24,INV_SUB_MIX[3][sx]=t,0===x?x=xi=1:(x=x2^d[d[d[x8^x2]]],xi^=d[d[xi]])}return{SBOX:SBOX,INV_SBOX:INV_SBOX,SUB_MIX:SUB_MIX,INV_SUB_MIX:INV_SUB_MIX}}();function AES(key){this._key=asUInt32Array(key),this._reset()}AES.blockSize=16,AES.keySize=32,AES.prototype.blockSize=AES.blockSize,AES.prototype.keySize=AES.keySize,AES.prototype._reset=function(){for(var keyWords=this._key,keySize=keyWords.length,nRounds=keySize+6,ksRows=4*(nRounds+1),keySchedule=[],k=0;k>>24,t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[255&t],t^=RCON[k/keySize|0]<<24):keySize>6&&k%keySize==4&&(t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[255&t]),keySchedule[k]=keySchedule[k-keySize]^t}for(var invKeySchedule=[],ik=0;ik>>24]]^G.INV_SUB_MIX[1][G.SBOX[tt>>>16&255]]^G.INV_SUB_MIX[2][G.SBOX[tt>>>8&255]]^G.INV_SUB_MIX[3][G.SBOX[255&tt]]}this._nRounds=nRounds,this._keySchedule=keySchedule,this._invKeySchedule=invKeySchedule},AES.prototype.encryptBlockRaw=function(M){return cryptBlock(M=asUInt32Array(M),this._keySchedule,G.SUB_MIX,G.SBOX,this._nRounds)},AES.prototype.encryptBlock=function(M){var out=this.encryptBlockRaw(M),buf=Buffer.allocUnsafe(16);return buf.writeUInt32BE(out[0],0),buf.writeUInt32BE(out[1],4),buf.writeUInt32BE(out[2],8),buf.writeUInt32BE(out[3],12),buf},AES.prototype.decryptBlock=function(M){var m1=(M=asUInt32Array(M))[1];M[1]=M[3],M[3]=m1;var out=cryptBlock(M,this._invKeySchedule,G.INV_SUB_MIX,G.INV_SBOX,this._nRounds),buf=Buffer.allocUnsafe(16);return buf.writeUInt32BE(out[0],0),buf.writeUInt32BE(out[3],4),buf.writeUInt32BE(out[2],8),buf.writeUInt32BE(out[1],12),buf},AES.prototype.scrub=function(){scrubVec(this._keySchedule),scrubVec(this._invKeySchedule),scrubVec(this._key)},module.exports.AES=AES},{"safe-buffer":839}],202:[function(require,module,exports){var aes=require("./aes"),Buffer=require("safe-buffer").Buffer,Transform=require("cipher-base"),inherits=require("inherits"),GHASH=require("./ghash"),xor=require("buffer-xor"),incr32=require("./incr32");function StreamCipher(mode,key,iv,decrypt){Transform.call(this);var h=Buffer.alloc(4,0);this._cipher=new aes.AES(key);var ck=this._cipher.encryptBlock(h);this._ghash=new GHASH(ck),iv=function(self,iv,ck){if(12===iv.length)return self._finID=Buffer.concat([iv,Buffer.from([0,0,0,1])]),Buffer.concat([iv,Buffer.from([0,0,0,2])]);var ghash=new GHASH(ck),len=iv.length,toPad=len%16;ghash.update(iv),toPad&&(toPad=16-toPad,ghash.update(Buffer.alloc(toPad,0))),ghash.update(Buffer.alloc(8,0));var ivBits=8*len,tail=Buffer.alloc(8);tail.writeUIntBE(ivBits,0,8),ghash.update(tail),self._finID=ghash.state;var out=Buffer.from(self._finID);return incr32(out),out}(this,iv,ck),this._prev=Buffer.from(iv),this._cache=Buffer.allocUnsafe(0),this._secCache=Buffer.allocUnsafe(0),this._decrypt=decrypt,this._alen=0,this._len=0,this._mode=mode,this._authTag=null,this._called=!1}inherits(StreamCipher,Transform),StreamCipher.prototype._update=function(chunk){if(!this._called&&this._alen){var rump=16-this._alen%16;rump<16&&(rump=Buffer.alloc(rump,0),this._ghash.update(rump))}this._called=!0;var out=this._mode.encrypt(this,chunk);return this._decrypt?this._ghash.update(chunk):this._ghash.update(out),this._len+=chunk.length,out},StreamCipher.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var tag=xor(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(a,b){var out=0;a.length!==b.length&&out++;for(var len=Math.min(a.length,b.length),i=0;i16)throw new Error("unable to decrypt data");var i=-1;for(;++i16)return out=this.cache.slice(0,16),this.cache=this.cache.slice(16),out}else if(this.cache.length>=16)return out=this.cache.slice(0,16),this.cache=this.cache.slice(16),out;return null},Splitter.prototype.flush=function(){if(this.cache.length)return this.cache},exports.createDecipher=function(suite,password){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");var keys=ebtk(password,!1,config.key,config.iv);return createDecipheriv(suite,keys.key,keys.iv)},exports.createDecipheriv=createDecipheriv},{"./aes":201,"./authCipher":202,"./modes":214,"./streamCipher":217,"cipher-base":249,evp_bytestokey:415,inherits:477,"safe-buffer":839}],205:[function(require,module,exports){var MODES=require("./modes"),AuthCipher=require("./authCipher"),Buffer=require("safe-buffer").Buffer,StreamCipher=require("./streamCipher"),Transform=require("cipher-base"),aes=require("./aes"),ebtk=require("evp_bytestokey");function Cipher(mode,key,iv){Transform.call(this),this._cache=new Splitter,this._cipher=new aes.AES(key),this._prev=Buffer.from(iv),this._mode=mode,this._autopadding=!0}require("inherits")(Cipher,Transform),Cipher.prototype._update=function(data){var chunk,thing;this._cache.add(data);for(var out=[];chunk=this._cache.get();)thing=this._mode.encrypt(this,chunk),out.push(thing);return Buffer.concat(out)};var PADDING=Buffer.alloc(16,16);function Splitter(){this.cache=Buffer.allocUnsafe(0)}function createCipheriv(suite,password,iv){var config=MODES[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");if("string"==typeof password&&(password=Buffer.from(password)),password.length!==config.key/8)throw new TypeError("invalid key length "+password.length);if("string"==typeof iv&&(iv=Buffer.from(iv)),"GCM"!==config.mode&&iv.length!==config.iv)throw new TypeError("invalid iv length "+iv.length);return"stream"===config.type?new StreamCipher(config.module,password,iv):"auth"===config.type?new AuthCipher(config.module,password,iv):new Cipher(config.module,password,iv)}Cipher.prototype._final=function(){var chunk=this._cache.flush();if(this._autopadding)return chunk=this._mode.encrypt(this,chunk),this._cipher.scrub(),chunk;if(!chunk.equals(PADDING))throw this._cipher.scrub(),new Error("data not multiple of block length")},Cipher.prototype.setAutoPadding=function(setTo){return this._autopadding=!!setTo,this},Splitter.prototype.add=function(data){this.cache=Buffer.concat([this.cache,data])},Splitter.prototype.get=function(){if(this.cache.length>15){var out=this.cache.slice(0,16);return this.cache=this.cache.slice(16),out}return null},Splitter.prototype.flush=function(){for(var len=16-this.cache.length,padBuff=Buffer.allocUnsafe(len),i=-1;++i>>0,0),buf.writeUInt32BE(out[1]>>>0,4),buf.writeUInt32BE(out[2]>>>0,8),buf.writeUInt32BE(out[3]>>>0,12),buf}function GHASH(key){this.h=key,this.state=Buffer.alloc(16,0),this.cache=Buffer.allocUnsafe(0)}GHASH.prototype.ghash=function(block){for(var i=-1;++i0;j--)Vi[j]=Vi[j]>>>1|(1&Vi[j-1])<<31;Vi[0]=Vi[0]>>>1,lsbVi&&(Vi[0]=Vi[0]^225<<24)}this.state=fromArray(Zi)},GHASH.prototype.update=function(buf){var chunk;for(this.cache=Buffer.concat([this.cache,buf]);this.cache.length>=16;)chunk=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(chunk)},GHASH.prototype.final=function(abl,bl){return this.cache.length&&this.ghash(Buffer.concat([this.cache,ZEROES],16)),this.ghash(fromArray([0,abl,0,bl])),this.state},module.exports=GHASH},{"safe-buffer":839}],207:[function(require,module,exports){module.exports=function(iv){for(var item,len=iv.length;len--;){if(255!==(item=iv.readUInt8(len))){item++,iv.writeUInt8(item,len);break}iv.writeUInt8(0,len)}}},{}],208:[function(require,module,exports){var xor=require("buffer-xor");exports.encrypt=function(self,block){var data=xor(block,self._prev);return self._prev=self._cipher.encryptBlock(data),self._prev},exports.decrypt=function(self,block){var pad=self._prev;self._prev=block;var out=self._cipher.decryptBlock(block);return xor(out,pad)}},{"buffer-xor":238}],209:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer,xor=require("buffer-xor");function encryptStart(self,data,decrypt){var len=data.length,out=xor(data,self._cache);return self._cache=self._cache.slice(len),self._prev=Buffer.concat([self._prev,decrypt?data:out]),out}exports.encrypt=function(self,data,decrypt){for(var len,out=Buffer.allocUnsafe(0);data.length;){if(0===self._cache.length&&(self._cache=self._cipher.encryptBlock(self._prev),self._prev=Buffer.allocUnsafe(0)),!(self._cache.length<=data.length)){out=Buffer.concat([out,encryptStart(self,data,decrypt)]);break}len=self._cache.length,out=Buffer.concat([out,encryptStart(self,data.slice(0,len),decrypt)]),data=data.slice(len)}return out}},{"buffer-xor":238,"safe-buffer":839}],210:[function(require,module,exports){var Buffer=require("safe-buffer").Buffer;function encryptByte(self,byteParam,decrypt){for(var pad,bit,value,i=-1,out=0;++i<8;)pad=self._cipher.encryptBlock(self._prev),bit=byteParam&1<<7-i?128:0,out+=(128&(value=pad[0]^bit))>>i%8,self._prev=shiftIn(self._prev,decrypt?bit:value);return out}function shiftIn(buffer,value){var len=buffer.length,i=-1,out=Buffer.allocUnsafe(buffer.length);for(buffer=Buffer.concat([buffer,Buffer.from([value])]);++i>7;return out}exports.encrypt=function(self,chunk,decrypt){for(var len=chunk.length,out=Buffer.allocUnsafe(len),i=-1;++i=0||!r.umod(priv.prime1)||!r.umod(priv.prime2);)r=new bn(randomBytes(len));return r}module.exports=crt,crt.getr=getr}).call(this,require("buffer").Buffer)},{"bn.js":198,buffer:240,randombytes:820}],222:[function(require,module,exports){module.exports=require("./browser/algorithms.json")},{"./browser/algorithms.json":223}],223:[function(require,module,exports){module.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],224:[function(require,module,exports){module.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],225:[function(require,module,exports){(function(Buffer){var createHash=require("create-hash"),stream=require("stream"),inherits=require("inherits"),sign=require("./sign"),verify=require("./verify"),algorithms=require("./algorithms.json");function Sign(algorithm){stream.Writable.call(this);var data=algorithms[algorithm];if(!data)throw new Error("Unknown message digest");this._hashType=data.hash,this._hash=createHash(data.hash),this._tag=data.id,this._signType=data.sign}function Verify(algorithm){stream.Writable.call(this);var data=algorithms[algorithm];if(!data)throw new Error("Unknown message digest");this._hash=createHash(data.hash),this._tag=data.id,this._signType=data.sign}function createSign(algorithm){return new Sign(algorithm)}function createVerify(algorithm){return new Verify(algorithm)}Object.keys(algorithms).forEach(function(key){algorithms[key].id=new Buffer(algorithms[key].id,"hex"),algorithms[key.toLowerCase()]=algorithms[key]}),inherits(Sign,stream.Writable),Sign.prototype._write=function(data,_,done){this._hash.update(data),done()},Sign.prototype.update=function(data,enc){return"string"==typeof data&&(data=new Buffer(data,enc)),this._hash.update(data),this},Sign.prototype.sign=function(key,enc){this.end();var hash=this._hash.digest(),sig=sign(hash,key,this._hashType,this._signType,this._tag);return enc?sig.toString(enc):sig},inherits(Verify,stream.Writable),Verify.prototype._write=function(data,_,done){this._hash.update(data),done()},Verify.prototype.update=function(data,enc){return"string"==typeof data&&(data=new Buffer(data,enc)),this._hash.update(data),this},Verify.prototype.verify=function(key,sig,enc){"string"==typeof sig&&(sig=new Buffer(sig,enc)),this.end();var hash=this._hash.digest();return verify(sig,hash,key,this._signType,this._tag)},module.exports={Sign:createSign,Verify:createVerify,createSign:createSign,createVerify:createVerify}}).call(this,require("buffer").Buffer)},{"./algorithms.json":223,"./sign":226,"./verify":227,buffer:240,"create-hash":333,inherits:477,stream:888}],226:[function(require,module,exports){(function(Buffer){var createHmac=require("create-hmac"),crt=require("browserify-rsa"),EC=require("elliptic").ec,BN=require("bn.js"),parseKeys=require("parse-asn1"),curves=require("./curves.json");function getKey(x,q,hash,algo){if((x=new Buffer(x.toArray())).length0&&bits.ishrn(shift),bits}function makeKey(q,kv,algo){var t,k;do{for(t=new Buffer(0);8*t.length=q)throw new Error("invalid sig")}module.exports=function(sig,hash,key,signType,tag){var pub=parseKeys(key);if("ec"===pub.type){if("ecdsa"!==signType&&"ecdsa/rsa"!==signType)throw new Error("wrong public key type");return function(sig,hash,pub){var curveId=curves[pub.data.algorithm.curve.join(".")];if(!curveId)throw new Error("unknown curve "+pub.data.algorithm.curve.join("."));var curve=new EC(curveId),pubkey=pub.data.subjectPrivateKey.data;return curve.verify(hash,sig,pubkey)}(sig,hash,pub)}if("dsa"===pub.type){if("dsa"!==signType)throw new Error("wrong public key type");return function(sig,hash,pub){var p=pub.data.p,q=pub.data.q,g=pub.data.g,y=pub.data.pub_key,unpacked=parseKeys.signature.decode(sig,"der"),s=unpacked.s,r=unpacked.r;checkValue(s,q),checkValue(r,q);var montp=BN.mont(p),w=s.invm(q);return 0===g.toRed(montp).redPow(new BN(hash).mul(w).mod(q)).fromRed().mul(y.toRed(montp).redPow(r.mul(w).mod(q)).fromRed()).mod(p).mod(q).cmp(r)}(sig,hash,pub)}if("rsa"!==signType&&"ecdsa/rsa"!==signType)throw new Error("wrong public key type");hash=Buffer.concat([tag,hash]);for(var len=pub.modulus.byteLength(),pad=[1],padNum=0;hash.length+pad.length+2=32)return x.hi>>>bits-32&255;var bitsOff32=32-bits,toMoveDown=this.hi<>>bitsOff32;return 255&(x.lo>>>bits|toMoveDown<0;){var clen=ctx.buffer.length-ptr;if(clen>len&&(clen=len),o.bufferInsert(buf,ptr,data,clen),ptr+=clen,data=data.slice(clen),len-=clen,ptr===ctx.buffer.length){var int64Buf=h.bytes2Int64Buffer(buf);compress(int64Buf,V),ctx.count.addOne(),ptr=0}}ctx.state=V,ctx.ptr=ptr},groestlClose=function(ctx){var padLen,count,buf=ctx.buffer,ptr=ctx.ptr,pad=new Array(136);buf.length;pad[0]=128,ptr<120?(padLen=128-ptr,count=ctx.count.plus(o.u(0,1))):(padLen=256-ptr,count=ctx.count.plus(o.u(0,2))),o.bufferSet(pad,1,0,padLen-9),h.bufferEncode64(pad,padLen-8,count),groestl(ctx,pad,padLen),function(state){var g=new Array(16);o.bufferInsert64(g,0,state,16);for(var t=new Array(16),r=0;r<14;r++){for(var i=0;i<16;i++)g[i].setxor64(j64[i].plus(r64[r]).setShiftLeft(56));for(var u=0;u<16;u++)t[u]=o.xor64(T0[B64(0,g[u])],T1[B64(1,g[u+1&15])],T2[B64(2,g[u+2&15])],T3[B64(3,g[u+3&15])],T4[B64(4,g[u+4&15])],T5[B64(5,g[u+5&15])],T6[B64(6,g[u+6&15])],T7[B64(7,g[u+11&15])]);var temp=g;g=t,t=temp}for(u=0;u<16;u++)state[u].setxor64(g[u])}(ctx.state);for(var out=new Array(16),u=0,v=8;u<8;u++,v++)out[2*u]=ctx.state[v].hi,out[2*u+1]=ctx.state[v].lo;return out};module.exports=function(input,format,output){var msg;msg=1===format?input:2===format?h.int32Buffer2Bytes(input):h.string2bytes(input);var ctx={};ctx.state=new Array(16);for(var i=0;i<15;i++)ctx.state[i]=new o.u64(0,0);ctx.state[15]=new o.u64(0,512),ctx.ptr=0,ctx.count=new o.u64(0,0),ctx.buffer=new Array(128),groestl(ctx,msg,msg.length);var r=groestlClose(ctx);return 2===output?r:1===output?h.int32Buffer2Bytes(r):h.int32ArrayToHexString(r)}},{"./helper":235,"./op":236}],235:[function(require,module,exports){"use strict";var op=require("./op.js");module.exports.int8ArrayToHexString=function(array){for(var string="",i=0;i>>2):0,buffer=new Array(len),j=0;j>>3):0,buffer=new Array(len),j=0;j>>3):0,buffer=new Array(len),j=0;j>>24,buffer[offset+6]=uint64.hi>>>16&255,buffer[offset+5]=uint64.hi>>>8&255,buffer[offset+4]=255&uint64.hi,buffer[offset+3]=uint64.lo>>>24,buffer[offset+2]=uint64.lo>>>16&255,buffer[offset+1]=uint64.lo>>>8&255,buffer[offset+0]=255&uint64.lo},module.exports.bufferEncode64=function(buffer,offset,uint64){buffer[offset]=uint64.hi>>>24,buffer[offset+1]=uint64.hi>>>16&255,buffer[offset+2]=uint64.hi>>>8&255,buffer[offset+3]=255&uint64.hi,buffer[offset+4]=uint64.lo>>>24,buffer[offset+5]=uint64.lo>>>16&255,buffer[offset+6]=uint64.lo>>>8&255,buffer[offset+7]=255&uint64.lo},module.exports.int32Buffer2Bytes=function(b){for(var buffer=new Array(b.length),len=b.length,i=0;i>>24,buffer[4*i+1]=(16711680&b[i])>>>16,buffer[4*i+2]=(65280&b[i])>>>8,buffer[4*i+3]=255&b[i],i++;return buffer},module.exports.string2Int32Buffer=function(s){return this.bytes2Int32Buffer(this.string2bytes(s))};var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";module.exports.b64Encode=function(input){for(var chr1,chr2,chr3,enc1,enc2,enc3,enc4,output="",i=0;i>2,enc2=(3&chr1)<<4|(chr2=input[i++])>>4,enc3=(15&chr2)<<2|(chr3=input[i++])>>6,enc4=63&chr3,isNaN(chr2)?enc3=enc4=64:isNaN(chr3)&&(enc4=64),output+=keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);return output},module.exports.b64Decode=function(input){var chr1,chr2,chr3,enc2,enc3,enc4,output=[],i=0;for(input=input.replace(/[^A-Za-z0-9\+\/\=]/g,"");i>4,chr2=(15&enc2)<<4|(enc3=keyStr.indexOf(input.charAt(i++)))>>2,chr3=(3&enc3)<<6|(enc4=keyStr.indexOf(input.charAt(i++))),output.push(chr1),64!=enc3&&output.push(chr2),64!=enc4&&output.push(chr3);return output}},{"./op.js":236}],236:[function(require,module,exports){"use strict";function u64(h,l){this.hi=h>>>0,this.lo=l>>>0}u64.prototype.set=function(oWord){this.lo=oWord.lo,this.hi=oWord.hi},u64.prototype.add=function(oWord){var lowest,lowMid,highMid,highest;return lowest=(65535&this.lo)+(65535&oWord.lo),lowMid=(this.lo>>>16)+(oWord.lo>>>16)+(lowest>>>16),highMid=(65535&this.hi)+(65535&oWord.hi)+(lowMid>>>16),highest=(this.hi>>>16)+(oWord.hi>>>16)+(highMid>>>16),this.lo=lowMid<<16|65535&lowest,this.hi=highest<<16|65535&highMid,this},u64.prototype.addOne=function(){-1===this.lo||4294967295===this.lo?(this.lo=0,this.hi++):this.lo++},u64.prototype.plus=function(oWord){var lowest,lowMid,highMid,highest,c=new u64(0,0);return lowest=(65535&this.lo)+(65535&oWord.lo),lowMid=(this.lo>>>16)+(oWord.lo>>>16)+(lowest>>>16),highMid=(65535&this.hi)+(65535&oWord.hi)+(lowMid>>>16),highest=(this.hi>>>16)+(oWord.hi>>>16)+(highMid>>>16),c.lo=lowMid<<16|65535&lowest,c.hi=highest<<16|65535&highMid,c},u64.prototype.not=function(){return new u64(~this.hi,~this.lo)},u64.prototype.one=function(){return new u64(0,1)},u64.prototype.zero=function(){return new u64(0,0)},u64.prototype.neg=function(){return this.not().plus(this.one())},u64.prototype.minus=function(oWord){return this.plus(oWord.neg())},u64.prototype.isZero=function(){return 0===this.lo&&0===this.hi},u64.prototype.multiply=function(multiplier){if(this.isZero())return this.zero();var obj;if(!0!==((obj=multiplier)&&obj.__isLong__)&&(multiplier=function(value){return isNaN(value)||!isFinite(value)?this.zero():new u64(value%1|0,value/1|0)}(multiplier)),multiplier.isZero())return this.zero();var a48=this.hi>>>16,a32=65535&this.hi,a16=this.lo>>>16,a00=65535&this.lo,b48=multiplier.hi>>>16,b32=65535&multiplier.hi,b16=multiplier.lo>>>16,b00=65535&multiplier.lo,c48=0,c32=0,c16=0,c00=0;return c16+=(c00+=a00*b00)>>>16,c32+=(c16+=a16*b00)>>>16,c16&=65535,c32+=(c16+=a00*b16)>>>16,c48+=(c32+=a32*b00)>>>16,c32&=65535,c48+=(c32+=a16*b16)>>>16,c32&=65535,c48+=(c32+=a00*b32)>>>16,c48+=a48*b00+a32*b16+a16*b32+a00*b48,new u64((c48&=65535)<<16|(c32&=65535),(c16&=65535)<<16|(c00&=65535))},u64.prototype.shiftLeft=function(bits){bits%=64;var c=new u64(0,0);if(0===bits)return this.clone();if(bits>31)c.lo=0,c.hi=this.lo<>>32-bits;c.lo=this.lo<63&&(bits%=64),bits>31)this.hi=this.lo<>>32-bits;this.lo<<=bits,this.hi=this.hi<=32)c.hi=0,c.lo=this.hi>>>bits-32;else{var bitsOff32=32-bits,toMoveDown=this.hi<>>bitsOff32;c.hi=this.hi>>>bits,c.lo=this.lo>>>bits|toMoveDown<32)return this.rotateRight(64-bits);var c=new u64(0,0);return 0===bits?(c.lo=this.lo>>>0,c.hi=this.hi>>>0):32===bits?(c.lo=this.hi,c.hi=this.lo):(c.lo=this.lo<>>32-bits,c.hi=this.hi<>>32-bits),c},u64.prototype.setRotateLeft=function(bits){return bits>32?this.setRotateRight(64-bits):0===bits?this:(32===bits?(newHigh=this.lo,this.lo=this.hi,this.hi=newHigh):(newHigh=this.hi<>>32-bits,this.lo=this.lo<>>32-bits,this.hi=newHigh),this);var newHigh},u64.prototype.rotateRight=function(bits){if(bits>32)return this.rotateLeft(64-bits);var c=new u64(0,0);return 0===bits?(c.lo=this.lo>>>0,c.hi=this.hi>>>0):32===bits?(c.lo=this.hi,c.hi=this.lo):(c.lo=this.hi<<32-bits|this.lo>>>bits,c.hi=this.lo<<32-bits|this.hi>>>bits),c},u64.prototype.setFlip=function(){var newHigh;return newHigh=this.lo,this.lo=this.hi,this.hi=newHigh,this},u64.prototype.setRotateRight=function(bits){return bits>32?this.setRotateLeft(64-bits):0===bits?this:(32===bits?(newHigh=this.lo,this.lo=this.hi,this.hi=newHigh):(newHigh=this.lo<<32-bits|this.hi>>>bits,this.lo=this.hi<<32-bits|this.lo>>>bits,this.hi=newHigh),this);var newHigh},u64.prototype.xor=function(oWord){var c=new u64(0,0);return c.hi=this.hi^oWord.hi,c.lo=this.lo^oWord.lo,c},u64.prototype.setxorOne=function(oWord){return this.hi^=oWord.hi,this.lo^=oWord.lo,this},u64.prototype.and=function(oWord){var c=new u64(0,0);return c.hi=this.hi&oWord.hi,c.lo=this.lo&oWord.lo,c},u64.prototype.clone=function(){return new u64(this.hi,this.lo)},u64.prototype.setxor64=function(){for(var a=arguments,i=a.length;i--;)this.hi^=a[i].hi,this.lo^=a[i].lo;return this},module.exports.u64=u64,module.exports.u=function(h,l){return new u64(h,l)},module.exports.xor64=function(){var a=arguments,h=a[0].hi,l=a[0].lo,i=a.length-1;do{h^=a[i].hi,l^=a[i].lo,i--}while(i>0);return new this.u64(h,l)},module.exports.clone64Array=function(array){for(var i=0,len=array.length,a=new Array(len);i>>32-c)},module.exports.rotr32=function(x,c){return this.rotl32(x,32-c)},module.exports.swap32=function(val){return(255&val)<<24|(65280&val)<<8|val>>>8&65280|val>>>24&255},module.exports.swap32Array=function(a){for(var i=0,len=a.length,r=new Array(i);iK_MAX_LENGTH)throw new RangeError('The value "'+length+'" is invalid for option "size"');var buf=new Uint8Array(length);return Object.setPrototypeOf(buf,Buffer.prototype),buf}function Buffer(arg,encodingOrOffset,length){if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe(arg)}return from(arg,encodingOrOffset,length)}function from(value,encodingOrOffset,length){if("string"==typeof value)return function(string,encoding){"string"==typeof encoding&&""!==encoding||(encoding="utf8");if(!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);var length=0|byteLength(string,encoding),buf=createBuffer(length),actual=buf.write(string,encoding);actual!==length&&(buf=buf.slice(0,actual));return buf}(value,encodingOrOffset);if(ArrayBuffer.isView(value))return fromArrayLike(value);if(null==value)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value);if(isInstance(value,ArrayBuffer)||value&&isInstance(value.buffer,ArrayBuffer))return function(array,byteOffset,length){if(byteOffset<0||array.byteLength=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return 0|length}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if("string"!=typeof string)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof string);var len=string.length,mustMatch=arguments.length>2&&!0===arguments[2];if(!mustMatch&&0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*len;case"hex":return len>>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function swap(b,n,m){var i=b[n];b[n]=b[m],b[m]=i}function bidirectionalIndexOf(buffer,val,byteOffset,encoding,dir){if(0===buffer.length)return-1;if("string"==typeof byteOffset?(encoding=byteOffset,byteOffset=0):byteOffset>2147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),numberIsNaN(byteOffset=+byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0){if(!dir)return-1;byteOffset=0}if("string"==typeof val&&(val=Buffer.from(val,encoding)),Buffer.isBuffer(val))return 0===val.length?-1:arrayIndexOf(buffer,val,byteOffset,encoding,dir);if("number"==typeof val)return val&=255,"function"==typeof Uint8Array.prototype.indexOf?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(arr,val,byteOffset,encoding,dir){var i,indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&("ucs2"===(encoding=String(encoding).toLowerCase())||"ucs-2"===encoding||"utf16le"===encoding||"utf-16le"===encoding)){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}if(dir){var foundIndex=-1;for(i=byteOffset;iarrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;jremaining&&(length=remaining):length=remaining;var strLen=string.length;length>strLen/2&&(length=strLen/2);for(var i=0;i>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}(string,buf.length-offset),buf,offset,length)}function base64Slice(buf,start,end){return 0===start&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice(buf,start,end){end=Math.min(buf.length,end);for(var res=[],i=start;i239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end)switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:128==(192&(secondByte=buf[i+1]))&&(tempCodePoint=(31&firstByte)<<6|63&secondByte)>127&&(codePoint=tempCodePoint);break;case 3:secondByte=buf[i+1],thirdByte=buf[i+2],128==(192&secondByte)&&128==(192&thirdByte)&&(tempCodePoint=(15&firstByte)<<12|(63&secondByte)<<6|63&thirdByte)>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint);break;case 4:secondByte=buf[i+1],thirdByte=buf[i+2],fourthByte=buf[i+3],128==(192&secondByte)&&128==(192&thirdByte)&&128==(192&fourthByte)&&(tempCodePoint=(15&firstByte)<<18|(63&secondByte)<<12|(63&thirdByte)<<6|63&fourthByte)>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint)}null===codePoint?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|1023&codePoint),res.push(codePoint),i+=bytesPerSequence}return function(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);var res="",i=0;for(;ithis.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if((end>>>=0)<=(start>>>=0))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"latin1":case"binary":return latin1Slice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}.apply(this,arguments)},Buffer.prototype.toLocaleString=Buffer.prototype.toString,Buffer.prototype.equals=function(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===Buffer.compare(this,b)},Buffer.prototype.inspect=function(){var str="",max=exports.INSPECT_MAX_BYTES;return str=this.toString("hex",0,max).replace(/(.{2})/g,"$1 ").trim(),this.length>max&&(str+=" ... "),""},customInspectSymbol&&(Buffer.prototype[customInspectSymbol]=Buffer.prototype.inspect),Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer.from(target,target.offset,target.byteLength)),!Buffer.isBuffer(target))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof target);if(void 0===start&&(start=0),void 0===end&&(end=target?target.length:0),void 0===thisStart&&(thisStart=0),void 0===thisEnd&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;for(var x=thisEnd-thisStart,y=end-start,len=Math.min(x,y),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end),i=0;i>>=0,isFinite(length)?(length>>>=0,void 0===encoding&&(encoding="utf8")):(encoding=length,length=void 0)}var remaining=this.length-offset;if((void 0===length||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");for(var loweredCase=!1;;)switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"latin1":case"binary":return latin1Write(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;ilen)&&(end=len);for(var out="",i=start;ilength)throw new RangeError("Trying to access beyond buffer length")}function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value>max||valuebuf.length)throw new RangeError("Index out of range")}function checkIEEE754(buf,value,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,4),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return value=+value,offset>>>=0,noAssert||checkIEEE754(buf,0,offset,8),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,start<0?(start+=len)<0&&(start=0):start>len&&(start=len),end<0?(end+=len)<0&&(end=0):end>len&&(end=len),end>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset+--byteLength],mul=1;byteLength>0&&(mul*=256);)val+=this[offset+--byteLength]*mul;return val},Buffer.prototype.readUInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+16777216*this[offset+3]},Buffer.prototype.readUInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),16777216*this[offset]+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])},Buffer.prototype.readIntLE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readIntBE=function(offset,byteLength,noAssert){offset>>>=0,byteLength>>>=0,noAssert||checkOffset(offset,byteLength,this.length);for(var i=byteLength,mul=1,val=this[offset+--i];i>0&&(mul*=256);)val+=this[offset+--i]*mul;return val>=(mul*=128)&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,1,this.length),128&this[offset]?-1*(255-this[offset]+1):this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt16BE=function(offset,noAssert){offset>>>=0,noAssert||checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return 32768&val?4294901760|val:val},Buffer.prototype.readInt32LE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24},Buffer.prototype.readInt32BE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]},Buffer.prototype.readFloatLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return offset>>>=0,noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){(value=+value,offset>>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var mul=1,i=0;for(this[offset]=255&value;++i>>=0,byteLength>>>=0,noAssert)||checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength)-1,0);var i=byteLength-1,mul=1;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,255,0),this[offset]=255&value,offset+1},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,65535,0),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value,offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,4294967295,0),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0,mul=1,sub=0;for(this[offset]=255&value;++i>0)-sub&255;return offset+byteLength},Buffer.prototype.writeIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset>>>=0,!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1,mul=1,sub=0;for(this[offset+i]=255&value;--i>=0&&(mul*=256);)value<0&&0===sub&&0!==this[offset+i+1]&&(sub=1),this[offset+i]=(value/mul>>0)-sub&255;return offset+byteLength},Buffer.prototype.writeInt8=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,1,127,-128),value<0&&(value=255+value+1),this[offset]=255&value,offset+1},Buffer.prototype.writeInt16LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=255&value,this[offset+1]=value>>>8,offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,2,32767,-32768),this[offset]=value>>>8,this[offset+1]=255&value,offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24,offset+4},Buffer.prototype.writeInt32BE=function(value,offset,noAssert){return value=+value,offset>>>=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),value<0&&(value=4294967295+value+1),this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value,offset+4},Buffer.prototype.writeFloatLE=function(value,offset,noAssert){return writeFloat(this,value,offset,!0,noAssert)},Buffer.prototype.writeFloatBE=function(value,offset,noAssert){return writeFloat(this,value,offset,!1,noAssert)},Buffer.prototype.writeDoubleLE=function(value,offset,noAssert){return writeDouble(this,value,offset,!0,noAssert)},Buffer.prototype.writeDoubleBE=function(value,offset,noAssert){return writeDouble(this,value,offset,!1,noAssert)},Buffer.prototype.copy=function(target,targetStart,start,end){if(!Buffer.isBuffer(target))throw new TypeError("argument should be a Buffer");if(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart=0;--i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,end),targetStart);return len},Buffer.prototype.fill=function(val,start,end,encoding){if("string"==typeof val){if("string"==typeof start?(encoding=start,start=0,end=this.length):"string"==typeof end&&(encoding=end,end=this.length),void 0!==encoding&&"string"!=typeof encoding)throw new TypeError("encoding must be a string");if("string"==typeof encoding&&!Buffer.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);if(1===val.length){var code=val.charCodeAt(0);("utf8"===encoding&&code<128||"latin1"===encoding)&&(val=code)}}else"number"==typeof val?val&=255:"boolean"==typeof val&&(val=Number(val));if(start<0||this.length>>=0,end=void 0===end?this.length:end>>>0,val||(val=0),"number"==typeof val)for(i=start;i55295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}if(i+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=65536+(leadSurrogate-55296<<10|codePoint-56320)}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,63&codePoint|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,63&codePoint|128)}else{if(!(codePoint<1114112))throw new Error("Invalid code point");if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,63&codePoint|128)}}return bytes}function base64ToBytes(str){return base64.toByteArray(function(str){if((str=(str=str.split("=")[0]).trim().replace(INVALID_BASE64_RE,"")).length<2)return"";for(;str.length%4!=0;)str+="=";return str}(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isInstance(obj,type){return obj instanceof type||null!=obj&&null!=obj.constructor&&null!=obj.constructor.name&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!=obj}var hexSliceLookupTable=function(){for(var table=new Array(256),i=0;i<16;++i)for(var i16=16*i,j=0;j<16;++j)table[i16+j]="0123456789abcdef"[i]+"0123456789abcdef"[j];return table}()}).call(this,require("buffer").Buffer)},{"base64-js":57,buffer:240,ieee754:476}],241:[function(require,module,exports){"use strict";var validate=require("./validation").validate,CHARSET="qpzry9x8gf2tvdw0s3jn54khce6mua7l",CHARSET_INVERSE_INDEX={q:0,p:1,z:2,r:3,y:4,9:5,x:6,8:7,g:8,f:9,2:10,t:11,v:12,d:13,w:14,0:15,s:16,3:17,j:18,n:19,5:20,4:21,k:22,h:23,c:24,e:25,6:26,m:27,u:28,a:29,7:30,l:31};module.exports={encode:function(data){validate(data instanceof Uint8Array,"Invalid data: "+data+".");for(var base32="",i=0;i>from==0,"Invalid value: "+value+"."),accumulator=accumulator<=to;)bits-=to,result[index]=accumulator>>bits&mask,++index}return strictMode?validate(bits0&&(result[index]=accumulator<index;)if((value=O[index++])!=value)return!0}else for(;length>index;index++)if((IS_INCLUDES||index in O)&&O[index]===el)return IS_INCLUDES||index||0;return!IS_INCLUDES&&-1}}},{"./_to-absolute-index":302,"./_to-iobject":304,"./_to-length":305}],256:[function(require,module,exports){var ctx=require("./_ctx"),IObject=require("./_iobject"),toObject=require("./_to-object"),toLength=require("./_to-length"),asc=require("./_array-species-create");module.exports=function(TYPE,$create){var IS_MAP=1==TYPE,IS_FILTER=2==TYPE,IS_SOME=3==TYPE,IS_EVERY=4==TYPE,IS_FIND_INDEX=6==TYPE,NO_HOLES=5==TYPE||IS_FIND_INDEX,create=$create||asc;return function($this,callbackfn,that){for(var val,res,O=toObject($this),self=IObject(O),f=ctx(callbackfn,that,3),length=toLength(self.length),index=0,result=IS_MAP?create($this,length):IS_FILTER?create($this,0):void 0;length>index;index++)if((NO_HOLES||index in self)&&(res=f(val=self[index],index,O),TYPE))if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return!0;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return!1;return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./_array-species-create":258,"./_ctx":264,"./_iobject":277,"./_to-length":305,"./_to-object":306}],257:[function(require,module,exports){var isObject=require("./_is-object"),isArray=require("./_is-array"),SPECIES=require("./_wks")("species");module.exports=function(original){var C;return isArray(original)&&("function"!=typeof(C=original.constructor)||C!==Array&&!isArray(C.prototype)||(C=void 0),isObject(C)&&null===(C=C[SPECIES])&&(C=void 0)),void 0===C?Array:C}},{"./_is-array":279,"./_is-object":280,"./_wks":310}],258:[function(require,module,exports){var speciesConstructor=require("./_array-species-constructor");module.exports=function(original,length){return new(speciesConstructor(original))(length)}},{"./_array-species-constructor":257}],259:[function(require,module,exports){var cof=require("./_cof"),TAG=require("./_wks")("toStringTag"),ARG="Arguments"==cof(function(){return arguments}());module.exports=function(it){var O,T,B;return void 0===it?"Undefined":null===it?"Null":"string"==typeof(T=function(it,key){try{return it[key]}catch(e){}}(O=Object(it),TAG))?T:ARG?cof(O):"Object"==(B=cof(O))&&"function"==typeof O.callee?"Arguments":B}},{"./_cof":260,"./_wks":310}],260:[function(require,module,exports){var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}},{}],261:[function(require,module,exports){"use strict";var dP=require("./_object-dp").f,create=require("./_object-create"),redefineAll=require("./_redefine-all"),ctx=require("./_ctx"),anInstance=require("./_an-instance"),forOf=require("./_for-of"),$iterDefine=require("./_iter-define"),step=require("./_iter-step"),setSpecies=require("./_set-species"),DESCRIPTORS=require("./_descriptors"),fastKey=require("./_meta").fastKey,validate=require("./_validate-collection"),SIZE=DESCRIPTORS?"_s":"size",getEntry=function(that,key){var entry,index=fastKey(key);if("F"!==index)return that._i[index];for(entry=that._f;entry;entry=entry.n)if(entry.k==key)return entry};module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){anInstance(that,C,NAME,"_i"),that._t=NAME,that._i=create(null),that._f=void 0,that._l=void 0,that[SIZE]=0,void 0!=iterable&&forOf(iterable,IS_MAP,that[ADDER],that)});return redefineAll(C.prototype,{clear:function(){for(var that=validate(this,NAME),data=that._i,entry=that._f;entry;entry=entry.n)entry.r=!0,entry.p&&(entry.p=entry.p.n=void 0),delete data[entry.i];that._f=that._l=void 0,that[SIZE]=0},delete:function(key){var that=validate(this,NAME),entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that._i[entry.i],entry.r=!0,prev&&(prev.n=next),next&&(next.p=prev),that._f==entry&&(that._f=next),that._l==entry&&(that._l=prev),that[SIZE]--}return!!entry},forEach:function(callbackfn){validate(this,NAME);for(var entry,f=ctx(callbackfn,arguments.length>1?arguments[1]:void 0,3);entry=entry?entry.n:this._f;)for(f(entry.v,entry.k,this);entry&&entry.r;)entry=entry.p},has:function(key){return!!getEntry(validate(this,NAME),key)}}),DESCRIPTORS&&dP(C.prototype,"size",{get:function(){return validate(this,NAME)[SIZE]}}),C},def:function(that,key,value){var prev,index,entry=getEntry(that,key);return entry?entry.v=value:(that._l=entry={i:index=fastKey(key,!0),k:key,v:value,p:prev=that._l,n:void 0,r:!1},that._f||(that._f=entry),prev&&(prev.n=entry),that[SIZE]++,"F"!==index&&(that._i[index]=entry)),that},getEntry:getEntry,setStrong:function(C,NAME,IS_MAP){$iterDefine(C,NAME,function(iterated,kind){this._t=validate(iterated,NAME),this._k=kind,this._l=void 0},function(){for(var kind=this._k,entry=this._l;entry&&entry.r;)entry=entry.p;return this._t&&(this._l=entry=entry?entry.n:this._t._f)?step(0,"keys"==kind?entry.k:"values"==kind?entry.v:[entry.k,entry.v]):(this._t=void 0,step(1))},IS_MAP?"entries":"values",!IS_MAP,!0),setSpecies(NAME)}}},{"./_an-instance":253,"./_ctx":264,"./_descriptors":266,"./_for-of":271,"./_iter-define":283,"./_iter-step":284,"./_meta":287,"./_object-create":288,"./_object-dp":289,"./_redefine-all":295,"./_set-species":297,"./_validate-collection":309}],262:[function(require,module,exports){"use strict";var global=require("./_global"),$export=require("./_export"),meta=require("./_meta"),fails=require("./_fails"),hide=require("./_hide"),redefineAll=require("./_redefine-all"),forOf=require("./_for-of"),anInstance=require("./_an-instance"),isObject=require("./_is-object"),setToStringTag=require("./_set-to-string-tag"),dP=require("./_object-dp").f,each=require("./_array-methods")(0),DESCRIPTORS=require("./_descriptors");module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=global[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};return DESCRIPTORS&&"function"==typeof C&&(IS_WEAK||proto.forEach&&!fails(function(){(new C).entries().next()}))?(C=wrapper(function(target,iterable){anInstance(target,C,NAME,"_c"),target._c=new Base,void 0!=iterable&&forOf(iterable,IS_MAP,target[ADDER],target)}),each("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(KEY){var IS_ADDER="add"==KEY||"set"==KEY;KEY in proto&&(!IS_WEAK||"clear"!=KEY)&&hide(C.prototype,KEY,function(a,b){if(anInstance(this,C,KEY),!IS_ADDER&&IS_WEAK&&!isObject(a))return"get"==KEY&&void 0;var result=this._c[KEY](0===a?0:a,b);return IS_ADDER?this:result})}),IS_WEAK||dP(C.prototype,"size",{get:function(){return this._c.size}})):(C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER),redefineAll(C.prototype,methods),meta.NEED=!0),setToStringTag(C,NAME),O[NAME]=C,$export($export.G+$export.W+$export.F,O),IS_WEAK||common.setStrong(C,NAME,IS_MAP),C}},{"./_an-instance":253,"./_array-methods":256,"./_descriptors":266,"./_export":269,"./_fails":270,"./_for-of":271,"./_global":272,"./_hide":274,"./_is-object":280,"./_meta":287,"./_object-dp":289,"./_redefine-all":295,"./_set-to-string-tag":298}],263:[function(require,module,exports){var core=module.exports={version:"2.6.11"};"number"==typeof __e&&(__e=core)},{}],264:[function(require,module,exports){var aFunction=require("./_a-function");module.exports=function(fn,that,length){if(aFunction(fn),void 0===that)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./_a-function":251}],265:[function(require,module,exports){module.exports=function(it){if(void 0==it)throw TypeError("Can't call method on "+it);return it}},{}],266:[function(require,module,exports){module.exports=!require("./_fails")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{"./_fails":270}],267:[function(require,module,exports){var isObject=require("./_is-object"),document=require("./_global").document,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}},{"./_global":272,"./_is-object":280}],268:[function(require,module,exports){module.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],269:[function(require,module,exports){var global=require("./_global"),core=require("./_core"),ctx=require("./_ctx"),hide=require("./_hide"),has=require("./_has"),$export=function(type,name,source){var key,own,out,IS_FORCED=type&$export.F,IS_GLOBAL=type&$export.G,IS_STATIC=type&$export.S,IS_PROTO=type&$export.P,IS_BIND=type&$export.B,IS_WRAP=type&$export.W,exports=IS_GLOBAL?core:core[name]||(core[name]={}),expProto=exports.prototype,target=IS_GLOBAL?global:IS_STATIC?global[name]:(global[name]||{}).prototype;for(key in IS_GLOBAL&&(source=name),source)(own=!IS_FORCED&&target&&void 0!==target[key])&&has(exports,key)||(out=own?target[key]:source[key],exports[key]=IS_GLOBAL&&"function"!=typeof target[key]?source[key]:IS_BIND&&own?ctx(out,global):IS_WRAP&&target[key]==out?function(C){var F=function(a,b,c){if(this instanceof C){switch(arguments.length){case 0:return new C;case 1:return new C(a);case 2:return new C(a,b)}return new C(a,b,c)}return C.apply(this,arguments)};return F.prototype=C.prototype,F}(out):IS_PROTO&&"function"==typeof out?ctx(Function.call,out):out,IS_PROTO&&((exports.virtual||(exports.virtual={}))[key]=out,type&$export.R&&expProto&&!expProto[key]&&hide(expProto,key,out)))};$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128,module.exports=$export},{"./_core":263,"./_ctx":264,"./_global":272,"./_has":273,"./_hide":274}],270:[function(require,module,exports){module.exports=function(exec){try{return!!exec()}catch(e){return!0}}},{}],271:[function(require,module,exports){var ctx=require("./_ctx"),call=require("./_iter-call"),isArrayIter=require("./_is-array-iter"),anObject=require("./_an-object"),toLength=require("./_to-length"),getIterFn=require("./core.get-iterator-method"),BREAK={},RETURN={};(exports=module.exports=function(iterable,entries,fn,that,ITERATOR){var length,step,iterator,result,iterFn=ITERATOR?function(){return iterable}:getIterFn(iterable),f=ctx(fn,that,entries?2:1),index=0;if("function"!=typeof iterFn)throw TypeError(iterable+" is not iterable!");if(isArrayIter(iterFn)){for(length=toLength(iterable.length);length>index;index++)if((result=entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index]))===BREAK||result===RETURN)return result}else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;)if((result=call(iterator,f,step.value,entries))===BREAK||result===RETURN)return result}).BREAK=BREAK,exports.RETURN=RETURN},{"./_an-object":254,"./_ctx":264,"./_is-array-iter":278,"./_iter-call":281,"./_to-length":305,"./core.get-iterator-method":311}],272:[function(require,module,exports){var global=module.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=global)},{}],273:[function(require,module,exports){var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}},{}],274:[function(require,module,exports){var dP=require("./_object-dp"),createDesc=require("./_property-desc");module.exports=require("./_descriptors")?function(object,key,value){return dP.f(object,key,createDesc(1,value))}:function(object,key,value){return object[key]=value,object}},{"./_descriptors":266,"./_object-dp":289,"./_property-desc":294}],275:[function(require,module,exports){var document=require("./_global").document;module.exports=document&&document.documentElement},{"./_global":272}],276:[function(require,module,exports){module.exports=!require("./_descriptors")&&!require("./_fails")(function(){return 7!=Object.defineProperty(require("./_dom-create")("div"),"a",{get:function(){return 7}}).a})},{"./_descriptors":266,"./_dom-create":267,"./_fails":270}],277:[function(require,module,exports){var cof=require("./_cof");module.exports=Object("z").propertyIsEnumerable(0)?Object:function(it){return"String"==cof(it)?it.split(""):Object(it)}},{"./_cof":260}],278:[function(require,module,exports){var Iterators=require("./_iterators"),ITERATOR=require("./_wks")("iterator"),ArrayProto=Array.prototype;module.exports=function(it){return void 0!==it&&(Iterators.Array===it||ArrayProto[ITERATOR]===it)}},{"./_iterators":285,"./_wks":310}],279:[function(require,module,exports){var cof=require("./_cof");module.exports=Array.isArray||function(arg){return"Array"==cof(arg)}},{"./_cof":260}],280:[function(require,module,exports){module.exports=function(it){return"object"==typeof it?null!==it:"function"==typeof it}},{}],281:[function(require,module,exports){var anObject=require("./_an-object");module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator.return;throw void 0!==ret&&anObject(ret.call(iterator)),e}}},{"./_an-object":254}],282:[function(require,module,exports){"use strict";var create=require("./_object-create"),descriptor=require("./_property-desc"),setToStringTag=require("./_set-to-string-tag"),IteratorPrototype={};require("./_hide")(IteratorPrototype,require("./_wks")("iterator"),function(){return this}),module.exports=function(Constructor,NAME,next){Constructor.prototype=create(IteratorPrototype,{next:descriptor(1,next)}),setToStringTag(Constructor,NAME+" Iterator")}},{"./_hide":274,"./_object-create":288,"./_property-desc":294,"./_set-to-string-tag":298,"./_wks":310}],283:[function(require,module,exports){"use strict";var LIBRARY=require("./_library"),$export=require("./_export"),redefine=require("./_redefine"),hide=require("./_hide"),Iterators=require("./_iterators"),$iterCreate=require("./_iter-create"),setToStringTag=require("./_set-to-string-tag"),getPrototypeOf=require("./_object-gpo"),ITERATOR=require("./_wks")("iterator"),BUGGY=!([].keys&&"next"in[].keys()),returnThis=function(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCED){$iterCreate(Constructor,NAME,next);var methods,key,IteratorPrototype,getMethod=function(kind){if(!BUGGY&&kind in proto)return proto[kind];switch(kind){case"keys":case"values":return function(){return new Constructor(this,kind)}}return function(){return new Constructor(this,kind)}},TAG=NAME+" Iterator",DEF_VALUES="values"==DEFAULT,VALUES_BUG=!1,proto=Base.prototype,$native=proto[ITERATOR]||proto["@@iterator"]||DEFAULT&&proto[DEFAULT],$default=$native||getMethod(DEFAULT),$entries=DEFAULT?DEF_VALUES?getMethod("entries"):$default:void 0,$anyNative="Array"==NAME&&proto.entries||$native;if($anyNative&&(IteratorPrototype=getPrototypeOf($anyNative.call(new Base)))!==Object.prototype&&IteratorPrototype.next&&(setToStringTag(IteratorPrototype,TAG,!0),LIBRARY||"function"==typeof IteratorPrototype[ITERATOR]||hide(IteratorPrototype,ITERATOR,returnThis)),DEF_VALUES&&$native&&"values"!==$native.name&&(VALUES_BUG=!0,$default=function(){return $native.call(this)}),LIBRARY&&!FORCED||!BUGGY&&!VALUES_BUG&&proto[ITERATOR]||hide(proto,ITERATOR,$default),Iterators[NAME]=$default,Iterators[TAG]=returnThis,DEFAULT)if(methods={values:DEF_VALUES?$default:getMethod("values"),keys:IS_SET?$default:getMethod("keys"),entries:$entries},FORCED)for(key in methods)key in proto||redefine(proto,key,methods[key]);else $export($export.P+$export.F*(BUGGY||VALUES_BUG),NAME,methods);return methods}},{"./_export":269,"./_hide":274,"./_iter-create":282,"./_iterators":285,"./_library":286,"./_object-gpo":291,"./_redefine":296,"./_set-to-string-tag":298,"./_wks":310}],284:[function(require,module,exports){module.exports=function(done,value){return{value:value,done:!!done}}},{}],285:[function(require,module,exports){module.exports={}},{}],286:[function(require,module,exports){module.exports=!0},{}],287:[function(require,module,exports){var META=require("./_uid")("meta"),isObject=require("./_is-object"),has=require("./_has"),setDesc=require("./_object-dp").f,id=0,isExtensible=Object.isExtensible||function(){return!0},FREEZE=!require("./_fails")(function(){return isExtensible(Object.preventExtensions({}))}),setMeta=function(it){setDesc(it,META,{value:{i:"O"+ ++id,w:{}}})},meta=module.exports={KEY:META,NEED:!1,fastKey:function(it,create){if(!isObject(it))return"symbol"==typeof it?it:("string"==typeof it?"S":"P")+it;if(!has(it,META)){if(!isExtensible(it))return"F";if(!create)return"E";setMeta(it)}return it[META].i},getWeak:function(it,create){if(!has(it,META)){if(!isExtensible(it))return!0;if(!create)return!1;setMeta(it)}return it[META].w},onFreeze:function(it){return FREEZE&&meta.NEED&&isExtensible(it)&&!has(it,META)&&setMeta(it),it}}},{"./_fails":270,"./_has":273,"./_is-object":280,"./_object-dp":289,"./_uid":308}],288:[function(require,module,exports){var anObject=require("./_an-object"),dPs=require("./_object-dps"),enumBugKeys=require("./_enum-bug-keys"),IE_PROTO=require("./_shared-key")("IE_PROTO"),Empty=function(){},createDict=function(){var iframeDocument,iframe=require("./_dom-create")("iframe"),i=enumBugKeys.length;for(iframe.style.display="none",require("./_html").appendChild(iframe),iframe.src="javascript:",(iframeDocument=iframe.contentWindow.document).open(),iframeDocument.write("