embark/js/ipfs-api.min.js

61 lines
868 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var HaadIpfsApi=function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:!1,exports:{}};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.l=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.i=function(value){return value},__webpack_require__.d=function(exports,name,getter){Object.defineProperty(exports,name,{configurable:!1,enumerable:!0,get:getter})},__webpack_require__.n=function(module){var getter=module&&module.__esModule?function(){return module.default}:function(){return module};return __webpack_require__.d(getter,"a",getter),getter},__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=356)}([function(module,exports,__webpack_require__){"use strict";(function(Buffer,global){function typedArraySupport(){try{var arr=new Uint8Array(1);return arr.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===arr.foo()&&"function"==typeof arr.subarray&&0===arr.subarray(1,1).byteLength}catch(e){return!1}}function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(that,length){if(kMaxLength()<length)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(that=new Uint8Array(length),that.__proto__=Buffer.prototype):(null===that&&(that=new Buffer(length)),that.length=length),that}function Buffer(arg,encodingOrOffset,length){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(arg,encodingOrOffset,length);if("number"==typeof arg){if("string"==typeof encodingOrOffset)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,arg)}return from(this,arg,encodingOrOffset,length)}function from(that,value,encodingOrOffset,length){if("number"==typeof value)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&value instanceof ArrayBuffer?fromArrayBuffer(that,value,encodingOrOffset,length):"string"==typeof value?fromString(that,value,encodingOrOffset):fromObject(that,value)}function assertSize(size){if("number"!=typeof size)throw new TypeError('"size" argument must be a number');if(size<0)throw new RangeError('"size" argument must not be negative')}function alloc(that,size,fill,encoding){return assertSize(size),size<=0?createBuffer(that,size):void 0!==fill?"string"==typeof encoding?createBuffer(that,size).fill(fill,encoding):createBuffer(that,size).fill(fill):createBuffer(that,size)}function allocUnsafe(that,size){if(assertSize(size),that=createBuffer(that,size<0?0:0|checked(size)),!Buffer.TYPED_ARRAY_SUPPORT)for(var i=0;i<size;++i)that[i]=0;return that}function fromString(that,string,encoding){if("string"==typeof encoding&&""!==encoding||(encoding="utf8"),!Buffer.isEncoding(encoding))throw new TypeError('"encoding" must be a valid string encoding');var length=0|byteLength(string,encoding);that=createBuffer(that,length);var actual=that.write(string,encoding);return actual!==length&&(that=that.slice(0,actual)),that}function fromArrayLike(that,array){var length=array.length<0?0:0|checked(array.length);that=createBuffer(that,length);for(var i=0;i<length;i+=1)that[i]=255&array[i];return that}function fromArrayBuffer(that,array,byteOffset,length){if(array.byteLength,byteOffset<0||array.byteLength<byteOffset)throw new RangeError("'offset' is out of bounds");if(array.byteLength<byteOffset+(length||0))throw new RangeError("'length' is out of bounds");return array=void 0===byteOffset&&void 0===length?new Uint8Array(array):void 0===length?new Uint8Array(array,byteOffset):new Uint8Array(array,byteOffset,length),Buffer.TYPED_ARRAY_SUPPORT?(that=array,that.__proto__=Buffer.prototype):that=fromArrayLike(that,array),that}function fromObject(that,obj){if(Buffer.isBuffer(obj)){var len=0|checked(obj.length);return that=createBuffer(that,len),0===that.length?that:(obj.copy(that,0,0,len),that)}if(obj){if("undefined"!=typeof ArrayBuffer&&obj.buffer instanceof ArrayBuffer||"length"in obj)return"number"!=typeof obj.length||isnan(obj.length)?createBuffer(that,0):fromArrayLike(that,obj);if("Buffer"===obj.type&&isArray(obj.data))return fromArrayLike(that,obj.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(length){if(length>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|length}function SlowBuffer(length){return+length!=length&&(length=0),Buffer.alloc(+length)}function byteLength(string,encoding){if(Buffer.isBuffer(string))return string.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(string)||string instanceof ArrayBuffer))return string.byteLength;"string"!=typeof string&&(string=""+string);var len=string.length;if(0===len)return 0;for(var loweredCase=!1;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":case void 0: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 utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}function slowToString(encoding,start,end){var loweredCase=!1;if((void 0===start||start<0)&&(start=0),start>this.length)return"";if((void 0===end||end>this.length)&&(end=this.length),end<=0)return"";if(end>>>=0,start>>>=0,end<=start)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}}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),byteOffset=+byteOffset,isNaN(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,Buffer.TYPED_ARRAY_SUPPORT&&"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){function read(buf,i){return 1===indexSize?buf[i]:buf.readUInt16BE(i*indexSize)}var indexSize=1,arrLength=arr.length,valLength=val.length;if(void 0!==encoding&&(encoding=String(encoding).toLowerCase(),"ucs2"===encoding||"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}var i;if(dir){var foundIndex=-1;for(i=byteOffset;i<arrLength;i++)if(read(arr,i)===read(val,foundIndex===-1?0:i-foundIndex)){if(foundIndex===-1&&(foundIndex=i),i-foundIndex+1===valLength)return foundIndex*indexSize}else foundIndex!==-1&&(i-=i-foundIndex),foundIndex=-1}else for(byteOffset+valLength>arrLength&&(byteOffset=arrLength-valLength),i=byteOffset;i>=0;i--){for(var found=!0,j=0;j<valLength;j++)if(read(arr,i+j)!==read(val,j)){found=!1;break}if(found)return i}return-1}function hexWrite(buf,string,offset,length){offset=Number(offset)||0;var remaining=buf.length-offset;length?(length=Number(length),length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2!==0)throw new TypeError("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;i<length;++i){var parsed=parseInt(string.substr(2*i,2),16);if(isNaN(parsed))return i;buf[offset+i]=parsed}return i}function utf8Write(buf,string,offset,length){return blitBuffer(utf8ToBytes(string,buf.length-offset),buf,offset,length)}function asciiWrite(buf,string,offset,length){return blitBuffer(asciiToBytes(string),buf,offset,length)}function latin1Write(buf,string,offset,length){return asciiWrite(buf,string,offset,length)}function base64Write(buf,string,offset,length){return blitBuffer(base64ToBytes(string),buf,offset,length)}function ucs2Write(buf,string,offset,length){return blitBuffer(utf16leToBytes(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;i<end;){var firstByte=buf[i],codePoint=null,bytesPerSequence=firstByte>239?4:firstByte>223?3:firstByte>191?2:1;if(i+bytesPerSequence<=end){var secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:secondByte=buf[i+1],128===(192&secondByte)&&(tempCodePoint=(31&firstByte)<<6|63&secondByte,tempCodePoint>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,tempCodePoint>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,tempCodePoint>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 decodeCodePointsArray(res)}function decodeCodePointsArray(codePoints){var len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,codePoints);for(var res="",i=0;i<len;)res+=String.fromCharCode.apply(String,codePoints.slice(i,i+=MAX_ARGUMENTS_LENGTH));return res}function asciiSlice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(127&buf[i]);return ret}function latin1Slice(buf,start,end){var ret="";end=Math.min(buf.length,end);for(var i=start;i<end;++i)ret+=String.fromCharCode(buf[i]);return ret}function hexSlice(buf,start,end){var len=buf.length;(!start||start<0)&&(start=0),(!end||end<0||end>len)&&(end=len);for(var out="",i=start;i<end;++i)out+=toHex(buf[i]);return out}function utf16leSlice(buf,start,end){for(var bytes=buf.slice(start,end),res="",i=0;i<bytes.length;i+=2)res+=String.fromCharCode(bytes[i]+256*bytes[i+1]);return res}function checkOffset(offset,ext,length){if(offset%1!==0||offset<0)throw new RangeError("offset is not uint");if(offset+ext>length)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||value<min)throw new RangeError('"value" argument is out of bounds');if(offset+ext>buf.length)throw new RangeError("Index out of range")}function objectWriteUInt16(buf,value,offset,littleEndian){value<0&&(value=65535+value+1);for(var i=0,j=Math.min(buf.length-offset,2);i<j;++i)buf[offset+i]=(value&255<<8*(littleEndian?i:1-i))>>>8*(littleEndian?i:1-i)}function objectWriteUInt32(buf,value,offset,littleEndian){value<0&&(value=4294967295+value+1);for(var i=0,j=Math.min(buf.length-offset,4);i<j;++i)buf[offset+i]=value>>>8*(littleEndian?i:3-i)&255}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 noAssert||checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38),ieee754.write(buf,value,offset,littleEndian,23,4),offset+4}function writeDouble(buf,value,offset,littleEndian,noAssert){return noAssert||checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308),ieee754.write(buf,value,offset,littleEndian,52,8),offset+8}function base64clean(str){if(str=stringtrim(str).replace(INVALID_BASE64_RE,""),str.length<2)return"";for(;str.length%4!==0;)str+="=";return str}function stringtrim(str){return str.trim?str.trim():str.replace(/^\s+|\s+$/g,"")}function toHex(n){return n<16?"0"+n.toString(16):n.toString(16)}function utf8ToBytes(string,units){units=units||1/0;for(var codePoint,length=string.length,leadSurrogate=null,bytes=[],i=0;i<length;++i){if(codePoint=string.charCodeAt(i),codePoint>55295&&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=(leadSurrogate-55296<<10|codePoint-56320)+65536}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 asciiToBytes(str){for(var byteArray=[],i=0;i<str.length;++i)byteArray.push(255&str.charCodeAt(i));return byteArray}function utf16leToBytes(str,units){for(var c,hi,lo,byteArray=[],i=0;i<str.length&&!((units-=2)<0);++i)c=str.charCodeAt(i),hi=c>>8,lo=c%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i<length&&!(i+offset>=dst.length||i>=src.length);++i)dst[i+offset]=src[i];return i}function isnan(val){return val!==val}var base64=__webpack_require__(145),ieee754=__webpack_require__(168),isArray=__webpack_require__(21);exports.Buffer=Buffer,exports.SlowBuffer=SlowBuffer,exports.INSPECT_MAX_BYTES=50,Buffer.TYPED_ARRAY_SUPPORT=void 0!==global.TYPED_ARRAY_SUPPORT?global.TYPED_ARRAY_SUPPORT:typedArraySupport(),exports.kMaxLength=kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(arr){return arr.__proto__=Buffer.prototype,arr},Buffer.from=function(value,encodingOrOffset,length){return from(null,value,encodingOrOffset,length)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]===Buffer&&Object.defineProperty(Buffer,Symbol.species,{value:null,configurable:!0})),Buffer.alloc=function(size,fill,encoding){return alloc(null,size,fill,encoding)},Buffer.allocUnsafe=function(size){return allocUnsafe(null,size)},Buffer.allocUnsafeSlow=function(size){return allocUnsafe(null,size)},Buffer.isBuffer=function(b){return!(null==b||!b._isBuffer)},Buffer.compare=function(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0},Buffer.isEncoding=function(encoding){switch(String(encoding).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(list,length){if(!isArray(list))throw new TypeError('"list" argument must be an Array of Buffers');if(0===list.length)return Buffer.alloc(0);var i;if(void 0===length)for(length=0,i=0;i<list.length;++i)length+=list[i].length;var buffer=Buffer.allocUnsafe(length),pos=0;for(i=0;i<list.length;++i){var buf=list[i];if(!Buffer.isBuffer(buf))throw new TypeError('"list" argument must be an Array of Buffers');buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var len=this.length;if(len%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<len;i+=2)swap(this,i,i+1);return this},Buffer.prototype.swap32=function(){var len=this.length;if(len%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<len;i+=4)swap(this,i,i+3),swap(this,i+1,i+2);return this},Buffer.prototype.swap64=function(){var len=this.length;if(len%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<len;i+=8)swap(this,i,i+7),swap(this,i+1,i+6),swap(this,i+2,i+5),swap(this,i+3,i+4);return this},Buffer.prototype.toString=function(){var length=0|this.length;return 0===length?"":0===arguments.length?utf8Slice(this,0,length):slowToString.apply(this,arguments)},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 this.length>0&&(str=this.toString("hex",0,max).match(/.{2}/g).join(" "),this.length>max&&(str+=" ... ")),"<Buffer "+str+">"},Buffer.prototype.compare=function(target,start,end,thisStart,thisEnd){if(!Buffer.isBuffer(target))throw new TypeError("Argument must be a Buffer");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<len;++i)if(thisCopy[i]!==targetCopy[i]){x=thisCopy[i],y=targetCopy[i];break}return x<y?-1:y<x?1:0},Buffer.prototype.includes=function(val,byteOffset,encoding){return this.indexOf(val,byteOffset,encoding)!==-1},Buffer.prototype.indexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!0)},Buffer.prototype.lastIndexOf=function(val,byteOffset,encoding){return bidirectionalIndexOf(this,val,byteOffset,encoding,!1)},Buffer.prototype.write=function(string,offset,length,encoding){if(void 0===offset)encoding="utf8",length=this.length,offset=0;else if(void 0===length&&"string"==typeof offset)encoding=offset,length=this.length,offset=0;else{if(!isFinite(offset))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");offset|=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;Buffer.prototype.slice=function(start,end){var len=this.length;start=~~start,end=void 0===end?len:~~end,start<0?(start+=len,start<0&&(start=0)):start>len&&(start=len),end<0?(end+=len,end<0&&(end=0)):end>len&&(end=len),end<start&&(end=start);var newBuf;if(Buffer.TYPED_ARRAY_SUPPORT)newBuf=this.subarray(start,end),newBuf.__proto__=Buffer.prototype;else{var sliceLen=end-start;newBuf=new Buffer(sliceLen,void 0);for(var i=0;i<sliceLen;++i)newBuf[i]=this[i+start]}return newBuf},Buffer.prototype.readUIntLE=function(offset,byteLength,noAssert){offset|=0,byteLength|=0,noAssert||checkOffset(offset,byteLength,this.length);for(var val=this[offset],mul=1,i=0;++i<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return val},Buffer.prototype.readUIntBE=function(offset,byteLength,noAssert){offset|=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 noAssert||checkOffset(offset,1,this.length),this[offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]|this[offset+1]<<8},Buffer.prototype.readUInt16BE=function(offset,noAssert){return noAssert||checkOffset(offset,2,this.length),this[offset]<<8|this[offset+1]},Buffer.prototype.readUInt32LE=function(offset,noAssert){return 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 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<byteLength&&(mul*=256);)val+=this[offset+i]*mul;return mul*=128,val>=mul&&(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 mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength)),val},Buffer.prototype.readInt8=function(offset,noAssert){return noAssert||checkOffset(offset,1,this.length),128&this[offset]?(255-this[offset]+1)*-1:this[offset]},Buffer.prototype.readInt16LE=function(offset,noAssert){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){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 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 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 noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!0,23,4)},Buffer.prototype.readFloatBE=function(offset,noAssert){return noAssert||checkOffset(offset,4,this.length),ieee754.read(this,offset,!1,23,4)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!0,52,8)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return noAssert||checkOffset(offset,8,this.length),ieee754.read(this,offset,!1,52,8)},Buffer.prototype.writeUIntLE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,byteLength|=0,!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,0)}var mul=1,i=0;for(this[offset]=255&value;++i<byteLength&&(mul*=256);)this[offset+i]=value/mul&255;return offset+byteLength},Buffer.prototype.writeUIntBE=function(value,offset,byteLength,noAssert){if(value=+value,offset|=0,byteLength|=0,!noAssert){var maxBytes=Math.pow(2,8*byteLength)-1;checkInt(this,value,offset,byteLength,maxBytes,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),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),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),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset+3]=value>>>24,this[offset+2]=value>>>16,this[offset+1]=value>>>8,this[offset]=255&value):objectWriteUInt32(this,value,offset,!0),offset+4},Buffer.prototype.writeUInt32BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),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<byteLength&&(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.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),Buffer.TYPED_ARRAY_SUPPORT||(value=Math.floor(value)),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),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8):objectWriteUInt16(this,value,offset,!0),offset+2},Buffer.prototype.writeInt16BE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>8,this[offset+1]=255&value):objectWriteUInt16(this,value,offset,!1),offset+2},Buffer.prototype.writeInt32LE=function(value,offset,noAssert){return value=+value,offset|=0,noAssert||checkInt(this,value,offset,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=255&value,this[offset+1]=value>>>8,this[offset+2]=value>>>16,this[offset+3]=value>>>24):objectWriteUInt32(this,value,offset,!0),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),Buffer.TYPED_ARRAY_SUPPORT?(this[offset]=value>>>24,this[offset+1]=value>>>16,this[offset+2]=value>>>8,this[offset+3]=255&value):objectWriteUInt32(this,value,offset,!1),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(start||(start=0),end||0===end||(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end<start&&(end=start),end===start)return 0;if(0===target.length||0===this.length)return 0;if(targetStart<0)throw new RangeError("targetStart out of bounds");if(start<0||start>=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart<end-start&&(end=target.length-targetStart+start);var i,len=end-start;if(this===target&&start<targetStart&&targetStart<end)for(i=len-1;i>=0;--i)target[i+targetStart]=this[i+start];else if(len<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i<len;++i)target[i+targetStart]=this[i+start];else Uint8Array.prototype.set.call(target,this.subarray(start,start+len),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),1===val.length){var code=val.charCodeAt(0);code<256&&(val=code)}if(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)}else"number"==typeof val&&(val&=255);if(start<0||this.length<start||this.length<end)throw new RangeError("Out of range index");if(end<=start)return this;start>>>=0,end=void 0===end?this.length:end>>>0,val||(val=0);var i;if("number"==typeof val)for(i=start;i<end;++i)this[i]=val;else{var bytes=Buffer.isBuffer(val)?val:utf8ToBytes(new Buffer(val,encoding).toString()),len=bytes.length;for(i=0;i<end-start;++i)this[i+start]=bytes[i%len]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g}).call(exports,__webpack_require__(0).Buffer,__webpack_require__(8))},function(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}},function(module,exports){function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined");
}function runTimeout(fun){if(cachedSetTimeout===setTimeout)return setTimeout(fun,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(fun,0);try{return cachedSetTimeout(fun,0)}catch(e){try{return cachedSetTimeout.call(null,fun,0)}catch(e){return cachedSetTimeout.call(this,fun,0)}}}function runClearTimeout(marker){if(cachedClearTimeout===clearTimeout)return clearTimeout(marker);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(marker);try{return cachedClearTimeout(marker)}catch(e){try{return cachedClearTimeout.call(null,marker)}catch(e){return cachedClearTimeout.call(this,marker)}}}function cleanUpNextTick(){draining&&currentQueue&&(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var timeout=runTimeout(cleanUpNextTick);draining=!0;for(var len=queue.length;len;){for(currentQueue=queue,queue=[];++queueIndex<len;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,len=queue.length}currentQueue=null,draining=!1,runClearTimeout(timeout)}}function Item(fun,array){this.fun=fun,this.array=array}function noop(){}var cachedSetTimeout,cachedClearTimeout,process=module.exports={};!function(){try{cachedSetTimeout="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(e){cachedSetTimeout=defaultSetTimout}try{cachedClearTimeout="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(e){cachedClearTimeout=defaultClearTimeout}}();var currentQueue,queue=[],draining=!1,queueIndex=-1;process.nextTick=function(fun){var args=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)args[i-1]=arguments[i];queue.push(new Item(fun,args)),1!==queue.length||draining||runTimeout(drainQueue)},Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={},process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.binding=function(name){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(dir){throw new Error("process.chdir is not supported")},process.umask=function(){return 0}},function(module,exports,__webpack_require__){(function(Buffer){function isArray(arg){return Array.isArray?Array.isArray(arg):"[object Array]"===objectToString(arg)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==typeof arg}function isUndefined(arg){return void 0===arg}function isRegExp(re){return"[object RegExp]"===objectToString(re)}function isObject(arg){return"object"==typeof arg&&null!==arg}function isDate(d){return"[object Date]"===objectToString(d)}function isError(e){return"[object Error]"===objectToString(e)||e instanceof Error}function isFunction(arg){return"function"==typeof arg}function isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}exports.isArray=isArray,exports.isBoolean=isBoolean,exports.isNull=isNull,exports.isNullOrUndefined=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=Buffer.isBuffer}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){"use strict";const createCallback=(method,context)=>{return function(){const args=Array.prototype.slice.call(arguments),lastIndex=args.length-1,lastArg=args&&args.length>0?args[lastIndex]:null,cb="function"==typeof lastArg?lastArg:null;return cb?method.apply(context,args):new Promise((resolve,reject)=>{args.push((err,val)=>{return err?reject(err):void resolve(val)}),method.apply(context,args)})}};module.exports=((methods,options)=>{options=options||{};const type=Object.prototype.toString.call(methods);if("[object Object]"===type||"[object Array]"===type){const obj=options.replace?methods:{};for(let key in methods)methods.hasOwnProperty(key)&&(obj[key]=createCallback(methods[key]));return obj}return createCallback(methods,options.context||methods)})},function(module,exports,__webpack_require__){function Stream(){EE.call(this)}module.exports=Stream;var EE=__webpack_require__(6).EventEmitter,inherits=__webpack_require__(1);inherits(Stream,EE),Stream.Readable=__webpack_require__(289),Stream.Writable=__webpack_require__(291),Stream.Duplex=__webpack_require__(286),Stream.Transform=__webpack_require__(290),Stream.PassThrough=__webpack_require__(288),Stream.Stream=Stream,Stream.prototype.pipe=function(dest,options){function ondata(chunk){dest.writable&&!1===dest.write(chunk)&&source.pause&&source.pause()}function ondrain(){source.readable&&source.resume&&source.resume()}function onend(){didOnEnd||(didOnEnd=!0,dest.end())}function onclose(){didOnEnd||(didOnEnd=!0,"function"==typeof dest.destroy&&dest.destroy())}function onerror(er){if(cleanup(),0===EE.listenerCount(this,"error"))throw er}function cleanup(){source.removeListener("data",ondata),dest.removeListener("drain",ondrain),source.removeListener("end",onend),source.removeListener("close",onclose),source.removeListener("error",onerror),dest.removeListener("error",onerror),source.removeListener("end",cleanup),source.removeListener("close",cleanup),dest.removeListener("close",cleanup)}var source=this;source.on("data",ondata),dest.on("drain",ondrain),dest._isStdio||options&&options.end===!1||(source.on("end",onend),source.on("close",onclose));var didOnEnd=!1;return source.on("error",onerror),dest.on("error",onerror),source.on("end",cleanup),source.on("close",cleanup),dest.on("close",cleanup),dest.emit("pipe",source),dest}},function(module,exports){function EventEmitter(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function isFunction(arg){return"function"==typeof arg}function isNumber(arg){return"number"==typeof arg}function isObject(arg){return"object"==typeof arg&&null!==arg}function isUndefined(arg){return void 0===arg}module.exports=EventEmitter,EventEmitter.EventEmitter=EventEmitter,EventEmitter.prototype._events=void 0,EventEmitter.prototype._maxListeners=void 0,EventEmitter.defaultMaxListeners=10,EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");return this._maxListeners=n,this},EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(this._events||(this._events={}),"error"===type&&(!this._events.error||isObject(this._events.error)&&!this._events.error.length)){if(er=arguments[1],er instanceof Error)throw er;var err=new Error('Uncaught, unspecified "error" event. ('+er+")");throw err.context=er,err}if(handler=this._events[type],isUndefined(handler))return!1;if(isFunction(handler))switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:args=Array.prototype.slice.call(arguments,1),handler.apply(this,args)}else if(isObject(handler))for(args=Array.prototype.slice.call(arguments,1),listeners=handler.slice(),len=listeners.length,i=0;i<len;i++)listeners[i].apply(this,args);return!0},EventEmitter.prototype.addListener=function(type,listener){var m;if(!isFunction(listener))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",type,isFunction(listener.listener)?listener.listener:listener),this._events[type]?isObject(this._events[type])?this._events[type].push(listener):this._events[type]=[this._events[type],listener]:this._events[type]=listener,isObject(this._events[type])&&!this._events[type].warned&&(m=isUndefined(this._maxListeners)?EventEmitter.defaultMaxListeners:this._maxListeners,m&&m>0&&this._events[type].length>m&&(this._events[type].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[type].length),"function"==typeof console.trace&&console.trace())),this},EventEmitter.prototype.on=EventEmitter.prototype.addListener,EventEmitter.prototype.once=function(type,listener){function g(){this.removeListener(type,g),fired||(fired=!0,listener.apply(this,arguments))}if(!isFunction(listener))throw TypeError("listener must be a function");var fired=!1;return g.listener=listener,this.on(type,g),this},EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;if(list=this._events[type],length=list.length,position=-1,list===listener||isFunction(list.listener)&&list.listener===listener)delete this._events[type],this._events.removeListener&&this.emit("removeListener",type,listener);else if(isObject(list)){for(i=length;i-- >0;)if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}if(position<0)return this;1===list.length?(list.length=0,delete this._events[type]):list.splice(position,1),this._events.removeListener&&this.emit("removeListener",type,listener)}return this},EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[type]&&delete this._events[type],this;if(0===arguments.length){for(key in this._events)"removeListener"!==key&&this.removeAllListeners(key);return this.removeAllListeners("removeListener"),this._events={},this}if(listeners=this._events[type],isFunction(listeners))this.removeListener(type,listeners);else if(listeners)for(;listeners.length;)this.removeListener(type,listeners[listeners.length-1]);return delete this._events[type],this},EventEmitter.prototype.listeners=function(type){var ret;return ret=this._events&&this._events[type]?isFunction(this._events[type])?[this._events[type]]:this._events[type].slice():[]},EventEmitter.prototype.listenerCount=function(type){if(this._events){var evlistener=this._events[type];if(isFunction(evlistener))return 1;if(evlistener)return evlistener.length}return 0},EventEmitter.listenerCount=function(emitter,type){return emitter.listenerCount(type)}},function(module,exports,__webpack_require__){function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding))throw new Error("Unknown encoding: "+encoding)}function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2,this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3,this.charLength=this.charReceived?3:0}var Buffer=__webpack_require__(0).Buffer,isBufferEncoding=Buffer.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},StringDecoder=exports.StringDecoder=function(encoding){switch(this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,""),assertEncoding(encoding),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=base64DetectIncompleteChar;break;default:return void(this.write=passThroughWrite)}this.charBuffer=new Buffer(6),this.charReceived=0,this.charLength=0};StringDecoder.prototype.write=function(buffer){for(var charStr="";this.charLength;){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;if(buffer.copy(this.charBuffer,this.charReceived,0,available),this.charReceived+=available,this.charReceived<this.charLength)return"";buffer=buffer.slice(available,buffer.length),charStr=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var charCode=charStr.charCodeAt(charStr.length-1);if(!(charCode>=55296&&charCode<=56319)){if(this.charReceived=this.charLength=0,0===buffer.length)return charStr;break}this.charLength+=this.surrogateSize,charStr=""}this.detectIncompleteChar(buffer);var end=buffer.length;this.charLength&&(buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end),end-=this.charReceived),charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1,charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;return this.charLength+=size,this.charReceived+=size,this.charBuffer.copy(this.charBuffer,size,0,size),buffer.copy(this.charBuffer,0,0,size),charStr.substring(0,end)}return charStr},StringDecoder.prototype.detectIncompleteChar=function(buffer){for(var i=buffer.length>=3?3:buffer.length;i>0;i--){var c=buffer[buffer.length-i];if(1==i&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i},StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length&&(res=this.write(buffer)),this.charReceived){var cr=this.charReceived,buf=this.charBuffer,enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res}},function(module,exports){var g;g=function(){return this}();try{g=g||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(g=window)}module.exports=g},function(module,exports,__webpack_require__){"use strict";(function(process){function nextTick(fn,arg1,arg2,arg3){if("function"!=typeof fn)throw new TypeError('"callback" argument must be a function');var args,i,len=arguments.length;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function(){fn.call(null,arg1)});case 3:return process.nextTick(function(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function(){fn.call(null,arg1,arg2,arg3)});default:for(args=new Array(len-1),i=0;i<args.length;)args[i++]=arguments[i];return process.nextTick(function(){fn.apply(null,args)})}}!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?module.exports=nextTick:module.exports=process.nextTick}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){var basex=__webpack_require__(144),ALPHABET="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";module.exports=basex(ALPHABET)},function(module,exports,__webpack_require__){"use strict";(function(global){var buffer=__webpack_require__(0),Buffer=buffer.Buffer,SlowBuffer=buffer.SlowBuffer,MAX_LEN=buffer.kMaxLength||2147483647;exports.alloc=function(size,fill,encoding){if("function"==typeof Buffer.alloc)return Buffer.alloc(size,fill,encoding);if("number"==typeof encoding)throw new TypeError("encoding must not be number");if("number"!=typeof size)throw new TypeError("size must be a number");if(size>MAX_LEN)throw new RangeError("size is too large");var enc=encoding,_fill=fill;void 0===_fill&&(enc=void 0,_fill=0);var buf=new Buffer(size);if("string"==typeof _fill)for(var fillBuf=new Buffer(_fill,enc),flen=fillBuf.length,i=-1;++i<size;)buf[i]=fillBuf[i%flen];else buf.fill(_fill);return buf},exports.allocUnsafe=function(size){if("function"==typeof Buffer.allocUnsafe)return Buffer.allocUnsafe(size);if("number"!=typeof size)throw new TypeError("size must be a number");if(size>MAX_LEN)throw new RangeError("size is too large");return new Buffer(size)},exports.from=function(value,encodingOrOffset,length){if("function"==typeof Buffer.from&&(!global.Uint8Array||Uint8Array.from!==Buffer.from))return Buffer.from(value,encodingOrOffset,length);if("number"==typeof value)throw new TypeError('"value" argument must not be a number');if("string"==typeof value)return new Buffer(value,encodingOrOffset);if("undefined"!=typeof ArrayBuffer&&value instanceof ArrayBuffer){var offset=encodingOrOffset;if(1===arguments.length)return new Buffer(value);"undefined"==typeof offset&&(offset=0);var len=length;if("undefined"==typeof len&&(len=value.byteLength-offset),offset>=value.byteLength)throw new RangeError("'offset' is out of bounds");if(len>value.byteLength-offset)throw new RangeError("'length' is out of bounds");return new Buffer(value.slice(offset,offset+len))}if(Buffer.isBuffer(value)){var out=new Buffer(value.length);return value.copy(out,0,0,value.length),out}if(value){if(Array.isArray(value)||"undefined"!=typeof ArrayBuffer&&value.buffer instanceof ArrayBuffer||"length"in value)return new Buffer(value);if("Buffer"===value.type&&Array.isArray(value.data))return new Buffer(value.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},exports.allocUnsafeSlow=function(size){if("function"==typeof Buffer.allocUnsafeSlow)return Buffer.allocUnsafeSlow(size);if("number"!=typeof size)throw new TypeError("size must be a number");if(size>=MAX_LEN)throw new RangeError("size is too large");return new SlowBuffer(size)}}).call(exports,__webpack_require__(8))},function(module,exports,__webpack_require__){(function(global,process){function inspect(obj,opts){var ctx={seen:[],stylize:stylizeNoColor};return arguments.length>=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 arrayToHash(array){var hash={};return array.forEach(function(val,idx){hash[val]=!0}),hash}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=formatPrimitive(ctx,value);if(primitive)return primitive;var keys=Object.keys(value),visibleKeys=arrayToHash(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 base="",array=!1,braces=["{","}"];if(isArray(value)&&(array=!0,braces=["[","]"]),isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(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))return braces[0]+base+braces[1];if(recurseTimes<0)return isRegExp(value)?ctx.stylize(RegExp.prototype.toString.call(value),"regexp"):ctx.stylize("[Object]","special");ctx.seen.push(value);var output;return output=array?formatArray(ctx,value,recurseTimes,visibleKeys,keys):keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)}),ctx.seen.pop(),reduceToSingleString(output,base,braces)}function formatPrimitive(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")}return isNumber(value)?ctx.stylize(""+value,"number"):isBoolean(value)?ctx.stylize(""+value,"boolean"):isNull(value)?ctx.stylize("null","null"):void 0}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){for(var output=[],i=0,l=value.length;i<l;++i)hasOwnProperty(value,String(i))?output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,String(i),!0)):output.push("");return keys.forEach(function(key){key.match(/^\d+$/)||output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,key,!0))}),output}function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){var name,str,desc;if(desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]},desc.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),str.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),name.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 reduceToSingleString(output,base,braces){var numLinesEst=0,length=output.reduce(function(prev,cur){return numLinesEst++,cur.indexOf("\n")>=0&&numLinesEst++,prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);return length>60?braces[0]+(""===base?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]:braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}function isBoolean(arg){return"boolean"==typeof arg}function isNull(arg){return null===arg}function isNullOrUndefined(arg){return null==arg}function isNumber(arg){return"number"==typeof arg}function isString(arg){return"string"==typeof arg}function isSymbol(arg){return"symbol"==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 isPrimitive(arg){return null===arg||"boolean"==typeof arg||"number"==typeof arg||"string"==typeof arg||"symbol"==typeof arg||"undefined"==typeof arg}function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}function timestamp(){var d=new Date,time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){for(var objects=[],i=0;i<arguments.length;i++)objects.push(inspect(arguments[i]));return objects.join(" ")}for(var i=1,args=arguments,len=args.length,str=String(f).replace(formatRegExp,function(x){if("%%"===x)return"%";if(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<len;x=args[++i])str+=isNull(x)||!isObject(x)?" "+x:" "+inspect(x);return str},exports.deprecate=function(fn,msg){function deprecated(){if(!warned){if(process.throwDeprecation)throw new Error(msg);process.traceDeprecation?console.trace(msg):console.error(msg),warned=!0}return fn.apply(this,arguments)}if(isUndefined(global.process))return function(){return exports.deprecate(fn,msg).apply(this,arguments)};if(process.noDeprecation===!0)return fn;var warned=!1;return deprecated};var debugEnviron,debugs={};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=isNullOrUndefined,exports.isNumber=isNumber,exports.isString=isString,exports.isSymbol=isSymbol,exports.isUndefined=isUndefined,exports.isRegExp=isRegExp,exports.isObject=isObject,exports.isDate=isDate,exports.isError=isError,exports.isFunction=isFunction,exports.isPrimitive=isPrimitive,exports.isBuffer=__webpack_require__(306);var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))},exports.inherits=__webpack_require__(305),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(exports,__webpack_require__(8),__webpack_require__(2))},function(module,exports,__webpack_require__){(function(setImmediate,clearImmediate){function Timeout(id,clearFn){this._id=id,this._clearFn=clearFn}var nextTick=__webpack_require__(2).nextTick,apply=Function.prototype.apply,slice=Array.prototype.slice,immediateIds={},nextImmediateId=0;exports.setTimeout=function(){return new Timeout(apply.call(setTimeout,window,arguments),clearTimeout)},exports.setInterval=function(){return new Timeout(apply.call(setInterval,window,arguments),clearInterval)},exports.clearTimeout=exports.clearInterval=function(timeout){timeout.close()},Timeout.prototype.unref=Timeout.prototype.ref=function(){},Timeout.prototype.close=function(){this._clearFn.call(window,this._id)},exports.enroll=function(item,msecs){clearTimeout(item._idleTimeoutId),item._idleTimeout=msecs},exports.unenroll=function(item){clearTimeout(item._idleTimeoutId),item._idleTimeout=-1},exports._unrefActive=exports.active=function(item){clearTimeout(item._idleTimeoutId);var msecs=item._idleTimeout;msecs>=0&&(item._idleTimeoutId=setTimeout(function(){item._onTimeout&&item._onTimeout()},msecs))},exports.setImmediate="function"==typeof setImmediate?setImmediate:function(fn){var id=nextImmediateId++,args=!(arguments.length<2)&&slice.call(arguments,1);return immediateIds[id]=!0,nextTick(function(){immediateIds[id]&&(args?fn.apply(null,args):fn.call(null),exports.clearImmediate(id))}),id},exports.clearImmediate="function"==typeof clearImmediate?clearImmediate:function(id){delete immediateIds[id]}}).call(exports,__webpack_require__(13).setImmediate,__webpack_require__(13).clearImmediate)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var bs58=__webpack_require__(10),cs=__webpack_require__(240);exports.toHexString=function(m){if(!Buffer.isBuffer(m))throw new Error("must be passed a buffer");return m.toString("hex")},exports.fromHexString=function(s){return new Buffer(s,"hex")},exports.toB58String=function(m){if(!Buffer.isBuffer(m))throw new Error("must be passed a buffer");return bs58.encode(m)},exports.fromB58String=function(s){var encoded=s;return Buffer.isBuffer(s)&&(encoded=s.toString()),new Buffer(bs58.decode(encoded))},exports.decode=function(buf){exports.validate(buf);var code=buf[0];return{code:code,name:cs.codes[code],length:buf[1],digest:buf.slice(2)}},exports.encode=function(digest,code,length){if(!digest||!code)throw new Error("multihash encode requires at least two args: digest, code");var hashfn=exports.coerceCode(code);if(!Buffer.isBuffer(digest))throw new Error("digest should be a Buffer");if(null==length&&(length=digest.length),length&&digest.length!==length)throw new Error("digest length should be equal to specified length.");if(length>127)throw new Error("multihash does not yet support digest lengths greater than 127 bytes.");return Buffer.concat([new Buffer([hashfn,length]),digest])},exports.coerceCode=function(name){var code=name;if("string"==typeof name){if(!cs.names[name])throw new Error("Unrecognized hash function named: "+name);code=cs.names[name]}if("number"!=typeof code)throw new Error("Hash function code should be a number. Got: "+code);if(!cs.codes[code]&&!exports.isAppCode(code))throw new Error("Unrecognized function code: "+code);return code},exports.isAppCode=function(code){return code>0&&code<16},exports.isValidCode=function(code){return!!exports.isAppCode(code)||!!cs.codes[code]},exports.validate=function(multihash){if(!Buffer.isBuffer(multihash))throw new Error("multihash must be a Buffer");if(multihash.length<3)throw new Error("multihash too short. must be > 3 bytes.");if(multihash.length>129)throw new Error("multihash too long. must be < 129 bytes.");var code=multihash[0];if(!exports.isValidCode(code))throw new Error("multihash unknown function code: 0x"+code.toString(16));if(multihash.slice(2).length!==multihash[1])throw new Error("multihash length inconsistent: 0x"+multihash.toString("hex"))}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(self){self.end()}var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var processNextTick=__webpack_require__(9),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Readable=__webpack_require__(105),Writable=__webpack_require__(60);util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}},function(module,exports){module.exports=function(module){return module.webpackPolyfill||(module.deprecate=function(){},module.paths=[],module.children||(module.children=[]),Object.defineProperty(module,"loaded",{enumerable:!0,configurable:!1,get:function(){return module.l}}),Object.defineProperty(module,"id",{enumerable:!0,configurable:!1,get:function(){return module.i}}),module.webpackPolyfill=1),module}},function(module,exports,__webpack_require__){"use strict";function streamToValue(res,callback){
res.pipe(concat(data=>callback(null,data)))}const concat=__webpack_require__(157);module.exports=streamToValue},function(module,exports,__webpack_require__){var asn1=exports;asn1.bignum=__webpack_require__(149),asn1.define=__webpack_require__(124).define,asn1.base=__webpack_require__(25),asn1.constants=__webpack_require__(64),asn1.decoders=__webpack_require__(128),asn1.encoders=__webpack_require__(130)},function(module,exports,__webpack_require__){"use strict";function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(self){self.end()}var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var processNextTick=__webpack_require__(9),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Readable=__webpack_require__(77),Writable=__webpack_require__(79);util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const mh=__webpack_require__(14),assert=__webpack_require__(45);class DAGLink{constructor(name,size,multihash){assert(multihash,"A link requires a multihash to point to"),assert(size,"A link requires a size"),this._name=name,this._size=size,"string"==typeof multihash?this._multihash=mh.fromB58String(multihash):Buffer.isBuffer(multihash)&&(this._multihash=multihash)}toString(){const mhStr=mh.toB58String(this.multihash);return`DAGLink <${mhStr} - name: "${this.name}", size: ${this.size}>`}toJSON(){return{name:this.name,size:this.size,multihash:mh.toB58String(this._multihash)}}get name(){return this._name}set name(name){throw new Error("Can't set property: 'name' is immutable")}get size(){return this._size}set size(size){throw new Error("Can't set property: 'size' is immutable")}get multihash(){return this._multihash}set multihash(multihash){throw new Error("Can't set property: 'multihash' is immutable")}}exports=module.exports=DAGLink,exports.create=__webpack_require__(172)}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){var toString={}.toString;module.exports=Array.isArray||function(arr){return"[object Array]"==toString.call(arr)}},function(module,exports,__webpack_require__){(function(process){function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys},util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Readable=__webpack_require__(100),Writable=__webpack_require__(102);util.inherits(Duplex,Readable),forEach(objectKeys(Writable.prototype),function(method){Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(self){self.end()}var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var processNextTick=__webpack_require__(9),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Readable=__webpack_require__(108),Writable=__webpack_require__(110);util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}},function(module,exports,__webpack_require__){"use strict";function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(self){self.end()}var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var processNextTick=__webpack_require__(9),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Readable=__webpack_require__(113),Writable=__webpack_require__(115);util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}},function(module,exports,__webpack_require__){var base=exports;base.Reporter=__webpack_require__(126).Reporter,base.DecoderBuffer=__webpack_require__(63).DecoderBuffer,base.EncoderBuffer=__webpack_require__(63).EncoderBuffer,base.Node=__webpack_require__(125)},function(module,exports,__webpack_require__){"use strict";function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||processNextTick(onEndNT,this)}function onEndNT(self){self.end()}var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var processNextTick=__webpack_require__(9),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Readable=__webpack_require__(147),Writable=__webpack_require__(148);util.inherits(Duplex,Readable);for(var keys=objectKeys(Writable.prototype),v=0;v<keys.length;v++){var method=keys[v];Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])}},function(module,exports,__webpack_require__){(function(Buffer){module.exports=function(a,b){for(var length=Math.min(a.length,b.length),buffer=new Buffer(length),i=0;i<length;++i)buffer[i]=a[i]^b[i];return buffer}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){function noop(){}module.exports=noop},function(module,exports,__webpack_require__){(function(process){function nodeify(promise,cb){return"function"!=typeof cb?promise:promise.then(function(res){nextTick(function(){cb(null,res)})},function(err){nextTick(function(){cb(err)})})}function nodeifyThis(cb){return nodeify(this,cb)}function extend(prom){if(prom&&isPromise(prom)){prom.nodeify=nodeifyThis;var then=prom.then;return prom.then=function(){return extend(then.apply(this,arguments))},prom}"function"==typeof prom?prom.prototype.nodeify=nodeifyThis:Promise.prototype.nodeify=nodeifyThis}function NodeifyPromise(fn){return this instanceof NodeifyPromise?(Promise.call(this,fn),void extend(this)):new NodeifyPromise(fn)}var nextTick,Promise=__webpack_require__(251),isPromise=__webpack_require__(82);nextTick="function"==typeof setImediate?setImediate:"object"==typeof process&&process&&process.nextTick?process.nextTick:function(cb){setTimeout(cb,0)},module.exports=nodeify,nodeify.extend=extend,nodeify.Promise=NodeifyPromise,NodeifyPromise.prototype=Object.create(Promise.prototype),NodeifyPromise.prototype.constructor=NodeifyPromise}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(global){function deprecate(fn,msg){function deprecated(){if(!warned){if(config("throwDeprecation"))throw new Error(msg);config("traceDeprecation")?console.trace(msg):console.warn(msg),warned=!0}return fn.apply(this,arguments)}if(config("noDeprecation"))return fn;var warned=!1;return deprecated}function config(name){try{if(!global.localStorage)return!1}catch(_){return!1}var val=global.localStorage[name];return null!=val&&"true"===String(val).toLowerCase()}module.exports=deprecate}).call(exports,__webpack_require__(8))},function(module,exports){function extend(){for(var target={},i=0;i<arguments.length;i++){var source=arguments[i];for(var key in source)hasOwnProperty.call(source,key)&&(target[key]=source[key])}return target}module.exports=extend;var hasOwnProperty=Object.prototype.hasOwnProperty},function(module,exports){"use strict";function onlyOnce(fn){return function(){if(null===fn)throw new Error("Callback was already called.");var callFn=fn;fn=null,callFn.apply(this,arguments)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=onlyOnce,module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function rest(func,start){return(0,_overRest3.default)(func,start,_identity2.default)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=rest;var _overRest2=__webpack_require__(218),_overRest3=_interopRequireDefault(_overRest2),_identity=__webpack_require__(219),_identity2=_interopRequireDefault(_identity);module.exports=exports.default},function(module,exports,__webpack_require__){(function(Buffer){function fixup_uint32(x){var ret,x_pos;return ret=x>uint_max||x<0?(x_pos=Math.abs(x)%uint_max,x<0?uint_max-x_pos:x_pos):x}function scrub_vec(v){for(var i=0;i<v.length;v++)v[i]=0;return!1}function Global(){this.SBOX=[],this.INV_SBOX=[],this.SUB_MIX=[[],[],[],[]],this.INV_SUB_MIX=[[],[],[],[]],this.init(),this.RCON=[0,1,2,4,8,16,32,64,128,27,54]}function bufferToArray(buf){for(var len=buf.length/4,out=new Array(len),i=-1;++i<len;)out[i]=buf.readUInt32BE(4*i);return out}function AES(key){this._key=bufferToArray(key),this._doReset()}var uint_max=Math.pow(2,32);Global.prototype.init=function(){var d,i,sx,t,x,x2,x4,x8,xi,_i;for(d=function(){var _i,_results;for(_results=[],i=_i=0;_i<256;i=++_i)i<128?_results.push(i<<1):_results.push(i<<1^283);return _results}(),x=0,xi=0,i=_i=0;_i<256;i=++_i)sx=xi^xi<<1^xi<<2^xi<<3^xi<<4,sx=sx>>>8^255&sx^99,this.SBOX[x]=sx,this.INV_SBOX[sx]=x,x2=d[x],x4=d[x2],x8=d[x4],t=257*d[sx]^16843008*sx,this.SUB_MIX[0][x]=t<<24|t>>>8,this.SUB_MIX[1][x]=t<<16|t>>>16,this.SUB_MIX[2][x]=t<<8|t>>>24,this.SUB_MIX[3][x]=t,t=16843009*x8^65537*x4^257*x2^16843008*x,this.INV_SUB_MIX[0][sx]=t<<24|t>>>8,this.INV_SUB_MIX[1][sx]=t<<16|t>>>16,this.INV_SUB_MIX[2][sx]=t<<8|t>>>24,this.INV_SUB_MIX[3][sx]=t,0===x?x=xi=1:(x=x2^d[d[d[x8^x2]]],xi^=d[d[xi]]);return!0};var G=new Global;AES.blockSize=16,AES.prototype.blockSize=AES.blockSize,AES.keySize=32,AES.prototype.keySize=AES.keySize,AES.prototype._doReset=function(){var invKsRow,keySize,keyWords,ksRow,ksRows,t;for(keyWords=this._key,keySize=keyWords.length,this._nRounds=keySize+6,ksRows=4*(this._nRounds+1),this._keySchedule=[],ksRow=0;ksRow<ksRows;ksRow++)this._keySchedule[ksRow]=ksRow<keySize?keyWords[ksRow]:(t=this._keySchedule[ksRow-1],ksRow%keySize===0?(t=t<<8|t>>>24,t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[255&t],t^=G.RCON[ksRow/keySize|0]<<24):keySize>6&&ksRow%keySize===4?t=G.SBOX[t>>>24]<<24|G.SBOX[t>>>16&255]<<16|G.SBOX[t>>>8&255]<<8|G.SBOX[255&t]:void 0,this._keySchedule[ksRow-keySize]^t);for(this._invKeySchedule=[],invKsRow=0;invKsRow<ksRows;invKsRow++)ksRow=ksRows-invKsRow,t=this._keySchedule[ksRow-(invKsRow%4?0:4)],this._invKeySchedule[invKsRow]=invKsRow<4||ksRow<=4?t:G.INV_SUB_MIX[0][G.SBOX[t>>>24]]^G.INV_SUB_MIX[1][G.SBOX[t>>>16&255]]^G.INV_SUB_MIX[2][G.SBOX[t>>>8&255]]^G.INV_SUB_MIX[3][G.SBOX[255&t]];return!0},AES.prototype.encryptBlock=function(M){M=bufferToArray(new Buffer(M));var out=this._doCryptBlock(M,this._keySchedule,G.SUB_MIX,G.SBOX),buf=new Buffer(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){M=bufferToArray(new Buffer(M));var temp=[M[3],M[1]];M[1]=temp[0],M[3]=temp[1];var out=this._doCryptBlock(M,this._invKeySchedule,G.INV_SUB_MIX,G.INV_SBOX),buf=new Buffer(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(){scrub_vec(this._keySchedule),scrub_vec(this._invKeySchedule),scrub_vec(this._key)},AES.prototype._doCryptBlock=function(M,keySchedule,SUB_MIX,SBOX){var ksRow,s0,s1,s2,s3,t0,t1,t2,t3;s0=M[0]^keySchedule[0],s1=M[1]^keySchedule[1],s2=M[2]^keySchedule[2],s3=M[3]^keySchedule[3],ksRow=4;for(var round=1;round<this._nRounds;round++)t0=SUB_MIX[0][s0>>>24]^SUB_MIX[1][s1>>>16&255]^SUB_MIX[2][s2>>>8&255]^SUB_MIX[3][255&s3]^keySchedule[ksRow++],t1=SUB_MIX[0][s1>>>24]^SUB_MIX[1][s2>>>16&255]^SUB_MIX[2][s3>>>8&255]^SUB_MIX[3][255&s0]^keySchedule[ksRow++],t2=SUB_MIX[0][s2>>>24]^SUB_MIX[1][s3>>>16&255]^SUB_MIX[2][s0>>>8&255]^SUB_MIX[3][255&s1]^keySchedule[ksRow++],t3=SUB_MIX[0][s3>>>24]^SUB_MIX[1][s0>>>16&255]^SUB_MIX[2][s1>>>8&255]^SUB_MIX[3][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++],[fixup_uint32(t0),fixup_uint32(t1),fixup_uint32(t2),fixup_uint32(t3)]},exports.AES=AES}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function incr32(iv){for(var item,len=iv.length;len--;){if(item=iv.readUInt8(len),255!==item){item++,iv.writeUInt8(item,len);break}iv.writeUInt8(0,len)}}function getBlock(self){var out=self._cipher.encryptBlock(self._prev);return incr32(self._prev),out}var xor=__webpack_require__(27);exports.encrypt=function(self,chunk){for(;self._cache.length<chunk.length;)self._cache=Buffer.concat([self._cache,getBlock(self)]);var pad=self._cache.slice(0,chunk.length);return self._cache=self._cache.slice(chunk.length),xor(chunk,pad)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function CipherBase(hashMode){Transform.call(this),this.hashMode="string"==typeof hashMode,this.hashMode?this[hashMode]=this._finalOrDigest:this.final=this._finalOrDigest,this._decoder=null,this._encoding=null}var Transform=__webpack_require__(5).Transform,inherits=__webpack_require__(1),StringDecoder=__webpack_require__(7).StringDecoder;module.exports=CipherBase,inherits(CipherBase,Transform),CipherBase.prototype.update=function(data,inputEnc,outputEnc){"string"==typeof data&&(data=new Buffer(data,inputEnc));var outData=this._update(data);return this.hashMode?this:(outputEnc&&(outData=this._toString(outData,outputEnc)),outData)},CipherBase.prototype.setAutoPadding=function(){},CipherBase.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},CipherBase.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},CipherBase.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},CipherBase.prototype._transform=function(data,_,next){var err;try{this.hashMode?this._update(data):this.push(this._update(data))}catch(e){err=e}finally{next(err)}},CipherBase.prototype._flush=function(done){var err;try{this.push(this._final())}catch(e){err=e}finally{done(err)}},CipherBase.prototype._finalOrDigest=function(outputEnc){var outData=this._final()||new Buffer("");return outputEnc&&(outData=this._toString(outData,outputEnc,!0)),outData},CipherBase.prototype._toString=function(value,enc,fin){if(this._decoder||(this._decoder=new StringDecoder(enc),this._encoding=enc),this._encoding!==enc)throw new Error("can't switch encodings");var out=this._decoder.write(value);return fin&&(out+=this._decoder.end()),out}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function create(data,dagLinks,hashAlg,callback){"function"==typeof data&&(callback=data,data=void 0),"function"==typeof dagLinks&&(callback=dagLinks,dagLinks=[]),"function"==typeof hashAlg&&(callback=hashAlg,hashAlg=void 0),hashAlg||(hashAlg="sha2-256");const links=dagLinks.map(l=>{return l.constructor&&"DAGLink"===l.constructor.name?l:new DAGLink(l.name?l.name:l.Name,l.size?l.size:l.Size,l.hash||l.Hash||l.multihash)}),sortedLinks=sort(links,linkSort);serialize({data:data,links:sortedLinks},(err,serialized)=>{return err?callback(err):void multihashing(serialized,hashAlg,(err,multihash)=>{if(err)return callback(err);const dagNode=new DAGNode(data,sortedLinks,serialized,multihash);callback(null,dagNode)})})}const multihashing=__webpack_require__(91),sort=__webpack_require__(285),dagPBUtil=__webpack_require__(51),serialize=dagPBUtil.serialize,dagNodeUtil=__webpack_require__(38),linkSort=dagNodeUtil.linkSort,DAGNode=__webpack_require__(50),DAGLink=__webpack_require__(20);module.exports=create},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function cloneData(dagNode){let data;return dagNode.data&&dagNode.data.length>0?(data=new Buffer(dagNode.data.length),dagNode.data.copy(data)):data=new Buffer(0),data}function cloneLinks(dagNode){return dagNode.links.slice()}function linkSort(a,b){const aBuf=new Buffer(a.name||"","ascii"),bBuf=new Buffer(b.name||"","ascii");return aBuf.compare(bBuf)}function toDAGLink(node){return new DAGLink("",node.size,node.multihash)}const DAGLink=__webpack_require__(20);exports=module.exports,exports.cloneData=cloneData,exports.cloneLinks=cloneLinks,exports.linkSort=linkSort,exports.toDAGLink=toDAGLink}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";exports.webcrypto=__webpack_require__(40)(),exports.hmac=__webpack_require__(194),exports.ecdh=__webpack_require__(193),exports.aes=__webpack_require__(191),exports.rsa=__webpack_require__(196)},function(module,exports,__webpack_require__){"use strict";module.exports=function(){if("undefined"!=typeof window&&(__webpack_require__(311)(window),window.crypto))return window.crypto;throw new Error("Please use an environment with crypto support")}},function(module,exports,__webpack_require__){function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}var isFunction=__webpack_require__(222),isLength=__webpack_require__(90);module.exports=isArrayLike},function(module,exports,__webpack_require__){(function(process){exports=module.exports=__webpack_require__(100),exports.Stream=__webpack_require__(5),exports.Readable=exports,exports.Writable=__webpack_require__(102),exports.Duplex=__webpack_require__(22),exports.Transform=__webpack_require__(101),exports.PassThrough=__webpack_require__(270),process.browser||"disable"!==process.env.READABLE_STREAM||(module.exports=__webpack_require__(5))}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(process){var Stream=function(){try{return __webpack_require__(5)}catch(_){}}();exports=module.exports=__webpack_require__(113),exports.Stream=Stream||exports,exports.Readable=exports,exports.Writable=__webpack_require__(115),exports.Duplex=__webpack_require__(24),exports.Transform=__webpack_require__(114),exports.PassThrough=__webpack_require__(299),!process.browser&&"disable"===process.env.READABLE_STREAM&&Stream&&(module.exports=Stream)}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const isStream=__webpack_require__(181),promisify=__webpack_require__(4),DAGNodeStream=__webpack_require__(62);module.exports=(send=>{return promisify((files,callback)=>{const ok=Buffer.isBuffer(files)||isStream.isReadable(files)||Array.isArray(files);if(!ok)return callback(new Error('"files" must be a buffer, readable stream, or array of objects'));const request={path:"add",files:files},transform=(res,callback)=>DAGNodeStream.streamToValue(send,res,callback);send.andTransform(request,transform,callback)})})}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(global){function compare(a,b){if(a===b)return 0;for(var x=a.length,y=b.length,i=0,len=Math.min(x,y);i<len;++i)if(a[i]!==b[i]){x=a[i],y=b[i];break}return x<y?-1:y<x?1:0}function isBuffer(b){return global.Buffer&&"function"==typeof global.Buffer.isBuffer?global.Buffer.isBuffer(b):!(null==b||!b._isBuffer)}function pToString(obj){return Object.prototype.toString.call(obj)}function isView(arrbuf){return!isBuffer(arrbuf)&&("function"==typeof global.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(arrbuf):!!arrbuf&&(arrbuf instanceof DataView||!!(arrbuf.buffer&&arrbuf.buffer instanceof ArrayBuffer))))}function getName(func){if(util.isFunction(func)){if(functionsHaveNames)return func.name;var str=func.toString(),match=str.match(regex);return match&&match[1]}}function truncate(s,n){return"string"==typeof s?s.length<n?s:s.slice(0,n):s}function inspect(something){if(functionsHaveNames||!util.isFunction(something))return util.inspect(something);var rawname=getName(something),name=rawname?": "+rawname:"";return"[Function"+name+"]"}function getMessage(self){return truncate(inspect(self.actual),128)+" "+self.operator+" "+truncate(inspect(self.expected),128)}function fail(actual,expected,message,operator,stackStartFunction){throw new assert.AssertionError({message:message,actual:actual,expected:expected,operator:operator,stackStartFunction:stackStartFunction})}function ok(value,message){value||fail(value,!0,message,"==",assert.ok)}function _deepEqual(actual,expected,strict,memos){if(actual===expected)return!0;if(isBuffer(actual)&&isBuffer(expected))return 0===compare(actual,expected);if(util.isDate(actual)&&util.isDate(expected))return actual.getTime()===expected.getTime();if(util.isRegExp(actual)&&util.isRegExp(expected))return actual.source===expected.source&&actual.global===expected.global&&actual.multiline===expected.multiline&&actual.lastIndex===expected.lastIndex&&actual.ignoreCase===expected.ignoreCase;if(null!==actual&&"object"==typeof actual||null!==expected&&"object"==typeof expected){if(isView(actual)&&isView(expected)&&pToString(actual)===pToString(expected)&&!(actual instanceof Float32Array||actual instanceof Float64Array))return 0===compare(new Uint8Array(actual.buffer),new Uint8Array(expected.buffer));if(isBuffer(actual)!==isBuffer(expected))return!1;memos=memos||{actual:[],expected:[]};var actualIndex=memos.actual.indexOf(actual);return actualIndex!==-1&&actualIndex===memos.expected.indexOf(expected)||(memos.actual.push(actual),memos.expected.push(expected),objEquiv(actual,expected,strict,memos))}return strict?actual===expected:actual==expected}function isArguments(object){return"[object Arguments]"==Object.prototype.toString.call(object)}function objEquiv(a,b,strict,actualVisitedObjects){if(null===a||void 0===a||null===b||void 0===b)return!1;if(util.isPrimitive(a)||util.isPrimitive(b))return a===b;if(strict&&Object.getPrototypeOf(a)!==Object.getPrototypeOf(b))return!1;var aIsArgs=isArguments(a),bIsArgs=isArguments(b);if(aIsArgs&&!bIsArgs||!aIsArgs&&bIsArgs)return!1;if(aIsArgs)return a=pSlice.call(a),b=pSlice.call(b),_deepEqual(a,b,strict);var key,i,ka=objectKeys(a),kb=objectKeys(b);if(ka.length!==kb.length)return!1;for(ka.sort(),kb.sort(),i=ka.length-1;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}function notDeepStrictEqual(actual,expected,message){_deepEqual(actual,expected,!0)&&fail(actual,expected,message,"notDeepStrictEqual",notDeepStrictEqual)}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)&&expected.call({},actual)===!0}function _tryBlock(block){var error;try{block()}catch(e){error=e}return error}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=_tryBlock(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}var util=__webpack_require__(12),hasOwn=Object.prototype.hasOwnProperty,pSlice=Array.prototype.slice,functionsHaveNames=function(){return"foo"===function(){}.name}(),assert=module.exports=ok,regex=/\s*function\s+([^\(\s]*)\s*/;assert.AssertionError=function(options){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=getMessage(this),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=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};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)hasOwn.call(obj,key)&&keys.push(key);return keys}}).call(exports,__webpack_require__(8))},function(module,exports){"use strict";function once(fn){return function(){if(null!==fn){var callFn=fn;fn=null,callFn.apply(this,arguments)}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=once,module.exports=exports.default},function(module,exports,__webpack_require__){(function(Buffer){function BufferList(callback){if(!(this instanceof BufferList))return new BufferList(callback);if(this._bufs=[],this.length=0,"function"==typeof callback){this._callback=callback;var piper=function(err){this._callback&&(this._callback(err),this._callback=null)}.bind(this);this.on("pipe",function(src){src.on("error",piper)}),this.on("unpipe",function(src){src.removeListener("error",piper)})}else this.append(callback);DuplexStream.call(this)}var DuplexStream=__webpack_require__(146),util=__webpack_require__(12);util.inherits(BufferList,DuplexStream),BufferList.prototype._offset=function(offset){for(var _t,tot=0,i=0;i<this._bufs.length;i++){if(_t=tot+this._bufs[i].length,offset<_t)return[i,offset-tot];tot=_t}},BufferList.prototype.append=function(buf){var newBuf,i=0;if(Array.isArray(buf))for(;i<buf.length;i++)this.append(buf[i]);else if(buf instanceof BufferList)for(;i<buf._bufs.length;i++)this.append(buf._bufs[i]);else null!=buf&&("number"==typeof buf&&(buf=buf.toString()),newBuf=Buffer.isBuffer(buf)?buf:new Buffer(buf),this._bufs.push(newBuf),this.length+=newBuf.length);return this},BufferList.prototype._write=function(buf,encoding,callback){this.append(buf),"function"==typeof callback&&callback()},BufferList.prototype._read=function(size){return this.length?(size=Math.min(size,this.length),this.push(this.slice(0,size)),void this.consume(size)):this.push(null)},BufferList.prototype.end=function(chunk){DuplexStream.prototype.end.call(this,chunk),this._callback&&(this._callback(null,this.slice()),this._callback=null)},BufferList.prototype.get=function(index){return this.slice(index,index+1)[0]},BufferList.prototype.slice=function(start,end){return this.copy(null,0,start,end)},BufferList.prototype.copy=function copy(dst,dstStart,srcStart,srcEnd){if(("number"!=typeof srcStart||srcStart<0)&&(srcStart=0),("number"!=typeof srcEnd||srcEnd>this.length)&&(srcEnd=this.length),srcStart>=this.length)return dst||new Buffer(0);if(srcEnd<=0)return dst||new Buffer(0);var l,i,copy=!!dst,off=this._offset(srcStart),len=srcEnd-srcStart,bytes=len,bufoff=copy&&dstStart||0,start=off[1];if(0===srcStart&&srcEnd==this.length){if(!copy)return Buffer.concat(this._bufs);for(i=0;i<this._bufs.length;i++)this._bufs[i].copy(dst,bufoff),bufoff+=this._bufs[i].length;return dst}if(bytes<=this._bufs[off[0]].length-start)return copy?this._bufs[off[0]].copy(dst,dstStart,start,start+bytes):this._bufs[off[0]].slice(start,start+bytes);for(copy||(dst=new Buffer(len)),i=off[0];i<this._bufs.length;i++){if(l=this._bufs[i].length-start,!(bytes>l)){this._bufs[i].copy(dst,bufoff,start,start+bytes);break}this._bufs[i].copy(dst,bufoff,start),bufoff+=l,bytes-=l,start&&(start=0)}return dst},BufferList.prototype.toString=function(encoding,start,end){return this.slice(start,end).toString(encoding)},BufferList.prototype.consume=function(bytes){for(;this._bufs.length;){if(!(bytes>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(bytes),this.length-=bytes;break}bytes-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},BufferList.prototype.duplicate=function(){for(var i=0,copy=new BufferList;i<this._bufs.length;i++)copy.append(this._bufs[i]);return copy},BufferList.prototype.destroy=function(){this._bufs.length=0,this.length=0,this.push(null)},function(){var methods={readDoubleBE:8,readDoubleLE:8,
readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1};for(var m in methods)!function(m){BufferList.prototype[m]=function(offset){return this.slice(offset,offset+methods[m])[m](0)}}(m)}(),module.exports=BufferList}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){exports["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},exports["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},exports["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},exports["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},exports["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},exports["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},exports.aes128=exports["aes-128-cbc"],exports.aes192=exports["aes-192-cbc"],exports.aes256=exports["aes-256-cbc"],exports["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},exports["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},exports["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},exports["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},exports["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},exports["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},exports["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},exports["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},exports["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},exports["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},exports["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},exports["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},exports["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},exports["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},exports["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},exports["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},exports["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},exports["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},function(module,exports,__webpack_require__){(function(global){module.exports=!1;try{module.exports="[object process]"===Object.prototype.toString.call(global.process)}catch(e){}}).call(exports,__webpack_require__(8))},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const mh=__webpack_require__(14),assert=__webpack_require__(45);class DAGNode{constructor(data,links,serialized,multihash){assert(serialized,"DAGNode needs its serialized format"),assert(multihash,"DAGNode needs its multihash"),"string"==typeof multihash&&(multihash=mh.fromB58String(multihash)),this._data=data||new Buffer(0),this._links=links||[],this._serialized=serialized,this._multihash=multihash,this._size=this.links.reduce((sum,l)=>sum+l.size,this.serialized.length),this._json={data:this.data,links:this.links.map(l=>l.toJSON()),multihash:mh.toB58String(this.multihash),size:this.size}}toJSON(){return this._json}toString(){const mhStr=mh.toB58String(this.multihash);return`DAGNode <${mhStr} - data: "${this.data.toString()}", links: ${this.links.length}, size: ${this.size}>`}get data(){return this._data}set data(data){throw new Error("Can't set property: 'data' is immutable")}get links(){return this._links}set links(links){throw new Error("Can't set property: 'links' is immutable")}get serialized(){return this._serialized}set serialized(serialized){throw new Error("Can't set property: 'serialized' is immutable")}get size(){return this._size}set size(size){throw new Error("Can't set property: 'size' is immutable")}get multihash(){return this._multihash}set multihash(multihash){throw new Error("Can't set property: 'multihash' is immutable")}}exports=module.exports=DAGNode,exports.create=__webpack_require__(37),exports.clone=__webpack_require__(174),exports.addLink=__webpack_require__(173),exports.rmLink=__webpack_require__(175)}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function cid(node,callback){callback(null,new CID(node.multihash))}function serialize(node,callback){let serialized;try{const pb=toProtoBuf(node);serialized=proto.PBNode.encode(pb)}catch(err){return callback(err)}callback(null,serialized)}function deserialize(data,callback){const pbn=proto.PBNode.decode(data),links=pbn.Links.map(link=>{return new DAGLink(link.Name,link.Tsize,link.Hash)}),buf=pbn.Data||new Buffer(0);DAGNode.create(buf,links,callback)}function toProtoBuf(node){const pbn={};return node.data&&node.data.length>0?pbn.Data=node.data:pbn.Data=null,node.links.length>0?pbn.Links=node.links.map(link=>{return{Hash:link.multihash,Name:link.name,Tsize:link.size}}):pbn.Links=null,pbn}const CID=__webpack_require__(76),protobuf=__webpack_require__(58),proto=protobuf(__webpack_require__(176)),DAGLink=__webpack_require__(20),DAGNode=__webpack_require__(50);exports=module.exports,exports.serialize=serialize,exports.deserialize=deserialize,exports.cid=cid}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(global,module){function arrayMap(array,iteratee){for(var index=-1,length=array?array.length:0,result=Array(length);++index<length;)result[index]=iteratee(array[index],index,array);return result}function arraySome(array,predicate){for(var index=-1,length=array?array.length:0;++index<length;)if(predicate(array[index],index,array))return!0;return!1}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}function baseUnary(func){return function(value){return func(value)}}function getValue(object,key){return null==object?void 0:object[key]}function isHostObject(value){var result=!1;if(null!=value&&"function"!=typeof value.toString)try{result=!!(value+"")}catch(e){}return result}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 setToArray(set){var index=-1,result=Array(set.size);return set.forEach(function(value){result[++index]=value}),result}function Hash(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}}function hashDelete(key){return this.has(key)&&delete this.__data__[key]}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?void 0:result}return hasOwnProperty.call(data,key)?data[key]:void 0}function hashHas(key){var data=this.__data__;return nativeCreate?void 0!==data[key]:hasOwnProperty.call(data,key)}function hashSet(key,value){var data=this.__data__;return data[key]=nativeCreate&&void 0===value?HASH_UNDEFINED:value,this}function ListCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0)return!1;var lastIndex=data.length-1;return index==lastIndex?data.pop():splice.call(data,index,1),!0}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?void 0:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?data.push([key,value]):data[index][1]=value,this}function MapCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){return getMapData(this,key).delete(key)}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){return getMapData(this,key).set(key,value),this}function SetCache(values){var index=-1,length=values?values.length:0;for(this.__data__=new MapCache;++index<length;)this.add(values[index])}function setCacheAdd(value){return this.__data__.set(value,HASH_UNDEFINED),this}function setCacheHas(value){return this.__data__.has(value)}function Stack(entries){this.__data__=new ListCache(entries)}function stackClear(){this.__data__=new ListCache}function stackDelete(key){return this.__data__.delete(key)}function stackGet(key){return this.__data__.get(key)}function stackHas(key){return this.__data__.has(key)}function stackSet(key,value){var cache=this.__data__;if(cache instanceof ListCache){var pairs=cache.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1)return pairs.push([key,value]),this;cache=this.__data__=new MapCache(pairs)}return cache.set(key,value),this}function arrayLikeKeys(value,inherited){var result=isArray(value)||isArguments(value)?baseTimes(value.length,String):[],length=result.length,skipIndexes=!!length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isIndex(key,length))||result.push(key);return result}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}function baseGet(object,path){path=isKey(path,object)?[path]:castPath(path);for(var index=0,length=path.length;null!=object&&index<length;)object=object[toKey(path[index++])];return index&&index==length?object:void 0}function baseGetTag(value){return objectToString.call(value)}function baseHasIn(object,key){return null!=object&&key in Object(object)}function baseIsEqual(value,other,customizer,bitmask,stack){return value===other||(null==value||null==other||!isObject(value)&&!isObjectLike(other)?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,bitmask,stack))}function baseIsEqualDeep(object,other,equalFunc,customizer,bitmask,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=getTag(object),objTag=objTag==argsTag?objectTag:objTag),othIsArr||(othTag=getTag(other),othTag=othTag==argsTag?objectTag:othTag);var objIsObj=objTag==objectTag&&!isHostObject(object),othIsObj=othTag==objectTag&&!isHostObject(other),isSameTag=objTag==othTag;if(isSameTag&&!objIsObj)return stack||(stack=new Stack),objIsArr||isTypedArray(object)?equalArrays(object,other,equalFunc,customizer,bitmask,stack):equalByTag(object,other,objTag,equalFunc,customizer,bitmask,stack);if(!(bitmask&PARTIAL_COMPARE_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new Stack),equalFunc(objUnwrapped,othUnwrapped,customizer,bitmask,stack)}}return!!isSameTag&&(stack||(stack=new Stack),equalObjects(object,other,equalFunc,customizer,bitmask,stack))}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=Object(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(void 0===objValue&&!(key in object))return!1}else{var stack=new Stack;if(customizer)var result=customizer(objValue,srcValue,key,object,source,stack);if(!(void 0===result?baseIsEqual(srcValue,objValue,customizer,UNORDERED_COMPARE_FLAG|PARTIAL_COMPARE_FLAG,stack):result))return!1}}return!0}function baseIsNative(value){if(!isObject(value)||isMasked(value))return!1;var pattern=isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objectToString.call(value)]}function baseIteratee(value){return"function"==typeof value?value:null==value?identity:"object"==typeof value?isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value):property(value)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)}),result}function baseMatches(source){var matchData=getMatchData(source);return 1==matchData.length&&matchData[0][2]?matchesStrictComparable(matchData[0][0],matchData[0][1]):function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){return isKey(path)&&isStrictComparable(srcValue)?matchesStrictComparable(toKey(path),srcValue):function(object){var objValue=get(object,path);return void 0===objValue&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,void 0,UNORDERED_COMPARE_FLAG|PARTIAL_COMPARE_FLAG)}}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function baseToString(value){if("string"==typeof value)return value;if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function castPath(value){return isArray(value)?value:stringToPath(value)}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(null==collection)return collection;if(!isArrayLike(collection))return eachFunc(collection,iteratee);for(var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);(fromRight?index--:++index<length)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;length--;){var key=props[fromRight?length:++index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function equalArrays(array,other,equalFunc,customizer,bitmask,stack){var isPartial=bitmask&PARTIAL_COMPARE_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength))return!1;var stacked=stack.get(array);if(stacked&&stack.get(other))return stacked==other;var index=-1,result=!0,seen=bitmask&UNORDERED_COMPARE_FLAG?new SetCache:void 0;for(stack.set(array,other),stack.set(other,array);++index<arrLength;){var arrValue=array[index],othValue=other[index];if(customizer)var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);if(void 0!==compared){if(compared)continue;result=!1;break}if(seen){if(!arraySome(other,function(othValue,othIndex){if(!seen.has(othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,customizer,bitmask,stack)))return seen.add(othIndex)})){result=!1;break}}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,customizer,bitmask,stack)){result=!1;break}}return stack.delete(array),stack.delete(other),result}function equalByTag(object,other,tag,equalFunc,customizer,bitmask,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset)return!1;object=object.buffer,other=other.buffer;case arrayBufferTag:return!(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other)));case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&PARTIAL_COMPARE_FLAG;if(convert||(convert=setToArray),object.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object);if(stacked)return stacked==other;bitmask|=UNORDERED_COMPARE_FLAG,stack.set(object,other);var result=equalArrays(convert(object),convert(other),equalFunc,customizer,bitmask,stack);return stack.delete(object),result;case symbolTag:if(symbolValueOf)return symbolValueOf.call(object)==symbolValueOf.call(other)}return!1}function equalObjects(object,other,equalFunc,customizer,bitmask,stack){var isPartial=bitmask&PARTIAL_COMPARE_FLAG,objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key)))return!1}var stacked=stack.get(object);if(stacked&&stack.get(other))return stacked==other;var result=!0;stack.set(object,other),stack.set(other,object);for(var skipCtor=isPartial;++index<objLength;){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);if(!(void 0===compared?objValue===othValue||equalFunc(objValue,othValue,customizer,bitmask,stack):compared)){result=!1;break}skipCtor||(skipCtor="constructor"==key)}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor)&&(result=!1)}return stack.delete(object),stack.delete(other),result}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data["string"==typeof key?"string":"hash"]:data.map}function getMatchData(object){for(var result=keys(object),length=result.length;length--;){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}function hasPath(object,path,hasFunc){path=isKey(path,object)?[path]:castPath(path);for(var result,index=-1,length=path.length;++index<length;){var key=toKey(path[index]);if(!(result=null!=object&&hasFunc(object,key)))break;object=object[key]}if(result)return result;var length=object?object.length:0;return!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function isIndex(value,length){return length=null==length?MAX_SAFE_INTEGER:length,!!length&&("number"==typeof value||reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function isKey(value,object){if(isArray(value))return!1;var type=typeof value;return!("number"!=type&&"symbol"!=type&&"boolean"!=type&&null!=value&&!isSymbol(value))||(reIsPlainProp.test(value)||!reIsDeepProp.test(value)||null!=object&&value in Object(object))}function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function isPrototype(value){var Ctor=value&&value.constructor,proto="function"==typeof Ctor&&Ctor.prototype||objectProto;return value===proto}function isStrictComparable(value){return value===value&&!isObject(value)}function matchesStrictComparable(key,srcValue){return function(object){return null!=object&&(object[key]===srcValue&&(void 0!==srcValue||key in Object(object)))}}function toKey(value){if("string"==typeof value||isSymbol(value))return value;var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,baseIteratee(iteratee,3))}function memoize(func,resolver){if("function"!=typeof func||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),result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(value,other){return value===other||value!==value&&other!==other}function isArguments(value){return isArrayLikeObject(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return null==value?"":baseToString(value)}function get(object,path,defaultValue){var result=null==object?void 0:baseGet(object,path);return void 0===result?defaultValue:result}function hasIn(object,path){return null!=object&&hasPath(object,path,baseHasIn)}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function identity(value){return value}function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}var LARGE_ARRAY_SIZE=200,FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",UNORDERED_COMPARE_FLAG=1,PARTIAL_COMPARE_FLAG=2,INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",promiseTag="[object Promise]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",weakMapTag="[object WeakMap]",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]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsUint=/^(?:0|[1-9]\d*)$/,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 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{return freeProcess&&freeProcess.binding("util")}catch(e){}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"Symbol(src)_1."+uid:""}(),funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol=root.Symbol,Uint8Array=root.Uint8Array,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,nativeKeys=overArg(Object.keys,Object),DataView=getNative(root,"DataView"),Map=getNative(root,"Map"),Promise=getNative(root,"Promise"),Set=getNative(root,"Set"),WeakMap=getNative(root,"WeakMap"),nativeCreate=getNative(Object,"create"),dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet,SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas,Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;var baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor(),getTag=baseGetTag;(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set)!=setTag||WeakMap&&getTag(new WeakMap)!=weakMapTag)&&(getTag=function(value){var result=objectToString.call(value),Ctor=result==objectTag?value.constructor:void 0,ctorString=Ctor?toSource(Ctor):void 0;if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}return result});var stringToPath=memoize(function(string){string=toString(string);var result=[];return reLeadingDot.test(string)&&result.push(""),string.replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result});memoize.Cache=MapCache;var isArray=Array.isArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;module.exports=map}).call(exports,__webpack_require__(8),__webpack_require__(16)(module))},function(module,exports,__webpack_require__){function baseGetTag(value){return null==value?void 0===value?undefinedTag:nullTag:(value=Object(value),symToStringTag&&symToStringTag in value?getRawTag(value):objectToString(value))}var Symbol=__webpack_require__(86),getRawTag=__webpack_require__(211),objectToString=__webpack_require__(216),nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol?Symbol.toStringTag:void 0;module.exports=baseGetTag},function(module,exports){function isObjectLike(value){return null!=value&&"object"==typeof value}module.exports=isObjectLike},function(module,exports,__webpack_require__){module.exports={encode:__webpack_require__(231),decode:__webpack_require__(230),encodingLength:__webpack_require__(232)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function Multiaddr(addr){if(!(this instanceof Multiaddr))return new Multiaddr(addr);if(addr||(addr=""),addr instanceof Buffer)this.buffer=codec.fromBuffer(addr);else if("string"==typeof addr||addr instanceof String)this.buffer=codec.fromString(addr);else{if(!(addr.buffer&&addr.protos&&addr.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr");this.buffer=codec.fromBuffer(addr.buffer)}}var map=__webpack_require__(52),extend=__webpack_require__(31),codec=__webpack_require__(233),protocols=__webpack_require__(57),NotImplemented=new Error("Sorry, Not Implemented Yet."),varint=__webpack_require__(55);exports=module.exports=Multiaddr,Multiaddr.prototype.toString=function(){return codec.bufferToString(this.buffer)},Multiaddr.prototype.toOptions=function(){var opts={},parsed=this.toString().split("/");return opts.family="ip4"===parsed[1]?"ipv4":"ipv6",opts.host=parsed[2],opts.transport=parsed[3],opts.port=parsed[4],opts},Multiaddr.prototype.inspect=function(){return"<Multiaddr "+this.buffer.toString("hex")+" - "+codec.bufferToString(this.buffer)+">"},Multiaddr.prototype.protos=function(){return map(this.protoCodes(),function(code){return extend(protocols(code))})},Multiaddr.prototype.protoCodes=function(){const codes=[],buf=this.buffer;let i=0;for(;i<buf.length;){const code=varint.decode(buf,i),n=varint.decode.bytes,p=protocols(code),size=codec.sizeForAddr(p,buf.slice(i+n));i+=size+n,codes.push(code)}return codes},Multiaddr.prototype.protoNames=function(){return map(this.protos(),function(proto){return proto.name})},Multiaddr.prototype.tuples=function(){return codec.bufferToTuples(this.buffer)},Multiaddr.prototype.stringTuples=function(){var t=codec.bufferToTuples(this.buffer);return codec.tuplesToStringTuples(t)},Multiaddr.prototype.encapsulate=function(addr){return addr=Multiaddr(addr),Multiaddr(this.toString()+addr.toString())},Multiaddr.prototype.decapsulate=function(addr){addr=addr.toString();var s=this.toString(),i=s.lastIndexOf(addr);if(i<0)throw new Error("Address "+this+" does not contain subaddress: "+addr);return Multiaddr(s.slice(0,i))},Multiaddr.prototype.equals=function(addr){return this.buffer.equals(addr.buffer)},Multiaddr.prototype.nodeAddress=function(){if(!this.isThinWaistAddress())throw new Error('Multiaddr must be "thin waist" address for nodeAddress.');var codes=this.protoCodes(),parts=this.toString().split("/").slice(1);return{family:41===codes[0]?"IPv6":"IPv4",address:parts[1],port:parts[3]}},Multiaddr.fromNodeAddress=function(addr,transport){if(!addr)throw new Error("requires node address object");if(!transport)throw new Error("requires transport protocol");var ip="IPv6"===addr.family?"ip6":"ip4";return Multiaddr("/"+[ip,addr.address,transport,addr.port].join("/"))},Multiaddr.prototype.isThinWaistAddress=function(addr){var protos=(addr||this).protos();return 2===protos.length&&((4===protos[0].code||41===protos[0].code)&&(6===protos[1].code||17===protos[1].code))},Multiaddr.prototype.fromStupidString=function(str){throw NotImplemented;
},Multiaddr.protocols=protocols,Multiaddr.isMultiaddr=function(addr){return addr.constructor&&addr.constructor.name?"Multiaddr"===addr.constructor.name:Boolean(addr.fromStupidString&&addr.protos)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function Protocols(proto){if("number"==typeof proto){if(Protocols.codes[proto])return Protocols.codes[proto];throw new Error("no protocol with code: "+proto)}if("string"==typeof proto||proto instanceof String){if(Protocols.names[proto])return Protocols.names[proto];throw new Error("no protocol with name: "+proto)}throw new Error("invalid protocol id type: "+proto)}function p(code,size,name){return{code:code,size:size,name:name}}var map=__webpack_require__(52);module.exports=Protocols,Protocols.lengthPrefixedVarSize=-1,Protocols.table=[[4,32,"ip4"],[6,16,"tcp"],[17,16,"udp"],[33,16,"dccp"],[41,128,"ip6"],[132,16,"sctp"],[302,0,"utp"],[421,Protocols.lengthPrefixedVarSize,"ipfs"],[480,0,"http"],[443,0,"https"],[477,0,"ws"],[275,0,"libp2p-webrtc-star"]],Protocols.names={},Protocols.codes={},map(Protocols.table,function(e){var proto=p.apply(this,e);Protocols.codes[proto.code]=proto,Protocols.names[proto.name]=proto}),Protocols.object=p},function(module,exports,__webpack_require__){(function(Buffer){var schema=__webpack_require__(252),compile=__webpack_require__(256),flatten=function(values){if(!values)return null;var result={};return Object.keys(values).forEach(function(k){result[k]=values[k].value}),result};module.exports=function(proto,opts){if(opts||(opts={}),!proto)throw new Error("Pass in a .proto string or a protobuf-schema parsed object");var sch="object"!=typeof proto||Buffer.isBuffer(proto)?schema.parse(proto):proto,Messages=function(){var self=this;compile(sch,opts.encodings||{}).forEach(function(m){self[m.name]=flatten(m.values)||m})};return Messages.prototype.toString=function(){return schema.stringify(sch)},Messages.prototype.toJSON=function(){return sch},new Messages}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function TransformState(stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null,ts.writecb=null,null!==data&&void 0!==data&&stream.push(data),cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState=new TransformState(this);var stream=this;this._readableState.needReadable=!0,this._readableState.sync=!1,options&&("function"==typeof options.transform&&(this._transform=options.transform),"function"==typeof options.flush&&(this._flush=options.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(er,data){done(stream,er,data)}):done(stream)})}function done(stream,er,data){if(er)return stream.emit("error",er);null!==data&&void 0!==data&&stream.push(data);var ws=stream._writableState,ts=stream._transformState;if(ws.length)throw new Error("Calling transform done when ws.length != 0");if(ts.transforming)throw new Error("Calling transform done when still transforming");return stream.push(null)}module.exports=Transform;var Duplex=__webpack_require__(15),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;null!==ts.writechunk&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0}},function(module,exports,__webpack_require__){"use strict";(function(process,setImmediate){function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk,this.encoding=encoding,this.callback=cb,this.next=null}function WritableState(options,stream){Duplex=Duplex||__webpack_require__(15),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(options){return Duplex=Duplex||__webpack_require__(15),realHasInstance.call(Writable,this)||this instanceof Duplex?(this._writableState=new WritableState(options,this),this.writable=!0,options&&("function"==typeof options.write&&(this._write=options.write),"function"==typeof options.writev&&(this._writev=options.writev)),void Stream.call(this)):new Writable(options)}function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er),processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=!0,er=!1;return null===chunk?er=new TypeError("May not write null values to stream"):Buffer.isBuffer(chunk)||"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream.emit("error",er),processNextTick(cb,er),valid=!1),valid}function decodeChunk(state,chunk,encoding){return state.objectMode||state.decodeStrings===!1||"string"!=typeof chunk||(chunk=bufferShim.from(chunk,encoding)),chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding),Buffer.isBuffer(chunk)&&(encoding="buffer");var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest=new WriteReq(chunk,encoding,cb),last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){--state.pendingcb,sync?processNextTick(cb,er):cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);finished||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(stream,state),sync?asyncWrite(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0;entry;)buffer[count]=entry,entry=entry.next,count+=1;doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state)}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,!1,len,chunk,encoding,cb),entry=entry.next,state.writing)break}null===entry&&(state.lastBufferedRequest=null)}state.bufferedRequestCount=0,state.bufferedRequest=entry,state.bufferProcessing=!1}function needFinish(state){return state.ending&&0===state.length&&null===state.bufferedRequest&&!state.finished&&!state.writing}function prefinish(stream,state){state.prefinished||(state.prefinished=!0,stream.emit("prefinish"))}function finishMaybe(stream,state){var need=needFinish(state);return need&&(0===state.pendingcb?(prefinish(stream,state),state.finished=!0,stream.emit("finish")):prefinish(stream,state)),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?processNextTick(cb):stream.once("finish",cb)),state.ended=!0,stream.writable=!1}function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(err){var entry=_this.entry;for(_this.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree?state.corkedRequestsFree.next=_this:state.corkedRequestsFree=_this}}module.exports=Writable;var Duplex,processNextTick=__webpack_require__(9),asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Stream,internalUtil={deprecate:__webpack_require__(30)};!function(){try{Stream=__webpack_require__(5)}catch(_){}finally{Stream||(Stream=__webpack_require__(6).EventEmitter)}}();var Buffer=__webpack_require__(0).Buffer,bufferShim=__webpack_require__(11);util.inherits(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(_){}}();var realHasInstance;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return!!realHasInstance.call(this,object)||object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return"function"==typeof encoding&&(cb=encoding,encoding=null),Buffer.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?writeAfterEnd(this,cb):validChunk(this,state,chunk,cb)&&(state.pendingcb++,ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){var state=this._writableState;state.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)}}).call(exports,__webpack_require__(2),__webpack_require__(13).setImmediate)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const bs58=__webpack_require__(10),isIPFS=__webpack_require__(178);module.exports=function(multihash){if(!isIPFS.multihash(multihash))throw new Error("not valid multihash");return Buffer.isBuffer(multihash)?bs58.encode(multihash):multihash}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";const TransformStream=__webpack_require__(42).Transform,streamToValue=__webpack_require__(17),getDagNode=__webpack_require__(338);class DAGNodeStream extends TransformStream{constructor(options){const opts=Object.assign(options||{},{objectMode:!0});super(opts),this._send=opts.send}static streamToValue(send,inputStream,callback){const outputStream=inputStream.pipe(new DAGNodeStream({send:send}));streamToValue(outputStream,callback)}_transform(obj,enc,callback){getDagNode(this._send,obj.Hash,(err,node)=>{if(err)return callback(err);const dag={path:obj.Name,hash:obj.Hash,size:node.size};this.push(dag),callback(null)})}}module.exports=DAGNodeStream},function(module,exports,__webpack_require__){function DecoderBuffer(base,options){return Reporter.call(this,options),Buffer.isBuffer(base)?(this.base=base,this.offset=0,void(this.length=base.length)):void 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}}var inherits=__webpack_require__(1),Reporter=__webpack_require__(25).Reporter,Buffer=__webpack_require__(0).Buffer;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)}},function(module,exports,__webpack_require__){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=__webpack_require__(127)},function(module,exports,__webpack_require__){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;var tagStr=der.tag[tag];return{cls:cls,primitive:primitive,tag:tag,tagStr:tagStr}}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<num;i++){len<<=8;var j=buf.readUInt8(fail);if(buf.isError(j))return j;len|=j}return len}var inherits=__webpack_require__(1),asn1=__webpack_require__(18),base=asn1.base,bignum=asn1.bignum,der=asn1.constants.der;module.exports=DERDecoder,DERDecoder.prototype.decode=function(data,options){return data instanceof base.DecoderBuffer||(data=new base.DecoderBuffer(data,options)),this.tree._decode(data,options)},inherits(DERNode,base.Node),DERNode.prototype._peekTag=function(buffer,tag,any){if(buffer.isEmpty())return!1;var state=buffer.save(),decodedTag=derDecodeTag(buffer,'Failed to peek tag: "'+tag+'"');return buffer.isError(decodedTag)?decodedTag:(buffer.restore(state),decodedTag.tag===tag||decodedTag.tagStr===tag||decodedTag.tagStr+"of"===tag||any)},DERNode.prototype._decodeTag=function(buffer,tag,any){var decodedTag=derDecodeTag(buffer,'Failed to decode tag of "'+tag+'"');if(buffer.isError(decodedTag))return decodedTag;var len=derDecodeLen(buffer,decodedTag.primitive,'Failed to get length of "'+tag+'"');if(buffer.isError(len))return len;if(!any&&decodedTag.tag!==tag&&decodedTag.tagStr!==tag&&decodedTag.tagStr+"of"!==tag)return buffer.error('Failed to match tag: "'+tag+'"');if(decodedTag.primitive||null!==len)return buffer.skip(len,'Failed to match body of: "'+tag+'"');var state=buffer.save(),res=this._skipUntilEnd(buffer,'Failed to skip indefinite length body: "'+this.tag+'"');return buffer.isError(res)?res:(len=buffer.offset-state.offset,buffer.restore(state),buffer.skip(len,'Failed to match body of: "'+tag+'"'))},DERNode.prototype._skipUntilEnd=function(buffer,fail){for(;;){var tag=derDecodeTag(buffer,fail);if(buffer.isError(tag))return tag;var len=derDecodeLen(buffer,tag.primitive,fail);if(buffer.isError(len))return len;var res;if(res=tag.primitive||null!==len?buffer.skip(len):this._skipUntilEnd(buffer,fail),buffer.isError(res))return res;if("end"===tag.tagStr)break}},DERNode.prototype._decodeList=function(buffer,tag,decoder,options){for(var result=[];!buffer.isEmpty();){var possibleEnd=this._peekTag(buffer,"end");if(buffer.isError(possibleEnd))return possibleEnd;var res=decoder.decode(buffer,"der",options);if(buffer.isError(res)&&possibleEnd)break;result.push(res)}return result},DERNode.prototype._decodeStr=function(buffer,tag){if("bitstr"===tag){var unused=buffer.readUInt8();return buffer.isError(unused)?unused:{unused:unused,data:buffer.raw()}}if("bmpstr"===tag){var raw=buffer.raw();if(raw.length%2===1)return buffer.error("Decoding of string type: bmpstr length mismatch");for(var str="",i=0;i<raw.length/2;i++)str+=String.fromCharCode(raw.readUInt16BE(2*i));return str}if("numstr"===tag){var numstr=buffer.raw().toString("ascii");return this._isNumstr(numstr)?numstr:buffer.error("Decoding of string type: numstr unsupported characters")}if("octstr"===tag)return buffer.raw();if("objDesc"===tag)return buffer.raw();if("printstr"===tag){var printstr=buffer.raw().toString("ascii");return this._isPrintstr(printstr)?printstr:buffer.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(tag)?buffer.raw().toString():buffer.error("Decoding of string type: "+tag+" unsupported")},DERNode.prototype._decodeObjid=function(buffer,values,relative){for(var result,identifiers=[],ident=0;!buffer.isEmpty();){var subident=buffer.readUInt8();ident<<=7,ident|=127&subident,0===(128&subident)&&(identifiers.push(ident),ident=0)}128&subident&&identifiers.push(ident);var first=identifiers[0]/40|0,second=identifiers[0]%40;if(result=relative?identifiers:[first,second].concat(identifiers.slice(1)),values){var tmp=values[result.join(" ")];void 0===tmp&&(tmp=values[result.join(".")]),void 0!==tmp&&(result=tmp)}return result},DERNode.prototype._decodeTime=function(buffer,tag){var str=buffer.raw().toString();if("gentime"===tag)var year=0|str.slice(0,4),mon=0|str.slice(4,6),day=0|str.slice(6,8),hour=0|str.slice(8,10),min=0|str.slice(10,12),sec=0|str.slice(12,14);else{if("utctime"!==tag)return buffer.error("Decoding "+tag+" time is not supported yet");var year=0|str.slice(0,2),mon=0|str.slice(2,4),day=0|str.slice(4,6),hour=0|str.slice(6,8),min=0|str.slice(8,10),sec=0|str.slice(10,12);year=year<70?2e3+year:1900+year}return Date.UTC(year,mon-1,day,hour,min,sec,0)},DERNode.prototype._decodeNull=function(buffer){return null},DERNode.prototype._decodeBool=function(buffer){var res=buffer.readUInt8();return buffer.isError(res)?res:0!==res},DERNode.prototype._decodeInt=function(buffer,values){var raw=buffer.raw(),res=new bignum(raw);return values&&(res=values[res.toString(10)]||res),res},DERNode.prototype._use=function(entity,obj){return"function"==typeof entity&&(entity=entity(obj)),entity._getDecoder("der").tree}},function(module,exports,__webpack_require__){function DEREncoder(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 two(num){return num<10?"0"+num:num}function encodeTag(tag,primitive,cls,reporter){var res;if("seqof"===tag?tag="seq":"setof"===tag&&(tag="set"),der.tagByName.hasOwnProperty(tag))res=der.tagByName[tag];else{if("number"!=typeof tag||(0|tag)!==tag)return reporter.error("Unknown tag: "+tag);res=tag}return res>=31?reporter.error("Multi-octet tag encoding unsupported"):(primitive||(res|=32),res|=der.tagClassByName[cls||"universal"]<<6)}var inherits=__webpack_require__(1),Buffer=__webpack_require__(0).Buffer,asn1=__webpack_require__(18),base=asn1.base,der=asn1.constants.der;module.exports=DEREncoder,DEREncoder.prototype.encode=function(data,reporter){return this.tree._encode(data,reporter).join()},inherits(DERNode,base.Node),DERNode.prototype._encodeComposite=function(tag,primitive,cls,content){var encodedTag=encodeTag(tag,primitive,cls,this.reporter);if(content.length<128){var header=new Buffer(2);return header[0]=encodedTag,header[1]=content.length,this._createEncoderBuffer([header,content])}for(var lenOctets=1,i=content.length;i>=256;i>>=8)lenOctets++;var header=new Buffer(2+lenOctets);header[0]=encodedTag,header[1]=128|lenOctets;for(var i=1+lenOctets,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<str.length;i++)buf.writeUInt16BE(str.charCodeAt(i),2*i);return this._createEncoderBuffer(buf)}return"numstr"===tag?this._isNumstr(str)?this._createEncoderBuffer(str):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===tag?this._isPrintstr(str)?this._createEncoderBuffer(str):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(tag)?this._createEncoderBuffer(str):"objDesc"===tag?this._createEncoderBuffer(str):this.reporter.error("Encoding of string type: "+tag+" unsupported")},DERNode.prototype._encodeObjid=function(id,values,relative){if("string"==typeof id){if(!values)return this.reporter.error("string objid given, but no values map found");if(!values.hasOwnProperty(id))return this.reporter.error("objid not found in values map");id=values[id].split(/[\s\.]+/g);for(var i=0;i<id.length;i++)id[i]|=0}else if(Array.isArray(id)){id=id.slice();for(var i=0;i<id.length;i++)id[i]|=0}if(!Array.isArray(id))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(id));if(!relative){if(id[1]>=40)return this.reporter.error("Second objid identifier OOB");id.splice(0,2,40*id[0]+id[1])}for(var size=0,i=0;i<id.length;i++){var ident=id[i];for(size++;ident>=128;ident>>=7)size++}for(var objid=new Buffer(size),offset=objid.length-1,i=id.length-1;i>=0;i--){var 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]);for(var size=1,i=num;i>=256;i>>=8)size++;for(var out=new Array(size),i=out.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<data.length;i++)if(data[i]!==state.defaultBuffer[i])return!1;return!0}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _setImmediate=__webpack_require__(140),_setImmediate2=_interopRequireDefault(_setImmediate);exports.default=_setImmediate2.default,module.exports=exports.default},function(module,exports,__webpack_require__){(function(Buffer){function StreamCipher(mode,key,iv,decrypt){if(!(this instanceof StreamCipher))return new StreamCipher(mode,key,iv);Transform.call(this),this._finID=Buffer.concat([iv,new Buffer([0,0,0,1])]),iv=Buffer.concat([iv,new Buffer([0,0,0,2])]),this._cipher=new aes.AES(key),this._prev=new Buffer(iv.length),this._cache=new Buffer(""),this._secCache=new Buffer(""),this._decrypt=decrypt,this._alen=0,this._len=0,iv.copy(this._prev),this._mode=mode;var h=new Buffer(4);h.fill(0),this._ghash=new GHASH(this._cipher.encryptBlock(h)),this._authTag=null,this._called=!1}function xorTest(a,b){var out=0;a.length!==b.length&&out++;for(var len=Math.min(a.length,b.length),i=-1;++i<len;)out+=a[i]^b[i];return out}var aes=__webpack_require__(34),Transform=__webpack_require__(36),inherits=__webpack_require__(1),GHASH=__webpack_require__(153),xor=__webpack_require__(27);inherits(StreamCipher,Transform),module.exports=StreamCipher,StreamCipher.prototype._update=function(chunk){if(!this._called&&this._alen){var rump=16-this._alen%16;rump<16&&(rump=new Buffer(rump),rump.fill(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){if(xorTest(tag,this._authTag))throw new Error("Unsupported state or unable to authenticate data")}else this._authTag=tag;this._cipher.scrub()},StreamCipher.prototype.getAuthTag=function(){if(!this._decrypt&&Buffer.isBuffer(this._authTag))return this._authTag;throw new Error("Attempting to get auth tag in unsupported state")},StreamCipher.prototype.setAuthTag=function(tag){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=tag},StreamCipher.prototype.setAAD=function(buf){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(buf),this._alen+=buf.length}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){var xor=__webpack_require__(27);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)}},function(module,exports,__webpack_require__){(function(Buffer){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}var xor=__webpack_require__(27);exports.encrypt=function(self,data,decrypt){for(var len,out=new Buffer("");data.length;){if(0===self._cache.length&&(self._cache=self._cipher.encryptBlock(self._prev),self._prev=new Buffer("")),!(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}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function encryptByte(self,byteParam,decrypt){for(var pad,bit,value,i=-1,len=8,out=0;++i<len;)pad=self._cipher.encryptBlock(self._prev),
bit=byteParam&1<<7-i?128:0,value=pad[0]^bit,out+=(128&value)>>i%8,self._prev=shiftIn(self._prev,decrypt?bit:value);return out}function shiftIn(buffer,value){var len=buffer.length,i=-1,out=new Buffer(buffer.length);for(buffer=Buffer.concat([buffer,new Buffer([value])]);++i<len;)out[i]=buffer[i]<<1|buffer[i+1]>>7;return out}exports.encrypt=function(self,chunk,decrypt){for(var len=chunk.length,out=new Buffer(len),i=-1;++i<len;)out[i]=encryptByte(self,chunk[i],decrypt);return out}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function encryptByte(self,byteParam,decrypt){var pad=self._cipher.encryptBlock(self._prev),out=pad[0]^byteParam;return self._prev=Buffer.concat([self._prev.slice(1),new Buffer([decrypt?byteParam:out])]),out}exports.encrypt=function(self,chunk,decrypt){for(var len=chunk.length,out=new Buffer(len),i=-1;++i<len;)out[i]=encryptByte(self,chunk[i],decrypt);return out}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){exports.encrypt=function(self,block){return self._cipher.encryptBlock(block)},exports.decrypt=function(self,block){return self._cipher.decryptBlock(block)}},function(module,exports,__webpack_require__){(function(Buffer){function getBlock(self){return self._prev=self._cipher.encryptBlock(self._prev),self._prev}var xor=__webpack_require__(27);exports.encrypt=function(self,chunk){for(;self._cache.length<chunk.length;)self._cache=Buffer.concat([self._cache,getBlock(self)]);var pad=self._cache.slice(0,chunk.length);return self._cache=self._cache.slice(chunk.length),xor(chunk,pad)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function StreamCipher(mode,key,iv,decrypt){return this instanceof StreamCipher?(Transform.call(this),this._cipher=new aes.AES(key),this._prev=new Buffer(iv.length),this._cache=new Buffer(""),this._secCache=new Buffer(""),this._decrypt=decrypt,iv.copy(this._prev),void(this._mode=mode)):new StreamCipher(mode,key,iv)}var aes=__webpack_require__(34),Transform=__webpack_require__(36),inherits=__webpack_require__(1);inherits(StreamCipher,Transform),module.exports=StreamCipher,StreamCipher.prototype._update=function(chunk){return this._mode.encrypt(this,chunk,this._decrypt)},StreamCipher.prototype._final=function(){this._cipher.scrub()}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),mh=__webpack_require__(14),multibase=__webpack_require__(236),multicodec=__webpack_require__(239),codecs=__webpack_require__(156),CID=function(){function CID(version,codec,multihash){if(_classCallCheck(this,CID),"string"==typeof version)if(multibase.isEncoded(version)){var cid=multibase.decode(version);this.version=parseInt(cid.slice(0,1).toString("hex"),16),this.codec=multicodec.getCodec(cid.slice(1)),this.multihash=multicodec.rmPrefix(cid.slice(1))}else this.codec="dag-pb",this.multihash=mh.fromB58String(version),this.version=0;else if(Buffer.isBuffer(version)){var firstByte=version.slice(0,1),v=parseInt(firstByte.toString("hex"),16);if(0===v||1===v){var _cid=version;this.version=v,this.codec=multicodec.getCodec(_cid.slice(1)),this.multihash=multicodec.rmPrefix(_cid.slice(1))}else this.codec="dag-pb",this.multihash=version,this.version=0}else if("number"==typeof version){if("string"!=typeof codec)throw new Error("codec must be string");if(0!==version&&1!==version)throw new Error("version must be a number equal to 0 or 1");mh.validate(multihash),this.codec=codec,this.version=version,this.multihash=multihash}}return _createClass(CID,[{key:"toV0",value:function(){return this.multihash}},{key:"toV1",value:function(){return this.buffer}},{key:"toBaseEncodedString",value:function(base){switch(base=base||"base58btc",this.version){case 0:return mh.toB58String(this.multihash);case 1:return multibase.encode(base,this.buffer).toString();default:throw new Error("Unsupported version")}}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(other){return this.codec===other.codec&&this.version===other.version&&this.multihash.equals(other.multihash)}},{key:"buffer",get:function(){switch(this.version){case 0:return this.multihash;case 1:return Buffer.concat([Buffer("01","hex"),Buffer(codecs[this.codec]),this.multihash]);default:throw new Error("unsupported version")}}}]),CID}();CID.codecs=codecs,CID.isCID=function(other){return"CID"===other.constructor.name},module.exports=CID}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(process){function ReadableState(options,stream){Duplex=Duplex||__webpack_require__(19),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){return Duplex=Duplex||__webpack_require__(19),this instanceof Readable?(this._readableState=new ReadableState(options,this),this.readable=!0,options&&"function"==typeof options.read&&(this._read=options.read),void Stream.call(this)):new Readable(options)}function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(null===chunk)state.reading=!1,onEofChunk(stream,state);else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{var skipAdd;!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk),skipAdd=!state.objectMode&&0===chunk.length),addToFront||(state.reading=!1),skipAdd||(state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream))),maybeReadMore(stream,state)}else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return 0===state.length&&state.ended?0:state.objectMode?0===n?0:1:null===n||isNaN(n)?state.flowing&&state.buffer.length?state.buffer[0].length:state.length:n<=0?0:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n>state.length?state.ended?state.length:(state.needReadable=!0,0):n)}function chunkInvalid(state,chunk){var er=null;return Buffer.isBuffer(chunk)||"string"==typeof chunk||null===chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,processNextTick(resume_,stream,state))}function resume_(stream,state){state.reading||(debug("resume read 0"),stream.read(0)),state.resumeScheduled=!1,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;if(debug("flow",state.flowing),state.flowing)do var chunk=stream.read();while(null!==chunk&&state.flowing)}function fromList(n,state){var ret,list=state.buffer,length=state.length,stringMode=!!state.decoder,objectMode=!!state.objectMode;if(0===list.length)return null;if(0===length)ret=null;else if(objectMode)ret=list.shift();else if(!n||n>=length)ret=stringMode?list.join(""):1===list.length?list[0]:Buffer.concat(list,length),list.length=0;else if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n),list[0]=buf.slice(n)}else if(n===list[0].length)ret=list.shift();else{ret=stringMode?"":new Buffer(n);for(var c=0,i=0,l=list.length;i<l&&c<n;i++){var buf=list[0],cpy=Math.min(n-c,buf.length);stringMode?ret+=buf.slice(0,cpy):buf.copy(ret,c,0,cpy),cpy<buf.length?list[0]=buf.slice(cpy):list.shift(),c+=cpy}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error("endReadable called on non-empty stream");state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var processNextTick=__webpack_require__(9),isArray=__webpack_require__(21),Buffer=__webpack_require__(0).Buffer;Readable.ReadableState=ReadableState;var Stream,EElistenerCount=(__webpack_require__(6),function(emitter,type){return emitter.listeners(type).length});!function(){try{Stream=__webpack_require__(5)}catch(_){}finally{Stream||(Stream=__webpack_require__(6).EventEmitter)}}();var Buffer=__webpack_require__(0).Buffer,util=__webpack_require__(3);util.inherits=__webpack_require__(1);var debugUtil=__webpack_require__(349),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder;util.inherits(Readable,Stream);var Duplex,Duplex;Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return state.objectMode||"string"!=typeof chunk||(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=new Buffer(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.isPaused=function(){return this._readableState.flowing===!1},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n);var state=this._readableState,nOrig=n;if(("number"!=typeof n||n>0)&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),(state.ended||state.reading)&&(doRead=!1,debug("reading or ended",doRead)),doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1),doRead&&!state.reading&&(n=howMuchToRead(nOrig,state));var ret;return ret=n>0?fromList(n,state):null,null===ret&&(state.needReadable=!0,n=0),state.length-=n,0!==state.length||state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&0===state.length&&endReadable(this),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata");var ret=dest.write(chunk);!1===ret&&(1!==state.pipesCount||state.pipes[0]!==dest||1!==src.listenerCount("data")||cleanedUp||(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;return src.on("data",ondata),dest._events&&dest._events.error?isArray(dest._events.error)?dest._events.error.unshift(onerror):dest._events.error=[onerror,dest._events.error]:dest.on("error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var _i=0;_i<len;_i++)dests[_i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);return i===-1?this:(state.pipes.splice(i,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev&&!1!==this._readableState.flowing&&this.resume(),"readable"===ev&&!this._readableState.endEmitted){var state=this._readableState;state.readableListening||(state.readableListening=!0,state.emittedReadable=!1,state.needReadable=!0,state.reading?state.length&&emitReadable(this,state):processNextTick(nReadingNextTick,this))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),(!state.objectMode||null!==chunk&&void 0!==chunk)&&(state.objectMode||chunk&&chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function TransformState(stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null,ts.writecb=null,null!==data&&void 0!==data&&stream.push(data),cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState=new TransformState(this);var stream=this;this._readableState.needReadable=!0,this._readableState.sync=!1,options&&("function"==typeof options.transform&&(this._transform=options.transform),"function"==typeof options.flush&&(this._flush=options.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(er){done(stream,er)}):done(stream)})}function done(stream,er){if(er)return stream.emit("error",er);var ws=stream._writableState,ts=stream._transformState;if(ws.length)throw new Error("calling transform done when ws.length != 0");if(ts.transforming)throw new Error("calling transform done when still transforming");return stream.push(null)}module.exports=Transform;var Duplex=__webpack_require__(19),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;null!==ts.writechunk&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0}},function(module,exports,__webpack_require__){"use strict";(function(process,setImmediate){function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk,this.encoding=encoding,this.callback=cb,this.next=null}function WritableState(options,stream){Duplex=Duplex||__webpack_require__(19),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this),this.corkedRequestsFree.next=new CorkedRequest(this)}function Writable(options){return Duplex=Duplex||__webpack_require__(19),this instanceof Writable||this instanceof Duplex?(this._writableState=new WritableState(options,this),this.writable=!0,options&&("function"==typeof options.write&&(this._write=options.write),"function"==typeof options.writev&&(this._writev=options.writev)),void Stream.call(this)):new Writable(options)}function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er),processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=!0;if(!Buffer.isBuffer(chunk)&&"string"!=typeof chunk&&null!==chunk&&void 0!==chunk&&!state.objectMode){var er=new TypeError("Invalid non-string/buffer chunk");stream.emit("error",er),processNextTick(cb,er),valid=!1}return valid}function decodeChunk(state,chunk,encoding){return state.objectMode||state.decodeStrings===!1||"string"!=typeof chunk||(chunk=new Buffer(chunk,encoding)),chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding),Buffer.isBuffer(chunk)&&(encoding="buffer");var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest=new WriteReq(chunk,encoding,cb),last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){--state.pendingcb,sync?processNextTick(cb,er):cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);finished||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(stream,state),sync?asyncWrite(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0;entry;)buffer[count]=entry,entry=entry.next,count+=1;doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,state.corkedRequestsFree=holder.next,holder.next=null}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,!1,len,chunk,encoding,cb),entry=entry.next,state.writing)break}null===entry&&(state.lastBufferedRequest=null)}state.bufferedRequestCount=0,state.bufferedRequest=entry,state.bufferProcessing=!1}function needFinish(state){return state.ending&&0===state.length&&null===state.bufferedRequest&&!state.finished&&!state.writing}function prefinish(stream,state){state.prefinished||(state.prefinished=!0,stream.emit("prefinish"))}function finishMaybe(stream,state){var need=needFinish(state);return need&&(0===state.pendingcb?(prefinish(stream,state),state.finished=!0,stream.emit("finish")):prefinish(stream,state)),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?processNextTick(cb):stream.once("finish",cb)),state.ended=!0,stream.writable=!1}function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(err){var entry=_this.entry;for(_this.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree?state.corkedRequestsFree.next=_this:state.corkedRequestsFree=_this}}module.exports=Writable;var processNextTick=__webpack_require__(9),asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick,Buffer=__webpack_require__(0).Buffer;Writable.WritableState=WritableState;var util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Stream,internalUtil={deprecate:__webpack_require__(30)};!function(){try{Stream=__webpack_require__(5)}catch(_){}finally{Stream||(Stream=__webpack_require__(6).EventEmitter)}}();var Buffer=__webpack_require__(0).Buffer;util.inherits(Writable,Stream);var Duplex;WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(_){}}();var Duplex;Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return"function"==typeof encoding&&(cb=encoding,encoding=null),Buffer.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?writeAfterEnd(this,cb):validChunk(this,state,chunk,cb)&&(state.pendingcb++,ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){var state=this._writableState;state.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)}}).call(exports,__webpack_require__(2),__webpack_require__(13).setImmediate)},function(module,exports,__webpack_require__){(function(Buffer){function EVP_BytesToKey(password,salt,keyLen,ivLen){Buffer.isBuffer(password)||(password=new Buffer(password,"binary")),salt&&!Buffer.isBuffer(salt)&&(salt=new Buffer(salt,"binary")),keyLen/=8,ivLen=ivLen||0;for(var md_buf,i,ki=0,ii=0,key=new Buffer(keyLen),iv=new Buffer(ivLen),addmd=0,bufs=[];;){if(addmd++>0&&bufs.push(md_buf),bufs.push(password),salt&&bufs.push(salt),md_buf=md5(Buffer.concat(bufs)),bufs=[],i=0,keyLen>0)for(;;){if(0===keyLen)break;if(i===md_buf.length)break;key[ki++]=md_buf[i],keyLen--,i++}if(ivLen>0&&i!==md_buf.length)for(;;){if(0===ivLen)break;if(i===md_buf.length)break;iv[ii++]=md_buf[i],ivLen--,i++}if(0===keyLen&&0===ivLen)break}for(i=0;i<md_buf.length;i++)md_buf[i]=0;return{key:key,iv:iv}}var md5=__webpack_require__(161);module.exports=EVP_BytesToKey}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";exports.DAGNode=__webpack_require__(50),exports.DAGLink=__webpack_require__(20),exports.resolver=__webpack_require__(177),exports.util=__webpack_require__(51)},function(module,exports){function isPromise(obj){return obj&&"function"==typeof obj.then}module.exports=isPromise},function(module,exports,__webpack_require__){(function(process,global){!function(root){"use strict";function Keccak(bits,padding,outputBits){this.blocks=[],this.s=[],this.padding=padding,this.outputBits=outputBits,this.reset=!0,this.block=0,this.start=0,this.blockCount=1600-(bits<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=outputBits>>5,this.extraBytes=(31&outputBits)>>3;for(var i=0;i<50;++i)this.s[i]=0}var NODE_JS="object"==typeof process&&process.versions&&process.versions.node;NODE_JS&&(root=global);for(var COMMON_JS=!root.JS_SHA3_TEST&&"object"==typeof module&&module.exports,HEX_CHARS="0123456789abcdef".split(""),SHAKE_PADDING=[31,7936,2031616,520093696],KECCAK_PADDING=[1,256,65536,16777216],PADDING=[6,1536,393216,100663296],SHIFT=[0,8,16,24],RC=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],BITS=[224,256,384,512],SHAKE_BITS=[128,256],OUTPUT_TYPES=["hex","buffer","arrayBuffer","array"],createOutputMethod=function(bits,padding,outputType){return function(message){return new Keccak(bits,padding,bits).update(message)[outputType]()}},createShakeOutputMethod=function(bits,padding,outputType){return function(message,outputBits){return new Keccak(bits,padding,outputBits).update(message)[outputType]()}},createMethod=function(bits,padding){var method=createOutputMethod(bits,padding,"hex");method.create=function(){return new Keccak(bits,padding,bits)},method.update=function(message){return method.create().update(message)};for(var i=0;i<OUTPUT_TYPES.length;++i){
var type=OUTPUT_TYPES[i];method[type]=createOutputMethod(bits,padding,type)}return method},createShakeMethod=function(bits,padding){var method=createShakeOutputMethod(bits,padding,"hex");method.create=function(outputBits){return new Keccak(bits,padding,outputBits)},method.update=function(message,outputBits){return method.create(outputBits).update(message)};for(var i=0;i<OUTPUT_TYPES.length;++i){var type=OUTPUT_TYPES[i];method[type]=createShakeOutputMethod(bits,padding,type)}return method},algorithms=[{name:"keccak",padding:KECCAK_PADDING,bits:BITS,createMethod:createMethod},{name:"sha3",padding:PADDING,bits:BITS,createMethod:createMethod},{name:"shake",padding:SHAKE_PADDING,bits:SHAKE_BITS,createMethod:createShakeMethod}],methods={},i=0;i<algorithms.length;++i)for(var algorithm=algorithms[i],bits=algorithm.bits,j=0;j<bits.length;++j)methods[algorithm.name+"_"+bits[j]]=algorithm.createMethod(bits[j],algorithm.padding);Keccak.prototype.update=function(message){var notString="string"!=typeof message;notString&&message.constructor==root.ArrayBuffer&&(message=new Uint8Array(message));for(var i,code,length=message.length,blocks=this.blocks,byteCount=this.byteCount,blockCount=this.blockCount,index=0,s=this.s;index<length;){if(this.reset)for(this.reset=!1,blocks[0]=this.block,i=1;i<blockCount+1;++i)blocks[i]=0;if(notString)for(i=this.start;index<length&&i<byteCount;++index)blocks[i>>2]|=message[index]<<SHIFT[3&i++];else for(i=this.start;index<length&&i<byteCount;++index)code=message.charCodeAt(index),code<128?blocks[i>>2]|=code<<SHIFT[3&i++]:code<2048?(blocks[i>>2]|=(192|code>>6)<<SHIFT[3&i++],blocks[i>>2]|=(128|63&code)<<SHIFT[3&i++]):code<55296||code>=57344?(blocks[i>>2]|=(224|code>>12)<<SHIFT[3&i++],blocks[i>>2]|=(128|code>>6&63)<<SHIFT[3&i++],blocks[i>>2]|=(128|63&code)<<SHIFT[3&i++]):(code=65536+((1023&code)<<10|1023&message.charCodeAt(++index)),blocks[i>>2]|=(240|code>>18)<<SHIFT[3&i++],blocks[i>>2]|=(128|code>>12&63)<<SHIFT[3&i++],blocks[i>>2]|=(128|code>>6&63)<<SHIFT[3&i++],blocks[i>>2]|=(128|63&code)<<SHIFT[3&i++]);if(this.lastByteIndex=i,i>=byteCount){for(this.start=i-byteCount,this.block=blocks[blockCount],i=0;i<blockCount;++i)s[i]^=blocks[i];f(s),this.reset=!0}else this.start=i}return this},Keccak.prototype.finalize=function(){var blocks=this.blocks,i=this.lastByteIndex,blockCount=this.blockCount,s=this.s;if(blocks[i>>2]|=this.padding[3&i],this.lastByteIndex==this.byteCount)for(blocks[0]=blocks[blockCount],i=1;i<blockCount+1;++i)blocks[i]=0;for(blocks[blockCount-1]|=2147483648,i=0;i<blockCount;++i)s[i]^=blocks[i];f(s)},Keccak.prototype.toString=Keccak.prototype.hex=function(){this.finalize();for(var block,blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0,hex="";j<outputBlocks;){for(i=0;i<blockCount&&j<outputBlocks;++i,++j)block=s[i],hex+=HEX_CHARS[block>>4&15]+HEX_CHARS[15&block]+HEX_CHARS[block>>12&15]+HEX_CHARS[block>>8&15]+HEX_CHARS[block>>20&15]+HEX_CHARS[block>>16&15]+HEX_CHARS[block>>28&15]+HEX_CHARS[block>>24&15];j%blockCount==0&&(f(s),i=0)}return extraBytes&&(block=s[i],extraBytes>0&&(hex+=HEX_CHARS[block>>4&15]+HEX_CHARS[15&block]),extraBytes>1&&(hex+=HEX_CHARS[block>>12&15]+HEX_CHARS[block>>8&15]),extraBytes>2&&(hex+=HEX_CHARS[block>>20&15]+HEX_CHARS[block>>16&15])),hex},Keccak.prototype.arrayBuffer=function(){this.finalize();var buffer,blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0,bytes=this.outputBits>>3;buffer=extraBytes?new ArrayBuffer(outputBlocks+1<<2):new ArrayBuffer(bytes);for(var array=new Uint32Array(buffer);j<outputBlocks;){for(i=0;i<blockCount&&j<outputBlocks;++i,++j)array[j]=s[i];j%blockCount==0&&f(s)}return extraBytes&&(array[i]=s[i],buffer=buffer.slice(0,bytes)),buffer},Keccak.prototype.buffer=Keccak.prototype.arrayBuffer,Keccak.prototype.digest=Keccak.prototype.array=function(){this.finalize();for(var offset,block,blockCount=this.blockCount,s=this.s,outputBlocks=this.outputBlocks,extraBytes=this.extraBytes,i=0,j=0,array=[];j<outputBlocks;){for(i=0;i<blockCount&&j<outputBlocks;++i,++j)offset=j<<2,block=s[i],array[offset]=255&block,array[offset+1]=block>>8&255,array[offset+2]=block>>16&255,array[offset+3]=block>>24&255;j%blockCount==0&&f(s)}return extraBytes&&(offset=j<<2,block=s[i],extraBytes>0&&(array[offset]=255&block),extraBytes>1&&(array[offset+1]=block>>8&255),extraBytes>2&&(array[offset+2]=block>>16&255)),array};var f=function(s){var h,l,n,c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20,b21,b22,b23,b24,b25,b26,b27,b28,b29,b30,b31,b32,b33,b34,b35,b36,b37,b38,b39,b40,b41,b42,b43,b44,b45,b46,b47,b48,b49;for(n=0;n<48;n+=2)c0=s[0]^s[10]^s[20]^s[30]^s[40],c1=s[1]^s[11]^s[21]^s[31]^s[41],c2=s[2]^s[12]^s[22]^s[32]^s[42],c3=s[3]^s[13]^s[23]^s[33]^s[43],c4=s[4]^s[14]^s[24]^s[34]^s[44],c5=s[5]^s[15]^s[25]^s[35]^s[45],c6=s[6]^s[16]^s[26]^s[36]^s[46],c7=s[7]^s[17]^s[27]^s[37]^s[47],c8=s[8]^s[18]^s[28]^s[38]^s[48],c9=s[9]^s[19]^s[29]^s[39]^s[49],h=c8^(c2<<1|c3>>>31),l=c9^(c3<<1|c2>>>31),s[0]^=h,s[1]^=l,s[10]^=h,s[11]^=l,s[20]^=h,s[21]^=l,s[30]^=h,s[31]^=l,s[40]^=h,s[41]^=l,h=c0^(c4<<1|c5>>>31),l=c1^(c5<<1|c4>>>31),s[2]^=h,s[3]^=l,s[12]^=h,s[13]^=l,s[22]^=h,s[23]^=l,s[32]^=h,s[33]^=l,s[42]^=h,s[43]^=l,h=c2^(c6<<1|c7>>>31),l=c3^(c7<<1|c6>>>31),s[4]^=h,s[5]^=l,s[14]^=h,s[15]^=l,s[24]^=h,s[25]^=l,s[34]^=h,s[35]^=l,s[44]^=h,s[45]^=l,h=c4^(c8<<1|c9>>>31),l=c5^(c9<<1|c8>>>31),s[6]^=h,s[7]^=l,s[16]^=h,s[17]^=l,s[26]^=h,s[27]^=l,s[36]^=h,s[37]^=l,s[46]^=h,s[47]^=l,h=c6^(c0<<1|c1>>>31),l=c7^(c1<<1|c0>>>31),s[8]^=h,s[9]^=l,s[18]^=h,s[19]^=l,s[28]^=h,s[29]^=l,s[38]^=h,s[39]^=l,s[48]^=h,s[49]^=l,b0=s[0],b1=s[1],b32=s[11]<<4|s[10]>>>28,b33=s[10]<<4|s[11]>>>28,b14=s[20]<<3|s[21]>>>29,b15=s[21]<<3|s[20]>>>29,b46=s[31]<<9|s[30]>>>23,b47=s[30]<<9|s[31]>>>23,b28=s[40]<<18|s[41]>>>14,b29=s[41]<<18|s[40]>>>14,b20=s[2]<<1|s[3]>>>31,b21=s[3]<<1|s[2]>>>31,b2=s[13]<<12|s[12]>>>20,b3=s[12]<<12|s[13]>>>20,b34=s[22]<<10|s[23]>>>22,b35=s[23]<<10|s[22]>>>22,b16=s[33]<<13|s[32]>>>19,b17=s[32]<<13|s[33]>>>19,b48=s[42]<<2|s[43]>>>30,b49=s[43]<<2|s[42]>>>30,b40=s[5]<<30|s[4]>>>2,b41=s[4]<<30|s[5]>>>2,b22=s[14]<<6|s[15]>>>26,b23=s[15]<<6|s[14]>>>26,b4=s[25]<<11|s[24]>>>21,b5=s[24]<<11|s[25]>>>21,b36=s[34]<<15|s[35]>>>17,b37=s[35]<<15|s[34]>>>17,b18=s[45]<<29|s[44]>>>3,b19=s[44]<<29|s[45]>>>3,b10=s[6]<<28|s[7]>>>4,b11=s[7]<<28|s[6]>>>4,b42=s[17]<<23|s[16]>>>9,b43=s[16]<<23|s[17]>>>9,b24=s[26]<<25|s[27]>>>7,b25=s[27]<<25|s[26]>>>7,b6=s[36]<<21|s[37]>>>11,b7=s[37]<<21|s[36]>>>11,b38=s[47]<<24|s[46]>>>8,b39=s[46]<<24|s[47]>>>8,b30=s[8]<<27|s[9]>>>5,b31=s[9]<<27|s[8]>>>5,b12=s[18]<<20|s[19]>>>12,b13=s[19]<<20|s[18]>>>12,b44=s[29]<<7|s[28]>>>25,b45=s[28]<<7|s[29]>>>25,b26=s[38]<<8|s[39]>>>24,b27=s[39]<<8|s[38]>>>24,b8=s[48]<<14|s[49]>>>18,b9=s[49]<<14|s[48]>>>18,s[0]=b0^~b2&b4,s[1]=b1^~b3&b5,s[10]=b10^~b12&b14,s[11]=b11^~b13&b15,s[20]=b20^~b22&b24,s[21]=b21^~b23&b25,s[30]=b30^~b32&b34,s[31]=b31^~b33&b35,s[40]=b40^~b42&b44,s[41]=b41^~b43&b45,s[2]=b2^~b4&b6,s[3]=b3^~b5&b7,s[12]=b12^~b14&b16,s[13]=b13^~b15&b17,s[22]=b22^~b24&b26,s[23]=b23^~b25&b27,s[32]=b32^~b34&b36,s[33]=b33^~b35&b37,s[42]=b42^~b44&b46,s[43]=b43^~b45&b47,s[4]=b4^~b6&b8,s[5]=b5^~b7&b9,s[14]=b14^~b16&b18,s[15]=b15^~b17&b19,s[24]=b24^~b26&b28,s[25]=b25^~b27&b29,s[34]=b34^~b36&b38,s[35]=b35^~b37&b39,s[44]=b44^~b46&b48,s[45]=b45^~b47&b49,s[6]=b6^~b8&b0,s[7]=b7^~b9&b1,s[16]=b16^~b18&b10,s[17]=b17^~b19&b11,s[26]=b26^~b28&b20,s[27]=b27^~b29&b21,s[36]=b36^~b38&b30,s[37]=b37^~b39&b31,s[46]=b46^~b48&b40,s[47]=b47^~b49&b41,s[8]=b8^~b0&b2,s[9]=b9^~b1&b3,s[18]=b18^~b10&b12,s[19]=b19^~b11&b13,s[28]=b28^~b20&b22,s[29]=b29^~b21&b23,s[38]=b38^~b30&b32,s[39]=b39^~b31&b33,s[48]=b48^~b40&b42,s[49]=b49^~b41&b43,s[0]^=RC[n],s[1]^=RC[n+1]};if(COMMON_JS)module.exports=methods;else if(root)for(var key in methods)root[key]=methods[key]}(this)}).call(exports,__webpack_require__(2),__webpack_require__(8))},function(module,exports){"use strict";module.exports=`enum KeyType {
RSA = 0;
}
message PublicKey {
required KeyType Type = 1;
required bytes Data = 2;
}
message PrivateKey {
required KeyType Type = 1;
required bytes Data = 2;
}`},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const BN=__webpack_require__(18).bignum;exports.toBase64=function(bn){let s=bn.toBuffer("be").toString("base64");return s.replace(/(=*)$/,"").replace(/\+/g,"-").replace(/\//g,"_")},exports.toBn=function(str){return new BN(Buffer.from(str,"base64"))}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){var root=__webpack_require__(88),Symbol=root.Symbol;module.exports=Symbol},function(module,exports,__webpack_require__){(function(global){var freeGlobal="object"==typeof global&&global&&global.Object===Object&&global;module.exports=freeGlobal}).call(exports,__webpack_require__(8))},function(module,exports,__webpack_require__){var freeGlobal=__webpack_require__(87),freeSelf="object"==typeof self&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")();module.exports=root},function(module,exports){var isArray=Array.isArray;module.exports=isArray},function(module,exports){function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}var MAX_SAFE_INTEGER=9007199254740991;module.exports=isLength},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function Multihashing(buf,func,length,callback){if("function"==typeof length&&(callback=length,length=void 0),!callback)throw new Error("Missing callback");Multihashing.digest(buf,func,length,(err,digest)=>{return err?callback(err):void callback(null,multihash.encode(digest,func,length))})}const multihash=__webpack_require__(14),crypto=__webpack_require__(241);module.exports=Multihashing,Multihashing.Buffer=Buffer,Multihashing.multihash=multihash,Multihashing.digest=function(buf,func,length,callback){if("function"==typeof length&&(callback=length,length=void 0),!callback)throw new Error("Missing callback");let cb=callback;length&&(cb=((err,digest)=>{return err?callback(err):void callback(null,digest.slice(0,length))}));let hash;try{hash=Multihashing.createHash(func)}catch(err){return cb(err)}hash(buf,cb)},Multihashing.createHash=function(func){if(func=multihash.coerceCode(func),!Multihashing.functions[func])throw new Error("multihash function "+func+" not yet supported");return Multihashing.functions[func]},Multihashing.functions={17:crypto.sha1,18:crypto.sha2256,19:crypto.sha2512,20:crypto.sha3}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){function parse(opts){function parseRow(row){try{if(row)return JSON.parse(row)}catch(e){opts.strict&&this.emit("error",new Error("Could not parse row "+row.slice(0,50)+"..."))}}return opts=opts||{},opts.strict=opts.strict!==!1,split(parseRow)}function serialize(opts){return through.obj(opts,function(obj,enc,cb){cb(null,JSON.stringify(obj)+EOL)})}var through=__webpack_require__(248),split=__webpack_require__(278),EOL=__webpack_require__(95).EOL;module.exports=parse,module.exports.serialize=module.exports.stringify=serialize,module.exports.parse=parse},function(module,exports,__webpack_require__){(function(process){function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys},util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Readable=__webpack_require__(244),Writable=__webpack_require__(246);util.inherits(Duplex,Readable),forEach(objectKeys(Writable.prototype),function(method){Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){function once(fn){var f=function(){return f.called?f.value:(f.called=!0,f.value=fn.apply(this,arguments))};return f.called=!1,f}function onceStrict(fn){var f=function(){if(f.called)throw new Error(f.onceError);return f.called=!0,f.value=fn.apply(this,arguments)},name=fn.name||"Function wrapped with `once`";return f.onceError=name+" shouldn't be called more than once",f.called=!1,f}var wrappy=__webpack_require__(118);module.exports=wrappy(once),module.exports.strict=wrappy(onceStrict),once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:!0})})},function(module,exports){exports.endianness=function(){return"LE"},exports.hostname=function(){return"undefined"!=typeof location?location.hostname:""},exports.loadavg=function(){return[]},exports.uptime=function(){return 0},exports.freemem=function(){return Number.MAX_VALUE},exports.totalmem=function(){return Number.MAX_VALUE},exports.cpus=function(){return[]},exports.type=function(){return"Browser"},exports.release=function(){return"undefined"!=typeof navigator?navigator.appVersion:""},exports.networkInterfaces=exports.getNetworkInterfaces=function(){return{}},exports.arch=function(){return"javascript"},exports.platform=function(){return"browser"},exports.tmpdir=exports.tmpDir=function(){return"/tmp"},exports.EOL="\n"},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function toB64Opt(val){if(val)return val.toString("base64")}const mh=__webpack_require__(14),crypto=__webpack_require__(199),assert=__webpack_require__(45),waterfall=__webpack_require__(142);class PeerId{constructor(id,privKey,pubKey){assert(Buffer.isBuffer(id),"invalid id provided"),privKey&&pubKey&&assert(privKey.public.bytes.equals(pubKey.bytes),"inconsistent arguments"),this.id=id,this._privKey=privKey,this._pubKey=pubKey}get privKey(){return this._privKey}get pubKey(){return this._pubKey?this._pubKey:this.privKey?this.privKey.public:void 0}marshalPubKey(){if(this.pubKey)return crypto.marshalPublicKey(this.pubKey)}marshalPrivKey(){if(this.privKey)return crypto.marshalPrivateKey(this.privKey)}toPrint(){return this.toJSON()}toJSON(){return{id:mh.toB58String(this.id),privKey:toB64Opt(this.marshalPrivKey()),pubKey:toB64Opt(this.marshalPubKey())}}toHexString(){return mh.toHexString(this.id)}toBytes(){return this.id}toB58String(){return mh.toB58String(this.id)}}exports=module.exports=PeerId,exports.Buffer=Buffer,exports.create=function(opts,callback){"function"==typeof opts&&(callback=opts,opts={}),opts=opts||{},opts.bits=opts.bits||2048,waterfall([cb=>crypto.generateKeyPair("RSA",opts.bits,cb),(privKey,cb)=>privKey.public.hash((err,digest)=>{cb(err,digest,privKey)})],(err,digest,privKey)=>{return err?callback(err):void callback(null,new PeerId(digest,privKey))})},exports.createFromHexString=function(str){return new PeerId(mh.fromHexString(str))},exports.createFromBytes=function(buf){return new PeerId(buf)},exports.createFromB58String=function(str){return new PeerId(mh.fromB58String(str))},exports.createFromPubKey=function(key,callback){let buf=key;if("string"==typeof buf&&(buf=new Buffer(key,"base64")),"function"!=typeof callback)throw new Error("callback is required");const pubKey=crypto.unmarshalPublicKey(buf);pubKey.hash((err,digest)=>{return err?callback(err):void callback(null,new PeerId(digest,null,pubKey))})},exports.createFromPrivKey=function(key,callback){let buf=key;if("string"==typeof buf&&(buf=new Buffer(key,"base64")),"function"!=typeof callback)throw new Error("callback is required");waterfall([cb=>crypto.unmarshalPrivateKey(buf,cb),(privKey,cb)=>privKey.public.hash((err,digest)=>{cb(err,digest,privKey)})],(err,digest,privKey)=>{return err?callback(err):void callback(null,new PeerId(digest,privKey))})},exports.createFromJSON=function(obj,callback){if("function"!=typeof callback)throw new Error("callback is required");const id=mh.fromB58String(obj.id),rawPrivKey=obj.privKey&&new Buffer(obj.privKey,"base64"),rawPubKey=obj.pubKey&&new Buffer(obj.pubKey,"base64"),pub=rawPubKey&&crypto.unmarshalPublicKey(rawPubKey);rawPrivKey?waterfall([cb=>crypto.unmarshalPrivateKey(rawPrivKey,cb),(priv,cb)=>priv.public.hash((err,digest)=>{cb(err,digest,priv)}),(privDigest,priv,cb)=>{pub?pub.hash((err,pubDigest)=>{cb(err,privDigest,priv,pubDigest)}):cb(null,privDigest,priv)}],(err,privDigest,priv,pubDigest)=>{return err?callback(err):pub&&!privDigest.equals(pubDigest)?callback(new Error("Public and private key do not match")):id&&!privDigest.equals(id)?callback(new Error("Id and private key do not match")):void callback(null,new PeerId(id,priv,pub))}):callback(null,new PeerId(id,null,pub))}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){module.exports={encode:__webpack_require__(259),decode:__webpack_require__(258),encodingLength:__webpack_require__(260)}},function(module,exports){"use strict";var replace=String.prototype.replace,percentTwenties=/%20/g;module.exports={default:"RFC3986",formatters:{RFC1738:function(value){return replace.call(value,percentTwenties,"+")},RFC3986:function(value){return value}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(module,exports){"use strict";var has=Object.prototype.hasOwnProperty,hexTable=function(){for(var array=[],i=0;i<256;++i)array.push("%"+((i<16?"0":"")+i.toString(16)).toUpperCase());return array}();exports.arrayToObject=function(source,options){for(var obj=options&&options.plainObjects?Object.create(null):{},i=0;i<source.length;++i)"undefined"!=typeof source[i]&&(obj[i]=source[i]);return obj},exports.merge=function(target,source,options){if(!source)return target;if("object"!=typeof source){if(Array.isArray(target))target.push(source);else{if("object"!=typeof target)return[target,source];target[source]=!0}return target}if("object"!=typeof target)return[target].concat(source);var mergeTarget=target;return Array.isArray(target)&&!Array.isArray(source)&&(mergeTarget=exports.arrayToObject(target,options)),Array.isArray(target)&&Array.isArray(source)?(source.forEach(function(item,i){has.call(target,i)?target[i]&&"object"==typeof target[i]?target[i]=exports.merge(target[i],item,options):target.push(item):target[i]=item}),target):Object.keys(source).reduce(function(acc,key){var value=source[key];return Object.prototype.hasOwnProperty.call(acc,key)?acc[key]=exports.merge(acc[key],value,options):acc[key]=value,acc},mergeTarget)},exports.decode=function(str){try{return decodeURIComponent(str.replace(/\+/g," "))}catch(e){return str}},exports.encode=function(str){if(0===str.length)return str;for(var string="string"==typeof str?str:String(str),out="",i=0;i<string.length;++i){var c=string.charCodeAt(i);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122?out+=string.charAt(i):c<128?out+=hexTable[c]:c<2048?out+=hexTable[192|c>>6]+hexTable[128|63&c]:c<55296||c>=57344?out+=hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|63&c]:(i+=1,c=65536+((1023&c)<<10|1023&string.charCodeAt(i)),out+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|63&c])}return out},exports.compact=function(obj,references){if("object"!=typeof obj||null===obj)return obj;var refs=references||[],lookup=refs.indexOf(obj);if(lookup!==-1)return refs[lookup];if(refs.push(obj),Array.isArray(obj)){for(var compacted=[],i=0;i<obj.length;++i)obj[i]&&"object"==typeof obj[i]?compacted.push(exports.compact(obj[i],refs)):"undefined"!=typeof obj[i]&&compacted.push(obj[i]);return compacted}var keys=Object.keys(obj);return keys.forEach(function(key){obj[key]=exports.compact(obj[key],refs)}),obj},exports.isRegExp=function(obj){return"[object RegExp]"===Object.prototype.toString.call(obj)},exports.isBuffer=function(obj){return null!==obj&&"undefined"!=typeof obj&&!!(obj.constructor&&obj.constructor.isBuffer&&obj.constructor.isBuffer(obj))}},function(module,exports,__webpack_require__){(function(process){function ReadableState(options,stream){var Duplex=__webpack_require__(22);options=options||{};var hwm=options.highWaterMark,defaultHwm=options.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode),this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){__webpack_require__(22);return this instanceof Readable?(this._readableState=new ReadableState(options,this),this.readable=!0,void Stream.call(this)):new Readable(options)}function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(util.isNullOrUndefined(chunk))state.reading=!1,state.ended||onEofChunk(stream,state);else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk)),addToFront||(state.reading=!1),state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream)),maybeReadMore(stream,state);else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function roundUpToNextPowerOf2(n){if(n>=MAX_HWM)n=MAX_HWM;else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){return 0===state.length&&state.ended?0:state.objectMode?0===n?0:1:isNaN(n)||util.isNull(n)?state.flowing&&state.buffer.length?state.buffer[0].length:state.length:n<=0?0:(n>state.highWaterMark&&(state.highWaterMark=roundUpToNextPowerOf2(n)),n>state.length?state.ended?state.length:(state.needReadable=!0,0):n)}function chunkInvalid(state,chunk){var er=null;return util.isBuffer(chunk)||util.isString(chunk)||util.isNullOrUndefined(chunk)||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?process.nextTick(function(){emitReadable_(stream)}):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,process.nextTick(function(){maybeReadMore_(stream,state)}))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EE.listenerCount(src,"data")&&(state.flowing=!0,flow(src))}}function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,process.nextTick(function(){resume_(stream,state)}))}function resume_(stream,state){state.resumeScheduled=!1,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;if(debug("flow",state.flowing),state.flowing)do var chunk=stream.read();while(null!==chunk&&state.flowing)}function fromList(n,state){var ret,list=state.buffer,length=state.length,stringMode=!!state.decoder,objectMode=!!state.objectMode;if(0===list.length)return null;if(0===length)ret=null;else if(objectMode)ret=list.shift();else if(!n||n>=length)ret=stringMode?list.join(""):Buffer.concat(list,length),list.length=0;else if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n),list[0]=buf.slice(n)}else if(n===list[0].length)ret=list.shift();else{ret=stringMode?"":new Buffer(n);for(var c=0,i=0,l=list.length;i<l&&c<n;i++){var buf=list[0],cpy=Math.min(n-c,buf.length);stringMode?ret+=buf.slice(0,cpy):buf.copy(ret,c,0,cpy),cpy<buf.length?list[0]=buf.slice(cpy):list.shift(),c+=cpy}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error("endReadable called on non-empty stream");state.endEmitted||(state.ended=!0,process.nextTick(function(){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var isArray=__webpack_require__(271),Buffer=__webpack_require__(0).Buffer;Readable.ReadableState=ReadableState;var EE=__webpack_require__(6).EventEmitter;EE.listenerCount||(EE.listenerCount=function(emitter,type){return emitter.listeners(type).length});var Stream=__webpack_require__(5),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var StringDecoder,debug=__webpack_require__(350);debug=debug&&debug.debuglog?debug.debuglog("stream"):function(){},util.inherits(Readable,Stream),Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return util.isString(chunk)&&!state.objectMode&&(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=new Buffer(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n);var state=this._readableState,nOrig=n;if((!util.isNumber(n)||n>0)&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),(state.ended||state.reading)&&(doRead=!1,debug("reading or ended",doRead)),doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1),doRead&&!state.reading&&(n=howMuchToRead(nOrig,state));var ret;return ret=n>0?fromList(n,state):null,util.isNull(ret)&&(state.needReadable=!0,n=0),state.length-=n,0!==state.length||state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&0===state.length&&endReadable(this),util.isNull(ret)||this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata");var ret=dest.write(chunk);!1===ret&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EE.listenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);return dest.on("drain",ondrain),src.on("data",ondata),dest._events&&dest._events.error?isArray(dest._events.error)?dest._events.error.unshift(onerror):dest._events.error=[onerror,dest._events.error]:dest.on("error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);return i===-1?this:(state.pipes.splice(i,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev&&!1!==this._readableState.flowing&&this.resume(),"readable"===ev&&this.readable){var state=this._readableState;if(!state.readableListening)if(state.readableListening=!0,state.emittedReadable=!1,state.needReadable=!0,state.reading)state.length&&emitReadable(this,state);else{var self=this;process.nextTick(function(){debug("readable nexttick read 0"),self.read(0)})}}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,state.reading||(debug("resume read 0"),this.read(0)),resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),chunk&&(state.objectMode||chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)util.isFunction(stream[i])&&util.isUndefined(this[i])&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){function TransformState(options,stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null,ts.writecb=null,util.isNullOrUndefined(data)||stream.push(data),cb&&cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState=new TransformState(options,this);var stream=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){util.isFunction(this._flush)?this._flush(function(er){done(stream,er)}):done(stream)})}function done(stream,er){if(er)return stream.emit("error",er);var ws=stream._writableState,ts=stream._transformState;if(ws.length)throw new Error("calling transform done when ws.length != 0");if(ts.transforming)throw new Error("calling transform done when still transforming");return stream.push(null)}module.exports=Transform;var Duplex=__webpack_require__(22),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;util.isNull(ts.writechunk)||!ts.writecb||ts.transforming?ts.needTransform=!0:(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform))}},function(module,exports,__webpack_require__){(function(process){function WriteReq(chunk,encoding,cb){this.chunk=chunk,this.encoding=encoding,this.callback=cb}function WritableState(options,stream){var Duplex=__webpack_require__(22);options=options||{};var hwm=options.highWaterMark,defaultHwm=options.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function Writable(options){var Duplex=__webpack_require__(22);return this instanceof Writable||this instanceof Duplex?(this._writableState=new WritableState(options,this),this.writable=!0,void Stream.call(this)):new Writable(options)}function writeAfterEnd(stream,state,cb){var er=new Error("write after end");stream.emit("error",er),process.nextTick(function(){cb(er)})}function validChunk(stream,state,chunk,cb){var valid=!0;if(!(util.isBuffer(chunk)||util.isString(chunk)||util.isNullOrUndefined(chunk)||state.objectMode)){var er=new TypeError("Invalid non-string/buffer chunk");stream.emit("error",er),process.nextTick(function(){cb(er)}),valid=!1}return valid}function decodeChunk(state,chunk,encoding){return!state.objectMode&&state.decodeStrings!==!1&&util.isString(chunk)&&(chunk=new Buffer(chunk,encoding)),chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding),util.isBuffer(chunk)&&(encoding="buffer");var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;return ret||(state.needDrain=!0),state.writing||state.corked?state.buffer.push(new WriteReq(chunk,encoding,cb)):doWrite(stream,state,!1,len,chunk,encoding,cb),ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){sync?process.nextTick(function(){state.pendingcb--,cb(er)}):(state.pendingcb--,cb(er)),stream._writableState.errorEmitted=!0,stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(stream,state);finished||state.corked||state.bufferProcessing||!state.buffer.length||clearBuffer(stream,state),sync?process.nextTick(function(){afterWrite(stream,state,finished,cb)}):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){if(state.bufferProcessing=!0,stream._writev&&state.buffer.length>1){for(var cbs=[],c=0;c<state.buffer.length;c++)cbs.push(state.buffer[c].callback);state.pendingcb++,doWrite(stream,state,!0,state.length,state.buffer,"",function(err){for(var i=0;i<cbs.length;i++)state.pendingcb--,cbs[i](err)}),state.buffer=[]}else{for(var c=0;c<state.buffer.length;c++){var entry=state.buffer[c],chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,!1,len,chunk,encoding,cb),state.writing){c++;break}}c<state.buffer.length?state.buffer=state.buffer.slice(c):state.buffer.length=0}state.bufferProcessing=!1}function needFinish(stream,state){return state.ending&&0===state.length&&!state.finished&&!state.writing}function prefinish(stream,state){state.prefinished||(state.prefinished=!0,stream.emit("prefinish"))}function finishMaybe(stream,state){var need=needFinish(stream,state);return need&&(0===state.pendingcb?(prefinish(stream,state),state.finished=!0,stream.emit("finish")):prefinish(stream,state)),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?process.nextTick(cb):stream.once("finish",cb)),state.ended=!0}module.exports=Writable;var Buffer=__webpack_require__(0).Buffer;Writable.WritableState=WritableState;var util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Stream=__webpack_require__(5);util.inherits(Writable,Stream),Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return util.isFunction(encoding)&&(cb=encoding,encoding=null),util.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),
util.isFunction(cb)||(cb=function(){}),state.ended?writeAfterEnd(this,state,cb):validChunk(this,state,chunk,cb)&&(state.pendingcb++,ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){var state=this._writableState;state.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.buffer.length||clearBuffer(this,state))},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;util.isFunction(chunk)?(cb=chunk,chunk=null,encoding=null):util.isFunction(encoding)&&(cb=encoding,encoding=null),util.isNullOrUndefined(chunk)||this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)}}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(process){function Duplex(options){return this instanceof Duplex?(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1&&(this.readable=!1),options&&options.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",onend)):new Duplex(options)}function onend(){this.allowHalfOpen||this._writableState.ended||process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys},util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Readable=__webpack_require__(280),Writable=__webpack_require__(282);util.inherits(Duplex,Readable),forEach(objectKeys(Writable.prototype),function(method){Duplex.prototype[method]||(Duplex.prototype[method]=Writable.prototype[method])})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function PassThrough(options){return this instanceof PassThrough?void Transform.call(this,options):new PassThrough(options)}module.exports=PassThrough;var Transform=__webpack_require__(59),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},function(module,exports,__webpack_require__){"use strict";(function(process){function prependListener(emitter,event,fn){return"function"==typeof emitter.prependListener?emitter.prependListener(event,fn):void(emitter._events&&emitter._events[event]?isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]:emitter.on(event,fn))}function ReadableState(options,stream){Duplex=Duplex||__webpack_require__(15),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){return Duplex=Duplex||__webpack_require__(15),this instanceof Readable?(this._readableState=new ReadableState(options,this),this.readable=!0,options&&"function"==typeof options.read&&(this._read=options.read),void Stream.call(this)):new Readable(options)}function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(null===chunk)state.reading=!1,onEofChunk(stream,state);else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk),skipAdd=!state.objectMode&&0===chunk.length),addToFront||(state.reading=!1),skipAdd||(state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream))),maybeReadMore(stream,state)}else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||0===state.length&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}function chunkInvalid(state,chunk){var er=null;return Buffer.isBuffer(chunk)||"string"==typeof chunk||null===chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,processNextTick(resume_,stream,state))}function resume_(stream,state){state.reading||(debug("resume read 0"),stream.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&null!==stream.read(););}function fromList(n,state){if(0===state.length)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.head.data:state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):ret=n===list.head.data.length?list.shift():hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(ret+=nb===str.length?str:str.slice(0,n),n-=nb,0===n){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,0===n){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c}return list.length-=c,ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var Duplex,processNextTick=__webpack_require__(9),isArray=__webpack_require__(21);Readable.ReadableState=ReadableState;var Stream,EElistenerCount=(__webpack_require__(6).EventEmitter,function(emitter,type){return emitter.listeners(type).length});!function(){try{Stream=__webpack_require__(5)}catch(_){}finally{Stream||(Stream=__webpack_require__(6).EventEmitter)}}();var Buffer=__webpack_require__(0).Buffer,bufferShim=__webpack_require__(11),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var debugUtil=__webpack_require__(351),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder,BufferList=__webpack_require__(287);util.inherits(Readable,Stream),Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return state.objectMode||"string"!=typeof chunk||(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=bufferShim.from(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.isPaused=function(){return this._readableState.flowing===!1},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(0!==n&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return ret=n>0?fromList(n,state):null,null===ret?(state.needReadable=!0,n=0):state.length-=n,0===state.length&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);!1!==ret||increasedAwaitDrain||((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,increasedAwaitDrain=!0),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1,increasedAwaitDrain=!1;return src.on("data",ondata),prependListener(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this);return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev)this._readableState.flowing!==!1&&this.resume();else if("readable"===ev){var state=this._readableState;state.endEmitted||state.readableListening||(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this,state):processNextTick(nReadingNextTick,this))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),(!state.objectMode||null!==chunk&&void 0!==chunk)&&(state.objectMode||chunk&&chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(global){var ClientRequest=__webpack_require__(292),extend=__webpack_require__(31),statusCodes=__webpack_require__(155),url=__webpack_require__(116),http=exports;http.request=function(opts,cb){opts="string"==typeof opts?url.parse(opts):extend(opts);var defaultProtocol=global.location.protocol.search(/^https?:$/)===-1?"http:":"",protocol=opts.protocol||defaultProtocol,host=opts.hostname||opts.host,port=opts.port,path=opts.path||"/";host&&host.indexOf(":")!==-1&&(host="["+host+"]"),opts.url=(host?protocol+"//"+host:"")+(port?":"+port:"")+path,opts.method=(opts.method||"GET").toUpperCase(),opts.headers=opts.headers||{};var req=new ClientRequest(opts);return cb&&req.on("response",cb),req},http.get=function(opts,cb){var req=http.request(opts,cb);return req.end(),req},http.Agent=function(){},http.Agent.defaultMaxSockets=4,http.STATUS_CODES=statusCodes,http.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(exports,__webpack_require__(8))},function(module,exports,__webpack_require__){(function(global){function checkTypeSupport(type){try{return xhr.responseType=type,xhr.responseType===type}catch(e){}return!1}function isFunction(value){return"function"==typeof value}exports.fetch=isFunction(global.fetch)&&isFunction(global.ReadableStream),exports.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),exports.blobConstructor=!0}catch(e){}var xhr=new global.XMLHttpRequest;xhr.open("GET",global.XDomainRequest?"/":"https://example.com");var haveArrayBuffer="undefined"!=typeof global.ArrayBuffer,haveSlice=haveArrayBuffer&&isFunction(global.ArrayBuffer.prototype.slice);exports.arraybuffer=haveArrayBuffer&&checkTypeSupport("arraybuffer"),exports.msstream=!exports.fetch&&haveSlice&&checkTypeSupport("ms-stream"),exports.mozchunkedarraybuffer=!exports.fetch&&haveArrayBuffer&&checkTypeSupport("moz-chunked-arraybuffer"),exports.overrideMimeType=isFunction(xhr.overrideMimeType),exports.vbArray=isFunction(global.VBArray),xhr=null}).call(exports,__webpack_require__(8))},function(module,exports,__webpack_require__){"use strict";(function(process){function prependListener(emitter,event,fn){return"function"==typeof emitter.prependListener?emitter.prependListener(event,fn):void(emitter._events&&emitter._events[event]?isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]:emitter.on(event,fn))}function ReadableState(options,stream){Duplex=Duplex||__webpack_require__(23),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){return Duplex=Duplex||__webpack_require__(23),this instanceof Readable?(this._readableState=new ReadableState(options,this),this.readable=!0,options&&"function"==typeof options.read&&(this._read=options.read),void Stream.call(this)):new Readable(options)}function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(null===chunk)state.reading=!1,onEofChunk(stream,state);else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk),skipAdd=!state.objectMode&&0===chunk.length),addToFront||(state.reading=!1),skipAdd||(state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream))),maybeReadMore(stream,state)}else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||0===state.length&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}function chunkInvalid(state,chunk){var er=null;return Buffer.isBuffer(chunk)||"string"==typeof chunk||null===chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,processNextTick(resume_,stream,state))}function resume_(stream,state){state.reading||(debug("resume read 0"),stream.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&null!==stream.read(););}function fromList(n,state){if(0===state.length)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.head.data:state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):ret=n===list.head.data.length?list.shift():hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(ret+=nb===str.length?str:str.slice(0,n),n-=nb,0===n){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,0===n){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c}return list.length-=c,ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var Duplex,processNextTick=__webpack_require__(9),isArray=__webpack_require__(21);Readable.ReadableState=ReadableState;var Stream,EElistenerCount=(__webpack_require__(6).EventEmitter,function(emitter,type){return emitter.listeners(type).length});!function(){try{Stream=__webpack_require__(5)}catch(_){}finally{Stream||(Stream=__webpack_require__(6).EventEmitter)}}();var Buffer=__webpack_require__(0).Buffer,bufferShim=__webpack_require__(11),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var debugUtil=__webpack_require__(352),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder,BufferList=__webpack_require__(295);util.inherits(Readable,Stream),Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return state.objectMode||"string"!=typeof chunk||(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=bufferShim.from(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.isPaused=function(){return this._readableState.flowing===!1},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(0!==n&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return ret=n>0?fromList(n,state):null,null===ret?(state.needReadable=!0,n=0):state.length-=n,0===state.length&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);!1!==ret||increasedAwaitDrain||((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,increasedAwaitDrain=!0),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1,increasedAwaitDrain=!1;return src.on("data",ondata),prependListener(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this);return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev)this._readableState.flowing!==!1&&this.resume();else if("readable"===ev){var state=this._readableState;state.endEmitted||state.readableListening||(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this,state):processNextTick(nReadingNextTick,this))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk);
}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),(!state.objectMode||null!==chunk&&void 0!==chunk)&&(state.objectMode||chunk&&chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function TransformState(stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null,ts.writecb=null,null!==data&&void 0!==data&&stream.push(data),cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState=new TransformState(this);var stream=this;this._readableState.needReadable=!0,this._readableState.sync=!1,options&&("function"==typeof options.transform&&(this._transform=options.transform),"function"==typeof options.flush&&(this._flush=options.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(er,data){done(stream,er,data)}):done(stream)})}function done(stream,er,data){if(er)return stream.emit("error",er);null!==data&&void 0!==data&&stream.push(data);var ws=stream._writableState,ts=stream._transformState;if(ws.length)throw new Error("Calling transform done when ws.length != 0");if(ts.transforming)throw new Error("Calling transform done when still transforming");return stream.push(null)}module.exports=Transform;var Duplex=__webpack_require__(23),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;null!==ts.writechunk&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0}},function(module,exports,__webpack_require__){"use strict";(function(process,setImmediate){function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk,this.encoding=encoding,this.callback=cb,this.next=null}function WritableState(options,stream){Duplex=Duplex||__webpack_require__(23),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(options){return Duplex=Duplex||__webpack_require__(23),realHasInstance.call(Writable,this)||this instanceof Duplex?(this._writableState=new WritableState(options,this),this.writable=!0,options&&("function"==typeof options.write&&(this._write=options.write),"function"==typeof options.writev&&(this._writev=options.writev)),void Stream.call(this)):new Writable(options)}function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er),processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=!0,er=!1;return null===chunk?er=new TypeError("May not write null values to stream"):Buffer.isBuffer(chunk)||"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream.emit("error",er),processNextTick(cb,er),valid=!1),valid}function decodeChunk(state,chunk,encoding){return state.objectMode||state.decodeStrings===!1||"string"!=typeof chunk||(chunk=bufferShim.from(chunk,encoding)),chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding),Buffer.isBuffer(chunk)&&(encoding="buffer");var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest=new WriteReq(chunk,encoding,cb),last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){--state.pendingcb,sync?processNextTick(cb,er):cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);finished||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(stream,state),sync?asyncWrite(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0;entry;)buffer[count]=entry,entry=entry.next,count+=1;doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state)}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,!1,len,chunk,encoding,cb),entry=entry.next,state.writing)break}null===entry&&(state.lastBufferedRequest=null)}state.bufferedRequestCount=0,state.bufferedRequest=entry,state.bufferProcessing=!1}function needFinish(state){return state.ending&&0===state.length&&null===state.bufferedRequest&&!state.finished&&!state.writing}function prefinish(stream,state){state.prefinished||(state.prefinished=!0,stream.emit("prefinish"))}function finishMaybe(stream,state){var need=needFinish(state);return need&&(0===state.pendingcb?(prefinish(stream,state),state.finished=!0,stream.emit("finish")):prefinish(stream,state)),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?processNextTick(cb):stream.once("finish",cb)),state.ended=!0,stream.writable=!1}function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(err){var entry=_this.entry;for(_this.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree?state.corkedRequestsFree.next=_this:state.corkedRequestsFree=_this}}module.exports=Writable;var Duplex,processNextTick=__webpack_require__(9),asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Stream,internalUtil={deprecate:__webpack_require__(30)};!function(){try{Stream=__webpack_require__(5)}catch(_){}finally{Stream||(Stream=__webpack_require__(6).EventEmitter)}}();var Buffer=__webpack_require__(0).Buffer,bufferShim=__webpack_require__(11);util.inherits(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(_){}}();var realHasInstance;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return!!realHasInstance.call(this,object)||object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return"function"==typeof encoding&&(cb=encoding,encoding=null),Buffer.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?writeAfterEnd(this,cb):validChunk(this,state,chunk,cb)&&(state.pendingcb++,ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){var state=this._writableState;state.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)}}).call(exports,__webpack_require__(2),__webpack_require__(13).setImmediate)},function(module,exports,__webpack_require__){(function(process){var Stream=function(){try{return __webpack_require__(5)}catch(_){}}();exports=module.exports=__webpack_require__(108),exports.Stream=Stream||exports,exports.Readable=exports,exports.Writable=__webpack_require__(110),exports.Duplex=__webpack_require__(23),exports.Transform=__webpack_require__(109),exports.PassThrough=__webpack_require__(294),!process.browser&&"disable"===process.env.READABLE_STREAM&&Stream&&(module.exports=Stream)}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(Buffer){function parse256(buf){var positive;if(128===buf[0])positive=!0;else{if(255!==buf[0])return null;positive=!1}for(var zero=!1,tuple=[],i=buf.length-1;i>0;i--){var byte=buf[i];positive?tuple.push(byte):zero&&0===byte?tuple.push(0):zero?(zero=!1,tuple.push(256-byte)):tuple.push(255-byte)}var sum=0,l=tuple.length;for(i=0;i<l;i++)sum+=tuple[i]*Math.pow(256,i);return positive?sum:-1*sum}var ZEROS="0000000000000000000",ZERO_OFFSET="0".charCodeAt(0),USTAR="ustar\x0000",MASK=parseInt("7777",8),clamp=function(index,len,defaultValue){return"number"!=typeof index?defaultValue:(index=~~index,index>=len?len:index>=0?index:(index+=len,index>=0?index:0))},toType=function(flag){switch(flag){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},toTypeflag=function(flag){switch(flag){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},alloc=function(size){var buf=new Buffer(size);return buf.fill(0),buf},indexOf=function(block,num,offset,end){for(;offset<end;offset++)if(block[offset]===num)return offset;return end},cksum=function(block){for(var sum=256,i=0;i<148;i++)sum+=block[i];for(var j=156;j<512;j++)sum+=block[j];return sum},encodeOct=function(val,n){return val=val.toString(8),ZEROS.slice(0,n-val.length)+val+" "},decodeOct=function(val,offset){if(128&val[offset])return parse256(val.slice(offset,offset+8));for(;offset<val.length&&32===val[offset];)offset++;for(var end=clamp(indexOf(val,32,offset,val.length),val.length,val.length);offset<end&&0===val[offset];)offset++;return end===offset?0:parseInt(val.slice(offset,end).toString(),8)},decodeStr=function(val,offset,length){return val.slice(offset,indexOf(val,0,offset,offset+length)).toString()},addLength=function(str){var len=Buffer.byteLength(str),digits=Math.floor(Math.log(len)/Math.log(10))+1;return len+digits>Math.pow(10,digits)&&digits++,len+digits+str};exports.decodeLongPath=function(buf){return decodeStr(buf,0,buf.length)},exports.encodePax=function(opts){var result="";opts.name&&(result+=addLength(" path="+opts.name+"\n")),opts.linkname&&(result+=addLength(" linkpath="+opts.linkname+"\n"));var pax=opts.pax;if(pax)for(var key in pax)result+=addLength(" "+key+"="+pax[key]+"\n");return new Buffer(result)},exports.decodePax=function(buf){for(var result={};buf.length;){for(var i=0;i<buf.length&&32!==buf[i];)i++;var len=parseInt(buf.slice(0,i).toString(),10);if(!len)return result;var b=buf.slice(i+1,len-1).toString(),keyIndex=b.indexOf("=");if(keyIndex===-1)return result;result[b.slice(0,keyIndex)]=b.slice(keyIndex+1),buf=buf.slice(len)}return result},exports.encode=function(opts){var buf=alloc(512),name=opts.name,prefix="";if(5===opts.typeflag&&"/"!==name[name.length-1]&&(name+="/"),Buffer.byteLength(name)!==name.length)return null;for(;Buffer.byteLength(name)>100;){var i=name.indexOf("/");if(i===-1)return null;prefix+=prefix?"/"+name.slice(0,i):name.slice(0,i),name=name.slice(i+1)}return Buffer.byteLength(name)>100||Buffer.byteLength(prefix)>155?null:opts.linkname&&Buffer.byteLength(opts.linkname)>100?null:(buf.write(name),buf.write(encodeOct(opts.mode&MASK,6),100),buf.write(encodeOct(opts.uid,6),108),buf.write(encodeOct(opts.gid,6),116),buf.write(encodeOct(opts.size,11),124),buf.write(encodeOct(opts.mtime.getTime()/1e3|0,11),136),buf[156]=ZERO_OFFSET+toTypeflag(opts.type),opts.linkname&&buf.write(opts.linkname,157),buf.write(USTAR,257),opts.uname&&buf.write(opts.uname,265),opts.gname&&buf.write(opts.gname,297),buf.write(encodeOct(opts.devmajor||0,6),329),buf.write(encodeOct(opts.devminor||0,6),337),prefix&&buf.write(prefix,345),buf.write(encodeOct(cksum(buf),6),148),buf)},exports.decode=function(buf){var typeflag=0===buf[156]?0:buf[156]-ZERO_OFFSET,name=decodeStr(buf,0,100),mode=decodeOct(buf,100),uid=decodeOct(buf,108),gid=decodeOct(buf,116),size=decodeOct(buf,124),mtime=decodeOct(buf,136),type=toType(typeflag),linkname=0===buf[157]?null:decodeStr(buf,157,100),uname=decodeStr(buf,265,32),gname=decodeStr(buf,297,32),devmajor=decodeOct(buf,329),devminor=decodeOct(buf,337);buf[345]&&(name=decodeStr(buf,345,155)+"/"+name),0===typeflag&&name&&"/"===name[name.length-1]&&(typeflag=5);var c=cksum(buf);if(256===c)return null;if(c!==decodeOct(buf,148))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");return{name:name,mode:mode,uid:uid,gid:gid,size:size,mtime:new Date(1e3*mtime),type:type,linkname:linkname,uname:uname,gname:gname,devmajor:devmajor,devminor:devminor}}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(process){function prependListener(emitter,event,fn){return"function"==typeof emitter.prependListener?emitter.prependListener(event,fn):void(emitter._events&&emitter._events[event]?isArray(emitter._events[event])?emitter._events[event].unshift(fn):emitter._events[event]=[fn,emitter._events[event]]:emitter.on(event,fn))}function ReadableState(options,stream){Duplex=Duplex||__webpack_require__(24),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){return Duplex=Duplex||__webpack_require__(24),this instanceof Readable?(this._readableState=new ReadableState(options,this),this.readable=!0,options&&"function"==typeof options.read&&(this._read=options.read),void Stream.call(this)):new Readable(options)}function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(null===chunk)state.reading=!1,onEofChunk(stream,state);else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var _e=new Error("stream.unshift() after end event");stream.emit("error",_e)}else{var skipAdd;!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk),skipAdd=!state.objectMode&&0===chunk.length),addToFront||(state.reading=!1),skipAdd||(state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream))),maybeReadMore(stream,state)}else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return n<=0||0===state.length&&state.ended?0:state.objectMode?1:n!==n?state.flowing&&state.length?state.buffer.head.data.length:state.length:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n<=state.length?n:state.ended?state.length:(state.needReadable=!0,0))}function chunkInvalid(state,chunk){var er=null;return Buffer.isBuffer(chunk)||"string"==typeof chunk||null===chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,processNextTick(resume_,stream,state))}function resume_(stream,state){state.reading||(debug("resume read 0"),stream.read(0)),state.resumeScheduled=!1,state.awaitDrain=0,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;for(debug("flow",state.flowing);state.flowing&&null!==stream.read(););}function fromList(n,state){if(0===state.length)return null;var ret;return state.objectMode?ret=state.buffer.shift():!n||n>=state.length?(ret=state.decoder?state.buffer.join(""):1===state.buffer.length?state.buffer.head.data:state.buffer.concat(state.length),state.buffer.clear()):ret=fromListPartial(n,state.buffer,state.decoder),ret}function fromListPartial(n,list,hasStrings){var ret;return n<list.head.data.length?(ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n)):ret=n===list.head.data.length?list.shift():hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list),ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;for(n-=ret.length;p=p.next;){var str=p.data,nb=n>str.length?str.length:n;if(ret+=nb===str.length?str:str.slice(0,n),n-=nb,0===n){nb===str.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=str.slice(nb));break}++c}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=bufferShim.allocUnsafe(n),p=list.head,c=1;for(p.data.copy(ret),n-=p.data.length;p=p.next;){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,0===n){nb===buf.length?(++c,p.next?list.head=p.next:list.head=list.tail=null):(list.head=p,p.data=buf.slice(nb));break}++c}return list.length-=c,ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error('"endReadable()" called on non-empty stream');state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var Duplex,processNextTick=__webpack_require__(9),isArray=__webpack_require__(21);Readable.ReadableState=ReadableState;var Stream,EElistenerCount=(__webpack_require__(6).EventEmitter,function(emitter,type){return emitter.listeners(type).length});!function(){try{Stream=__webpack_require__(5)}catch(_){}finally{Stream||(Stream=__webpack_require__(6).EventEmitter)}}();var Buffer=__webpack_require__(0).Buffer,bufferShim=__webpack_require__(11),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var debugUtil=__webpack_require__(353),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder,BufferList=__webpack_require__(300);util.inherits(Readable,Stream),Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return state.objectMode||"string"!=typeof chunk||(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=bufferShim.from(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.isPaused=function(){return this._readableState.flowing===!1},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(0!==n&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),state.ended||state.reading?(doRead=!1,debug("reading or ended",doRead)):doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1,state.reading||(n=howMuchToRead(nOrig,state)));var ret;return ret=n>0?fromList(n,state):null,null===ret?(state.needReadable=!0,n=0):state.length-=n,0===state.length&&(state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&endReadable(this)),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("_read() is not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);!1!==ret||increasedAwaitDrain||((1===state.pipesCount&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp&&(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++,increasedAwaitDrain=!0),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1,increasedAwaitDrain=!1;return src.on("data",ondata),prependListener(dest,"error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this);return this}var index=indexOf(state.pipes,dest);return index===-1?this:(state.pipes.splice(index,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev)this._readableState.flowing!==!1&&this.resume();else if("readable"===ev){var state=this._readableState;state.endEmitted||state.readableListening||(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,state.reading?state.length&&emitReadable(this,state):processNextTick(nReadingNextTick,this))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),(!state.objectMode||null!==chunk&&void 0!==chunk)&&(state.objectMode||chunk&&chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function TransformState(stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null,ts.writecb=null,null!==data&&void 0!==data&&stream.push(data),
cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options),this._transformState=new TransformState(this);var stream=this;this._readableState.needReadable=!0,this._readableState.sync=!1,options&&("function"==typeof options.transform&&(this._transform=options.transform),"function"==typeof options.flush&&(this._flush=options.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(er,data){done(stream,er,data)}):done(stream)})}function done(stream,er,data){if(er)return stream.emit("error",er);null!==data&&void 0!==data&&stream.push(data);var ws=stream._writableState,ts=stream._transformState;if(ws.length)throw new Error("Calling transform done when ws.length != 0");if(ts.transforming)throw new Error("Calling transform done when still transforming");return stream.push(null)}module.exports=Transform;var Duplex=__webpack_require__(24),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("_transform() is not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;null!==ts.writechunk&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0}},function(module,exports,__webpack_require__){"use strict";(function(process,setImmediate){function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk,this.encoding=encoding,this.callback=cb,this.next=null}function WritableState(options,stream){Duplex=Duplex||__webpack_require__(24),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}function Writable(options){return Duplex=Duplex||__webpack_require__(24),realHasInstance.call(Writable,this)||this instanceof Duplex?(this._writableState=new WritableState(options,this),this.writable=!0,options&&("function"==typeof options.write&&(this._write=options.write),"function"==typeof options.writev&&(this._writev=options.writev)),void Stream.call(this)):new Writable(options)}function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er),processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=!0,er=!1;return null===chunk?er=new TypeError("May not write null values to stream"):Buffer.isBuffer(chunk)||"string"==typeof chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er&&(stream.emit("error",er),processNextTick(cb,er),valid=!1),valid}function decodeChunk(state,chunk,encoding){return state.objectMode||state.decodeStrings===!1||"string"!=typeof chunk||(chunk=bufferShim.from(chunk,encoding)),chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding),Buffer.isBuffer(chunk)&&(encoding="buffer");var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest=new WriteReq(chunk,encoding,cb),last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){--state.pendingcb,sync?processNextTick(cb,er):cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);finished||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(stream,state),sync?asyncWrite(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0;entry;)buffer[count]=entry,entry=entry.next,count+=1;doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next?(state.corkedRequestsFree=holder.next,holder.next=null):state.corkedRequestsFree=new CorkedRequest(state)}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,!1,len,chunk,encoding,cb),entry=entry.next,state.writing)break}null===entry&&(state.lastBufferedRequest=null)}state.bufferedRequestCount=0,state.bufferedRequest=entry,state.bufferProcessing=!1}function needFinish(state){return state.ending&&0===state.length&&null===state.bufferedRequest&&!state.finished&&!state.writing}function prefinish(stream,state){state.prefinished||(state.prefinished=!0,stream.emit("prefinish"))}function finishMaybe(stream,state){var need=needFinish(state);return need&&(0===state.pendingcb?(prefinish(stream,state),state.finished=!0,stream.emit("finish")):prefinish(stream,state)),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?processNextTick(cb):stream.once("finish",cb)),state.ended=!0,stream.writable=!1}function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(err){var entry=_this.entry;for(_this.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree?state.corkedRequestsFree.next=_this:state.corkedRequestsFree=_this}}module.exports=Writable;var Duplex,processNextTick=__webpack_require__(9),asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick;Writable.WritableState=WritableState;var util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Stream,internalUtil={deprecate:__webpack_require__(30)};!function(){try{Stream=__webpack_require__(5)}catch(_){}finally{Stream||(Stream=__webpack_require__(6).EventEmitter)}}();var Buffer=__webpack_require__(0).Buffer,bufferShim=__webpack_require__(11);util.inherits(Writable,Stream),WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(_){}}();var realHasInstance;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){return!!realHasInstance.call(this,object)||object&&object._writableState instanceof WritableState}})):realHasInstance=function(object){return object instanceof this},Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return"function"==typeof encoding&&(cb=encoding,encoding=null),Buffer.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?writeAfterEnd(this,cb):validChunk(this,state,chunk,cb)&&(state.pendingcb++,ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){var state=this._writableState;state.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("_write() is not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)}}).call(exports,__webpack_require__(2),__webpack_require__(13).setImmediate)},function(module,exports,__webpack_require__){"use strict";function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function urlParse(url,parseQueryString,slashesDenoteHost){if(url&&util.isObject(url)&&url instanceof Url)return url;var u=new Url;return u.parse(url,parseQueryString,slashesDenoteHost),u}function urlFormat(obj){return util.isString(obj)&&(obj=urlParse(obj)),obj instanceof Url?obj.format():Url.prototype.format.call(obj)}function urlResolve(source,relative){return urlParse(source,!1,!0).resolve(relative)}function urlResolveObject(source,relative){return source?urlParse(source,!1,!0).resolveObject(relative):relative}var punycode=__webpack_require__(263),util=__webpack_require__(304);exports.parse=urlParse,exports.resolve=urlResolve,exports.resolveObject=urlResolveObject,exports.format=urlFormat,exports.Url=Url;var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=__webpack_require__(269);Url.prototype.parse=function(url,parseQueryString,slashesDenoteHost){if(!util.isString(url))throw new TypeError("Parameter 'url' must be a string, not "+typeof url);var queryIndex=url.indexOf("?"),splitter=queryIndex!==-1&&queryIndex<url.indexOf("#")?"?":"#",uSplit=url.split(splitter),slashRegex=/\\/g;uSplit[0]=uSplit[0].replace(slashRegex,"/"),url=uSplit.join(splitter);var rest=url;if(rest=rest.trim(),!slashesDenoteHost&&1===url.split("#").length){var simplePath=simplePathPattern.exec(rest);if(simplePath)return this.path=rest,this.href=rest,this.pathname=simplePath[1],simplePath[2]?(this.search=simplePath[2],parseQueryString?this.query=querystring.parse(this.search.substr(1)):this.query=this.search.substr(1)):parseQueryString&&(this.search="",this.query={}),this}var proto=protocolPattern.exec(rest);if(proto){proto=proto[0];var lowerProto=proto.toLowerCase();this.protocol=lowerProto,rest=rest.substr(proto.length)}if(slashesDenoteHost||proto||rest.match(/^\/\/[^@\/]+@[^@\/]+/)){var slashes="//"===rest.substr(0,2);!slashes||proto&&hostlessProtocol[proto]||(rest=rest.substr(2),this.slashes=!0)}if(!hostlessProtocol[proto]&&(slashes||proto&&!slashedProtocol[proto])){for(var hostEnd=-1,i=0;i<hostEndingChars.length;i++){var hec=rest.indexOf(hostEndingChars[i]);hec!==-1&&(hostEnd===-1||hec<hostEnd)&&(hostEnd=hec)}var auth,atSign;atSign=hostEnd===-1?rest.lastIndexOf("@"):rest.lastIndexOf("@",hostEnd),atSign!==-1&&(auth=rest.slice(0,atSign),rest=rest.slice(atSign+1),this.auth=decodeURIComponent(auth)),hostEnd=-1;for(var i=0;i<nonHostChars.length;i++){var hec=rest.indexOf(nonHostChars[i]);hec!==-1&&(hostEnd===-1||hec<hostEnd)&&(hostEnd=hec)}hostEnd===-1&&(hostEnd=rest.length),this.host=rest.slice(0,hostEnd),rest=rest.slice(hostEnd),this.parseHost(),this.hostname=this.hostname||"";var ipv6Hostname="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!ipv6Hostname)for(var hostparts=this.hostname.split(/\./),i=0,l=hostparts.length;i<l;i++){var part=hostparts[i];if(part&&!part.match(hostnamePartPattern)){for(var newpart="",j=0,k=part.length;j<k;j++)newpart+=part.charCodeAt(j)>127?"x":part[j];if(!newpart.match(hostnamePartPattern)){var validParts=hostparts.slice(0,i),notHost=hostparts.slice(i+1),bit=part.match(hostnamePartStart);bit&&(validParts.push(bit[1]),notHost.unshift(bit[2])),notHost.length&&(rest="/"+notHost.join(".")+rest),this.hostname=validParts.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),ipv6Hostname||(this.hostname=punycode.toASCII(this.hostname));var p=this.port?":"+this.port:"",h=this.hostname||"";this.host=h+p,this.href+=this.host,ipv6Hostname&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==rest[0]&&(rest="/"+rest))}if(!unsafeProtocol[lowerProto])for(var i=0,l=autoEscape.length;i<l;i++){var ae=autoEscape[i];if(rest.indexOf(ae)!==-1){var esc=encodeURIComponent(ae);esc===ae&&(esc=escape(ae)),rest=rest.split(ae).join(esc)}}var hash=rest.indexOf("#");hash!==-1&&(this.hash=rest.substr(hash),rest=rest.slice(0,hash));var qm=rest.indexOf("?");if(qm!==-1?(this.search=rest.substr(qm),this.query=rest.substr(qm+1),parseQueryString&&(this.query=querystring.parse(this.query)),rest=rest.slice(0,qm)):parseQueryString&&(this.search="",this.query={}),rest&&(this.pathname=rest),slashedProtocol[lowerProto]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var p=this.pathname||"",s=this.search||"";this.path=p+s}return this.href=this.format(),this},Url.prototype.format=function(){var auth=this.auth||"";auth&&(auth=encodeURIComponent(auth),auth=auth.replace(/%3A/i,":"),auth+="@");var protocol=this.protocol||"",pathname=this.pathname||"",hash=this.hash||"",host=!1,query="";this.host?host=auth+this.host:this.hostname&&(host=auth+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(host+=":"+this.port)),this.query&&util.isObject(this.query)&&Object.keys(this.query).length&&(query=querystring.stringify(this.query));var search=this.search||query&&"?"+query||"";return protocol&&":"!==protocol.substr(-1)&&(protocol+=":"),this.slashes||(!protocol||slashedProtocol[protocol])&&host!==!1?(host="//"+(host||""),pathname&&"/"!==pathname.charAt(0)&&(pathname="/"+pathname)):host||(host=""),hash&&"#"!==hash.charAt(0)&&(hash="#"+hash),search&&"?"!==search.charAt(0)&&(search="?"+search),pathname=pathname.replace(/[?#]/g,function(match){return encodeURIComponent(match)}),search=search.replace("#","%23"),protocol+host+pathname+search+hash},Url.prototype.resolve=function(relative){return this.resolveObject(urlParse(relative,!1,!0)).format()},Url.prototype.resolveObject=function(relative){if(util.isString(relative)){var rel=new Url;rel.parse(relative,!1,!0),relative=rel}for(var result=new Url,tkeys=Object.keys(this),tk=0;tk<tkeys.length;tk++){var tkey=tkeys[tk];result[tkey]=this[tkey]}if(result.hash=relative.hash,""===relative.href)return result.href=result.format(),result;if(relative.slashes&&!relative.protocol){for(var rkeys=Object.keys(relative),rk=0;rk<rkeys.length;rk++){var rkey=rkeys[rk];"protocol"!==rkey&&(result[rkey]=relative[rkey])}return slashedProtocol[result.protocol]&&result.hostname&&!result.pathname&&(result.path=result.pathname="/"),result.href=result.format(),result}if(relative.protocol&&relative.protocol!==result.protocol){if(!slashedProtocol[relative.protocol]){for(var keys=Object.keys(relative),v=0;v<keys.length;v++){var k=keys[v];result[k]=relative[k]}return result.href=result.format(),result}if(result.protocol=relative.protocol,relative.host||hostlessProtocol[relative.protocol])result.pathname=relative.pathname;else{for(var relPath=(relative.pathname||"").split("/");relPath.length&&!(relative.host=relPath.shift()););relative.host||(relative.host=""),relative.hostname||(relative.hostname=""),""!==relPath[0]&&relPath.unshift(""),relPath.length<2&&relPath.unshift(""),result.pathname=relPath.join("/")}if(result.search=relative.search,result.query=relative.query,result.host=relative.host||"",result.auth=relative.auth,result.hostname=relative.hostname||relative.host,result.port=relative.port,result.pathname||result.search){var p=result.pathname||"",s=result.search||"";result.path=p+s}return result.slashes=result.slashes||relative.slashes,result.href=result.format(),result}var isSourceAbs=result.pathname&&"/"===result.pathname.charAt(0),isRelAbs=relative.host||relative.pathname&&"/"===relative.pathname.charAt(0),mustEndAbs=isRelAbs||isSourceAbs||result.host&&relative.pathname,removeAllDots=mustEndAbs,srcPath=result.pathname&&result.pathname.split("/")||[],relPath=relative.pathname&&relative.pathname.split("/")||[],psychotic=result.protocol&&!slashedProtocol[result.protocol];if(psychotic&&(result.hostname="",result.port=null,result.host&&(""===srcPath[0]?srcPath[0]=result.host:srcPath.unshift(result.host)),result.host="",relative.protocol&&(relative.hostname=null,relative.port=null,relative.host&&(""===relPath[0]?relPath[0]=relative.host:relPath.unshift(relative.host)),relative.host=null),mustEndAbs=mustEndAbs&&(""===relPath[0]||""===srcPath[0])),isRelAbs)result.host=relative.host||""===relative.host?relative.host:result.host,result.hostname=relative.hostname||""===relative.hostname?relative.hostname:result.hostname,result.search=relative.search,result.query=relative.query,srcPath=relPath;else if(relPath.length)srcPath||(srcPath=[]),srcPath.pop(),srcPath=srcPath.concat(relPath),result.search=relative.search,result.query=relative.query;else if(!util.isNullOrUndefined(relative.search)){if(psychotic){result.hostname=result.host=srcPath.shift();var authInHost=!!(result.host&&result.host.indexOf("@")>0)&&result.host.split("@");authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return result.search=relative.search,result.query=relative.query,util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.href=result.format(),result}if(!srcPath.length)return result.pathname=null,result.search?result.path="/"+result.search:result.path=null,result.href=result.format(),result;for(var last=srcPath.slice(-1)[0],hasTrailingSlash=(result.host||relative.host||srcPath.length>1)&&("."===last||".."===last)||""===last,up=0,i=srcPath.length;i>=0;i--)last=srcPath[i],"."===last?srcPath.splice(i,1):".."===last?(srcPath.splice(i,1),up++):up&&(srcPath.splice(i,1),up--);if(!mustEndAbs&&!removeAllDots)for(;up--;up)srcPath.unshift("..");!mustEndAbs||""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0)||srcPath.unshift(""),hasTrailingSlash&&"/"!==srcPath.join("/").substr(-1)&&srcPath.push("");var isAbsolute=""===srcPath[0]||srcPath[0]&&"/"===srcPath[0].charAt(0);if(psychotic){result.hostname=result.host=isAbsolute?"":srcPath.length?srcPath.shift():"";var authInHost=!!(result.host&&result.host.indexOf("@")>0)&&result.host.split("@");authInHost&&(result.auth=authInHost.shift(),result.host=result.hostname=authInHost.shift())}return mustEndAbs=mustEndAbs||result.host&&srcPath.length,mustEndAbs&&!isAbsolute&&srcPath.unshift(""),srcPath.length?result.pathname=srcPath.join("/"):(result.pathname=null,result.path=null),util.isNull(result.pathname)&&util.isNull(result.search)||(result.path=(result.pathname?result.pathname:"")+(result.search?result.search:"")),result.auth=relative.auth||result.auth,result.slashes=result.slashes||relative.slashes,result.href=result.format(),result},Url.prototype.parseHost=function(){var host=this.host,port=portPattern.exec(host);port&&(port=port[0],":"!==port&&(this.port=port.substr(1)),host=host.substr(0,host.length-port.length)),host&&(this.hostname=host)}},function(module,exports,__webpack_require__){module.exports={encode:__webpack_require__(308),decode:__webpack_require__(307),encodingLength:__webpack_require__(309)}},function(module,exports){function wrappy(fn,cb){function wrapper(){for(var args=new Array(arguments.length),i=0;i<args.length;i++)args[i]=arguments[i];var ret=fn.apply(this,args),cb=args[args.length-1];return"function"==typeof ret&&ret!==cb&&Object.keys(cb).forEach(function(k){ret[k]=cb[k]}),ret}if(fn&&cb)return wrappy(fn)(cb);if("function"!=typeof fn)throw new TypeError("need wrapper function");return Object.keys(fn).forEach(function(k){wrapper[k]=fn[k]}),wrapper}module.exports=wrappy},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4),cleanMultihash=__webpack_require__(61);module.exports=(send=>{return promisify((hash,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={});try{hash=cleanMultihash(hash)}catch(err){return callback(err)}send({path:"cat",args:hash,buffer:opts.buffer},callback)})})},function(module,exports,__webpack_require__){"use strict";const addCmd=__webpack_require__(44),Duplex=__webpack_require__(42).Duplex,promisify=__webpack_require__(4);module.exports=(send=>{const add=addCmd(send);return promisify(callback=>{const tuples=[],ds=new Duplex({objectMode:!0});ds._read=(n=>{}),ds._write=((file,enc,next)=>{tuples.push(file),next()}),ds.end=(()=>{add(tuples,(err,res)=>{return err?ds.emit("error",err):(res.forEach(tuple=>{ds.push(tuple)}),void ds.push(null))})}),callback(null,ds)})})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4),cleanMultihash=__webpack_require__(61),TarStreamToObjects=__webpack_require__(347);module.exports=(send=>{return promisify((path,opts,callback)=>{"function"!=typeof opts||callback||(callback=opts,opts={}),"function"==typeof opts&&"function"==typeof callback&&(callback=opts,opts={});try{path=cleanMultihash(path)}catch(err){return callback(err)}const request={path:"get",args:path,qs:opts};send.andTransform(request,TarStreamToObjects.from,callback)})})},function(module,exports,__webpack_require__){"use strict";const httpRequest=__webpack_require__(106).request,httpsRequest=__webpack_require__(167).request;module.exports=(protocol=>{return 0===protocol.indexOf("https")?httpsRequest:httpRequest})},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function IpfsAPI(hostOrMultiaddr,port,opts){const config=getConfig();try{const maddr=multiaddr(hostOrMultiaddr).nodeAddress();config.host=maddr.address,config.port=maddr.port}catch(e){"string"==typeof hostOrMultiaddr&&(config.host=hostOrMultiaddr,config.port=port&&"object"!=typeof port?port:config.port)}let lastIndex=arguments.length;for(;!opts&&lastIndex-- >0&&!(opts=arguments[lastIndex]););if(Object.assign(config,opts),!config.host&&"undefined"!=typeof window){const split=window.location.host.split(":");config.host=split[0],config.port=split[1]}const requestAPI=getRequestAPI(config),cmds=loadCommands(requestAPI);return cmds.send=requestAPI,cmds.Buffer=Buffer,cmds}const multiaddr=__webpack_require__(56),loadCommands=__webpack_require__(340),getConfig=__webpack_require__(337),getRequestAPI=__webpack_require__(344);exports=module.exports=IpfsAPI}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){function Entity(name,body){this.name=name,this.body=body,this.decoders={},this.encoders={}}var asn1=__webpack_require__(18),inherits=__webpack_require__(1),api=exports;api.define=function(name,body){return new Entity(name,body)},Entity.prototype._createNamed=function(base){var named;try{named=__webpack_require__(310).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)}},function(module,exports,__webpack_require__){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())}var Reporter=__webpack_require__(25).Reporter,EncoderBuffer=__webpack_require__(25).EncoderBuffer,DecoderBuffer=__webpack_require__(25).DecoderBuffer,assert=__webpack_require__(229),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),overrided=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];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}))},overrided.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(){var state=this._baseState;return state.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(){var state=this._baseState;return state.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 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)}}var prevObj;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)var 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&&present!==!0?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);var result;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 ommited 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)}},function(module,exports,__webpack_require__){function Reporter(options){this._reporterState={obj:null,path:[],options:options||{},errors:[]}}function ReporterError(path,msg){this.path=path,this.rethrow(msg)}var inherits=__webpack_require__(1);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}},function(module,exports,__webpack_require__){var constants=__webpack_require__(64);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)},function(module,exports,__webpack_require__){var decoders=exports;decoders.der=__webpack_require__(65),decoders.pem=__webpack_require__(129)},function(module,exports,__webpack_require__){function PEMDecoder(entity){DERDecoder.call(this,entity),this.enc="pem"}var inherits=__webpack_require__(1),Buffer=__webpack_require__(0).Buffer,DERDecoder=__webpack_require__(65);inherits(PEMDecoder,DERDecoder),module.exports=PEMDecoder,PEMDecoder.prototype.decode=function(data,options){for(var lines=data.toString().split(/[\r\n]+/g),label=options.label.toUpperCase(),re=/^-----(BEGIN|END) ([^-]+)-----$/,start=-1,end=-1,i=0;i<lines.length;i++){var match=lines[i].match(re);if(null!==match&&match[2]===label){if(start!==-1){if("END"!==match[1])break;end=i;break}if("BEGIN"!==match[1])break;start=i}}if(start===-1||end===-1)throw new Error("PEM section not found for: "+label);var base64=lines.slice(start+1,end).join("");base64.replace(/[^a-z0-9\+\/=]+/gi,"");var input=new Buffer(base64,"base64");return DERDecoder.prototype.decode.call(this,input,options)}},function(module,exports,__webpack_require__){var encoders=exports;encoders.der=__webpack_require__(66),encoders.pem=__webpack_require__(131)},function(module,exports,__webpack_require__){function PEMEncoder(entity){DEREncoder.call(this,entity),this.enc="pem"}var inherits=__webpack_require__(1),DEREncoder=__webpack_require__(66);inherits(PEMEncoder,DEREncoder),module.exports=PEMEncoder,PEMEncoder.prototype.encode=function(data,options){for(var buf=DEREncoder.prototype.encode.call(this,data),p=buf.toString("base64"),out=["-----BEGIN "+options.label+"-----"],i=0;i<p.length;i+=64)out.push(p.slice(i,i+64));return out.push("-----END "+options.label+"-----"),out.join("\n")}},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function eachOfArrayLike(coll,iteratee,callback){function iteratorCallback(err){err?callback(err):++completed===length&&callback(null)}callback=(0,_once2.default)(callback||_noop2.default);var index=0,completed=0,length=coll.length;for(0===length&&callback(null);index<length;index++)iteratee(coll[index],index,(0,_onlyOnce2.default)(iteratorCallback))}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(coll,iteratee,callback){var eachOfImplementation=(0,_isArrayLike2.default)(coll)?eachOfArrayLike:eachOfGeneric;eachOfImplementation(coll,iteratee,callback)};var _isArrayLike=__webpack_require__(41),_isArrayLike2=_interopRequireDefault(_isArrayLike),_eachOfLimit=__webpack_require__(133),_eachOfLimit2=_interopRequireDefault(_eachOfLimit),_doLimit=__webpack_require__(135),_doLimit2=_interopRequireDefault(_doLimit),_noop=__webpack_require__(28),_noop2=_interopRequireDefault(_noop),_once=__webpack_require__(46),_once2=_interopRequireDefault(_once),_onlyOnce=__webpack_require__(32),_onlyOnce2=_interopRequireDefault(_onlyOnce),eachOfGeneric=(0,_doLimit2.default)(_eachOfLimit2.default,1/0);module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function eachOfLimit(coll,limit,iteratee,callback){(0,_eachOfLimit3.default)(limit)(coll,iteratee,callback)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=eachOfLimit;var _eachOfLimit2=__webpack_require__(136),_eachOfLimit3=_interopRequireDefault(_eachOfLimit2);module.exports=exports.default},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default={},module.exports=exports.default},function(module,exports){"use strict";function doLimit(fn,limit){return function(iterable,iteratee,callback){return fn(iterable,limit,iteratee,callback)}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=doLimit,module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _eachOfLimit(limit){return function(obj,iteratee,callback){function iterateeCallback(err,value){if(running-=1,err)done=!0,callback(err);else{if(value===_breakLoop2.default||done&&running<=0)return done=!0,callback(null);replenish()}}function replenish(){for(;running<limit&&!done;){var elem=nextElem();if(null===elem)return done=!0,void(running<=0&&callback(null));running+=1,iteratee(elem.value,elem.key,(0,_onlyOnce2.default)(iterateeCallback))}}if(callback=(0,_once2.default)(callback||_noop2.default),limit<=0||!obj)return callback(null);var nextElem=(0,_iterator2.default)(obj),done=!1,running=0;replenish()}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=_eachOfLimit;var _noop=__webpack_require__(28),_noop2=_interopRequireDefault(_noop),_once=__webpack_require__(46),_once2=_interopRequireDefault(_once),_iterator=__webpack_require__(138),_iterator2=_interopRequireDefault(_iterator),_onlyOnce=__webpack_require__(32),_onlyOnce2=_interopRequireDefault(_onlyOnce),_breakLoop=__webpack_require__(134),_breakLoop2=_interopRequireDefault(_breakLoop);module.exports=exports.default},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(coll){return iteratorSymbol&&coll[iteratorSymbol]&&coll[iteratorSymbol]()};var iteratorSymbol="function"==typeof Symbol&&Symbol.iterator;module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function createArrayIterator(coll){var i=-1,len=coll.length;return function(){return++i<len?{value:coll[i],key:i}:null}}function createES2015Iterator(iterator){var i=-1;return function(){var item=iterator.next();return item.done?null:(i++,{value:item.value,key:i})}}function createObjectIterator(obj){var okeys=(0,_keys2.default)(obj),i=-1,len=okeys.length;return function(){var key=okeys[++i];return i<len?{value:obj[key],key:key}:null}}function iterator(coll){if((0,_isArrayLike2.default)(coll))return createArrayIterator(coll);var iterator=(0,_getIterator2.default)(coll);return iterator?createES2015Iterator(iterator):createObjectIterator(coll)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=iterator;var _isArrayLike=__webpack_require__(41),_isArrayLike2=_interopRequireDefault(_isArrayLike),_getIterator=__webpack_require__(137),_getIterator2=_interopRequireDefault(_getIterator),_keys=__webpack_require__(225),_keys2=_interopRequireDefault(_keys);module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _parallel(eachfn,tasks,callback){callback=callback||_noop2.default;var results=(0,_isArrayLike2.default)(tasks)?[]:{};eachfn(tasks,function(task,key,callback){task((0,_rest2.default)(function(err,args){args.length<=1&&(args=args[0]),results[key]=args,callback(err)}))},function(err){callback(err,results)})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=_parallel;var _noop=__webpack_require__(28),_noop2=_interopRequireDefault(_noop),_isArrayLike=__webpack_require__(41),_isArrayLike2=_interopRequireDefault(_isArrayLike),_rest=__webpack_require__(33),_rest2=_interopRequireDefault(_rest);module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";(function(setImmediate,process){function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function fallback(fn){setTimeout(fn,0)}function wrap(defer){return(0,_rest2.default)(function(fn,args){defer(function(){fn.apply(null,args)})})}Object.defineProperty(exports,"__esModule",{value:!0}),exports.hasNextTick=exports.hasSetImmediate=void 0,exports.fallback=fallback,exports.wrap=wrap;var _defer,_rest=__webpack_require__(33),_rest2=_interopRequireDefault(_rest),hasSetImmediate=exports.hasSetImmediate="function"==typeof setImmediate&&setImmediate,hasNextTick=exports.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;_defer=hasSetImmediate?setImmediate:hasNextTick?process.nextTick:fallback,exports.default=wrap(_defer)}).call(exports,__webpack_require__(13).setImmediate,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function parallelLimit(tasks,callback){(0,_parallel2.default)(_eachOf2.default,tasks,callback)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=parallelLimit;var _eachOf=__webpack_require__(132),_eachOf2=_interopRequireDefault(_eachOf),_parallel=__webpack_require__(139),_parallel2=_interopRequireDefault(_parallel);module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=function(tasks,callback){function nextTask(args){if(taskIndex===tasks.length)return callback.apply(null,[null].concat(args));var taskCallback=(0,_onlyOnce2.default)((0,_rest2.default)(function(err,args){return err?callback.apply(null,[err].concat(args)):void nextTask(args)}));args.push(taskCallback);var task=tasks[taskIndex++];task.apply(null,args)}if(callback=(0,_once2.default)(callback||_noop2.default),!(0,_isArray2.default)(tasks))return callback(new Error("First argument to waterfall must be an array of functions"));if(!tasks.length)return callback();var taskIndex=0;nextTask([])};var _isArray=__webpack_require__(89),_isArray2=_interopRequireDefault(_isArray),_noop=__webpack_require__(28),_noop2=_interopRequireDefault(_noop),_once=__webpack_require__(46),_once2=_interopRequireDefault(_once),_rest=__webpack_require__(33),_rest2=_interopRequireDefault(_rest),_onlyOnce=__webpack_require__(32),_onlyOnce2=_interopRequireDefault(_onlyOnce);module.exports=exports.default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function whilst(test,iteratee,callback){if(callback=(0,_onlyOnce2.default)(callback||_noop2.default),!test())return callback(null);var next=(0,_rest2.default)(function(err,args){return err?callback(err):test()?iteratee(next):void callback.apply(null,[null].concat(args))});iteratee(next)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=whilst;var _noop=__webpack_require__(28),_noop2=_interopRequireDefault(_noop),_rest=__webpack_require__(33),_rest2=_interopRequireDefault(_rest),_onlyOnce=__webpack_require__(32),_onlyOnce2=_interopRequireDefault(_onlyOnce);module.exports=exports.default},function(module,exports){module.exports=function(ALPHABET){function encode(source){if(0===source.length)return"";for(var digits=[0],i=0;i<source.length;++i){for(var j=0,carry=source[i];j<digits.length;++j)carry+=digits[j]<<8,digits[j]=carry%BASE,carry=carry/BASE|0;for(;carry>0;)digits.push(carry%BASE),carry=carry/BASE|0}for(var string="",k=0;0===source[k]&&k<source.length-1;++k)string+=ALPHABET[0];for(var q=digits.length-1;q>=0;--q)string+=ALPHABET[digits[q]];return string}function decodeUnsafe(string){if(0===string.length)return[];for(var bytes=[0],i=0;i<string.length;i++){var value=ALPHABET_MAP[string[i]];if(void 0===value)return;for(var j=0,carry=value;j<bytes.length;++j)carry+=bytes[j]*BASE,bytes[j]=255&carry,carry>>=8;for(;carry>0;)bytes.push(255&carry),carry>>=8}for(var k=0;string[k]===LEADER&&k<string.length-1;++k)bytes.push(0);return bytes.reverse()}function decode(string){var array=decodeUnsafe(string);if(array)return array;throw new Error("Non-base"+BASE+" character")}for(var ALPHABET_MAP={},BASE=ALPHABET.length,LEADER=ALPHABET.charAt(0),i=0;i<ALPHABET.length;i++)ALPHABET_MAP[ALPHABET.charAt(i)]=i;return{encode:encode,decodeUnsafe:decodeUnsafe,decode:decode}}},function(module,exports){"use strict";function placeHoldersCount(b64){var len=b64.length;if(len%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===b64[len-2]?2:"="===b64[len-1]?1:0}function byteLength(b64){return 3*b64.length/4-placeHoldersCount(b64)}function toByteArray(b64){var i,j,l,tmp,placeHolders,arr,len=b64.length;placeHolders=placeHoldersCount(b64),arr=new Arr(3*len/4-placeHolders),l=placeHolders>0?len-4:len;var L=0;for(i=0,j=0;i<l;i+=4,j+=3)tmp=revLookup[b64.charCodeAt(i)]<<18|revLookup[b64.charCodeAt(i+1)]<<12|revLookup[b64.charCodeAt(i+2)]<<6|revLookup[b64.charCodeAt(i+3)],arr[L++]=tmp>>16&255,arr[L++]=tmp>>8&255,arr[L++]=255&tmp;return 2===placeHolders?(tmp=revLookup[b64.charCodeAt(i)]<<2|revLookup[b64.charCodeAt(i+1)]>>4,arr[L++]=255&tmp):1===placeHolders&&(tmp=revLookup[b64.charCodeAt(i)]<<10|revLookup[b64.charCodeAt(i+1)]<<4|revLookup[b64.charCodeAt(i+2)]>>2,arr[L++]=tmp>>8&255,arr[L++]=255&tmp),arr}function tripletToBase64(num){return lookup[num>>18&63]+lookup[num>>12&63]+lookup[num>>6&63]+lookup[63&num]}function encodeChunk(uint8,start,end){for(var tmp,output=[],i=start;i<end;i+=3)tmp=(uint8[i]<<16)+(uint8[i+1]<<8)+uint8[i+2],output.push(tripletToBase64(tmp));return output.join("")}function fromByteArray(uint8){for(var tmp,len=uint8.length,extraBytes=len%3,output="",parts=[],maxChunkLength=16383,i=0,len2=len-extraBytes;i<len2;i+=maxChunkLength)parts.push(encodeChunk(uint8,i,i+maxChunkLength>len2?len2:i+maxChunkLength));return 1===extraBytes?(tmp=uint8[len-1],output+=lookup[tmp>>2],output+=lookup[tmp<<4&63],output+="=="):2===extraBytes&&(tmp=(uint8[len-2]<<8)+uint8[len-1],output+=lookup[tmp>>10],output+=lookup[tmp>>4&63],output+=lookup[tmp<<2&63],output+="="),parts.push(output),parts.join("")}exports.byteLength=byteLength,exports.toByteArray=toByteArray,exports.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,len=code.length;i<len;++i)lookup[i]=code[i],revLookup[code.charCodeAt(i)]=i;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63},function(module,exports,__webpack_require__){module.exports=__webpack_require__(26)},function(module,exports,__webpack_require__){"use strict";(function(process){function ReadableState(options,stream){Duplex=Duplex||__webpack_require__(26),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.readableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){return Duplex=Duplex||__webpack_require__(26),this instanceof Readable?(this._readableState=new ReadableState(options,this),this.readable=!0,options&&"function"==typeof options.read&&(this._read=options.read),void Stream.call(this)):new Readable(options)}function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(null===chunk)state.reading=!1,onEofChunk(stream,state);else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{var skipAdd;!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk),skipAdd=!state.objectMode&&0===chunk.length),addToFront||(state.reading=!1),skipAdd||(state.flowing&&0===state.length&&!state.sync?(stream.emit("data",chunk),stream.read(0)):(state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):state.buffer.push(chunk),state.needReadable&&emitReadable(stream))),maybeReadMore(stream,state)}else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function computeNewHighWaterMark(n){return n>=MAX_HWM?n=MAX_HWM:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n}function howMuchToRead(n,state){return 0===state.length&&state.ended?0:state.objectMode?0===n?0:1:null===n||isNaN(n)?state.flowing&&state.buffer.length?state.buffer[0].length:state.length:n<=0?0:(n>state.highWaterMark&&(state.highWaterMark=computeNewHighWaterMark(n)),n>state.length?state.ended?state.length:(state.needReadable=!0,0):n)}function chunkInvalid(state,chunk){var er=null;return Buffer.isBuffer(chunk)||"string"==typeof chunk||null===chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(!state.ended){if(state.decoder){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,emitReadable(stream)}}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync?processNextTick(emitReadable_,stream):emitReadable_(stream))}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,processNextTick(maybeReadMore_,stream,state))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(debug("maybeReadMore read 0"),stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;debug("pipeOnDrain",state.awaitDrain),state.awaitDrain&&state.awaitDrain--,0===state.awaitDrain&&EElistenerCount(src,"data")&&(state.flowing=!0,flow(src))}}function nReadingNextTick(self){debug("readable nexttick read 0"),self.read(0)}function resume(stream,state){state.resumeScheduled||(state.resumeScheduled=!0,processNextTick(resume_,stream,state))}function resume_(stream,state){state.reading||(debug("resume read 0"),stream.read(0)),state.resumeScheduled=!1,stream.emit("resume"),flow(stream),state.flowing&&!state.reading&&stream.read(0)}function flow(stream){var state=stream._readableState;if(debug("flow",state.flowing),state.flowing)do var chunk=stream.read();while(null!==chunk&&state.flowing)}function fromList(n,state){var ret,list=state.buffer,length=state.length,stringMode=!!state.decoder,objectMode=!!state.objectMode;if(0===list.length)return null;if(0===length)ret=null;else if(objectMode)ret=list.shift();else if(!n||n>=length)ret=stringMode?list.join(""):1===list.length?list[0]:Buffer.concat(list,length),list.length=0;else if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n),list[0]=buf.slice(n)}else if(n===list[0].length)ret=list.shift();else{ret=stringMode?"":new Buffer(n);for(var c=0,i=0,l=list.length;i<l&&c<n;i++){var buf=list[0],cpy=Math.min(n-c,buf.length);stringMode?ret+=buf.slice(0,cpy):buf.copy(ret,c,0,cpy),cpy<buf.length?list[0]=buf.slice(cpy):list.shift(),c+=cpy}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error("endReadable called on non-empty stream");state.endEmitted||(state.ended=!0,processNextTick(endReadableNT,state,stream))}function endReadableNT(state,stream){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var processNextTick=__webpack_require__(9),isArray=__webpack_require__(21),Buffer=__webpack_require__(0).Buffer;Readable.ReadableState=ReadableState;var Stream,EElistenerCount=(__webpack_require__(6),function(emitter,type){return emitter.listeners(type).length});!function(){try{Stream=__webpack_require__(5)}catch(_){}finally{Stream||(Stream=__webpack_require__(6).EventEmitter)}}();var Buffer=__webpack_require__(0).Buffer,util=__webpack_require__(3);util.inherits=__webpack_require__(1);var debugUtil=__webpack_require__(348),debug=void 0;debug=debugUtil&&debugUtil.debuglog?debugUtil.debuglog("stream"):function(){};var StringDecoder;util.inherits(Readable,Stream);var Duplex,Duplex;Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return state.objectMode||"string"!=typeof chunk||(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=new Buffer(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.isPaused=function(){return this._readableState.flowing===!1},Readable.prototype.setEncoding=function(enc){return StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;Readable.prototype.read=function(n){debug("read",n);var state=this._readableState,nOrig=n;if(("number"!=typeof n||n>0)&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return debug("read: emitReadable",state.length,state.ended),0===state.length&&state.ended?endReadable(this):emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return 0===state.length&&endReadable(this),null;var doRead=state.needReadable;debug("need readable",doRead),(0===state.length||state.length-n<state.highWaterMark)&&(doRead=!0,debug("length less than watermark",doRead)),(state.ended||state.reading)&&(doRead=!1,debug("reading or ended",doRead)),doRead&&(debug("do read"),state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1),doRead&&!state.reading&&(n=howMuchToRead(nOrig,state));var ret;return ret=n>0?fromList(n,state):null,null===ret&&(state.needReadable=!0,n=0),state.length-=n,0!==state.length||state.ended||(state.needReadable=!0),nOrig!==n&&state.ended&&0===state.length&&endReadable(this),null!==ret&&this.emit("data",ret),ret},Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){debug("onunpipe"),readable===src&&cleanup()}function onend(){debug("onend"),dest.end()}function cleanup(){debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),
src.removeListener("end",onend),src.removeListener("end",cleanup),src.removeListener("data",ondata),cleanedUp=!0,!state.awaitDrain||dest._writableState&&!dest._writableState.needDrain||ondrain()}function ondata(chunk){debug("ondata");var ret=dest.write(chunk);!1===ret&&(1!==state.pipesCount||state.pipes[0]!==dest||1!==src.listenerCount("data")||cleanedUp||(debug("false write response, pause",src._readableState.awaitDrain),src._readableState.awaitDrain++),src.pause())}function onerror(er){debug("onerror",er),unpipe(),dest.removeListener("error",onerror),0===EElistenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}function unpipe(){debug("unpipe"),src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?processNextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;return src.on("data",ondata),dest._events&&dest._events.error?isArray(dest._events.error)?dest._events.error.unshift(onerror):dest._events.error=[onerror,dest._events.error]:dest.on("error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(debug("pipe resume"),src.resume()),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var _i=0;_i<len;_i++)dests[_i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);return i===-1?this:(state.pipes.splice(i,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"===ev&&!1!==this._readableState.flowing&&this.resume(),"readable"===ev&&!this._readableState.endEmitted){var state=this._readableState;state.readableListening||(state.readableListening=!0,state.emittedReadable=!1,state.needReadable=!0,state.reading?state.length&&emitReadable(this,state):processNextTick(nReadingNextTick,this))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){var state=this._readableState;return state.flowing||(debug("resume"),state.flowing=!0,resume(this,state)),this},Readable.prototype.pause=function(){return debug("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(debug("pause"),this._readableState.flowing=!1,this.emit("pause")),this},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder&&(chunk=state.decoder.write(chunk)),(!state.objectMode||null!==chunk&&void 0!==chunk)&&(state.objectMode||chunk&&chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)void 0===this[i]&&"function"==typeof stream[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){debug("wrapped _read",n),paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";(function(process,setImmediate){function nop(){}function WriteReq(chunk,encoding,cb){this.chunk=chunk,this.encoding=encoding,this.callback=cb,this.next=null}function WritableState(options,stream){Duplex=Duplex||__webpack_require__(26),options=options||{},this.objectMode=!!options.objectMode,stream instanceof Duplex&&(this.objectMode=this.objectMode||!!options.writableObjectMode);var hwm=options.highWaterMark,defaultHwm=this.objectMode?16:16384;this.highWaterMark=hwm||0===hwm?hwm:defaultHwm,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this),this.corkedRequestsFree.next=new CorkedRequest(this)}function Writable(options){return Duplex=Duplex||__webpack_require__(26),this instanceof Writable||this instanceof Duplex?(this._writableState=new WritableState(options,this),this.writable=!0,options&&("function"==typeof options.write&&(this._write=options.write),"function"==typeof options.writev&&(this._writev=options.writev)),void Stream.call(this)):new Writable(options)}function writeAfterEnd(stream,cb){var er=new Error("write after end");stream.emit("error",er),processNextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=!0;if(!Buffer.isBuffer(chunk)&&"string"!=typeof chunk&&null!==chunk&&void 0!==chunk&&!state.objectMode){var er=new TypeError("Invalid non-string/buffer chunk");stream.emit("error",er),processNextTick(cb,er),valid=!1}return valid}function decodeChunk(state,chunk,encoding){return state.objectMode||state.decodeStrings===!1||"string"!=typeof chunk||(chunk=new Buffer(chunk,encoding)),chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding),Buffer.isBuffer(chunk)&&(encoding="buffer");var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(ret||(state.needDrain=!0),state.writing||state.corked){var last=state.lastBufferedRequest;state.lastBufferedRequest=new WriteReq(chunk,encoding,cb),last?last.next=state.lastBufferedRequest:state.bufferedRequest=state.lastBufferedRequest,state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev?stream._writev(chunk,state.onwrite):stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){--state.pendingcb,sync?processNextTick(cb,er):cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);finished||state.corked||state.bufferProcessing||!state.bufferedRequest||clearBuffer(stream,state),sync?asyncWrite(afterWrite,stream,state,finished,cb):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=new Array(l),holder=state.corkedRequestsFree;holder.entry=entry;for(var count=0;entry;)buffer[count]=entry,entry=entry.next,count+=1;doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,state.corkedRequestsFree=holder.next,holder.next=null}else{for(;entry;){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,!1,len,chunk,encoding,cb),entry=entry.next,state.writing)break}null===entry&&(state.lastBufferedRequest=null)}state.bufferedRequestCount=0,state.bufferedRequest=entry,state.bufferProcessing=!1}function needFinish(state){return state.ending&&0===state.length&&null===state.bufferedRequest&&!state.finished&&!state.writing}function prefinish(stream,state){state.prefinished||(state.prefinished=!0,stream.emit("prefinish"))}function finishMaybe(stream,state){var need=needFinish(state);return need&&(0===state.pendingcb?(prefinish(stream,state),state.finished=!0,stream.emit("finish")):prefinish(stream,state)),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?processNextTick(cb):stream.once("finish",cb)),state.ended=!0,stream.writable=!1}function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(err){var entry=_this.entry;for(_this.entry=null;entry;){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree?state.corkedRequestsFree.next=_this:state.corkedRequestsFree=_this}}module.exports=Writable;var processNextTick=__webpack_require__(9),asyncWrite=!process.browser&&["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:processNextTick,Buffer=__webpack_require__(0).Buffer;Writable.WritableState=WritableState;var util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Stream,internalUtil={deprecate:__webpack_require__(30)};!function(){try{Stream=__webpack_require__(5)}catch(_){}finally{Stream||(Stream=__webpack_require__(6).EventEmitter)}}();var Buffer=__webpack_require__(0).Buffer;util.inherits(Writable,Stream);var Duplex;WritableState.prototype.getBuffer=function(){for(var current=this.bufferedRequest,out=[];current;)out.push(current),current=current.next;return out},function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(_){}}();var Duplex;Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return"function"==typeof encoding&&(cb=encoding,encoding=null),Buffer.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=nop),state.ended?writeAfterEnd(this,cb):validChunk(this,state,chunk,cb)&&(state.pendingcb++,ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype.cork=function(){var state=this._writableState;state.corked++},Writable.prototype.uncork=function(){var state=this._writableState;state.corked&&(state.corked--,state.writing||state.corked||state.finished||state.bufferProcessing||!state.bufferedRequest||clearBuffer(this,state))},Writable.prototype.setDefaultEncoding=function(encoding){if("string"==typeof encoding&&(encoding=encoding.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+encoding);this._writableState.defaultEncoding=encoding},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))},Writable.prototype._writev=null,Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),null!==chunk&&void 0!==chunk&&this.write(chunk,encoding),state.corked&&(state.corked=1,this.uncork()),state.ending||state.finished||endWritable(this,state,cb)}}).call(exports,__webpack_require__(2),__webpack_require__(13).setImmediate)},function(module,exports,__webpack_require__){(function(module){!function(module,exports){"use strict";function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}function BN(number,base,endian){return BN.isBN(number)?number:(this.negative=0,this.words=null,this.length=0,this.red=null,void(null!==number&&("le"!==base&&"be"!==base||(endian=base,base=10),this._init(number||0,base||10,endian||"be"))))}function parseHex(str,start,end){for(var r=0,len=Math.min(str.length,end),i=start;i<len;i++){var c=str.charCodeAt(i)-48;r<<=4,r|=c>=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<len;i++){var c=str.charCodeAt(i)-48;r*=mul,r+=c>=49?c-49+10:c>=17?c-17+10:c}return r}function toBitArray(num){for(var w=new Array(num.bitLength()),bit=0;bit<w.length;bit++){var off=bit/26|0,wbit=bit%26;w[bit]=(num.words[off]&1<<wbit)>>>wbit}return w}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<len;k++){for(var ncarry=carry>>>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;a=0|self.words[i],b=0|num.words[j],r=a*b+rword,ncarry+=r/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()}function bigMulTo(self,num,out){out.negative=num.negative^self.negative,out.length=self.length+num.length;for(var carry=0,hncarry=0,k=0;k<out.length-1;k++){var ncarry=hncarry;hncarry=0;for(var 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,a=0|self.words[i],b=0|num.words[j],r=a*b,lo=67108863&r;ncarry=ncarry+(r/67108864|0)|0,lo=lo+rword|0,rword=67108863&lo,ncarry=ncarry+(lo>>>26)|0,hncarry+=ncarry>>>26,ncarry&=67108863}out.words[k]=rword,carry=ncarry,ncarry=hncarry}return 0!==carry?out.words[k]=carry:out.length--,out.strip()}function jumboMulTo(self,num,out){var fftm=new FFTM;return fftm.mulp(self,num,out)}function FFTM(x,y){this.x=x,this.y=y}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)}"object"==typeof module?module.exports=BN:exports.BN=BN,BN.BN=BN,BN.wordSize=26;var Buffer;try{Buffer=__webpack_require__(0).Buffer}catch(e){}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),number=number.toString().replace(/\s+/g,"");var start=0;"-"===number[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<this.length;i++)this.words[i]=0;var j,w,off=0;if("be"===endian)for(i=number.length-1,j=0;i>=0;i-=3)w=number[i]|number[i-1]<<8|number[i-2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,off+=24,off>=26&&(off-=26,j++);else if("le"===endian)for(i=0,j=0;i<number.length;i+=3)w=number[i]|number[i+1]<<8|number[i+2]<<16,this.words[j]|=w<<off&67108863,this.words[j+1]=w>>>26-off&67108863,off+=24,off>=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<this.length;i++)this.words[i]=0;var j,w,off=0;for(i=number.length-6,j=0;i>=start;i-=6)w=parseHex(number,i,i+6),this.words[j]|=w<<off&67108863,this.words[j+1]|=w>>>26-off&4194303,off+=24,off>=26&&(off-=26,j++);i+6!==start&&(w=parseHex(number,start,i+6),this.words[j]|=w<<off&67108863,this.words[j+1]|=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;i<end;i+=limbLen)word=parseBase(number,i,i+limbLen,base),this.imuln(limbPow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word);if(0!==mod){var pow=1;for(word=parseBase(number,i,number.length,base),i=0;i<mod;i++)pow*=base;this.imuln(pow),this.words[0]+word<67108864?this.words[0]+=word:this._iaddn(word)}},BN.prototype.copy=function(dest){dest.words=new Array(this.length);for(var i=0;i<this.length;i++)dest.words[i]=this.words[i];dest.length=this.length,dest.negative=this.negative,dest.red=this.red},BN.prototype.clone=function(){var r=new BN(null);return this.copy(r),r},BN.prototype._expand=function(size){for(;this.length<size;)this.words[this.length++]=0;return this},BN.prototype.strip=function(){for(;this.length>1&&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?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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];BN.prototype.toString=function(base,padding){base=base||10,padding=0|padding||1;var out;if(16===base||"hex"===base){out="";for(var off=0,carry=0,i=0;i<this.length;i++){var w=this.words[i],word=(16777215&(w<<off|carry)).toString(16);carry=w>>>24-off&16777215,out=0!==carry||i!==this.length-1?zeros[6-word.length]+word+out:word+out,off+=2,off>=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);c=c.idivn(groupBase),out=c.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("undefined"!=typeof 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<reqLength;i++)res[i]=0}else{for(i=0;i<reqLength-byteLength;i++)res[i]=0;for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),res[reqLength-i-1]=b}return res},Math.clz32?BN.prototype._countBits=function(w){return 32-Math.clz32(w)}:BN.prototype._countBits=function(w){var t=w,r=0;return t>=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;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(r+=b,26!==b)break}return r},BN.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function(width){return 0!==this.negative?this.abs().inotn(width).iaddn(1):this.clone()},BN.prototype.fromTwos=function(width){return this.testn(width-1)?this.notn(width).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function(){return 0!==this.negative},BN.prototype.neg=function(){return this.clone().ineg()},BN.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function(num){for(;this.length<num.length;)this.words[this.length++]=0;for(var i=0;i<num.length;i++)this.words[i]=this.words[i]|num.words[i];return this.strip()},BN.prototype.ior=function(num){return assert(0===(this.negative|num.negative)),this.iuor(num)},BN.prototype.or=function(num){return this.length>num.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;i<b.length;i++)this.words[i]=this.words[i]&num.words[i];return this.length=b.length,this.strip()},BN.prototype.iand=function(num){return assert(0===(this.negative|num.negative)),this.iuand(num)},BN.prototype.and=function(num){return this.length>num.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;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this.strip()},BN.prototype.ixor=function(num){return assert(0===(this.negative|num.negative)),this.iuxor(num)},BN.prototype.xor=function(num){return this.length>num.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;i<bytesNeeded;i++)this.words[i]=67108863&~this.words[i];return bitsLeft>0&&(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),val?this.words[off]=this.words[off]|1<<wbit:this.words[off]=this.words[off]&~(1<<wbit),this.strip()},BN.prototype.iadd=function(num){var r;if(0!==this.negative&&0===num.negative)return this.negative=0,r=this.isub(num),this.negative^=1,this._normSign();if(0===this.negative&&0!==num.negative)return num.negative=0,r=this.isub(num),num.negative=1,r._normSign();var a,b;this.length>num.length?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])+(0|b.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,this.words[i]=67108863&r,carry=r>>>26;if(this.length=a.length,0!==carry)this.words[this.length]=carry,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},BN.prototype.add=function(num){var res;return 0!==num.negative&&0===this.negative?(num.negative=0,res=this.sub(num),num.negative^=1,res):0===num.negative&&0!==this.negative?(this.negative=0,res=num.sub(this),this.negative=1,res):this.length>num.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 cmp=this.cmp(num);if(0===cmp)return this.negative=0,this.length=1,this.words[0]=0,this;var a,b;cmp>0?(a=this,b=num):(a=num,b=this);for(var carry=0,i=0;i<b.length;i++)r=(0|a.words[i])-(0|b.words[i])+carry,carry=r>>26,this.words[i]=67108863&r;for(;0!==carry&&i<a.length;i++)r=(0|a.words[i])+carry,carry=r>>26,this.words[i]=67108863&r;if(0===carry&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this.strip()},BN.prototype.sub=function(num){return this.clone().isub(num)};var comb10MulTo=function(self,num,out){var lo,mid,hi,a=self.words,b=num.words,o=out.words,c=0,a0=0|a[0],al0=8191&a0,ah0=a0>>>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,lo=Math.imul(al0,bl0),mid=Math.imul(al0,bh0),mid=mid+Math.imul(ah0,bl0)|0,hi=Math.imul(ah0,bh0);var w0=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w0>>>26)|0,w0&=67108863,lo=Math.imul(al1,bl0),mid=Math.imul(al1,bh0),mid=mid+Math.imul(ah1,bl0)|0,hi=Math.imul(ah1,bh0),lo=lo+Math.imul(al0,bl1)|0,mid=mid+Math.imul(al0,bh1)|0,mid=mid+Math.imul(ah0,bl1)|0,hi=hi+Math.imul(ah0,bh1)|0;var w1=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w1>>>26)|0,w1&=67108863,lo=Math.imul(al2,bl0),mid=Math.imul(al2,bh0),mid=mid+Math.imul(ah2,bl0)|0,hi=Math.imul(ah2,bh0),lo=lo+Math.imul(al1,bl1)|0,mid=mid+Math.imul(al1,bh1)|0,mid=mid+Math.imul(ah1,bl1)|0,hi=hi+Math.imul(ah1,bh1)|0,lo=lo+Math.imul(al0,bl2)|0,mid=mid+Math.imul(al0,bh2)|0,mid=mid+Math.imul(ah0,bl2)|0,hi=hi+Math.imul(ah0,bh2)|0;var w2=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w2>>>26)|0,w2&=67108863,lo=Math.imul(al3,bl0),mid=Math.imul(al3,bh0),mid=mid+Math.imul(ah3,bl0)|0,hi=Math.imul(ah3,bh0),lo=lo+Math.imul(al2,bl1)|0,mid=mid+Math.imul(al2,bh1)|0,mid=mid+Math.imul(ah2,bl1)|0,hi=hi+Math.imul(ah2,bh1)|0,lo=lo+Math.imul(al1,bl2)|0,mid=mid+Math.imul(al1,bh2)|0,mid=mid+Math.imul(ah1,bl2)|0,hi=hi+Math.imul(ah1,bh2)|0,lo=lo+Math.imul(al0,bl3)|0,mid=mid+Math.imul(al0,bh3)|0,mid=mid+Math.imul(ah0,bl3)|0,hi=hi+Math.imul(ah0,bh3)|0;var w3=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w3>>>26)|0,w3&=67108863,lo=Math.imul(al4,bl0),mid=Math.imul(al4,bh0),mid=mid+Math.imul(ah4,bl0)|0,hi=Math.imul(ah4,bh0),lo=lo+Math.imul(al3,bl1)|0,mid=mid+Math.imul(al3,bh1)|0,mid=mid+Math.imul(ah3,bl1)|0,hi=hi+Math.imul(ah3,bh1)|0,lo=lo+Math.imul(al2,bl2)|0,mid=mid+Math.imul(al2,bh2)|0,mid=mid+Math.imul(ah2,bl2)|0,hi=hi+Math.imul(ah2,bh2)|0,lo=lo+Math.imul(al1,bl3)|0,mid=mid+Math.imul(al1,bh3)|0,mid=mid+Math.imul(ah1,bl3)|0,hi=hi+Math.imul(ah1,bh3)|0,lo=lo+Math.imul(al0,bl4)|0,mid=mid+Math.imul(al0,bh4)|0,mid=mid+Math.imul(ah0,bl4)|0,hi=hi+Math.imul(ah0,bh4)|0;var w4=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w4>>>26)|0,w4&=67108863,lo=Math.imul(al5,bl0),mid=Math.imul(al5,bh0),mid=mid+Math.imul(ah5,bl0)|0,hi=Math.imul(ah5,bh0),lo=lo+Math.imul(al4,bl1)|0,mid=mid+Math.imul(al4,bh1)|0,mid=mid+Math.imul(ah4,bl1)|0,hi=hi+Math.imul(ah4,bh1)|0,lo=lo+Math.imul(al3,bl2)|0,mid=mid+Math.imul(al3,bh2)|0,mid=mid+Math.imul(ah3,bl2)|0,hi=hi+Math.imul(ah3,bh2)|0,lo=lo+Math.imul(al2,bl3)|0,mid=mid+Math.imul(al2,bh3)|0,mid=mid+Math.imul(ah2,bl3)|0,hi=hi+Math.imul(ah2,bh3)|0,lo=lo+Math.imul(al1,bl4)|0,mid=mid+Math.imul(al1,bh4)|0,mid=mid+Math.imul(ah1,bl4)|0,hi=hi+Math.imul(ah1,bh4)|0,lo=lo+Math.imul(al0,bl5)|0,mid=mid+Math.imul(al0,bh5)|0,mid=mid+Math.imul(ah0,bl5)|0,hi=hi+Math.imul(ah0,bh5)|0;var w5=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w5>>>26)|0,w5&=67108863,lo=Math.imul(al6,bl0),mid=Math.imul(al6,bh0),mid=mid+Math.imul(ah6,bl0)|0,hi=Math.imul(ah6,bh0),lo=lo+Math.imul(al5,bl1)|0,mid=mid+Math.imul(al5,bh1)|0,mid=mid+Math.imul(ah5,bl1)|0,hi=hi+Math.imul(ah5,bh1)|0,lo=lo+Math.imul(al4,bl2)|0,mid=mid+Math.imul(al4,bh2)|0,mid=mid+Math.imul(ah4,bl2)|0,hi=hi+Math.imul(ah4,bh2)|0,lo=lo+Math.imul(al3,bl3)|0,mid=mid+Math.imul(al3,bh3)|0,mid=mid+Math.imul(ah3,bl3)|0,hi=hi+Math.imul(ah3,bh3)|0,lo=lo+Math.imul(al2,bl4)|0,mid=mid+Math.imul(al2,bh4)|0,mid=mid+Math.imul(ah2,bl4)|0,hi=hi+Math.imul(ah2,bh4)|0,lo=lo+Math.imul(al1,bl5)|0,mid=mid+Math.imul(al1,bh5)|0,mid=mid+Math.imul(ah1,bl5)|0,hi=hi+Math.imul(ah1,bh5)|0,lo=lo+Math.imul(al0,bl6)|0,mid=mid+Math.imul(al0,bh6)|0,mid=mid+Math.imul(ah0,bl6)|0,hi=hi+Math.imul(ah0,bh6)|0;var w6=(c+lo|0)+((8191&mid)<<13)|0;
c=(hi+(mid>>>13)|0)+(w6>>>26)|0,w6&=67108863,lo=Math.imul(al7,bl0),mid=Math.imul(al7,bh0),mid=mid+Math.imul(ah7,bl0)|0,hi=Math.imul(ah7,bh0),lo=lo+Math.imul(al6,bl1)|0,mid=mid+Math.imul(al6,bh1)|0,mid=mid+Math.imul(ah6,bl1)|0,hi=hi+Math.imul(ah6,bh1)|0,lo=lo+Math.imul(al5,bl2)|0,mid=mid+Math.imul(al5,bh2)|0,mid=mid+Math.imul(ah5,bl2)|0,hi=hi+Math.imul(ah5,bh2)|0,lo=lo+Math.imul(al4,bl3)|0,mid=mid+Math.imul(al4,bh3)|0,mid=mid+Math.imul(ah4,bl3)|0,hi=hi+Math.imul(ah4,bh3)|0,lo=lo+Math.imul(al3,bl4)|0,mid=mid+Math.imul(al3,bh4)|0,mid=mid+Math.imul(ah3,bl4)|0,hi=hi+Math.imul(ah3,bh4)|0,lo=lo+Math.imul(al2,bl5)|0,mid=mid+Math.imul(al2,bh5)|0,mid=mid+Math.imul(ah2,bl5)|0,hi=hi+Math.imul(ah2,bh5)|0,lo=lo+Math.imul(al1,bl6)|0,mid=mid+Math.imul(al1,bh6)|0,mid=mid+Math.imul(ah1,bl6)|0,hi=hi+Math.imul(ah1,bh6)|0,lo=lo+Math.imul(al0,bl7)|0,mid=mid+Math.imul(al0,bh7)|0,mid=mid+Math.imul(ah0,bl7)|0,hi=hi+Math.imul(ah0,bh7)|0;var w7=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w7>>>26)|0,w7&=67108863,lo=Math.imul(al8,bl0),mid=Math.imul(al8,bh0),mid=mid+Math.imul(ah8,bl0)|0,hi=Math.imul(ah8,bh0),lo=lo+Math.imul(al7,bl1)|0,mid=mid+Math.imul(al7,bh1)|0,mid=mid+Math.imul(ah7,bl1)|0,hi=hi+Math.imul(ah7,bh1)|0,lo=lo+Math.imul(al6,bl2)|0,mid=mid+Math.imul(al6,bh2)|0,mid=mid+Math.imul(ah6,bl2)|0,hi=hi+Math.imul(ah6,bh2)|0,lo=lo+Math.imul(al5,bl3)|0,mid=mid+Math.imul(al5,bh3)|0,mid=mid+Math.imul(ah5,bl3)|0,hi=hi+Math.imul(ah5,bh3)|0,lo=lo+Math.imul(al4,bl4)|0,mid=mid+Math.imul(al4,bh4)|0,mid=mid+Math.imul(ah4,bl4)|0,hi=hi+Math.imul(ah4,bh4)|0,lo=lo+Math.imul(al3,bl5)|0,mid=mid+Math.imul(al3,bh5)|0,mid=mid+Math.imul(ah3,bl5)|0,hi=hi+Math.imul(ah3,bh5)|0,lo=lo+Math.imul(al2,bl6)|0,mid=mid+Math.imul(al2,bh6)|0,mid=mid+Math.imul(ah2,bl6)|0,hi=hi+Math.imul(ah2,bh6)|0,lo=lo+Math.imul(al1,bl7)|0,mid=mid+Math.imul(al1,bh7)|0,mid=mid+Math.imul(ah1,bl7)|0,hi=hi+Math.imul(ah1,bh7)|0,lo=lo+Math.imul(al0,bl8)|0,mid=mid+Math.imul(al0,bh8)|0,mid=mid+Math.imul(ah0,bl8)|0,hi=hi+Math.imul(ah0,bh8)|0;var w8=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w8>>>26)|0,w8&=67108863,lo=Math.imul(al9,bl0),mid=Math.imul(al9,bh0),mid=mid+Math.imul(ah9,bl0)|0,hi=Math.imul(ah9,bh0),lo=lo+Math.imul(al8,bl1)|0,mid=mid+Math.imul(al8,bh1)|0,mid=mid+Math.imul(ah8,bl1)|0,hi=hi+Math.imul(ah8,bh1)|0,lo=lo+Math.imul(al7,bl2)|0,mid=mid+Math.imul(al7,bh2)|0,mid=mid+Math.imul(ah7,bl2)|0,hi=hi+Math.imul(ah7,bh2)|0,lo=lo+Math.imul(al6,bl3)|0,mid=mid+Math.imul(al6,bh3)|0,mid=mid+Math.imul(ah6,bl3)|0,hi=hi+Math.imul(ah6,bh3)|0,lo=lo+Math.imul(al5,bl4)|0,mid=mid+Math.imul(al5,bh4)|0,mid=mid+Math.imul(ah5,bl4)|0,hi=hi+Math.imul(ah5,bh4)|0,lo=lo+Math.imul(al4,bl5)|0,mid=mid+Math.imul(al4,bh5)|0,mid=mid+Math.imul(ah4,bl5)|0,hi=hi+Math.imul(ah4,bh5)|0,lo=lo+Math.imul(al3,bl6)|0,mid=mid+Math.imul(al3,bh6)|0,mid=mid+Math.imul(ah3,bl6)|0,hi=hi+Math.imul(ah3,bh6)|0,lo=lo+Math.imul(al2,bl7)|0,mid=mid+Math.imul(al2,bh7)|0,mid=mid+Math.imul(ah2,bl7)|0,hi=hi+Math.imul(ah2,bh7)|0,lo=lo+Math.imul(al1,bl8)|0,mid=mid+Math.imul(al1,bh8)|0,mid=mid+Math.imul(ah1,bl8)|0,hi=hi+Math.imul(ah1,bh8)|0,lo=lo+Math.imul(al0,bl9)|0,mid=mid+Math.imul(al0,bh9)|0,mid=mid+Math.imul(ah0,bl9)|0,hi=hi+Math.imul(ah0,bh9)|0;var w9=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w9>>>26)|0,w9&=67108863,lo=Math.imul(al9,bl1),mid=Math.imul(al9,bh1),mid=mid+Math.imul(ah9,bl1)|0,hi=Math.imul(ah9,bh1),lo=lo+Math.imul(al8,bl2)|0,mid=mid+Math.imul(al8,bh2)|0,mid=mid+Math.imul(ah8,bl2)|0,hi=hi+Math.imul(ah8,bh2)|0,lo=lo+Math.imul(al7,bl3)|0,mid=mid+Math.imul(al7,bh3)|0,mid=mid+Math.imul(ah7,bl3)|0,hi=hi+Math.imul(ah7,bh3)|0,lo=lo+Math.imul(al6,bl4)|0,mid=mid+Math.imul(al6,bh4)|0,mid=mid+Math.imul(ah6,bl4)|0,hi=hi+Math.imul(ah6,bh4)|0,lo=lo+Math.imul(al5,bl5)|0,mid=mid+Math.imul(al5,bh5)|0,mid=mid+Math.imul(ah5,bl5)|0,hi=hi+Math.imul(ah5,bh5)|0,lo=lo+Math.imul(al4,bl6)|0,mid=mid+Math.imul(al4,bh6)|0,mid=mid+Math.imul(ah4,bl6)|0,hi=hi+Math.imul(ah4,bh6)|0,lo=lo+Math.imul(al3,bl7)|0,mid=mid+Math.imul(al3,bh7)|0,mid=mid+Math.imul(ah3,bl7)|0,hi=hi+Math.imul(ah3,bh7)|0,lo=lo+Math.imul(al2,bl8)|0,mid=mid+Math.imul(al2,bh8)|0,mid=mid+Math.imul(ah2,bl8)|0,hi=hi+Math.imul(ah2,bh8)|0,lo=lo+Math.imul(al1,bl9)|0,mid=mid+Math.imul(al1,bh9)|0,mid=mid+Math.imul(ah1,bl9)|0,hi=hi+Math.imul(ah1,bh9)|0;var w10=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w10>>>26)|0,w10&=67108863,lo=Math.imul(al9,bl2),mid=Math.imul(al9,bh2),mid=mid+Math.imul(ah9,bl2)|0,hi=Math.imul(ah9,bh2),lo=lo+Math.imul(al8,bl3)|0,mid=mid+Math.imul(al8,bh3)|0,mid=mid+Math.imul(ah8,bl3)|0,hi=hi+Math.imul(ah8,bh3)|0,lo=lo+Math.imul(al7,bl4)|0,mid=mid+Math.imul(al7,bh4)|0,mid=mid+Math.imul(ah7,bl4)|0,hi=hi+Math.imul(ah7,bh4)|0,lo=lo+Math.imul(al6,bl5)|0,mid=mid+Math.imul(al6,bh5)|0,mid=mid+Math.imul(ah6,bl5)|0,hi=hi+Math.imul(ah6,bh5)|0,lo=lo+Math.imul(al5,bl6)|0,mid=mid+Math.imul(al5,bh6)|0,mid=mid+Math.imul(ah5,bl6)|0,hi=hi+Math.imul(ah5,bh6)|0,lo=lo+Math.imul(al4,bl7)|0,mid=mid+Math.imul(al4,bh7)|0,mid=mid+Math.imul(ah4,bl7)|0,hi=hi+Math.imul(ah4,bh7)|0,lo=lo+Math.imul(al3,bl8)|0,mid=mid+Math.imul(al3,bh8)|0,mid=mid+Math.imul(ah3,bl8)|0,hi=hi+Math.imul(ah3,bh8)|0,lo=lo+Math.imul(al2,bl9)|0,mid=mid+Math.imul(al2,bh9)|0,mid=mid+Math.imul(ah2,bl9)|0,hi=hi+Math.imul(ah2,bh9)|0;var w11=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w11>>>26)|0,w11&=67108863,lo=Math.imul(al9,bl3),mid=Math.imul(al9,bh3),mid=mid+Math.imul(ah9,bl3)|0,hi=Math.imul(ah9,bh3),lo=lo+Math.imul(al8,bl4)|0,mid=mid+Math.imul(al8,bh4)|0,mid=mid+Math.imul(ah8,bl4)|0,hi=hi+Math.imul(ah8,bh4)|0,lo=lo+Math.imul(al7,bl5)|0,mid=mid+Math.imul(al7,bh5)|0,mid=mid+Math.imul(ah7,bl5)|0,hi=hi+Math.imul(ah7,bh5)|0,lo=lo+Math.imul(al6,bl6)|0,mid=mid+Math.imul(al6,bh6)|0,mid=mid+Math.imul(ah6,bl6)|0,hi=hi+Math.imul(ah6,bh6)|0,lo=lo+Math.imul(al5,bl7)|0,mid=mid+Math.imul(al5,bh7)|0,mid=mid+Math.imul(ah5,bl7)|0,hi=hi+Math.imul(ah5,bh7)|0,lo=lo+Math.imul(al4,bl8)|0,mid=mid+Math.imul(al4,bh8)|0,mid=mid+Math.imul(ah4,bl8)|0,hi=hi+Math.imul(ah4,bh8)|0,lo=lo+Math.imul(al3,bl9)|0,mid=mid+Math.imul(al3,bh9)|0,mid=mid+Math.imul(ah3,bl9)|0,hi=hi+Math.imul(ah3,bh9)|0;var w12=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w12>>>26)|0,w12&=67108863,lo=Math.imul(al9,bl4),mid=Math.imul(al9,bh4),mid=mid+Math.imul(ah9,bl4)|0,hi=Math.imul(ah9,bh4),lo=lo+Math.imul(al8,bl5)|0,mid=mid+Math.imul(al8,bh5)|0,mid=mid+Math.imul(ah8,bl5)|0,hi=hi+Math.imul(ah8,bh5)|0,lo=lo+Math.imul(al7,bl6)|0,mid=mid+Math.imul(al7,bh6)|0,mid=mid+Math.imul(ah7,bl6)|0,hi=hi+Math.imul(ah7,bh6)|0,lo=lo+Math.imul(al6,bl7)|0,mid=mid+Math.imul(al6,bh7)|0,mid=mid+Math.imul(ah6,bl7)|0,hi=hi+Math.imul(ah6,bh7)|0,lo=lo+Math.imul(al5,bl8)|0,mid=mid+Math.imul(al5,bh8)|0,mid=mid+Math.imul(ah5,bl8)|0,hi=hi+Math.imul(ah5,bh8)|0,lo=lo+Math.imul(al4,bl9)|0,mid=mid+Math.imul(al4,bh9)|0,mid=mid+Math.imul(ah4,bl9)|0,hi=hi+Math.imul(ah4,bh9)|0;var w13=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w13>>>26)|0,w13&=67108863,lo=Math.imul(al9,bl5),mid=Math.imul(al9,bh5),mid=mid+Math.imul(ah9,bl5)|0,hi=Math.imul(ah9,bh5),lo=lo+Math.imul(al8,bl6)|0,mid=mid+Math.imul(al8,bh6)|0,mid=mid+Math.imul(ah8,bl6)|0,hi=hi+Math.imul(ah8,bh6)|0,lo=lo+Math.imul(al7,bl7)|0,mid=mid+Math.imul(al7,bh7)|0,mid=mid+Math.imul(ah7,bl7)|0,hi=hi+Math.imul(ah7,bh7)|0,lo=lo+Math.imul(al6,bl8)|0,mid=mid+Math.imul(al6,bh8)|0,mid=mid+Math.imul(ah6,bl8)|0,hi=hi+Math.imul(ah6,bh8)|0,lo=lo+Math.imul(al5,bl9)|0,mid=mid+Math.imul(al5,bh9)|0,mid=mid+Math.imul(ah5,bl9)|0,hi=hi+Math.imul(ah5,bh9)|0;var w14=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w14>>>26)|0,w14&=67108863,lo=Math.imul(al9,bl6),mid=Math.imul(al9,bh6),mid=mid+Math.imul(ah9,bl6)|0,hi=Math.imul(ah9,bh6),lo=lo+Math.imul(al8,bl7)|0,mid=mid+Math.imul(al8,bh7)|0,mid=mid+Math.imul(ah8,bl7)|0,hi=hi+Math.imul(ah8,bh7)|0,lo=lo+Math.imul(al7,bl8)|0,mid=mid+Math.imul(al7,bh8)|0,mid=mid+Math.imul(ah7,bl8)|0,hi=hi+Math.imul(ah7,bh8)|0,lo=lo+Math.imul(al6,bl9)|0,mid=mid+Math.imul(al6,bh9)|0,mid=mid+Math.imul(ah6,bl9)|0,hi=hi+Math.imul(ah6,bh9)|0;var w15=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w15>>>26)|0,w15&=67108863,lo=Math.imul(al9,bl7),mid=Math.imul(al9,bh7),mid=mid+Math.imul(ah9,bl7)|0,hi=Math.imul(ah9,bh7),lo=lo+Math.imul(al8,bl8)|0,mid=mid+Math.imul(al8,bh8)|0,mid=mid+Math.imul(ah8,bl8)|0,hi=hi+Math.imul(ah8,bh8)|0,lo=lo+Math.imul(al7,bl9)|0,mid=mid+Math.imul(al7,bh9)|0,mid=mid+Math.imul(ah7,bl9)|0,hi=hi+Math.imul(ah7,bh9)|0;var w16=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w16>>>26)|0,w16&=67108863,lo=Math.imul(al9,bl8),mid=Math.imul(al9,bh8),mid=mid+Math.imul(ah9,bl8)|0,hi=Math.imul(ah9,bh8),lo=lo+Math.imul(al8,bl9)|0,mid=mid+Math.imul(al8,bh9)|0,mid=mid+Math.imul(ah8,bl9)|0,hi=hi+Math.imul(ah8,bh9)|0;var w17=(c+lo|0)+((8191&mid)<<13)|0;c=(hi+(mid>>>13)|0)+(w17>>>26)|0,w17&=67108863,lo=Math.imul(al9,bl9),mid=Math.imul(al9,bh9),mid=mid+Math.imul(ah9,bl9)|0,hi=Math.imul(ah9,bh9);var w18=(c+lo|0)+((8191&mid)<<13)|0;return c=(hi+(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};Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function(num,out){var res,len=this.length+num.length;return res=10===this.length&&10===num.length?comb10MulTo(this,num,out):len<63?smallMulTo(this,num,out):len<1024?bigMulTo(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<N;i++)t[i]=this.revBin(i,l,N);return t},FFTM.prototype.revBin=function(x,l,N){if(0===x||x===N-1)return x;for(var rb=0,i=0;i<l;i++)rb|=(1&x)<<l-i-1,x>>=1;return rb},FFTM.prototype.permute=function(rbt,rws,iws,rtws,itws,N){for(var i=0;i<N;i++)rtws[i]=rws[rbt[i]],itws[i]=iws[rbt[i]]},FFTM.prototype.transform=function(rws,iws,rtws,itws,N,rbt){this.permute(rbt,rws,iws,rtws,itws,N);for(var s=1;s<N;s<<=1)for(var l=s<<1,rtwdf=Math.cos(2*Math.PI/l),itwdf=Math.sin(2*Math.PI/l),p=0;p<N;p+=l)for(var rtwdf_=rtwdf,itwdf_=itwdf,j=0;j<s;j++){var re=rtws[p+j],ie=itws[p+j],ro=rtws[p+j+s],io=itws[p+j+s],rx=rtwdf_*ro-itwdf_*io;io=rtwdf_*io+itwdf_*ro,ro=rx,rtws[p+j]=re+ro,itws[p+j]=ie+io,rtws[p+j+s]=re-ro,itws[p+j+s]=ie-io,j!==l&&(rx=rtwdf*rtwdf_-itwdf*itwdf_,itwdf_=rtwdf*itwdf_+itwdf*rtwdf_,rtwdf_=rx)}},FFTM.prototype.guessLen13b=function(n,m){var N=1|Math.max(m,n),odd=1&N,i=0;for(N=N/2|0;N;N>>>=1)i++;return 1<<i+1+odd},FFTM.prototype.conjugate=function(rws,iws,N){if(!(N<=1))for(var i=0;i<N/2;i++){var t=rws[i];rws[i]=rws[N-i-1],rws[N-i-1]=t,t=iws[i],iws[i]=-iws[N-i-1],iws[N-i-1]=-t}},FFTM.prototype.normalize13b=function(ws,N){for(var carry=0,i=0;i<N/2;i++){var w=8192*Math.round(ws[2*i+1]/N)+Math.round(ws[2*i]/N)+carry;ws[i]=67108863&w,carry=w<67108864?0:w/67108864|0}return ws},FFTM.prototype.convert13b=function(ws,len,rws,N){for(var carry=0,i=0;i<len;i++)carry+=0|ws[i],rws[2*i]=8191&carry,carry>>>=13,rws[2*i+1]=8191&carry,carry>>>=13;for(i=2*len;i<N;++i)rws[i]=0;assert(0===carry),assert(0===(carry&-8192))},FFTM.prototype.stub=function(N){for(var ph=new Array(N),i=0;i<N;i++)ph[i]=0;return ph},FFTM.prototype.mulp=function(x,y,out){var N=2*this.guessLen13b(x.length,y.length),rbt=this.makeRBT(N),_=this.stub(N),rws=new Array(N),rwst=new Array(N),iwst=new Array(N),nrws=new Array(N),nrwst=new Array(N),niwst=new Array(N),rmws=out.words;rmws.length=N,this.convert13b(x.words,x.length,rws,N),this.convert13b(y.words,y.length,nrws,N),this.transform(rws,_,rwst,iwst,N,rbt),this.transform(nrws,_,nrwst,niwst,N,rbt);for(var i=0;i<N;i++){var rx=rwst[i]*nrwst[i]-iwst[i]*niwst[i];iwst[i]=rwst[i]*niwst[i]+iwst[i]*nrwst[i],rwst[i]=rx}return this.conjugate(rwst,iwst,N),this.transform(rwst,iwst,rmws,_,N,rbt),this.conjugate(rmws,_,N),this.normalize13b(rmws,N),out.negative=x.negative^y.negative,out.length=x.length+y.length,out.strip()},BN.prototype.mul=function(num){var out=new BN(null);return out.words=new Array(this.length+num.length),this.mulTo(num,out)},BN.prototype.mulf=function(num){var out=new BN(null);return out.words=new Array(this.length+num.length),jumboMulTo(this,num,out)},BN.prototype.imul=function(num){return this.clone().mulTo(num,this)},BN.prototype.imuln=function(num){assert("number"==typeof num),assert(num<67108864);for(var carry=0,i=0;i<this.length;i++){var w=(0|this.words[i])*num,lo=(67108863&w)+(67108863&carry);carry>>=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=toBitArray(num);if(0===w.length)return new BN(1);for(var res=this,i=0;i<w.length&&0===w[i];i++,res=res.sqr());if(++i<w.length)for(var q=res.sqr();i<w.length;i++,q=q.sqr())0!==w[i]&&(res=res.mul(q));return res},BN.prototype.iushln=function(bits){assert("number"==typeof bits&&bits>=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<this.length;i++){var newCarry=this.words[i]&carryMask,c=(0|this.words[i])-newCarry<<r;this.words[i]=c|carry,carry=newCarry>>>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<s;i++)this.words[i]=0;this.length+=s}return this.strip()},BN.prototype.ishln=function(bits){return assert(0===this.negative),this.iushln(bits)},BN.prototype.iushrn=function(bits,hint,extended){assert("number"==typeof bits&&bits>=0);var h;h=hint?(hint-hint%26)/26:0;var r=bits%26,s=Math.min((bits-r)/26,this.length),mask=67108863^67108863>>>r<<r,maskedWords=extended;if(h-=s,h=Math.max(0,h),maskedWords){for(var i=0;i<s;i++)maskedWords.words[i]=this.words[i];maskedWords.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var carry=0;for(i=this.length-1;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<<r;if(this.length<=s)return!1;var w=this.words[s];return!!(w&q)},BN.prototype.imaskn=function(bits){assert("number"==typeof bits&&bits>=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<<r;this.words[this.length-1]&=mask}return this.strip()},BN.prototype.maskn=function(bits){return this.clone().imaskn(bits)},BN.prototype.iaddn=function(num){return assert("number"==typeof num),assert(num<67108864),num<0?this.isubn(-num):0!==this.negative?1===this.length&&(0|this.words[0])<num?(this.words[0]=num-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(num),this.negative=1,this):this._iaddn(num)},BN.prototype._iaddn=function(num){this.words[0]+=num;for(var i=0;i<this.length&&this.words[i]>=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<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},BN.prototype.addn=function(num){return this.clone().iaddn(num)},BN.prototype.subn=function(num){return this.clone().isubn(num)},BN.prototype.iabs=function(){return this.negative=0,this},BN.prototype.abs=function(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function(num,mul,shift){var i,len=num.length+shift;this._expand(len);var w,carry=0;for(i=0;i<num.length;i++){w=(0|this.words[i+shift])+carry;var right=(0|num.words[i])*mul;w-=67108863&right,carry=(w>>26)-(right/67108864|0),this.words[i+shift]=67108863&w}for(;i<this.length-shift;i++)w=(0|this.words[i+shift])+carry,carry=w>>26,this.words[i+shift]=67108863&w;if(0===carry)return this.strip();for(assert(carry===-1),carry=0,i=0;i<this.length;i++)w=-(0|this.words[i])+carry,carry=w>>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],bhiBits=this._countBits(bhi);shift=26-bhiBits,0!==shift&&(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),q.length=m+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var diff=a.clone()._ishlnsubmul(b,1,m);0===diff.negative&&(a=diff,q&&(q.words[m]=1));for(var j=m-1;j>=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){if(assert(!num.isZero()),this.isZero())return{div:new BN(0),mod:new BN(0)};var div,mod,res;return 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)},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 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))}var res;return res=0===a.cmpn(1)?x1:x2,res.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<<r;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var carry=q,i=s;0!==carry&&i<this.length;i++){var w=0|this.words[i];w+=carry,carry=w>>>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 negative=num<0;if(0!==this.negative&&!negative)return-1;if(0===this.negative&&negative)return 1;this.strip();var res;if(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:w<num?-1:1}return 0!==this.negative?0|-res:res},BN.prototype.cmp=function(num){if(0!==this.negative&&0===num.negative)return-1;if(0===this.negative&&0!==num.negative)return 1;var res=this.ucmp(num);return 0!==this.negative?0|-res:res},BN.prototype.ucmp=function(num){if(this.length>num.length)return 1;if(this.length<num.length)return-1;for(var res=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|num.words[i];if(a!==b){a<b?res=-1:a>b&&(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 this.cmpn(num)===-1},BN.prototype.lt=function(num){return this.cmp(num)===-1},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};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),r=this.imulK(r),r=r.iadd(this.tmp),rlen=r.bitLength();while(rlen>this.n);var cmp=rlen<this.n?-1:r.ucmp(this.p);return 0===cmp?(r.words[0]=0,r.length=1):cmp>0?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 mask=4194303,outLen=Math.min(input.length,9),i=0;i<outLen;i++)output.words[i]=input.words[i];if(output.length=outLen,input.length<=9)return input.words[0]=0,void(input.length=1);var prev=input.words[9];for(output.words[output.length++]=prev&mask,i=10;i<input.length;i++){var next=0|input.words[i];input.words[i-10]=(next&mask)<<4|prev>>>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<num.length;i++){var w=0|num.words[i];lo+=977*w,num.words[i]=67108863&lo,lo=64*w+(lo/67108864|0)}return 0===num.words[num.length-1]&&(num.length--,0===num.words[num.length-1]&&num.length--),num},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function(num){for(var carry=0,i=0;i<num.length;i++){var hi=19*(0|num.words[i])+carry,lo=67108863&hi;hi>>>=26,num.words[i]=lo,carry=hi}return 0!==carry&&(num.words[num.length++]=carry),num},BN._prime=function prime(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<m);var b=this.pow(c,new BN(1).iushln(m-i-1));r=r.redMul(b),c=b.redSqr(),t=t.redMul(c),m=i}return r},Red.prototype.invm=function(a){var inv=a._invmp(this.m);return 0!==inv.negative?(inv.negative=0,this.imod(inv).redNeg()):this.imod(inv)},Red.prototype.pow=function(a,num){if(num.isZero())return new BN(1);if(0===num.cmpn(1))return a.clone();var windowSize=4,wnd=new Array(1<<windowSize);wnd[0]=new BN(1).toRed(this),wnd[1]=a;for(var i=2;i<wnd.length;i++)wnd[i]=this.mul(wnd[i-1],a);var res=wnd[0],current=0,currentLen=0,start=num.bitLength()%26;for(0===start&&(start=26),i=num.length-1;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,currentLen++,(currentLen===windowSize||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){var res=this.imod(a._invmp(this.m).mul(this.r2));return res._forceRed(this)}}("undefined"==typeof module||module,this)}).call(exports,__webpack_require__(16)(module))},function(module,exports,__webpack_require__){function getCiphers(){return Object.keys(modes)}var ciphers=__webpack_require__(152);exports.createCipher=exports.Cipher=ciphers.createCipher,exports.createCipheriv=exports.Cipheriv=ciphers.createCipheriv;var deciphers=__webpack_require__(151);exports.createDecipher=exports.Decipher=deciphers.createDecipher,exports.createDecipheriv=exports.Decipheriv=deciphers.createDecipheriv;
var modes=__webpack_require__(48);exports.listCiphers=exports.getCiphers=getCiphers},function(module,exports,__webpack_require__){(function(Buffer){function Decipher(mode,key,iv){return this instanceof Decipher?(Transform.call(this),this._cache=new Splitter,this._last=void 0,this._cipher=new aes.AES(key),this._prev=new Buffer(iv.length),iv.copy(this._prev),this._mode=mode,void(this._autopadding=!0)):new Decipher(mode,key,iv)}function Splitter(){return this instanceof Splitter?void(this.cache=new Buffer("")):new Splitter}function unpad(last){for(var padded=last[15],i=-1;++i<padded;)if(last[i+(16-padded)]!==padded)throw new Error("unable to decrypt data");if(16!==padded)return last.slice(0,16-padded)}function createDecipheriv(suite,password,iv){var config=modes[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");if("string"==typeof iv&&(iv=new Buffer(iv)),"string"==typeof password&&(password=new Buffer(password)),password.length!==config.key/8)throw new TypeError("invalid key length "+password.length);if(iv.length!==config.iv)throw new TypeError("invalid iv length "+iv.length);return"stream"===config.type?new StreamCipher(modelist[config.mode],password,iv,!0):"auth"===config.type?new AuthCipher(modelist[config.mode],password,iv,!0):new Decipher(modelist[config.mode],password,iv)}function createDecipher(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)}var aes=__webpack_require__(34),Transform=__webpack_require__(36),inherits=__webpack_require__(1),modes=__webpack_require__(48),StreamCipher=__webpack_require__(75),AuthCipher=__webpack_require__(68),ebtk=__webpack_require__(80);inherits(Decipher,Transform),Decipher.prototype._update=function(data){this._cache.add(data);for(var chunk,thing,out=[];chunk=this._cache.get(this._autopadding);)thing=this._mode.decrypt(this,chunk),out.push(thing);return Buffer.concat(out)},Decipher.prototype._final=function(){var chunk=this._cache.flush();if(this._autopadding)return unpad(this._mode.decrypt(this,chunk));if(chunk)throw new Error("data not multiple of block length")},Decipher.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(autoPadding){var out;if(autoPadding){if(this.cache.length>16)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};var modelist={ECB:__webpack_require__(73),CBC:__webpack_require__(69),CFB:__webpack_require__(70),CFB8:__webpack_require__(72),CFB1:__webpack_require__(71),OFB:__webpack_require__(74),CTR:__webpack_require__(35),GCM:__webpack_require__(35)};exports.createDecipher=createDecipher,exports.createDecipheriv=createDecipheriv}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function Cipher(mode,key,iv){return this instanceof Cipher?(Transform.call(this),this._cache=new Splitter,this._cipher=new aes.AES(key),this._prev=new Buffer(iv.length),iv.copy(this._prev),this._mode=mode,void(this._autopadding=!0)):new Cipher(mode,key,iv)}function Splitter(){return this instanceof Splitter?void(this.cache=new Buffer("")):new Splitter}function createCipheriv(suite,password,iv){var config=modes[suite.toLowerCase()];if(!config)throw new TypeError("invalid suite type");if("string"==typeof iv&&(iv=new Buffer(iv)),"string"==typeof password&&(password=new Buffer(password)),password.length!==config.key/8)throw new TypeError("invalid key length "+password.length);if(iv.length!==config.iv)throw new TypeError("invalid iv length "+iv.length);return"stream"===config.type?new StreamCipher(modelist[config.mode],password,iv):"auth"===config.type?new AuthCipher(modelist[config.mode],password,iv):new Cipher(modelist[config.mode],password,iv)}function createCipher(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 createCipheriv(suite,keys.key,keys.iv)}var aes=__webpack_require__(34),Transform=__webpack_require__(36),inherits=__webpack_require__(1),modes=__webpack_require__(48),ebtk=__webpack_require__(80),StreamCipher=__webpack_require__(75),AuthCipher=__webpack_require__(68);inherits(Cipher,Transform),Cipher.prototype._update=function(data){this._cache.add(data);for(var chunk,thing,out=[];chunk=this._cache.get();)thing=this._mode.encrypt(this,chunk),out.push(thing);return Buffer.concat(out)},Cipher.prototype._final=function(){var chunk=this._cache.flush();if(this._autopadding)return chunk=this._mode.encrypt(this,chunk),this._cipher.scrub(),chunk;if("10101010101010101010101010101010"!==chunk.toString("hex"))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=new Buffer(len),i=-1;++i<len;)padBuff.writeUInt8(len,i);var out=Buffer.concat([this.cache,padBuff]);return out};var modelist={ECB:__webpack_require__(73),CBC:__webpack_require__(69),CFB:__webpack_require__(70),CFB8:__webpack_require__(72),CFB1:__webpack_require__(71),OFB:__webpack_require__(74),CTR:__webpack_require__(35),GCM:__webpack_require__(35)};exports.createCipheriv=createCipheriv,exports.createCipher=createCipher}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function GHASH(key){this.h=key,this.state=new Buffer(16),this.state.fill(0),this.cache=new Buffer("")}function toArray(buf){return[buf.readUInt32BE(0),buf.readUInt32BE(4),buf.readUInt32BE(8),buf.readUInt32BE(12)]}function fromArray(out){out=out.map(fixup_uint32);var buf=new Buffer(16);return buf.writeUInt32BE(out[0],0),buf.writeUInt32BE(out[1],4),buf.writeUInt32BE(out[2],8),buf.writeUInt32BE(out[3],12),buf}function fixup_uint32(x){var ret,x_pos;return ret=x>uint_max||x<0?(x_pos=Math.abs(x)%uint_max,x<0?uint_max-x_pos:x_pos):x}function xor(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]}var zeros=new Buffer(16);zeros.fill(0),module.exports=GHASH,GHASH.prototype.ghash=function(block){for(var i=-1;++i<block.length;)this.state[i]^=block[i];this._multiply()},GHASH.prototype._multiply=function(){for(var j,xi,lsb_Vi,Vi=toArray(this.h),Zi=[0,0,0,0],i=-1;++i<128;){for(xi=0!==(this.state[~~(i/8)]&1<<7-i%8),xi&&(Zi=xor(Zi,Vi)),lsb_Vi=0!==(1&Vi[3]),j=3;j>0;j--)Vi[j]=Vi[j]>>>1|(1&Vi[j-1])<<31;Vi[0]=Vi[0]>>>1,lsb_Vi&&(Vi[0]=Vi[0]^225<<24)}this.state=fromArray(Zi)},GHASH.prototype.update=function(buf){this.cache=Buffer.concat([this.cache,buf]);for(var chunk;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,zeros],16)),this.ghash(fromArray([0,abl,0,bl])),this.state};var uint_max=Math.pow(2,32)}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){const Sha3=__webpack_require__(83),hashLengths=[224,256,384,512];var hash=function(bitcount){if(void 0!==bitcount&&hashLengths.indexOf(bitcount)==-1)throw new Error("Unsupported hash length");this.content=[],this.bitcount=bitcount?"keccak_"+bitcount:"keccak_512"};hash.prototype.update=function(i){if(Buffer.isBuffer(i))this.content.push(i);else{if("string"!=typeof i)throw new Error("Unsupported argument to update");this.content.push(new Buffer(i))}return this},hash.prototype.digest=function(encoding){var result=Sha3[this.bitcount](Buffer.concat(this.content));if("hex"===encoding)return result;if("binary"===encoding||void 0===encoding)return new Buffer(result,"hex").toString("binary");throw new Error("Unsupported encoding for digest: "+encoding)},module.exports={SHA3Hash:hash}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){module.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){module.exports={raw:new Buffer("00","hex"),"dag-pb":new Buffer("70","hex"),"dag-cbor":new Buffer("71","hex"),"eth-block":new Buffer("90","hex"),"eth-tx":new Buffer("91","hex")}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){function ConcatStream(opts,cb){if(!(this instanceof ConcatStream))return new ConcatStream(opts,cb);"function"==typeof opts&&(cb=opts,opts={}),opts||(opts={});var encoding=opts.encoding,shouldInferEncoding=!1;encoding?(encoding=String(encoding).toLowerCase(),"u8"!==encoding&&"uint8"!==encoding||(encoding="uint8array")):shouldInferEncoding=!0,Writable.call(this,{objectMode:!0}),this.encoding=encoding,this.shouldInferEncoding=shouldInferEncoding,cb&&this.on("finish",function(){cb(this.getBody())}),this.body=[]}function isArrayish(arr){return/Array\]$/.test(Object.prototype.toString.call(arr))}function isBufferish(p){return"string"==typeof p||isArrayish(p)||p&&"function"==typeof p.subarray}function stringConcat(parts){for(var strings=[],i=0;i<parts.length;i++){var p=parts[i];"string"==typeof p?strings.push(p):Buffer.isBuffer(p)?strings.push(p):isBufferish(p)?strings.push(new Buffer(p)):strings.push(new Buffer(String(p)))}return Buffer.isBuffer(parts[0])?(strings=Buffer.concat(strings),strings=strings.toString("utf8")):strings=strings.join(""),strings}function bufferConcat(parts){for(var bufs=[],i=0;i<parts.length;i++){var p=parts[i];Buffer.isBuffer(p)?bufs.push(p):isBufferish(p)?bufs.push(new Buffer(p)):bufs.push(new Buffer(String(p)))}return Buffer.concat(bufs)}function arrayConcat(parts){for(var res=[],i=0;i<parts.length;i++)res.push.apply(res,parts[i]);return res}function u8Concat(parts){for(var len=0,i=0;i<parts.length;i++)"string"==typeof parts[i]&&(parts[i]=new Buffer(parts[i])),len+=parts[i].length;for(var u8=new U8(len),i=0,offset=0;i<parts.length;i++)for(var part=parts[i],j=0;j<part.length;j++)u8[offset++]=part[j];return u8}var Writable=__webpack_require__(159).Writable,inherits=__webpack_require__(1);if("undefined"==typeof Uint8Array)var U8=__webpack_require__(303).Uint8Array;else var U8=Uint8Array;module.exports=ConcatStream,inherits(ConcatStream,Writable),ConcatStream.prototype._write=function(chunk,enc,next){this.body.push(chunk),next()},ConcatStream.prototype.inferEncoding=function(buff){var firstBuffer=void 0===buff?this.body[0]:buff;return Buffer.isBuffer(firstBuffer)?"buffer":"undefined"!=typeof Uint8Array&&firstBuffer instanceof Uint8Array?"uint8array":Array.isArray(firstBuffer)?"array":"string"==typeof firstBuffer?"string":"[object Object]"===Object.prototype.toString.call(firstBuffer)?"object":"buffer"},ConcatStream.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),"array"===this.encoding?arrayConcat(this.body):"string"===this.encoding?stringConcat(this.body):"buffer"===this.encoding?bufferConcat(this.body):"uint8array"===this.encoding?u8Concat(this.body):this.body):[]};Array.isArray||function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function PassThrough(options){return this instanceof PassThrough?void Transform.call(this,options):new PassThrough(options)}module.exports=PassThrough;var Transform=__webpack_require__(78),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},function(module,exports,__webpack_require__){var Stream=function(){try{return __webpack_require__(5)}catch(_){}}();exports=module.exports=__webpack_require__(77),exports.Stream=Stream||exports,exports.Readable=exports,exports.Writable=__webpack_require__(79),exports.Duplex=__webpack_require__(19),exports.Transform=__webpack_require__(78),exports.PassThrough=__webpack_require__(158)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function toArray(buf,bigEndian){if(buf.length%intSize!==0){var len=buf.length+(intSize-buf.length%intSize);buf=Buffer.concat([buf,zeroBuffer],len)}for(var arr=[],fn=bigEndian?buf.readInt32BE:buf.readInt32LE,i=0;i<buf.length;i+=intSize)arr.push(fn.call(buf,i));return arr}function toBuffer(arr,size,bigEndian){for(var buf=new Buffer(size),fn=bigEndian?buf.writeInt32BE:buf.writeInt32LE,i=0;i<arr.length;i++)fn.call(buf,arr[i],4*i,!0);return buf}function hash(buf,fn,hashSize,bigEndian){Buffer.isBuffer(buf)||(buf=new Buffer(buf));var arr=fn(toArray(buf,bigEndian),buf.length*chrsz);return toBuffer(arr,hashSize,bigEndian)}var intSize=4,zeroBuffer=new Buffer(intSize);zeroBuffer.fill(0);var chrsz=8;exports.hash=hash}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function core_md5(x,len){x[len>>5]|=128<<len%32,x[(len+64>>>9<<4)+14]=len;for(var a=1732584193,b=-271733879,c=-1732584194,d=271733878,i=0;i<x.length;i+=16){var olda=a,oldb=b,oldc=c,oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936),d=md5_ff(d,a,b,c,x[i+1],12,-389564586),c=md5_ff(c,d,a,b,x[i+2],17,606105819),b=md5_ff(b,c,d,a,x[i+3],22,-1044525330),a=md5_ff(a,b,c,d,x[i+4],7,-176418897),d=md5_ff(d,a,b,c,x[i+5],12,1200080426),c=md5_ff(c,d,a,b,x[i+6],17,-1473231341),b=md5_ff(b,c,d,a,x[i+7],22,-45705983),a=md5_ff(a,b,c,d,x[i+8],7,1770035416),d=md5_ff(d,a,b,c,x[i+9],12,-1958414417),c=md5_ff(c,d,a,b,x[i+10],17,-42063),b=md5_ff(b,c,d,a,x[i+11],22,-1990404162),a=md5_ff(a,b,c,d,x[i+12],7,1804603682),d=md5_ff(d,a,b,c,x[i+13],12,-40341101),c=md5_ff(c,d,a,b,x[i+14],17,-1502002290),b=md5_ff(b,c,d,a,x[i+15],22,1236535329),a=md5_gg(a,b,c,d,x[i+1],5,-165796510),d=md5_gg(d,a,b,c,x[i+6],9,-1069501632),c=md5_gg(c,d,a,b,x[i+11],14,643717713),b=md5_gg(b,c,d,a,x[i+0],20,-373897302),a=md5_gg(a,b,c,d,x[i+5],5,-701558691),d=md5_gg(d,a,b,c,x[i+10],9,38016083),c=md5_gg(c,d,a,b,x[i+15],14,-660478335),b=md5_gg(b,c,d,a,x[i+4],20,-405537848),a=md5_gg(a,b,c,d,x[i+9],5,568446438),d=md5_gg(d,a,b,c,x[i+14],9,-1019803690),c=md5_gg(c,d,a,b,x[i+3],14,-187363961),b=md5_gg(b,c,d,a,x[i+8],20,1163531501),a=md5_gg(a,b,c,d,x[i+13],5,-1444681467),d=md5_gg(d,a,b,c,x[i+2],9,-51403784),c=md5_gg(c,d,a,b,x[i+7],14,1735328473),b=md5_gg(b,c,d,a,x[i+12],20,-1926607734),a=md5_hh(a,b,c,d,x[i+5],4,-378558),d=md5_hh(d,a,b,c,x[i+8],11,-2022574463),c=md5_hh(c,d,a,b,x[i+11],16,1839030562),b=md5_hh(b,c,d,a,x[i+14],23,-35309556),a=md5_hh(a,b,c,d,x[i+1],4,-1530992060),d=md5_hh(d,a,b,c,x[i+4],11,1272893353),c=md5_hh(c,d,a,b,x[i+7],16,-155497632),b=md5_hh(b,c,d,a,x[i+10],23,-1094730640),a=md5_hh(a,b,c,d,x[i+13],4,681279174),d=md5_hh(d,a,b,c,x[i+0],11,-358537222),c=md5_hh(c,d,a,b,x[i+3],16,-722521979),b=md5_hh(b,c,d,a,x[i+6],23,76029189),a=md5_hh(a,b,c,d,x[i+9],4,-640364487),d=md5_hh(d,a,b,c,x[i+12],11,-421815835),c=md5_hh(c,d,a,b,x[i+15],16,530742520),b=md5_hh(b,c,d,a,x[i+2],23,-995338651),a=md5_ii(a,b,c,d,x[i+0],6,-198630844),d=md5_ii(d,a,b,c,x[i+7],10,1126891415),c=md5_ii(c,d,a,b,x[i+14],15,-1416354905),b=md5_ii(b,c,d,a,x[i+5],21,-57434055),a=md5_ii(a,b,c,d,x[i+12],6,1700485571),d=md5_ii(d,a,b,c,x[i+3],10,-1894986606),c=md5_ii(c,d,a,b,x[i+10],15,-1051523),b=md5_ii(b,c,d,a,x[i+1],21,-2054922799),a=md5_ii(a,b,c,d,x[i+8],6,1873313359),d=md5_ii(d,a,b,c,x[i+15],10,-30611744),c=md5_ii(c,d,a,b,x[i+6],15,-1560198380),b=md5_ii(b,c,d,a,x[i+13],21,1309151649),a=md5_ii(a,b,c,d,x[i+4],6,-145523070),d=md5_ii(d,a,b,c,x[i+11],10,-1120210379),c=md5_ii(c,d,a,b,x[i+2],15,718787259),b=md5_ii(b,c,d,a,x[i+9],21,-343485551),a=safe_add(a,olda),b=safe_add(b,oldb),c=safe_add(c,oldc),d=safe_add(d,oldd)}return Array(a,b,c,d)}function md5_cmn(q,a,b,x,s,t){return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b)}function md5_ff(a,b,c,d,x,s,t){return md5_cmn(b&c|~b&d,a,b,x,s,t)}function md5_gg(a,b,c,d,x,s,t){return md5_cmn(b&d|c&~d,a,b,x,s,t)}function md5_hh(a,b,c,d,x,s,t){return md5_cmn(b^c^d,a,b,x,s,t)}function md5_ii(a,b,c,d,x,s,t){return md5_cmn(c^(b|~d),a,b,x,s,t)}function safe_add(x,y){var lsw=(65535&x)+(65535&y),msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|65535&lsw}function bit_rol(num,cnt){return num<<cnt|num>>>32-cnt}var helpers=__webpack_require__(160);module.exports=function(buf){return helpers.hash(buf,core_md5,16)}},function(module,exports,__webpack_require__){var once=__webpack_require__(163),noop=function(){},isRequest=function(stream){return stream.setHeader&&"function"==typeof stream.abort},isChildProcess=function(stream){return stream.stdio&&Array.isArray(stream.stdio)&&3===stream.stdio.length},eos=function(stream,opts,callback){if("function"==typeof opts)return eos(stream,null,opts);opts||(opts={}),callback=once(callback||noop);var ws=stream._writableState,rs=stream._readableState,readable=opts.readable||opts.readable!==!1&&stream.readable,writable=opts.writable||opts.writable!==!1&&stream.writable,onlegacyfinish=function(){stream.writable||onfinish()},onfinish=function(){writable=!1,readable||callback()},onend=function(){readable=!1,writable||callback()},onexit=function(exitCode){callback(exitCode?new Error("exited with error code: "+exitCode):null)},onclose=function(){return(!readable||rs&&rs.ended)&&(!writable||ws&&ws.ended)?void 0:callback(new Error("premature close"))},onrequest=function(){stream.req.on("finish",onfinish)};return isRequest(stream)?(stream.on("complete",onfinish),stream.on("abort",onclose),stream.req?onrequest():stream.on("request",onrequest)):writable&&!ws&&(stream.on("end",onlegacyfinish),stream.on("close",onlegacyfinish)),isChildProcess(stream)&&stream.on("exit",onexit),stream.on("end",onend),stream.on("finish",onfinish),opts.error!==!1&&stream.on("error",callback),stream.on("close",onclose),function(){stream.removeListener("complete",onfinish),stream.removeListener("abort",onclose),stream.removeListener("request",onrequest),stream.req&&stream.req.removeListener("finish",onfinish),stream.removeListener("end",onlegacyfinish),stream.removeListener("close",onlegacyfinish),stream.removeListener("finish",onfinish),stream.removeListener("exit",onexit),stream.removeListener("end",onend),stream.removeListener("error",callback),stream.removeListener("close",onclose)}};module.exports=eos},function(module,exports,__webpack_require__){function once(fn){var f=function(){return f.called?f.value:(f.called=!0,f.value=fn.apply(this,arguments))};return f.called=!1,f}var wrappy=__webpack_require__(118);module.exports=wrappy(once),once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:!0})})},function(module,exports){"use strict";module.exports=function(arr,iter,context){var results=[];return Array.isArray(arr)?(arr.forEach(function(value,index,list){var res=iter.call(context,value,index,list);Array.isArray(res)?results.push.apply(results,res):null!=res&&results.push(res)}),results):results}},function(module,exports,__webpack_require__){var util=__webpack_require__(12),INDENT_START=/[\{\[]/,INDENT_END=/[\}\]]/;module.exports=function(){var lines=[],indent=0,push=function(str){for(var spaces="";spaces.length<2*indent;)spaces+=" ";lines.push(spaces+str)},line=function(fmt){return fmt?INDENT_END.test(fmt.trim()[0])&&INDENT_START.test(fmt[fmt.length-1])?(indent--,push(util.format.apply(util,arguments)),indent++,line):INDENT_START.test(fmt[fmt.length-1])?(push(util.format.apply(util,arguments)),indent++,line):INDENT_END.test(fmt.trim()[0])?(indent--,push(util.format.apply(util,arguments)),line):(push(util.format.apply(util,arguments)),line):line};return line.toString=function(){return lines.join("\n")},line.toFunction=function(scope){var src="return ("+line.toString()+")",keys=Object.keys(scope||{}).map(function(key){return key}),vals=keys.map(function(key){return scope[key]});return Function.apply(null,keys.concat(src)).apply(null,vals)},arguments.length&&line.apply(null,arguments),line}},function(module,exports,__webpack_require__){var isProperty=__webpack_require__(179),gen=function(obj,prop){return isProperty(prop)?obj+"."+prop:obj+"["+JSON.stringify(prop)+"]"};gen.valid=isProperty,gen.property=function(prop){return isProperty(prop)?prop:JSON.stringify(prop)},module.exports=gen},function(module,exports,__webpack_require__){var http=__webpack_require__(106),https=module.exports;for(var key in http)http.hasOwnProperty(key)&&(https[key]=http[key]);https.request=function(params,cb){return params||(params={}),params.scheme="https",params.protocol="https:",http.request.call(this,params,cb)}},function(module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,nBits=-7,i=isLE?nBytes-1:0,d=isLE?-1:1,s=buffer[offset+i];for(i+=d,e=s&(1<<-nBits)-1,s>>=-nBits,nBits+=eLen;nBits>0;e=256*e+buffer[offset+i],i+=d,nBits-=8);for(m=e&(1<<-nBits)-1,e>>=-nBits,nBits+=mLen;nBits>0;m=256*m+buffer[offset+i],i+=d,nBits-=8);if(0===e)e=1-eBias;else{if(e===eMax)return m?NaN:(s?-1:1)*(1/0);m+=Math.pow(2,mLen),e-=eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)},exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c,eLen=8*nBytes-mLen-1,eMax=(1<<eLen)-1,eBias=eMax>>1,rt=23===mLen?Math.pow(2,-24)-Math.pow(2,-77):0,i=isLE?0:nBytes-1,d=isLE?1:-1,s=value<0||0===value&&1/value<0?1:0;for(value=Math.abs(value),isNaN(value)||value===1/0?(m=isNaN(value)?1:0,e=eMax):(e=Math.floor(Math.log(value)/Math.LN2),value*(c=Math.pow(2,-e))<1&&(e--,c*=2),value+=e+eBias>=1?rt/c:rt*Math.pow(2,1-eBias),value*c>=2&&(e++,c/=2),e+eBias>=eMax?(m=0,e=eMax):e+eBias>=1?(m=(value*c-1)*Math.pow(2,mLen),e+=eBias):(m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen),e=0));mLen>=8;buffer[offset+i]=255&m,i+=d,m/=256,mLen-=8);for(e=e<<mLen|m,eLen+=mLen;eLen>0;buffer[offset+i]=255&e,i+=d,e/=256,eLen-=8);buffer[offset+i-d]|=128*s}},function(module,exports){var indexOf=[].indexOf;module.exports=function(arr,obj){if(indexOf)return arr.indexOf(obj);for(var i=0;i<arr.length;++i)if(arr[i]===obj)return i;return-1}},function(module,exports,__webpack_require__){"use strict";function _normalizeFamily(family){return family?family.toLowerCase():"ipv4"}var ip=exports,Buffer=__webpack_require__(0).Buffer,os=__webpack_require__(95);ip.toBuffer=function(ip,buff,offset){offset=~~offset;var result;if(this.isV4Format(ip))result=buff||new Buffer(offset+4),ip.split(/\./g).map(function(byte){result[offset++]=255&parseInt(byte,10)});else if(this.isV6Format(ip)){var i,sections=ip.split(":",8);for(i=0;i<sections.length;i++){var v4Buffer,isv4=this.isV4Format(sections[i]);isv4&&(v4Buffer=this.toBuffer(sections[i]),sections[i]=v4Buffer.slice(0,2).toString("hex")),v4Buffer&&++i<8&&sections.splice(i,0,v4Buffer.slice(2,4).toString("hex"))}if(""===sections[0])for(;sections.length<8;)sections.unshift("0");else if(""===sections[sections.length-1])for(;sections.length<8;)sections.push("0");else if(sections.length<8){for(i=0;i<sections.length&&""!==sections[i];i++);var argv=[i,1];for(i=9-sections.length;i>0;i--)argv.push("0");sections.splice.apply(sections,argv)}for(result=buff||new Buffer(offset+16),i=0;i<sections.length;i++){var word=parseInt(sections[i],16);result[offset++]=word>>8&255,result[offset++]=255&word}}if(!result)throw Error("Invalid ip address: "+ip);return result},ip.toString=function(buff,offset,length){offset=~~offset,length=length||buff.length-offset;var result=[];if(4===length){for(var i=0;i<length;i++)result.push(buff[offset+i]);result=result.join(".")}else if(16===length){for(var i=0;i<length;i+=2)result.push(buff.readUInt16BE(offset+i).toString(16));result=result.join(":"),result=result.replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3"),result=result.replace(/:{3,4}/,"::")}return result};var ipv4Regex=/^(\d{1,3}\.){3,3}\d{1,3}$/,ipv6Regex=/^(::)?(((\d{1,3}\.){3}(\d{1,3}){1})?([0-9a-f]){0,4}:{0,2}){1,8}(::)?$/i;ip.isV4Format=function(ip){return ipv4Regex.test(ip)},ip.isV6Format=function(ip){return ipv6Regex.test(ip)},ip.fromPrefixLen=function(prefixlen,family){family=prefixlen>32?"ipv6":_normalizeFamily(family);var len=4;"ipv6"===family&&(len=16);for(var buff=new Buffer(len),i=0,n=buff.length;i<n;++i){var bits=8;prefixlen<8&&(bits=prefixlen),prefixlen-=bits,buff[i]=255&~(255>>bits)}return ip.toString(buff)},ip.mask=function(addr,mask){addr=ip.toBuffer(addr),mask=ip.toBuffer(mask);var result=new Buffer(Math.max(addr.length,mask.length));if(addr.length===mask.length)for(var i=0;i<addr.length;i++)result[i]=addr[i]&mask[i];else if(4===mask.length)for(var i=0;i<mask.length;i++)result[i]=addr[addr.length-4+i]&mask[i];else{for(var i=0;i<result.length-6;i++)result[i]=0;result[10]=255,result[11]=255;for(var i=0;i<addr.length;i++)result[i+12]=addr[i]&mask[i+12]}return ip.toString(result)},ip.cidr=function(cidrString){var cidrParts=cidrString.split("/"),addr=cidrParts[0];if(2!==cidrParts.length)throw new Error("invalid CIDR subnet: "+addr);var mask=ip.fromPrefixLen(parseInt(cidrParts[1],10));return ip.mask(addr,mask)},ip.subnet=function(addr,mask){for(var networkAddress=ip.toLong(ip.mask(addr,mask)),maskBuffer=ip.toBuffer(mask),maskLength=0,i=0;i<maskBuffer.length;i++)if(255===maskBuffer[i])maskLength+=8;else for(var octet=255&maskBuffer[i];octet;)octet=octet<<1&255,maskLength++;var numberOfAddresses=Math.pow(2,32-maskLength);return{networkAddress:ip.fromLong(networkAddress),firstAddress:numberOfAddresses<=2?ip.fromLong(networkAddress):ip.fromLong(networkAddress+1),lastAddress:numberOfAddresses<=2?ip.fromLong(networkAddress+numberOfAddresses-1):ip.fromLong(networkAddress+numberOfAddresses-2),broadcastAddress:ip.fromLong(networkAddress+numberOfAddresses-1),subnetMask:mask,subnetMaskLength:maskLength,numHosts:numberOfAddresses<=2?numberOfAddresses:numberOfAddresses-2,length:numberOfAddresses,contains:function(other){return networkAddress===ip.toLong(ip.mask(other,mask))}}},ip.cidrSubnet=function(cidrString){var cidrParts=cidrString.split("/"),addr=cidrParts[0];if(2!==cidrParts.length)throw new Error("invalid CIDR subnet: "+addr);var mask=ip.fromPrefixLen(parseInt(cidrParts[1],10));return ip.subnet(addr,mask)},ip.not=function(addr){for(var buff=ip.toBuffer(addr),i=0;i<buff.length;i++)buff[i]=255^buff[i];return ip.toString(buff)},ip.or=function(a,b){if(a=ip.toBuffer(a),b=ip.toBuffer(b),a.length===b.length){for(var i=0;i<a.length;++i)a[i]|=b[i];return ip.toString(a)}var buff=a,other=b;b.length>a.length&&(buff=b,other=a);for(var offset=buff.length-other.length,i=offset;i<buff.length;++i)buff[i]|=other[i-offset];return ip.toString(buff)},ip.isEqual=function(a,b){if(a=ip.toBuffer(a),b=ip.toBuffer(b),a.length===b.length){for(var i=0;i<a.length;i++)if(a[i]!==b[i])return!1;return!0}if(4===b.length){var t=b;b=a,a=t}for(var i=0;i<10;i++)if(0!==b[i])return!1;var word=b.readUInt16BE(10);if(0!==word&&65535!==word)return!1;for(var i=0;i<4;i++)if(a[i]!==b[i+12])return!1;return!0},ip.isPrivate=function(addr){return/^(::f{4}:)?10\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)||/^(::f{4}:)?192\.168\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)||/^(::f{4}:)?172\.(1[6-9]|2\d|30|31)\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)||/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)||/^(::f{4}:)?169\.254\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(addr)||/^f[cd][0-9a-f]{2}:/i.test(addr)||/^fe80:/i.test(addr)||/^::1$/.test(addr)||/^::$/.test(addr)},ip.isPublic=function(addr){return!ip.isPrivate(addr)},ip.isLoopback=function(addr){return/^(::f{4}:)?127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/.test(addr)||/^fe80::1$/.test(addr)||/^::1$/.test(addr)||/^::$/.test(addr)},ip.loopback=function(family){if(family=_normalizeFamily(family),"ipv4"!==family&&"ipv6"!==family)throw new Error("family must be ipv4 or ipv6");return"ipv4"===family?"127.0.0.1":"fe80::1"},ip.address=function(name,family){var all,interfaces=os.networkInterfaces();if(family=_normalizeFamily(family),name&&"private"!==name&&"public"!==name){var res=interfaces[name].filter(function(details){var itemFamily=details.family.toLowerCase();return itemFamily===family});if(0===res.length)return;return res[0].address}var all=Object.keys(interfaces).map(function(nic){var addresses=interfaces[nic].filter(function(details){return details.family=details.family.toLowerCase(),details.family===family&&!ip.isLoopback(details.address)&&(!name||("public"===name?ip.isPrivate(details.address):ip.isPublic(details.address)))});return addresses.length?addresses[0].address:void 0}).filter(Boolean);return all.length?all[0]:ip.loopback(family)},ip.toLong=function(ip){var ipl=0;return ip.split(".").forEach(function(octet){ipl<<=8,ipl+=parseInt(octet)}),ipl>>>0},ip.fromLong=function(ipl){return(ipl>>>24)+"."+(ipl>>16&255)+"."+(ipl>>8&255)+"."+(255&ipl)}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function Block(data){if(!(this instanceof Block))return new Block(data);if(!data)throw new Error("Block must be constructed with data");this._cache={},data=ensureBuffer(data),Object.defineProperty(this,"data",{get(){return data},set(){throw new Error("Tried to change an immutable block")}}),this.key=((hashFunc,callback)=>{return"function"==typeof hashFunc&&(callback=hashFunc,hashFunc=null),hashFunc||(hashFunc="sha2-256"),this._cache[hashFunc]?setImmediate(()=>{callback(null,this._cache[hashFunc])}):void multihashing(this.data,hashFunc,(err,multihash)=>{return err?callback(err):(this._cache[hashFunc]=multihash,void callback(null,multihash))})})}function ensureBuffer(data){return Buffer.isBuffer(data)?data:new Buffer(data)}const multihashing=__webpack_require__(91),setImmediate=__webpack_require__(67);module.exports=Block}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function create(name,size,multihash,callback){const link=new DAGLink(name,size,multihash);callback(null,link)}const DAGLink=__webpack_require__(20);module.exports=create},function(module,exports,__webpack_require__){"use strict";function addLink(node,link,callback){const links=cloneLinks(node),data=cloneData(node);if(link.constructor&&"DAGLink"===link.constructor.name);else if(link.constructor&&"DAGNode"===link.constructor.name)link=toDAGLink(link);else{link.multihash=link.multihash||link.hash;
try{link=new DAGLink(link.name,link.size,link.multihash)}catch(err){return callback(err)}}links.push(link),create(data,links,callback)}const dagNodeUtil=__webpack_require__(38),cloneLinks=dagNodeUtil.cloneLinks,cloneData=dagNodeUtil.cloneData,toDAGLink=dagNodeUtil.toDAGLink,DAGLink=__webpack_require__(20),create=__webpack_require__(37);module.exports=addLink},function(module,exports,__webpack_require__){"use strict";function clone(dagNode,callback){const data=cloneData(dagNode),links=cloneLinks(dagNode);create(data,links,callback)}const dagNodeUtil=__webpack_require__(38),cloneLinks=dagNodeUtil.cloneLinks,cloneData=dagNodeUtil.cloneData,create=__webpack_require__(37);module.exports=clone},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function rmLink(dagNode,nameOrMultihash,callback){const data=cloneData(dagNode);let links=cloneLinks(dagNode);if("string"==typeof nameOrMultihash)links=links.filter(link=>link.name!==nameOrMultihash);else{if(!Buffer.isBuffer(nameOrMultihash))return callback(new Error("second arg needs to be a name or multihash"),null);links=links.filter(link=>!link.multihash.equals(nameOrMultihash))}create(data,links,callback)}const dagNodeUtil=__webpack_require__(38),cloneLinks=dagNodeUtil.cloneLinks,cloneData=dagNodeUtil.cloneData,create=__webpack_require__(37);module.exports=rmLink}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){"use strict";module.exports=`// An IPFS MerkleDAG Link
message PBLink {
// multihash of the target object
optional bytes Hash = 1;
// utf string name. should be unique per object
optional string Name = 2;
// cumulative size of target object
optional uint64 Tsize = 3;
}
// An IPFS MerkleDAG Node
message PBNode {
// refs to other objects
repeated PBLink Links = 2;
// opaque user data
optional bytes Data = 1;
}`},function(module,exports,__webpack_require__){"use strict";const util=__webpack_require__(51),bs58=__webpack_require__(10);exports=module.exports,exports.multicodec="dag-pb",exports.resolve=((block,path,callback)=>{function gotNode(err,node){if(err)return callback(err);const split=path.split("/");if("links"===split[0]){let remainderPath="";if(!split[1])return callback(null,{value:node.links.map(l=>{return l.toJSON()}),remainderPath:""});const values={};node.links.forEach((l,i)=>{const link=l.toJSON();values[i]=link.multihash,values[link.name]=link.multihash});let value=values[split[1]];split[2]&&(split.shift(),split.shift(),remainderPath=split.join("/"),value={"/":value}),callback(null,{value:value,remainderPath:remainderPath})}else"data"===split[0]?callback(null,{value:node.data,remainderPath:""}):callback(new Error("path not available"))}util.deserialize(block.data,gotNode)}),exports.tree=((block,options,callback)=>{"function"==typeof options&&(callback=options,options={}),options||(options={}),util.deserialize(block.data,(err,node)=>{if(err)return callback(err);const paths=[];node.links.forEach(link=>{paths.push({path:link.name||"",value:bs58.encode(link.multihash).toString()})}),node.data&&node.data.length>0&&paths.push({path:"data",value:node.data}),callback(null,paths)})})},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function isMultihash(hash){var formatted=convertToString(hash);try{var buffer=new Buffer(base58.decode(formatted));return multihash.decode(buffer),!0}catch(e){return!1}}function isIpfs(input,pattern){var formatted=convertToString(input);if(!formatted)return!1;var match=formatted.match(pattern);if(!match)return!1;if("ipfs"!==match[1])return!1;var hash=match[4];return isMultihash(hash)}function isIpns(input,pattern){var formatted=convertToString(input);if(!formatted)return!1;var match=formatted.match(pattern);return!!match&&"ipns"===match[1]}function convertToString(input){return Buffer.isBuffer(input)?base58.encode(input):"string"==typeof input&&input}var base58=__webpack_require__(10),multihash=__webpack_require__(14),urlPattern=/^https?:\/\/[^\/]+\/(ip(f|n)s)\/((\w+).*)/,pathPattern=/^\/(ip(f|n)s)\/((\w+).*)/;module.exports={multihash:isMultihash,ipfsUrl:function(url){return isIpfs(url,urlPattern)},ipnsUrl:function(url){return isIpns(url,urlPattern)},url:function(_url){return isIpfs(_url,urlPattern)||isIpns(_url,urlPattern)},urlPattern:urlPattern,ipfsPath:function(path){return isIpfs(path,pathPattern)},ipnsPath:function(path){return isIpns(path,pathPattern)},path:function(_path){return isIpfs(_path,pathPattern)||isIpns(_path,pathPattern)},pathPattern:pathPattern,urlOrPath:function(x){return isIpfs(x,urlPattern)||isIpns(x,urlPattern)||isIpfs(x,pathPattern)||isIpns(x,pathPattern)}}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){"use strict";function isProperty(str){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(str)}module.exports=isProperty},function(module,exports){"use strict";var isStream=module.exports=function(stream){return null!==stream&&"object"==typeof stream&&"function"==typeof stream.pipe};isStream.writable=function(stream){return isStream(stream)&&stream.writable!==!1&&"function"==typeof stream._write&&"object"==typeof stream._writableState},isStream.readable=function(stream){return isStream(stream)&&stream.readable!==!1&&"function"==typeof stream._read&&"object"==typeof stream._readableState},isStream.duplex=function(stream){return isStream.writable(stream)&&isStream.readable(stream)},isStream.transform=function(stream){return isStream.duplex(stream)&&"function"==typeof stream._transform&&"object"==typeof stream._transformState}},function(module,exports,__webpack_require__){function isStream(obj){return obj instanceof stream.Stream}function isReadable(obj){return isStream(obj)&&"function"==typeof obj._read&&"object"==typeof obj._readableState}function isWritable(obj){return isStream(obj)&&"function"==typeof obj._write&&"object"==typeof obj._writableState}function isDuplex(obj){return isReadable(obj)&&isWritable(obj)}var stream=__webpack_require__(5);module.exports=isStream,module.exports.isReadable=isReadable,module.exports.isWritable=isWritable,module.exports.isDuplex=isDuplex},function(module,exports,__webpack_require__){!function(global){"use strict";var buffer,_Base64=global.Base64,version="2.1.9";if("undefined"!=typeof module&&module.exports)try{buffer=__webpack_require__(0).Buffer}catch(err){}var b64chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64tab=function(bin){for(var t={},i=0,l=bin.length;i<l;i++)t[bin.charAt(i)]=i;return t}(b64chars),fromCharCode=String.fromCharCode,cb_utob=function(c){if(c.length<2){var cc=c.charCodeAt(0);return cc<128?c:cc<2048?fromCharCode(192|cc>>>6)+fromCharCode(128|63&cc):fromCharCode(224|cc>>>12&15)+fromCharCode(128|cc>>>6&63)+fromCharCode(128|63&cc)}var cc=65536+1024*(c.charCodeAt(0)-55296)+(c.charCodeAt(1)-56320);return fromCharCode(240|cc>>>18&7)+fromCharCode(128|cc>>>12&63)+fromCharCode(128|cc>>>6&63)+fromCharCode(128|63&cc)},re_utob=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,utob=function(u){return u.replace(re_utob,cb_utob)},cb_encode=function(ccc){var padlen=[0,2,1][ccc.length%3],ord=ccc.charCodeAt(0)<<16|(ccc.length>1?ccc.charCodeAt(1):0)<<8|(ccc.length>2?ccc.charCodeAt(2):0),chars=[b64chars.charAt(ord>>>18),b64chars.charAt(ord>>>12&63),padlen>=2?"=":b64chars.charAt(ord>>>6&63),padlen>=1?"=":b64chars.charAt(63&ord)];return chars.join("")},btoa=global.btoa?function(b){return global.btoa(b)}:function(b){return b.replace(/[\s\S]{1,3}/g,cb_encode)},_encode=buffer?function(u){return(u.constructor===buffer.constructor?u:new buffer(u)).toString("base64")}:function(u){return btoa(utob(u))},encode=function(u,urisafe){return urisafe?_encode(String(u)).replace(/[+\/]/g,function(m0){return"+"==m0?"-":"_"}).replace(/=/g,""):_encode(String(u))},encodeURI=function(u){return encode(u,!0)},re_btou=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),cb_btou=function(cccc){switch(cccc.length){case 4:var cp=(7&cccc.charCodeAt(0))<<18|(63&cccc.charCodeAt(1))<<12|(63&cccc.charCodeAt(2))<<6|63&cccc.charCodeAt(3),offset=cp-65536;return fromCharCode((offset>>>10)+55296)+fromCharCode((1023&offset)+56320);case 3:return fromCharCode((15&cccc.charCodeAt(0))<<12|(63&cccc.charCodeAt(1))<<6|63&cccc.charCodeAt(2));default:return fromCharCode((31&cccc.charCodeAt(0))<<6|63&cccc.charCodeAt(1))}},btou=function(b){return b.replace(re_btou,cb_btou)},cb_decode=function(cccc){var len=cccc.length,padlen=len%4,n=(len>0?b64tab[cccc.charAt(0)]<<18:0)|(len>1?b64tab[cccc.charAt(1)]<<12:0)|(len>2?b64tab[cccc.charAt(2)]<<6:0)|(len>3?b64tab[cccc.charAt(3)]:0),chars=[fromCharCode(n>>>16),fromCharCode(n>>>8&255),fromCharCode(255&n)];return chars.length-=[0,0,2,1][padlen],chars.join("")},atob=global.atob?function(a){return global.atob(a)}:function(a){return a.replace(/[\s\S]{1,4}/g,cb_decode)},_decode=buffer?function(a){return(a.constructor===buffer.constructor?a:new buffer(a,"base64")).toString()}:function(a){return btou(atob(a))},decode=function(a){return _decode(String(a).replace(/[-_]/g,function(m0){return"-"==m0?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},noConflict=function(){var Base64=global.Base64;return global.Base64=_Base64,Base64};if(global.Base64={VERSION:version,atob:atob,btoa:btoa,fromBase64:decode,toBase64:encode,utob:utob,encode:encode,encodeURI:encodeURI,btou:btou,decode:decode,noConflict:noConflict},"function"==typeof Object.defineProperty){var noEnum=function(v){return{value:v,enumerable:!1,writable:!0,configurable:!0}};global.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",noEnum(function(){return decode(this)})),Object.defineProperty(String.prototype,"toBase64",noEnum(function(urisafe){return encode(this,urisafe)})),Object.defineProperty(String.prototype,"toBase64URI",noEnum(function(){return encode(this,!0)}))}}global.Meteor&&(Base64=global.Base64)}(this)},function(module,exports){module.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},function(module,exports){module.exports={name:"@haad/ipfs-api",version:"13.0.0-beta.2",description:"A client library for the IPFS HTTP API. Follows interface-ipfs-core spec",main:"src/index.js",browser:{glob:!1,fs:!1,stream:"readable-stream",http:"stream-http"},scripts:{test:"gulp test","test:node":"gulp test:node","test:browser":"gulp test:browser",lint:"aegir-lint",build:"gulp build",release:"gulp release","release-minor":"gulp release --type minor","release-major":"gulp release --type major",coverage:"gulp coverage","coverage-publish":"aegir-coverage publish"},dependencies:{async:"^2.1.2",bl:"^1.1.2",bs58:"^3.0.0","concat-stream":"^1.5.2","detect-node":"^2.0.3",flatmap:"0.0.3",glob:"^7.1.1","ipfs-block":"^0.5.0","ipld-dag-pb":"^0.9.0","is-ipfs":"^0.2.1",isstream:"^0.1.2","js-base64":"^2.1.9","lru-cache":"^4.0.1",multiaddr:"^2.0.3","multipart-stream":"^2.0.1",ndjson:"^1.4.3",once:"^1.4.0","peer-id":"^0.8.0","peer-info":"^0.8.0","promisify-es6":"^1.0.2",qs:"^6.3.0","readable-stream":"^1.1.14","stream-http":"^2.5.0",streamifier:"^0.1.1","tar-stream":"^1.5.2"},engines:{node:">=4.0.0",npm:">=3.0.0"},repository:{type:"git",url:"https://github.com/ipfs/js-ipfs-api"},devDependencies:{aegir:"^9.1.2",chai:"^3.5.0","eslint-plugin-react":"^6.7.1",gulp:"^3.9.1",hapi:"^15.2.0","interface-ipfs-core":"^0.21.0","ipfs-daemon":"^0.3.0-beta.1","ipfsd-ctl":"^0.17.0","pre-commit":"^1.1.3","socket.io":"^1.5.1","socket.io-client":"^1.5.1","stream-equal":"^0.1.9"},"pre-commit":["lint","test"],keywords:["ipfs"],author:"Matt Bell <mappum@gmail.com>",contributors:["Alex Mingoia <talk@alexmingoia.com>","Connor Keenan <ckeenan89@gmail.com>","David Braun <David.Braun@Toptal.com>","David Dias <daviddias.p@gmail.com>","Fil <fil@rezo.net>","Francisco Baio Dias <xicombd@gmail.com>","Friedel Ziegelmayer <dignifiedquire@gmail.com>","Gavin McDermott <gavinmcdermott@gmail.com>","Harlan T Wood <harlantwood@users.noreply.github.com>","Harlan T Wood <code@harlantwood.net>","Holodisc <holodiscent@gmail.com>","Jason Carver <jacarver@linkedin.com>","Jeromy <why@ipfs.io>","Jeromy <jeromyj@gmail.com>","Joe Turgeon <arithmetric@gmail.com>","Juan Batiz-Benet <juan@benet.ai>","Kristoffer Ström <kristoffer@rymdkoloni.se>","Matt Bell <mappum@gmail.com>","Mithgol <getgit@mithgol.ru>","Richard Littauer <richard.littauer@gmail.com>","Stephen Whitmore <stephen.whitmore@gmail.com>","Travis Person <travis.person@gmail.com>","Victor Bjelkholm <victorbjelkholm@gmail.com>","Victor Bjelkholm <victor@typeform.com>","ethers <ethereum@outlook.com>","greenkeeperio-bot <support@greenkeeper.io>","haad <haad@headbanggames.com>","nginnever <ginneversource@gmail.com>","priecint <tp-dev@seznam.cz>","samuli <samuli@nugg.ad>"],license:"MIT",bugs:{url:"https://github.com/ipfs/js-ipfs-api/issues"},homepage:"https://github.com/ipfs/js-ipfs-api"}},function(module,exports){"use strict";exports.names={sha1:17,"sha2-256":18,"sha2-512":19,"sha3-224":23,"sha3-256":22,"sha3-384":21,"sha3-512":20,"shake-128":24,"shake-256":25,"keccak-224":26,"keccak-256":27,"keccak-384":28,"keccak-512":29,blake2b:64,blake2s:65},exports.codes={17:"sha1",18:"sha2-256",19:"sha2-512",23:"sha3-224",22:"sha3-256",21:"sha3-384",20:"sha3-512",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",64:"blake2b",65:"blake2s"},exports.defaultLengths={17:20,18:32,19:64,23:28,22:32,21:48,20:64,24:32,25:64,26:28,27:32,28:48,29:64,64:64,65:32}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const bs58=__webpack_require__(10),cs=__webpack_require__(185);exports.toHexString=function(m){if(!Buffer.isBuffer(m))throw new Error("must be passed a buffer");return m.toString("hex")},exports.fromHexString=function(s){return new Buffer(s,"hex")},exports.toB58String=function(m){if(!Buffer.isBuffer(m))throw new Error("must be passed a buffer");return bs58.encode(m)},exports.fromB58String=function(s){let encoded=s;return Buffer.isBuffer(s)&&(encoded=s.toString()),new Buffer(bs58.decode(encoded))},exports.decode=function(buf){exports.validate(buf);const code=buf[0];return{code:code,name:cs.codes[code],length:buf[1],digest:buf.slice(2)}},exports.encode=function(digest,code,length){if(!digest||!code)throw new Error("multihash encode requires at least two args: digest, code");const hashfn=exports.coerceCode(code);if(!Buffer.isBuffer(digest))throw new Error("digest should be a Buffer");if(null==length&&(length=digest.length),length&&digest.length!==length)throw new Error("digest length should be equal to specified length.");if(length>127)throw new Error("multihash does not yet support digest lengths greater than 127 bytes.");return Buffer.concat([new Buffer([hashfn,length]),digest])},exports.coerceCode=function(name){let code=name;if("string"==typeof name){if(!cs.names[name])throw new Error(`Unrecognized hash function named: ${name}`);code=cs.names[name]}if("number"!=typeof code)throw new Error(`Hash function code should be a number. Got: ${code}`);if(!cs.codes[code]&&!exports.isAppCode(code))throw new Error(`Unrecognized function code: ${code}`);return code},exports.isAppCode=function(code){return code>0&&code<16},exports.isValidCode=function(code){return!!exports.isAppCode(code)||!!cs.codes[code]},exports.validate=function(multihash){if(!Buffer.isBuffer(multihash))throw new Error("multihash must be a Buffer");if(multihash.length<3)throw new Error("multihash too short. must be > 3 bytes.");if(multihash.length>129)throw new Error("multihash too long. must be < 129 bytes.");let code=multihash[0];if(!exports.isValidCode(code))throw new Error(`multihash unknown function code: 0x${code.toString(16)}`);if(multihash.slice(2).length!==multihash[1])throw new Error(`multihash length inconsistent: 0x${multihash.toString("hex")}`)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function getWebCrypto(){if("undefined"!=typeof window){if(window.crypto)return window.crypto.subtle||window.crypto.webkitSubtle;if(window.msCrypto)return window.msCrypto.subtle}}function webCryptoHash(type){if(!webCrypto)throw new Error("Please use a browser with webcrypto support");return(data,callback)=>{const res=webCrypto.digest({name:type},data);return"function"!=typeof res.then?(res.onerror=(()=>{callback(`Error hashing data using ${type}`)}),void(res.oncomplete=(e=>{callback(null,e.target.result)}))):void nodeify(res.then(raw=>new Buffer(new Uint8Array(raw))),callback)}}function sha1(buf,callback){webCryptoHash("SHA-1")(buf,callback)}function sha2256(buf,callback){webCryptoHash("SHA-256")(buf,callback)}function sha2512(buf,callback){webCryptoHash("SHA-512")(buf,callback)}const nodeify=__webpack_require__(29),webCrypto=getWebCrypto();module.exports={sha1:sha1,sha2256:sha2256,sha2512:sha2512}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const sha3=__webpack_require__(83),toCallback=__webpack_require__(190),sha=__webpack_require__(187),toBuf=(doWork,other)=>input=>{return new Buffer(doWork(input,other),"hex")};module.exports={sha1:sha.sha1,sha2256:sha.sha2256,sha2512:sha.sha2512,sha3512:toCallback(toBuf(sha3.sha3_512)),sha3384:toCallback(toBuf(sha3.sha3_384)),sha3256:toCallback(toBuf(sha3.sha3_256)),sha3224:toCallback(toBuf(sha3.sha3_224)),shake128:toCallback(toBuf(sha3.shake_128,256)),shake256:toCallback(toBuf(sha3.shake_256,512)),keccak224:toCallback(toBuf(sha3.keccak_224)),keccak256:toCallback(toBuf(sha3.keccak_256)),keccak384:toCallback(toBuf(sha3.keccak_384)),keccak512:toCallback(toBuf(sha3.keccak_512))}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function Multihashing(buf,func,length,callback){if("function"==typeof length&&(callback=length,length=void 0),!callback)throw new Error("Missing callback");Multihashing.digest(buf,func,length,(err,digest)=>{return err?callback(err):void callback(null,multihash.encode(digest,func,length))})}const multihash=__webpack_require__(186),crypto=__webpack_require__(188);module.exports=Multihashing,Multihashing.Buffer=Buffer,Multihashing.multihash=multihash,Multihashing.digest=function(buf,func,length,callback){if("function"==typeof length&&(callback=length,length=void 0),!callback)throw new Error("Missing callback");let cb=callback;length&&(cb=((err,digest)=>{return err?callback(err):void callback(null,digest.slice(0,length))}));let hash;try{hash=Multihashing.createHash(func)}catch(err){return cb(err)}hash(buf,cb)},Multihashing.createHash=function(func){if(func=multihash.coerceCode(func),!Multihashing.functions[func])throw new Error("multihash function "+func+" not yet supported");return Multihashing.functions[func]},Multihashing.functions={17:crypto.sha1,18:crypto.sha2256,19:crypto.sha2512,20:crypto.sha3512,21:crypto.sha3384,22:crypto.sha3256,23:crypto.sha3224,24:crypto.shake128,25:crypto.shake256,26:crypto.keccak224,27:crypto.keccak256,28:crypto.keccak384,29:crypto.keccak512}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";const setImmediate=__webpack_require__(67);module.exports=function(doWork){return function(input,callback){const done=(err,res)=>setImmediate(()=>{callback(err,res)});let res;try{res=doWork(input)}catch(err){return void done(err)}done(null,res)}}},function(module,exports,__webpack_require__){"use strict";const ciphers=__webpack_require__(192),CIPHER_MODES={16:"aes-128-ctr",32:"aes-256-ctr"};exports.create=function(key,iv,callback){const mode=CIPHER_MODES[key.length];if(!mode)return callback(new Error("Invalid key length"));const cipher=ciphers.createCipheriv(mode,key,iv),decipher=ciphers.createDecipheriv(mode,key,iv),res={
encrypt(data,cb){cb(null,cipher.update(data))},decrypt(data,cb){cb(null,decipher.update(data))}};callback(null,res)}},function(module,exports,__webpack_require__){"use strict";const crypto=__webpack_require__(150);module.exports={createCipheriv:crypto.createCipheriv,createDecipheriv:crypto.createDecipheriv}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function marshalPublicKey(jwk){const byteLen=curveLengths[jwk.crv];return Buffer.concat([new Buffer([4]),toBn(jwk.x).toBuffer("be",byteLen),toBn(jwk.y).toBuffer("be",byteLen)],1+2*byteLen)}function unmarshalPublicKey(curve,key){const byteLen=curveLengths[curve];if(!key.slice(0,1).equals(new Buffer([4])))throw new Error("Invalid key format");const x=new BN(key.slice(1,byteLen+1)),y=new BN(key.slice(1+byteLen));return{kty:"EC",crv:curve,x:toBase64(x),y:toBase64(y),ext:!0}}function unmarshalPrivateKey(curve,key){const result=unmarshalPublicKey(curve,key.public);return result.d=toBase64(new BN(key.private)),result}const crypto=__webpack_require__(40)(),nodeify=__webpack_require__(29),BN=__webpack_require__(18).bignum,util=__webpack_require__(85),toBase64=util.toBase64,toBn=util.toBn,bits={"P-256":256,"P-384":384,"P-521":521};exports.generateEphmeralKeyPair=function(curve,callback){nodeify(crypto.subtle.generateKey({name:"ECDH",namedCurve:curve},!0,["deriveBits"]).then(pair=>{const genSharedKey=(theirPub,forcePrivate,cb)=>{"function"==typeof forcePrivate&&(cb=forcePrivate,forcePrivate=void 0);let privateKey;privateKey=forcePrivate?crypto.subtle.importKey("jwk",unmarshalPrivateKey(curve,forcePrivate),{name:"ECDH",namedCurve:curve},!1,["deriveBits"]):Promise.resolve(pair.privateKey);const keys=Promise.all([crypto.subtle.importKey("jwk",unmarshalPublicKey(curve,theirPub),{name:"ECDH",namedCurve:curve},!1,[]),privateKey]);nodeify(keys.then(keys=>crypto.subtle.deriveBits({name:"ECDH",namedCurve:curve,public:keys[0]},keys[1],bits[curve])).then(bits=>Buffer.from(bits)),cb)};return crypto.subtle.exportKey("jwk",pair.publicKey).then(publicKey=>{return{key:marshalPublicKey(publicKey),genSharedKey:genSharedKey}})}),callback)};const curveLengths={"P-256":32,"P-384":48,"P-521":66}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const nodeify=__webpack_require__(29),crypto=__webpack_require__(40)(),lengths=__webpack_require__(195),hashTypes={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"};exports.create=function(hashType,secret,callback){const hash=hashTypes[hashType];nodeify(crypto.subtle.importKey("raw",secret,{name:"HMAC",hash:{name:hash}},!1,["sign"]).then(key=>{return{digest(data,cb){nodeify(crypto.subtle.sign({name:"HMAC"},key,data).then(raw=>Buffer.from(raw)),cb)},length:lengths[hashType]}}),callback)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){"use strict";module.exports={SHA1:20,SHA256:32,SHA512:64}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function exportKey(pair){return Promise.all([crypto.subtle.exportKey("jwk",pair.privateKey),crypto.subtle.exportKey("jwk",pair.publicKey)])}function derivePublicFromPrivate(jwKey){return crypto.subtle.importKey("jwk",{kty:jwKey.kty,n:jwKey.n,e:jwKey.e,alg:jwKey.alg,kid:jwKey.kid},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"])}const nodeify=__webpack_require__(29),crypto=__webpack_require__(40)();exports.utils=__webpack_require__(197),exports.generateKey=function(bits,callback){nodeify(crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:bits,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(exportKey).then(keys=>({privateKey:keys[0],publicKey:keys[1]})),callback)},exports.unmarshalPrivateKey=function(key,callback){const privateKey=crypto.subtle.importKey("jwk",key,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]);nodeify(Promise.all([privateKey,derivePublicFromPrivate(key)]).then(keys=>exportKey({privateKey:keys[0],publicKey:keys[1]})).then(keys=>({privateKey:keys[0],publicKey:keys[1]})),callback)},exports.getRandomValues=function(arr){return Buffer.from(crypto.getRandomValues(arr))},exports.hashAndSign=function(key,msg,callback){nodeify(crypto.subtle.importKey("jwk",key,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then(privateKey=>{return crypto.subtle.sign({name:"RSASSA-PKCS1-v1_5"},privateKey,Uint8Array.from(msg))}).then(sig=>Buffer.from(sig)),callback)},exports.hashAndVerify=function(key,sig,msg,callback){nodeify(crypto.subtle.importKey("jwk",key,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then(publicKey=>{return crypto.subtle.verify({name:"RSASSA-PKCS1-v1_5"},publicKey,sig,msg)}),callback)}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";const asn1=__webpack_require__(18),util=__webpack_require__(85),toBase64=util.toBase64,toBn=util.toBn,RSAPrivateKey=asn1.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}),AlgorithmIdentifier=asn1.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))}),PublicKey=asn1.define("RSAPublicKey",function(){this.seq().obj(this.key("algorithm").use(AlgorithmIdentifier),this.key("subjectPublicKey").bitstr())}),RSAPublicKey=asn1.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});exports.pkcs1ToJwk=function(bytes){const asn1=RSAPrivateKey.decode(bytes,"der");return{kty:"RSA",n:toBase64(asn1.modulus),e:toBase64(asn1.publicExponent),d:toBase64(asn1.privateExponent),p:toBase64(asn1.prime1),q:toBase64(asn1.prime2),dp:toBase64(asn1.exponent1),dq:toBase64(asn1.exponent2),qi:toBase64(asn1.coefficient),alg:"RS256",kid:"2011-04-29"}},exports.jwkToPkcs1=function(jwk){return RSAPrivateKey.encode({version:0,modulus:toBn(jwk.n),publicExponent:toBn(jwk.e),privateExponent:toBn(jwk.d),prime1:toBn(jwk.p),prime2:toBn(jwk.q),exponent1:toBn(jwk.dp),exponent2:toBn(jwk.dq),coefficient:toBn(jwk.qi)},"der")},exports.pkixToJwk=function(bytes){const ndata=PublicKey.decode(bytes,"der"),asn1=RSAPublicKey.decode(ndata.subjectPublicKey.data,"der");return{kty:"RSA",n:toBase64(asn1.modulus),e:toBase64(asn1.publicExponent),alg:"RS256",kid:"2011-04-29"}},exports.jwkToPkix=function(jwk){return PublicKey.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:RSAPublicKey.encode({modulus:toBn(jwk.n),publicExponent:toBn(jwk.e)},"der")}},"der")}},function(module,exports,__webpack_require__){"use strict";const crypto=__webpack_require__(39);module.exports=((curve,callback)=>{crypto.ecdh.generateEphmeralKeyPair(curve,callback)})},function(module,exports,__webpack_require__){"use strict";const protobuf=__webpack_require__(58),pbm=protobuf(__webpack_require__(84)),c=__webpack_require__(39);exports.hmac=c.hmac,exports.aes=c.aes,exports.webcrypto=c.webcrypto;const keys=exports.keys=__webpack_require__(201);exports.keyStretcher=__webpack_require__(200),exports.generateEphemeralKeyPair=__webpack_require__(198),exports.generateKeyPair=((type,bits,cb)=>{let key=keys[type.toLowerCase()];return key?void key.generateKeyPair(bits,cb):cb(new Error("invalid or unsupported key type"))}),exports.unmarshalPublicKey=(buf=>{const decoded=pbm.PublicKey.decode(buf);switch(decoded.Type){case pbm.KeyType.RSA:return keys.rsa.unmarshalRsaPublicKey(decoded.Data);default:throw new Error("invalid or unsupported key type")}}),exports.marshalPublicKey=((key,type)=>{if(type=(type||"rsa").toLowerCase(),"rsa"!==type)throw new Error("invalid or unsupported key type");return key.bytes}),exports.unmarshalPrivateKey=((buf,callback)=>{const decoded=pbm.PrivateKey.decode(buf);switch(decoded.Type){case pbm.KeyType.RSA:return keys.rsa.unmarshalRsaPrivateKey(decoded.Data,callback);default:callback(new Error("invalid or unsupported key type"))}}),exports.marshalPrivateKey=((key,type)=>{if(type=(type||"rsa").toLowerCase(),"rsa"!==type)throw new Error("invalid or unsupported key type");return key.bytes})},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const crypto=__webpack_require__(39),whilst=__webpack_require__(143),cipherMap={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}};module.exports=((cipherType,hash,secret,callback)=>{const cipher=cipherMap[cipherType];if(!cipher)return callback(new Error("unkown cipherType passed"));if(!hash)return callback(new Error("unkown hashType passed"));const cipherKeySize=cipher.keySize,ivSize=cipher.ivSize,hmacKeySize=20,seed=Buffer.from("key expansion"),resultLength=2*(ivSize+cipherKeySize+hmacKeySize);crypto.hmac.create(hash,secret,(err,m)=>{return err?callback(err):void m.digest(seed,(err,a)=>{function stretch(cb){m.digest(Buffer.concat([a,seed]),(err,b)=>{if(err)return cb(err);let todo=b.length;j+todo>resultLength&&(todo=resultLength-j),result.push(b),j+=todo,m.digest(a,(err,_a)=>{return err?cb(err):(a=_a,void cb())})})}function finish(err){if(err)return callback(err);const half=resultLength/2,resultBuffer=Buffer.concat(result),r1=resultBuffer.slice(0,half),r2=resultBuffer.slice(half,resultLength),createKey=res=>({iv:res.slice(0,ivSize),cipherKey:res.slice(ivSize,ivSize+cipherKeySize),macKey:res.slice(ivSize+cipherKeySize)});callback(null,{k1:createKey(r1),k2:createKey(r2)})}if(err)return callback(err);let result=[],j=0;whilst(()=>j<resultLength,stretch,finish)})})})}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";module.exports={rsa:__webpack_require__(202)}},function(module,exports,__webpack_require__){"use strict";function unmarshalRsaPrivateKey(bytes,callback){const jwk=crypto.utils.pkcs1ToJwk(bytes);crypto.unmarshalPrivateKey(jwk,(err,keys)=>{return err?callback(err):void callback(null,new RsaPrivateKey(keys.privateKey,keys.publicKey))})}function unmarshalRsaPublicKey(bytes){const jwk=crypto.utils.pkixToJwk(bytes);return new RsaPublicKey(jwk)}function generateKeyPair(bits,cb){crypto.generateKey(bits,(err,keys)=>{return err?cb(err):void cb(null,new RsaPrivateKey(keys.privateKey,keys.publicKey))})}function ensure(cb){if("function"!=typeof cb)throw new Error("callback is required")}const multihashing=__webpack_require__(189),protobuf=__webpack_require__(58),crypto=__webpack_require__(39).rsa,pbm=protobuf(__webpack_require__(84));class RsaPublicKey{constructor(key){this._key=key}verify(data,sig,callback){ensure(callback),crypto.hashAndVerify(this._key,sig,data,callback)}marshal(){return crypto.utils.jwkToPkix(this._key)}get bytes(){return pbm.PublicKey.encode({Type:pbm.KeyType.RSA,Data:this.marshal()})}encrypt(bytes){return this._key.encrypt(bytes,"RSAES-PKCS1-V1_5")}equals(key){return this.bytes.equals(key.bytes)}hash(callback){ensure(callback),multihashing(this.bytes,"sha2-256",callback)}}class RsaPrivateKey{constructor(key,publicKey){this._key=key,this._publicKey=publicKey}genSecret(){return crypto.getRandomValues(new Uint8Array(16))}sign(message,callback){ensure(callback),crypto.hashAndSign(this._key,message,callback)}get public(){if(!this._publicKey)throw new Error("public key not provided");return new RsaPublicKey(this._publicKey)}decrypt(msg,callback){crypto.decrypt(this._key,msg,callback)}marshal(){return crypto.utils.jwkToPkcs1(this._key)}get bytes(){return pbm.PrivateKey.encode({Type:pbm.KeyType.RSA,Data:this.marshal()})}equals(key){return this.bytes.equals(key.bytes)}hash(callback){ensure(callback),multihashing(this.bytes,"sha2-256",callback)}}module.exports={RsaPublicKey:RsaPublicKey,RsaPrivateKey:RsaPrivateKey,unmarshalRsaPublicKey:unmarshalRsaPublicKey,unmarshalRsaPrivateKey:unmarshalRsaPrivateKey,generateKeyPair:generateKeyPair}},function(module,exports,__webpack_require__){(function(global,module){function arrayFilter(array,predicate){for(var index=-1,length=array?array.length:0,resIndex=0,result=[];++index<length;){var value=array[index];predicate(value,index,array)&&(result[resIndex++]=value)}return result}function arraySome(array,predicate){for(var index=-1,length=array?array.length:0;++index<length;)if(predicate(array[index],index,array))return!0;return!1}function baseProperty(key){return function(object){return null==object?void 0:object[key]}}function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}function baseUnary(func){return function(value){return func(value)}}function getValue(object,key){return null==object?void 0:object[key]}function isHostObject(value){var result=!1;if(null!=value&&"function"!=typeof value.toString)try{result=!!(value+"")}catch(e){}return result}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 setToArray(set){var index=-1,result=Array(set.size);return set.forEach(function(value){result[++index]=value}),result}function Hash(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{}}function hashDelete(key){return this.has(key)&&delete this.__data__[key]}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?void 0:result}return hasOwnProperty.call(data,key)?data[key]:void 0}function hashHas(key){var data=this.__data__;return nativeCreate?void 0!==data[key]:hasOwnProperty.call(data,key)}function hashSet(key,value){var data=this.__data__;return data[key]=nativeCreate&&void 0===value?HASH_UNDEFINED:value,this}function ListCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[]}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0)return!1;var lastIndex=data.length-1;return index==lastIndex?data.pop():splice.call(data,index,1),!0}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?void 0:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?data.push([key,value]):data[index][1]=value,this}function MapCache(entries){var index=-1,length=entries?entries.length:0;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){return getMapData(this,key).delete(key)}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){return getMapData(this,key).set(key,value),this}function SetCache(values){var index=-1,length=values?values.length:0;for(this.__data__=new MapCache;++index<length;)this.add(values[index])}function setCacheAdd(value){return this.__data__.set(value,HASH_UNDEFINED),this}function setCacheHas(value){return this.__data__.has(value)}function Stack(entries){this.__data__=new ListCache(entries)}function stackClear(){this.__data__=new ListCache}function stackDelete(key){return this.__data__.delete(key)}function stackGet(key){return this.__data__.get(key)}function stackHas(key){return this.__data__.has(key)}function stackSet(key,value){var cache=this.__data__;if(cache instanceof ListCache){var pairs=cache.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1)return pairs.push([key,value]),this;cache=this.__data__=new MapCache(pairs)}return cache.set(key,value),this}function arrayLikeKeys(value,inherited){var result=isArray(value)||isArguments(value)?baseTimes(value.length,String):[],length=result.length,skipIndexes=!!length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isIndex(key,length))||result.push(key);return result}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseFilter(collection,predicate){var result=[];return baseEach(collection,function(value,index,collection){predicate(value,index,collection)&&result.push(value)}),result}function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys)}function baseGet(object,path){path=isKey(path,object)?[path]:castPath(path);for(var index=0,length=path.length;null!=object&&index<length;)object=object[toKey(path[index++])];return index&&index==length?object:void 0}function baseGetTag(value){return objectToString.call(value)}function baseHasIn(object,key){return null!=object&&key in Object(object)}function baseIsEqual(value,other,customizer,bitmask,stack){return value===other||(null==value||null==other||!isObject(value)&&!isObjectLike(other)?value!==value&&other!==other:baseIsEqualDeep(value,other,baseIsEqual,customizer,bitmask,stack))}function baseIsEqualDeep(object,other,equalFunc,customizer,bitmask,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=getTag(object),objTag=objTag==argsTag?objectTag:objTag),othIsArr||(othTag=getTag(other),othTag=othTag==argsTag?objectTag:othTag);var objIsObj=objTag==objectTag&&!isHostObject(object),othIsObj=othTag==objectTag&&!isHostObject(other),isSameTag=objTag==othTag;if(isSameTag&&!objIsObj)return stack||(stack=new Stack),objIsArr||isTypedArray(object)?equalArrays(object,other,equalFunc,customizer,bitmask,stack):equalByTag(object,other,objTag,equalFunc,customizer,bitmask,stack);if(!(bitmask&PARTIAL_COMPARE_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new Stack),equalFunc(objUnwrapped,othUnwrapped,customizer,bitmask,stack)}}return!!isSameTag&&(stack||(stack=new Stack),equalObjects(object,other,equalFunc,customizer,bitmask,stack))}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=Object(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(void 0===objValue&&!(key in object))return!1}else{var stack=new Stack;if(customizer)var result=customizer(objValue,srcValue,key,object,source,stack);if(!(void 0===result?baseIsEqual(srcValue,objValue,customizer,UNORDERED_COMPARE_FLAG|PARTIAL_COMPARE_FLAG,stack):result))return!1}}return!0}function baseIsNative(value){if(!isObject(value)||isMasked(value))return!1;var pattern=isFunction(value)||isHostObject(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objectToString.call(value)]}function baseIteratee(value){return"function"==typeof value?value:null==value?identity:"object"==typeof value?isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value):property(value)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}function baseMatches(source){var matchData=getMatchData(source);return 1==matchData.length&&matchData[0][2]?matchesStrictComparable(matchData[0][0],matchData[0][1]):function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){return isKey(path)&&isStrictComparable(srcValue)?matchesStrictComparable(toKey(path),srcValue):function(object){var objValue=get(object,path);return void 0===objValue&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,void 0,UNORDERED_COMPARE_FLAG|PARTIAL_COMPARE_FLAG)}}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function baseToString(value){if("string"==typeof value)return value;if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function castPath(value){return isArray(value)?value:stringToPath(value)}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(null==collection)return collection;if(!isArrayLike(collection))return eachFunc(collection,iteratee);for(var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);(fromRight?index--:++index<length)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;length--;){var key=props[fromRight?length:++index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function equalArrays(array,other,equalFunc,customizer,bitmask,stack){var isPartial=bitmask&PARTIAL_COMPARE_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength))return!1;var stacked=stack.get(array);if(stacked&&stack.get(other))return stacked==other;var index=-1,result=!0,seen=bitmask&UNORDERED_COMPARE_FLAG?new SetCache:void 0;for(stack.set(array,other),stack.set(other,array);++index<arrLength;){var arrValue=array[index],othValue=other[index];if(customizer)var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);if(void 0!==compared){if(compared)continue;result=!1;break}if(seen){if(!arraySome(other,function(othValue,othIndex){if(!seen.has(othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,customizer,bitmask,stack)))return seen.add(othIndex)})){result=!1;break}}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,customizer,bitmask,stack)){result=!1;break}}return stack.delete(array),stack.delete(other),result}function equalByTag(object,other,tag,equalFunc,customizer,bitmask,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset)return!1;object=object.buffer,other=other.buffer;case arrayBufferTag:return!(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other)));case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&PARTIAL_COMPARE_FLAG;if(convert||(convert=setToArray),object.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object);if(stacked)return stacked==other;bitmask|=UNORDERED_COMPARE_FLAG,stack.set(object,other);var result=equalArrays(convert(object),convert(other),equalFunc,customizer,bitmask,stack);return stack.delete(object),result;case symbolTag:if(symbolValueOf)return symbolValueOf.call(object)==symbolValueOf.call(other)}return!1}function equalObjects(object,other,equalFunc,customizer,bitmask,stack){var isPartial=bitmask&PARTIAL_COMPARE_FLAG,objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key)))return!1}var stacked=stack.get(object);if(stacked&&stack.get(other))return stacked==other;var result=!0;stack.set(object,other),stack.set(other,object);for(var skipCtor=isPartial;++index<objLength;){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);if(!(void 0===compared?objValue===othValue||equalFunc(objValue,othValue,customizer,bitmask,stack):compared)){result=!1;break}skipCtor||(skipCtor="constructor"==key)}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor)&&(result=!1)}return stack.delete(object),stack.delete(other),result}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data["string"==typeof key?"string":"hash"]:data.map}function getMatchData(object){for(var result=keys(object),length=result.length;length--;){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:void 0}function hasPath(object,path,hasFunc){path=isKey(path,object)?[path]:castPath(path);for(var result,index=-1,length=path.length;++index<length;){var key=toKey(path[index]);if(!(result=null!=object&&hasFunc(object,key)))break;object=object[key]}if(result)return result;var length=object?object.length:0;return!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object))}function isIndex(value,length){return length=null==length?MAX_SAFE_INTEGER:length,!!length&&("number"==typeof value||reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function isKey(value,object){if(isArray(value))return!1;var type=typeof value;return!("number"!=type&&"symbol"!=type&&"boolean"!=type&&null!=value&&!isSymbol(value))||(reIsPlainProp.test(value)||!reIsDeepProp.test(value)||null!=object&&value in Object(object))}function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function isPrototype(value){var Ctor=value&&value.constructor,proto="function"==typeof Ctor&&Ctor.prototype||objectProto;return value===proto}function isStrictComparable(value){return value===value&&!isObject(value)}function matchesStrictComparable(key,srcValue){return function(object){return null!=object&&(object[key]===srcValue&&(void 0!==srcValue||key in Object(object)))}}function toKey(value){if("string"==typeof value||isSymbol(value))return value;var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,baseIteratee(predicate,3))}function memoize(func,resolver){if("function"!=typeof func||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),result};return memoized.cache=new(memoize.Cache||MapCache),memoized}function eq(value,other){return value===other||value!==value&&other!==other}function isArguments(value){return isArrayLikeObject(value)&&hasOwnProperty.call(value,"callee")&&(!propertyIsEnumerable.call(value,"callee")||objectToString.call(value)==argsTag)}function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isFunction(value){var tag=isObject(value)?objectToString.call(value):"";return tag==funcTag||tag==genTag}function isLength(value){return"number"==typeof value&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isObject(value){var type=typeof value;return!!value&&("object"==type||"function"==type)}function isObjectLike(value){return!!value&&"object"==typeof value}function isSymbol(value){return"symbol"==typeof value||isObjectLike(value)&&objectToString.call(value)==symbolTag}function toString(value){return null==value?"":baseToString(value)}function get(object,path,defaultValue){var result=null==object?void 0:baseGet(object,path);return void 0===result?defaultValue:result}function hasIn(object,path){return null!=object&&hasPath(object,path,baseHasIn)}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function identity(value){return value}function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}var LARGE_ARRAY_SIZE=200,FUNC_ERROR_TEXT="Expected a function",HASH_UNDEFINED="__lodash_hash_undefined__",UNORDERED_COMPARE_FLAG=1,PARTIAL_COMPARE_FLAG=2,INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",promiseTag="[object Promise]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",weakMapTag="[object WeakMap]",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]",reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,reLeadingDot=/^\./,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reEscapeChar=/\\(\\)?/g,reIsHostCtor=/^\[object .+?Constructor\]$/,reIsUint=/^(?:0|[1-9]\d*)$/,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 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{return freeProcess&&freeProcess.binding("util")}catch(e){}}(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype,coreJsData=root["__core-js_shared__"],maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");
return uid?"Symbol(src)_1."+uid:""}(),funcToString=funcProto.toString,hasOwnProperty=objectProto.hasOwnProperty,objectToString=objectProto.toString,reIsNative=RegExp("^"+funcToString.call(hasOwnProperty).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Symbol=root.Symbol,Uint8Array=root.Uint8Array,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,nativeKeys=overArg(Object.keys,Object),DataView=getNative(root,"DataView"),Map=getNative(root,"Map"),Promise=getNative(root,"Promise"),Set=getNative(root,"Set"),WeakMap=getNative(root,"WeakMap"),nativeCreate=getNative(Object,"create"),dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap),symbolProto=Symbol?Symbol.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0,symbolToString=symbolProto?symbolProto.toString:void 0;Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet,SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas,Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;var baseEach=createBaseEach(baseForOwn),baseFor=createBaseFor(),getTag=baseGetTag;(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set)!=setTag||WeakMap&&getTag(new WeakMap)!=weakMapTag)&&(getTag=function(value){var result=objectToString.call(value),Ctor=result==objectTag?value.constructor:void 0,ctorString=Ctor?toSource(Ctor):void 0;if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}return result});var stringToPath=memoize(function(string){string=toString(string);var result=[];return reLeadingDot.test(string)&&result.push(""),string.replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result});memoize.Cache=MapCache;var isArray=Array.isArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;module.exports=filter}).call(exports,__webpack_require__(8),__webpack_require__(16)(module))},function(module,exports){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)}module.exports=apply},function(module,exports,__webpack_require__){function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isBuff&&("offset"==key||"parent"==key)||isType&&("buffer"==key||"byteLength"==key||"byteOffset"==key)||isIndex(key,length))||result.push(key);return result}var baseTimes=__webpack_require__(209),isArguments=__webpack_require__(220),isArray=__webpack_require__(89),isBuffer=__webpack_require__(221),isIndex=__webpack_require__(212),isTypedArray=__webpack_require__(224),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;module.exports=arrayLikeKeys},function(module,exports,__webpack_require__){function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag}var baseGetTag=__webpack_require__(53),isObjectLike=__webpack_require__(54),argsTag="[object Arguments]";module.exports=baseIsArguments},function(module,exports,__webpack_require__){function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}var baseGetTag=__webpack_require__(53),isLength=__webpack_require__(90),isObjectLike=__webpack_require__(54),argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]",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]",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,module.exports=baseIsTypedArray},function(module,exports,__webpack_require__){function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}var isPrototype=__webpack_require__(213),nativeKeys=__webpack_require__(214),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;module.exports=baseKeys},function(module,exports){function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}module.exports=baseTimes},function(module,exports){function baseUnary(func){return function(value){return func(value)}}module.exports=baseUnary},function(module,exports,__webpack_require__){function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=void 0;var unmasked=!0}catch(e){}var result=nativeObjectToString.call(value);return unmasked&&(isOwn?value[symToStringTag]=tag:delete value[symToStringTag]),result}var Symbol=__webpack_require__(86),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,nativeObjectToString=objectProto.toString,symToStringTag=Symbol?Symbol.toStringTag:void 0;module.exports=getRawTag},function(module,exports){function isIndex(value,length){return length=null==length?MAX_SAFE_INTEGER:length,!!length&&("number"==typeof value||reIsUint.test(value))&&value>-1&&value%1==0&&value<length}var MAX_SAFE_INTEGER=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;module.exports=isIndex},function(module,exports){function isPrototype(value){var Ctor=value&&value.constructor,proto="function"==typeof Ctor&&Ctor.prototype||objectProto;return value===proto}var objectProto=Object.prototype;module.exports=isPrototype},function(module,exports,__webpack_require__){var overArg=__webpack_require__(217),nativeKeys=overArg(Object.keys,Object);module.exports=nativeKeys},function(module,exports,__webpack_require__){(function(module){var freeGlobal=__webpack_require__(87),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{return freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch(e){}}();module.exports=nodeUtil}).call(exports,__webpack_require__(16)(module))},function(module,exports){function objectToString(value){return nativeObjectToString.call(value)}var objectProto=Object.prototype,nativeObjectToString=objectProto.toString;module.exports=objectToString},function(module,exports){function overArg(func,transform){return function(arg){return func(transform(arg))}}module.exports=overArg},function(module,exports,__webpack_require__){function overRest(func,start,transform){return start=nativeMax(void 0===start?func.length-1:start,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),array=Array(length);++index<length;)array[index]=args[start+index];index=-1;for(var otherArgs=Array(start+1);++index<start;)otherArgs[index]=args[index];return otherArgs[start]=transform(array),apply(func,this,otherArgs)}}var apply=__webpack_require__(204),nativeMax=Math.max;module.exports=overRest},function(module,exports){function identity(value){return value}module.exports=identity},function(module,exports,__webpack_require__){var baseIsArguments=__webpack_require__(206),isObjectLike=__webpack_require__(54),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty,propertyIsEnumerable=objectProto.propertyIsEnumerable,isArguments=baseIsArguments(function(){return arguments}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,"callee")&&!propertyIsEnumerable.call(value,"callee")};module.exports=isArguments},function(module,exports,__webpack_require__){(function(module){var root=__webpack_require__(88),stubFalse=__webpack_require__(227),freeExports="object"==typeof exports&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&"object"==typeof module&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer=moduleExports?root.Buffer:void 0,nativeIsBuffer=Buffer?Buffer.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse;module.exports=isBuffer}).call(exports,__webpack_require__(16)(module))},function(module,exports,__webpack_require__){function isFunction(value){if(!isObject(value))return!1;var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag}var baseGetTag=__webpack_require__(53),isObject=__webpack_require__(223),asyncTag="[object AsyncFunction]",funcTag="[object Function]",genTag="[object GeneratorFunction]",proxyTag="[object Proxy]";module.exports=isFunction},function(module,exports){function isObject(value){var type=typeof value;return null!=value&&("object"==type||"function"==type)}module.exports=isObject},function(module,exports,__webpack_require__){var baseIsTypedArray=__webpack_require__(207),baseUnary=__webpack_require__(210),nodeUtil=__webpack_require__(215),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;module.exports=isTypedArray},function(module,exports,__webpack_require__){function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}var arrayLikeKeys=__webpack_require__(205),baseKeys=__webpack_require__(208),isArrayLike=__webpack_require__(41);module.exports=keys},function(module,exports,__webpack_require__){(function(global,module){var __WEBPACK_AMD_DEFINE_RESULT__;(function(){function addMapEntry(map,pair){return map.set(pair[0],pair[1]),map}function addSetEntry(set,value){return set.add(value),set}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<length;){var value=array[index];setter(accumulator,value,iteratee(value),array)}return accumulator}function arrayEach(array,iteratee){for(var index=-1,length=null==array?0:array.length;++index<length&&iteratee(array[index],index,array)!==!1;);return array}function arrayEachRight(array,iteratee){for(var length=null==array?0:array.length;length--&&iteratee(array[length],length,array)!==!1;);return array}function arrayEvery(array,predicate){for(var index=-1,length=null==array?0:array.length;++index<length;)if(!predicate(array[index],index,array))return!1;return!0}function arrayFilter(array,predicate){for(var index=-1,length=null==array?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];predicate(value,index,array)&&(result[resIndex++]=value)}return result}function arrayIncludes(array,value){var length=null==array?0:array.length;return!!length&&baseIndexOf(array,value,0)>-1}function arrayIncludesWith(array,value,comparator){for(var index=-1,length=null==array?0:array.length;++index<length;)if(comparator(value,array[index]))return!0;return!1}function arrayMap(array,iteratee){for(var index=-1,length=null==array?0:array.length,result=Array(length);++index<length;)result[index]=iteratee(array[index],index,array);return result}function arrayPush(array,values){for(var index=-1,length=values.length,offset=array.length;++index<length;)array[offset+index]=values[index];return array}function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=null==array?0:array.length;for(initAccum&&length&&(accumulator=array[++index]);++index<length;)accumulator=iteratee(accumulator,array[index],index,array);return accumulator}function arrayReduceRight(array,iteratee,accumulator,initAccum){var length=null==array?0:array.length;for(initAccum&&length&&(accumulator=array[--length]);length--;)accumulator=iteratee(accumulator,array[length],length,array);return accumulator}function arraySome(array,predicate){for(var index=-1,length=null==array?0:array.length;++index<length;)if(predicate(array[index],index,array))return!0;return!1}function asciiToArray(string){return string.split("")}function asciiWords(string){return string.match(reAsciiWord)||[]}function baseFindKey(collection,predicate,eachFunc){var result;return eachFunc(collection,function(value,key,collection){if(predicate(value,key,collection))return result=key,!1}),result}function baseFindIndex(array,predicate,fromIndex,fromRight){for(var length=array.length,index=fromIndex+(fromRight?1:-1);fromRight?index--:++index<length;)if(predicate(array[index],index,array))return index;return-1}function baseIndexOf(array,value,fromIndex){return value===value?strictIndexOf(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex)}function baseIndexOfWith(array,value,fromIndex,comparator){for(var index=fromIndex-1,length=array.length;++index<length;)if(comparator(array[index],value))return index;return-1}function baseIsNaN(value){return value!==value}function baseMean(array,iteratee){var length=null==array?0:array.length;return length?baseSum(array,iteratee)/length:NAN}function baseProperty(key){return function(object){return null==object?undefined:object[key]}}function basePropertyOf(object){return function(key){return null==object?undefined:object[key]}}function baseReduce(collection,iteratee,accumulator,initAccum,eachFunc){return eachFunc(collection,function(value,index,collection){accumulator=initAccum?(initAccum=!1,value):iteratee(accumulator,value,index,collection)}),accumulator}function baseSortBy(array,comparer){var length=array.length;for(array.sort(comparer);length--;)array[length]=array[length].value;return array}function baseSum(array,iteratee){for(var result,index=-1,length=array.length;++index<length;){var current=iteratee(array[index]);current!==undefined&&(result=result===undefined?current:result+current)}return result}function baseTimes(n,iteratee){for(var index=-1,result=Array(n);++index<n;)result[index]=iteratee(index);return result}function baseToPairs(object,props){return arrayMap(props,function(key){return[key,object[key]]})}function baseUnary(func){return function(value){return func(value)}}function baseValues(object,props){return arrayMap(props,function(key){return object[key]})}function cacheHas(cache,key){return cache.has(key)}function charsStartIndex(strSymbols,chrSymbols){for(var index=-1,length=strSymbols.length;++index<length&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}function charsEndIndex(strSymbols,chrSymbols){for(var index=strSymbols.length;index--&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1;);return index}function countHolders(array,placeholder){for(var length=array.length,result=0;length--;)array[length]===placeholder&&++result;return result}function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function getValue(object,key){return null==object?undefined:object[key]}function hasUnicode(string){return reHasUnicode.test(string)}function hasUnicodeWord(string){return reHasUnicodeWord.test(string)}function iteratorToArray(iterator){for(var data,result=[];!(data=iterator.next()).done;)result.push(data.value);return result}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<length;){var value=array[index];value!==placeholder&&value!==PLACEHOLDER||(array[index]=PLACEHOLDER,result[resIndex++]=index)}return result}function setToArray(set){var index=-1,result=Array(set.size);return set.forEach(function(value){result[++index]=value}),result}function setToPairs(set){var index=-1,result=Array(set.size);return set.forEach(function(value){result[++index]=[value,value]}),result}function strictIndexOf(array,value,fromIndex){for(var index=fromIndex-1,length=array.length;++index<length;)if(array[index]===value)return index;return-1}function strictLastIndexOf(array,value,fromIndex){for(var index=fromIndex+1;index--;)if(array[index]===value)return index;return index}function stringSize(string){return hasUnicode(string)?unicodeSize(string):asciiSize(string)}function stringToArray(string){return hasUnicode(string)?unicodeToArray(string):asciiToArray(string)}function unicodeSize(string){for(var result=reUnicode.lastIndex=0;reUnicode.test(string);)++result;return result}function unicodeToArray(string){return string.match(reUnicode)||[]}function unicodeWords(string){return string.match(reUnicodeWord)||[]}var undefined,VERSION="4.17.2",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,LAZY_WHILE_FLAG=3,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]",promiseTag="[object Promise]",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*$/,reLeadingDot=/^\./,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,rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange="\\u2700-\\u27bf",rsLowerRange="a-z\\xdf-\\xf6\\xf8-\\xff",rsMathOpRange="\\xac\\xb1\\xd7\\xf7",rsNonCharRange="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",rsPunctuationRange="\\u2000-\\u206f",rsSpaceRange=" \\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",rsUpperRange="A-Z\\xc0-\\xd6\\xd8-\\xde",rsVarRange="\\ufe0e\\ufe0f",rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange,rsApos="[']",rsAstral="["+rsAstralRange+"]",rsBreak="["+rsBreakRange+"]",rsCombo="["+rsComboRange+"]",rsDigits="\\d+",rsDingbat="["+rsDingbatRange+"]",rsLower="["+rsLowerRange+"]",rsMisc="[^"+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsUpper="["+rsUpperRange+"]",rsZWJ="\\u200d",rsMiscLower="(?:"+rsLower+"|"+rsMisc+")",rsMiscUpper="(?:"+rsUpper+"|"+rsMisc+")",rsOptContrLower="(?:"+rsApos+"(?:d|ll|m|re|s|t|ve))?",rsOptContrUpper="(?:"+rsApos+"(?:D|LL|M|RE|S|T|VE))?",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsOrdLower="\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",rsOrdUpper="\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji="(?:"+[rsDingbat,rsRegional,rsSurrPair].join("|")+")"+rsSeq,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reApos=RegExp(rsApos,"g"),reComboMark=RegExp(rsCombo,"g"),reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g"),reUnicodeWord=RegExp([rsUpper+"?"+rsLower+"+"+rsOptContrLower+"(?="+[rsBreak,rsUpper,"$"].join("|")+")",rsMiscUpper+"+"+rsOptContrUpper+"(?="+[rsBreak,rsUpper+rsMiscLower,"$"].join("|")+")",rsUpper+"?"+rsMiscLower+"+"+rsOptContrLower,rsUpper+"+"+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join("|"),"g"),reHasUnicode=RegExp("["+rsZWJ+rsAstralRange+rsComboRange+rsVarRange+"]"),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 deburredLetters={"À":"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"},htmlEscapes={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},htmlUnescapes={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},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{return 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,asciiSize=baseProperty("length"),deburrLetter=basePropertyOf(deburredLetters),escapeHtmlChar=basePropertyOf(htmlEscapes),unescapeHtmlChar=basePropertyOf(htmlUnescapes),runInContext=function runInContext(context){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)}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 lazyClone(){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}function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1,result.__filtered__=!0}else result=this.clone(),result.__dir__*=-1;return result}function lazyValue(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=getView(0,arrLength,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,iteratees=this.__iteratees__,iterLength=iteratees.length,resIndex=0,takeCount=nativeMin(length,this.__takeCount__);if(!isArr||arrLength<LARGE_ARRAY_SIZE||arrLength==length&&takeCount==length)return baseWrapperValue(array,this.__actions__);var result=[];outer:for(;length--&&resIndex<takeCount;){index+=dir;for(var iterIndex=-1,value=array[index];++iterIndex<iterLength;){var data=iteratees[iterIndex],iteratee=data.iteratee,type=data.type,computed=iteratee(value);if(type==LAZY_MAP_FLAG)value=computed;else if(!computed){if(type==LAZY_FILTER_FLAG)continue outer;break outer}}result[resIndex++]=value}return result}function Hash(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];return this.size-=result?1:0,result}function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined:result}return hasOwnProperty.call(data,key)?data[key]:undefined}function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined:hasOwnProperty.call(data,key);
}function hashSet(key,value){var data=this.__data__;return this.size+=this.has(key)?0:1,data[key]=nativeCreate&&value===undefined?HASH_UNDEFINED:value,this}function ListCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function listCacheClear(){this.__data__=[],this.size=0}function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0)return!1;var lastIndex=data.length-1;return index==lastIndex?data.pop():splice.call(data,index,1),--this.size,!0}function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined:data[index][1]}function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1}function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);return index<0?(++this.size,data.push([key,value])):data[index][1]=value,this}function MapCache(entries){var index=-1,length=null==entries?0:entries.length;for(this.clear();++index<length;){var entry=entries[index];this.set(entry[0],entry[1])}}function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map||ListCache),string:new Hash}}function mapCacheDelete(key){var result=getMapData(this,key).delete(key);return this.size-=result?1:0,result}function mapCacheGet(key){return getMapData(this,key).get(key)}function mapCacheHas(key){return getMapData(this,key).has(key)}function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;return data.set(key,value),this.size+=data.size==size?0:1,this}function SetCache(values){var index=-1,length=null==values?0:values.length;for(this.__data__=new MapCache;++index<length;)this.add(values[index])}function setCacheAdd(value){return this.__data__.set(value,HASH_UNDEFINED),this}function setCacheHas(value){return this.__data__.has(value)}function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size}function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(key){var data=this.__data__,result=data.delete(key);return this.size=data.size,result}function stackGet(key){return this.__data__.get(key)}function stackHas(key){return this.__data__.has(key)}function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1)return pairs.push([key,value]),this.size=++data.size,this;data=this.__data__=new MapCache(pairs)}return data.set(key,value),this.size=data.size,this}function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value)!inherited&&!hasOwnProperty.call(value,key)||skipIndexes&&("length"==key||isBuff&&("offset"==key||"parent"==key)||isType&&("buffer"==key||"byteLength"==key||"byteOffset"==key)||isIndex(key,length))||result.push(key);return result}function arraySample(array){var length=array.length;return length?array[baseRandom(0,length-1)]:undefined}function arraySampleSize(array,n){return shuffleSelf(copyArray(array),baseClamp(n,0,array.length))}function arrayShuffle(array){return shuffleSelf(copyArray(array))}function assignInDefaults(objValue,srcValue,key,object){return objValue===undefined||eq(objValue,objectProto[key])&&!hasOwnProperty.call(object,key)?srcValue:objValue}function assignMergeValue(object,key,value){(value===undefined||eq(object[key],value))&&(value!==undefined||key in object)||baseAssignValue(object,key,value)}function assignValue(object,key,value){var objValue=object[key];hasOwnProperty.call(object,key)&&eq(objValue,value)&&(value!==undefined||key in object)||baseAssignValue(object,key,value)}function assocIndexOf(array,key){for(var length=array.length;length--;)if(eq(array[length][0],key))return length;return-1}function baseAggregator(collection,setter,iteratee,accumulator){return baseEach(collection,function(value,key,collection){setter(accumulator,value,iteratee(value),collection)}),accumulator}function baseAssign(object,source){return object&&copyObject(source,keys(source),object)}function baseAssignIn(object,source){return object&&copyObject(source,keysIn(source),object)}function baseAssignValue(object,key,value){"__proto__"==key&&defineProperty?defineProperty(object,key,{configurable:!0,enumerable:!0,value:value,writable:!0}):object[key]=value}function baseAt(object,paths){for(var index=-1,length=paths.length,result=Array(length),skip=null==object;++index<length;)result[index]=skip?undefined:get(object,paths[index]);return result}function baseClamp(number,lower,upper){return number===number&&(upper!==undefined&&(number=number<=upper?number:upper),lower!==undefined&&(number=number>=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=initCloneArray(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?copySymbolsIn(value,baseAssignIn(result,value)):copySymbols(value,baseAssign(result,value))}else{if(!cloneableTags[tag])return object?value:{};result=initCloneByTag(value,tag,baseClone,isDeep)}}stack||(stack=new Stack);var stacked=stack.get(value);if(stacked)return stacked;stack.set(value,result);var keysFunc=isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys,props=isArr?undefined:keysFunc(value);return arrayEach(props||value,function(subValue,key){props&&(key=subValue,subValue=value[key]),assignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack))}),result}function baseConforms(source){var props=keys(source);return function(object){return baseConformsTo(object,source,props)}}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<length;){var value=array[index],computed=null==iteratee?value:iteratee(value);if(value=comparator||0!==value?value:0,isCommon&&computed===computed){for(var valuesIndex=valuesLength;valuesIndex--;)if(values[valuesIndex]===computed)continue outer;result.push(value)}else includes(values,computed,comparator)||result.push(value)}return result}function baseEvery(collection,predicate){var result=!0;return baseEach(collection,function(value,index,collection){return result=!!predicate(value,index,collection)}),result}function baseExtremum(array,iteratee,comparator){for(var index=-1,length=array.length;++index<length;){var value=array[index],current=iteratee(value);if(null!=current&&(computed===undefined?current===current&&!isSymbol(current):comparator(current,computed)))var computed=current,result=value}return result}function baseFill(array,value,start,end){var length=array.length;for(start=toInteger(start),start<0&&(start=-start>length?0:length+start),end=end===undefined||end>length?length:toInteger(end),end<0&&(end+=length),end=start>end?0:toLength(end);start<end;)array[start++]=value;return array}function baseFilter(collection,predicate){var result=[];return baseEach(collection,function(value,index,collection){predicate(value,index,collection)&&result.push(value)}),result}function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;for(predicate||(predicate=isFlattenable),result||(result=[]);++index<length;){var value=array[index];depth>0&&predicate(value)?depth>1?baseFlatten(value,depth-1,predicate,isStrict,result):arrayPush(result,value):isStrict||(result[result.length]=value)}return result}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){path=castPath(path,object);for(var index=0,length=path.length;null!=object&&index<length;)object=object[toKey(path[index++])];return index&&index==length?object:undefined}function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object))}function baseGetTag(value){return null==value?value===undefined?undefinedTag:nullTag:(value=Object(value),symToStringTag&&symToStringTag in value?getRawTag(value):objectToString(value))}function baseGt(value,other){return value>other}function baseHas(object,key){return null!=object&&hasOwnProperty.call(object,key)}function baseHasIn(object,key){return null!=object&&key in Object(object)}function baseInRange(number,start,end){return number>=nativeMin(start,end)&&number<nativeMax(start,end)}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<length&&result.length<maxLength;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,!(seen?cacheHas(seen,computed):includes(result,computed,comparator))){for(othIndex=othLength;--othIndex;){var cache=caches[othIndex];if(!(cache?cacheHas(cache,computed):includes(arrays[othIndex],computed,comparator)))continue outer}seen&&seen.push(computed),result.push(value)}}return result}function baseInverter(object,setter,iteratee,accumulator){return baseForOwn(object,function(value,key,object){setter(accumulator,iteratee(value),key,object)}),accumulator}function baseInvoke(object,path,args){path=castPath(path,object),object=parent(object,path);var func=null==object?object:object[toKey(last(path))];return null==func?undefined:apply(func,object,args)}function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag}function baseIsArrayBuffer(value){return isObjectLike(value)&&baseGetTag(value)==arrayBufferTag}function baseIsDate(value){return isObjectLike(value)&&baseGetTag(value)==dateTag}function baseIsEqual(value,other,bitmask,customizer,stack){return value===other||(null==value||null==other||!isObject(value)&&!isObjectLike(other)?value!==value&&other!==other:baseIsEqualDeep(value,other,bitmask,customizer,baseIsEqual,stack))}function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;objIsArr||(objTag=getTag(object),objTag=objTag==argsTag?objectTag:objTag),othIsArr||(othTag=getTag(other),othTag=othTag==argsTag?objectTag:othTag);var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other))return!1;objIsArr=!0,objIsObj=!1}if(isSameTag&&!objIsObj)return stack||(stack=new Stack),objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):equalByTag(object,other,objTag,bitmask,customizer,equalFunc,stack);if(!(bitmask&COMPARE_PARTIAL_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othIsWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;return stack||(stack=new Stack),equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack)}}return!!isSameTag&&(stack||(stack=new Stack),equalObjects(object,other,bitmask,customizer,equalFunc,stack))}function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag}function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(null==object)return!length;for(object=Object(object);index--;){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object))return!1}for(;++index<length;){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined&&!(key in object))return!1}else{var stack=new Stack;if(customizer)var result=customizer(objValue,srcValue,key,object,source,stack);if(!(result===undefined?baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG,customizer,stack):result))return!1}}return!0}function baseIsNative(value){if(!isObject(value)||isMasked(value))return!1;var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value))}function baseIsRegExp(value){return isObjectLike(value)&&baseGetTag(value)==regexpTag}function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag}function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)]}function baseIteratee(value){return"function"==typeof value?value:null==value?identity:"object"==typeof value?isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value):property(value)}function baseKeys(object){if(!isPrototype(object))return nativeKeys(object);var result=[];for(var key in Object(object))hasOwnProperty.call(object,key)&&"constructor"!=key&&result.push(key);return result}function baseKeysIn(object){if(!isObject(object))return nativeKeysIn(object);var isProto=isPrototype(object),result=[];for(var key in object)("constructor"!=key||!isProto&&hasOwnProperty.call(object,key))&&result.push(key);return result}function baseLt(value,other){return value<other}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection)}),result}function baseMatches(source){var matchData=getMatchData(source);return 1==matchData.length&&matchData[0][2]?matchesStrictComparable(matchData[0][0],matchData[0][1]):function(object){return object===source||baseIsMatch(object,source,matchData)}}function baseMatchesProperty(path,srcValue){return isKey(path)&&isStrictComparable(srcValue)?matchesStrictComparable(toKey(path),srcValue):function(object){var objValue=get(object,path);return objValue===undefined&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG)}}function baseMerge(object,source,srcIndex,customizer,stack){object!==source&&baseFor(source,function(srcValue,key){if(isObject(srcValue))stack||(stack=new Stack),baseMergeDeep(object,source,key,srcIndex,baseMerge,customizer,stack);else{var newValue=customizer?customizer(object[key],srcValue,key+"",object,source,stack):undefined;newValue===undefined&&(newValue=srcValue),assignMergeValue(object,key,newValue)}},keysIn)}function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=object[key],srcValue=source[key],stacked=stack.get(srcValue);if(stacked)return void assignMergeValue(object,key,stacked);var newValue=customizer?customizer(objValue,srcValue,key+"",object,source,stack):undefined,isCommon=newValue===undefined;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue,isArr||isBuff||isTyped?isArray(objValue)?newValue=objValue:isArrayLikeObject(objValue)?newValue=copyArray(objValue):isBuff?(isCommon=!1,newValue=cloneBuffer(srcValue,!0)):isTyped?(isCommon=!1,newValue=cloneTypedArray(srcValue,!0)):newValue=[]:isPlainObject(srcValue)||isArguments(srcValue)?(newValue=objValue,isArguments(objValue)?newValue=toPlainObject(objValue):(!isObject(objValue)||srcIndex&&isFunction(objValue))&&(newValue=initCloneObject(srcValue))):isCommon=!1}isCommon&&(stack.set(srcValue,newValue),mergeFunc(newValue,srcValue,srcIndex,customizer,stack),stack.delete(srcValue)),assignMergeValue(object,key,newValue)}function baseNth(array,n){var length=array.length;if(length)return n+=n<0?length:0,isIndex(n,length)?array[n]:undefined}function baseOrderBy(collection,iteratees,orders){var index=-1;iteratees=arrayMap(iteratees.length?iteratees:[identity],baseUnary(getIteratee()));var result=baseMap(collection,function(value,key,collection){var criteria=arrayMap(iteratees,function(iteratee){return iteratee(value)});return{criteria:criteria,index:++index,value:value}});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders)})}function basePick(object,paths){return object=Object(object),basePickBy(object,paths,function(value,path){return hasIn(object,path)})}function basePickBy(object,paths,predicate){for(var index=-1,length=paths.length,result={};++index<length;){var path=paths[index],value=baseGet(object,path);predicate(value,path)&&baseSet(result,castPath(path,object),value)}return result}function basePropertyDeep(path){return function(object){return baseGet(object,path)}}function basePullAll(array,values,iteratee,comparator){var indexOf=comparator?baseIndexOfWith:baseIndexOf,index=-1,length=values.length,seen=array;for(array===values&&(values=copyArray(values)),iteratee&&(seen=arrayMap(array,baseUnary(iteratee)));++index<length;)for(var fromIndex=0,value=values[index],computed=iteratee?iteratee(value):value;(fromIndex=indexOf(seen,computed,fromIndex,comparator))>-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 baseRange(start,end,step,fromRight){for(var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);length--;)result[fromRight?length:++index]=start,start+=step;return result}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),n&&(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;path=castPath(path,object);for(var index=-1,length=path.length,lastIndex=length-1,nested=object;null!=nested&&++index<length;){var key=toKey(path[index]),newValue=value;if(index!=lastIndex){var objValue=nested[key];newValue=customizer?customizer(objValue,key,nested):undefined,newValue===undefined&&(newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{})}assignValue(nested,key,newValue),nested=nested[key]}return object}function baseShuffle(collection){return shuffleSelf(values(collection))}function baseSlice(array,start,end){var index=-1,length=array.length;start<0&&(start=-start>length?0:length+start),end=end>length?length:end,end<0&&(end+=length),length=start>end?0:end-start>>>0,start>>>=0;for(var result=Array(length);++index<length;)result[index]=array[index+start];return result}function baseSome(collection,predicate){var result;return baseEach(collection,function(value,index,collection){return result=predicate(value,index,collection),!result}),!!result}function baseSortedIndex(array,value,retHighest){var low=0,high=null==array?low:array.length;if("number"==typeof value&&value===value&&high<=HALF_MAX_ARRAY_LENGTH){for(;low<high;){var mid=low+high>>>1,computed=array[mid];null!==computed&&!isSymbol(computed)&&(retHighest?computed<=value:computed<value)?low=mid+1:high=mid}return high}return baseSortedIndexBy(array,value,identity,retHighest)}function baseSortedIndexBy(array,value,iteratee,retHighest){value=iteratee(value);for(var low=0,high=null==array?0:array.length,valIsNaN=value!==value,valIsNull=null===value,valIsSymbol=isSymbol(value),valIsUndefined=value===undefined;low<high;){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),othIsDefined=computed!==undefined,othIsNull=null===computed,othIsReflexive=computed===computed,othIsSymbol=isSymbol(computed);if(valIsNaN)var setLow=retHighest||othIsReflexive;else setLow=valIsUndefined?othIsReflexive&&(retHighest||othIsDefined):valIsNull?othIsReflexive&&othIsDefined&&(retHighest||!othIsNull):valIsSymbol?othIsReflexive&&othIsDefined&&!othIsNull&&(retHighest||!othIsSymbol):!othIsNull&&!othIsSymbol&&(retHighest?computed<=value:computed<value);setLow?low=mid+1:high=mid}return nativeMin(high,MAX_ARRAY_INDEX)}function baseSortedUniq(array,iteratee){for(var index=-1,length=array.length,resIndex=0,result=[];++index<length;){var value=array[index],computed=iteratee?iteratee(value):value;if(!index||!eq(computed,seen)){var seen=computed;result[resIndex++]=0===value?0:value}}return result}function baseToNumber(value){return"number"==typeof value?value:isSymbol(value)?NAN:+value}function baseToString(value){if("string"==typeof value)return value;if(isArray(value))return arrayMap(value,baseToString)+"";if(isSymbol(value))return symbolToString?symbolToString.call(value):"";var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=!0,result=[],seen=result;if(comparator)isCommon=!1,includes=arrayIncludesWith;else if(length>=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;){var value=array[index],computed=iteratee?iteratee(value):value;if(value=comparator||0!==value?value:0,isCommon&&computed===computed){for(var seenIndex=seen.length;seenIndex--;)if(seen[seenIndex]===computed)continue outer;iteratee&&seen.push(computed),result.push(value)}else includes(seen,computed,comparator)||(seen!==result&&seen.push(computed),result.push(value))}return result}function baseUnset(object,path){return path=castPath(path,object),object=parent(object,path),null==object||delete object[toKey(last(path))]}function baseUpdate(object,path,updater,customizer){return baseSet(object,path,updater(baseGet(object,path)),customizer)}function baseWhile(array,predicate,isDrop,fromRight){for(var length=array.length,index=fromRight?length:-1;(fromRight?index--:++index<length)&&predicate(array[index],index,array););return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index)}function baseWrapperValue(value,actions){var result=value;return result instanceof LazyWrapper&&(result=result.value()),arrayReduce(actions,function(result,action){return action.func.apply(action.thisArg,arrayPush([result],action.args))},result)}function baseXor(arrays,iteratee,comparator){var length=arrays.length;if(length<2)return length?baseUniq(arrays[0]):[];for(var index=-1,result=Array(length);++index<length;)for(var array=arrays[index],othIndex=-1;++othIndex<length;)othIndex!=index&&(result[index]=baseDifference(result[index]||array,arrays[othIndex],iteratee,comparator));return baseUniq(baseFlatten(result,1),iteratee,comparator)}function baseZipObject(props,values,assignFunc){for(var index=-1,length=props.length,valsLength=values.length,result={};++index<length;){var value=index<valsLength?values[index]:undefined;assignFunc(result,props[index],value)}return result}function castArrayLikeObject(value){return isArrayLikeObject(value)?value:[]}function castFunction(value){return"function"==typeof value?value:identity}function castPath(value,object){return isArray(value)?value:isKey(value,object)?[value]:stringToPath(toString(value))}function castSlice(array,start,end){var length=array.length;return end=end===undefined?length:end,!start&&end>=length?array:baseSlice(array,start,end)}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 cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength)}function cloneMap(map,isDeep,cloneFunc){var array=isDeep?cloneFunc(mapToArray(map),CLONE_DEEP_FLAG):mapToArray(map);return arrayReduce(array,addMapEntry,new map.constructor)}function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));return result.lastIndex=regexp.lastIndex,result}function cloneSet(set,isDeep,cloneFunc){var array=isDeep?cloneFunc(setToArray(set),CLONE_DEEP_FLAG):setToArray(set);return arrayReduce(array,addSetEntry,new set.constructor)}function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{}}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&&value<other||othIsSymbol&&valIsDefined&&valIsReflexive&&!valIsNull&&!valIsSymbol||othIsNull&&valIsDefined&&valIsReflexive||!othIsDefined&&valIsReflexive||!othIsReflexive)return-1}return 0}function compareMultiple(object,other,orders){for(var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;++index<length;){var result=compareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength)return result;var order=orders[index];return result*("desc"==order?-1:1)}}return object.index-other.index}function composeArgs(args,partials,holders,isCurried){for(var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;++leftIndex<leftLength;)result[leftIndex]=partials[leftIndex];for(;++argsIndex<holdersLength;)(isUncurried||argsIndex<argsLength)&&(result[holders[argsIndex]]=args[argsIndex]);for(;rangeLength--;)result[leftIndex++]=args[argsIndex++];return result}function composeArgsRight(args,partials,holders,isCurried){for(var argsIndex=-1,argsLength=args.length,holdersIndex=-1,holdersLength=holders.length,rightIndex=-1,rightLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(rangeLength+rightLength),isUncurried=!isCurried;++argsIndex<rangeLength;)result[argsIndex]=args[argsIndex];for(var offset=argsIndex;++rightIndex<rightLength;)result[offset+rightIndex]=partials[rightIndex];for(;++holdersIndex<holdersLength;)(isUncurried||argsIndex<argsLength)&&(result[offset+holders[holdersIndex]]=args[argsIndex++]);return result}function copyArray(source,array){var index=-1,length=source.length;for(array||(array=Array(length));++index<length;)array[index]=source[index];return array}function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});for(var index=-1,length=props.length;++index<length;){var key=props[index],newValue=customizer?customizer(object[key],source[key],key,object,source):undefined;newValue===undefined&&(newValue=source[key]),isNew?baseAssignValue(object,key,newValue):assignValue(object,key,newValue)}return object}function copySymbols(source,object){return copyObject(source,getSymbols(source),object)}function copySymbolsIn(source,object){return copyObject(source,getSymbolsIn(source),object)}function createAggregator(setter,initializer){return function(collection,iteratee){var func=isArray(collection)?arrayAggregator:baseAggregator,accumulator=initializer?initializer():{};return func(collection,setter,getIteratee(iteratee,2),accumulator)}}function createAssigner(assigner){return baseRest(function(object,sources){var index=-1,length=sources.length,customizer=length>1?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<length;){var source=sources[index];source&&assigner(object,source,index,customizer)}return object})}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(null==collection)return collection;if(!isArrayLike(collection))return eachFunc(collection,iteratee);for(var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);(fromRight?index--:++index<length)&&iteratee(iterable[index],index,iterable)!==!1;);return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){for(var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;length--;){var key=props[fromRight?length:++index];if(iteratee(iterable[key],key,iterable)===!1)break}return object}}function createBind(func,bitmask,thisArg){function wrapper(){var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(isBind?thisArg:this,arguments)}var isBind=bitmask&WRAP_BIND_FLAG,Ctor=createCtor(func);return wrapper}function createCaseFirst(methodName){return function(string){string=toString(string);var strSymbols=hasUnicode(string)?stringToArray(string):undefined,chr=strSymbols?strSymbols[0]:string.charAt(0),trailing=strSymbols?castSlice(strSymbols,1).join(""):string.slice(1);return chr[methodName]()+trailing}}function createCompounder(callback){return function(string){return arrayReduce(words(deburr(string).replace(reApos,"")),callback,"")}}function createCtor(Ctor){return function(){var args=arguments;switch(args.length){case 0:return new Ctor;case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);
case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6])}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);return isObject(result)?result:thisBinding}}function createCurry(func,bitmask,arity){function wrapper(){for(var length=arguments.length,args=Array(length),index=length,placeholder=getHolder(wrapper);index--;)args[index]=arguments[index];var holders=length<3&&args[0]!==placeholder&&args[length-1]!==placeholder?[]:replaceHolders(args,placeholder);if(length-=holders.length,length<arity)return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,undefined,args,holders,undefined,undefined,arity-length);var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return apply(fn,this,args)}var Ctor=createCtor(func);return wrapper}function createFind(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike(collection)){var iteratee=getIteratee(predicate,3);collection=keys(collection),predicate=function(key){return iteratee(iterable[key],key,iterable)}}var index=findIndexFunc(collection,predicate,fromIndex);return 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;++index<length;){func=funcs[index];var funcName=getFuncName(func),data="wrapper"==funcName?getData(func):undefined;wrapper=data&&isLaziable(data[0])&&data[1]==(WRAP_ARY_FLAG|WRAP_CURRY_FLAG|WRAP_PARTIAL_FLAG|WRAP_REARG_FLAG)&&!data[4].length&&1==data[9]?wrapper[getFuncName(data[0])].apply(wrapper,data[3]):1==func.length&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func)}return function(){var args=arguments,value=args[0];if(wrapper&&1==args.length&&isArray(value)&&value.length>=LARGE_ARRAY_SIZE)return wrapper.plant(value).value();for(var index=0,result=length?funcs[index].apply(this,args):value;++index<length;)result=funcs[index].call(this,result);return result}})}function createHybrid(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){function wrapper(){for(var length=arguments.length,args=Array(length),index=length;index--;)args[index]=arguments[index];if(isCurried)var placeholder=getHolder(wrapper),holdersCount=countHolders(args,placeholder);if(partials&&(args=composeArgs(args,partials,holders,isCurried)),partialsRight&&(args=composeArgsRight(args,partialsRight,holdersRight,isCurried)),length-=holdersCount,isCurried&&length<arity){var newHolders=replaceHolders(args,placeholder);return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,thisArg,args,newHolders,argPos,ary,arity-length)}var thisBinding=isBind?thisArg:this,fn=isBindKey?thisBinding[func]:func;return length=args.length,argPos?args=reorder(args,argPos):isFlip&&length>1&&args.reverse(),isAry&&ary<length&&(args.length=ary),this&&this!==root&&this instanceof wrapper&&(fn=Ctor||createCtor(fn)),fn.apply(thisBinding,args)}var isAry=bitmask&WRAP_ARY_FLAG,isBind=bitmask&WRAP_BIND_FLAG,isBindKey=bitmask&WRAP_BIND_KEY_FLAG,isCurried=bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG),isFlip=bitmask&WRAP_FLIP_FLAG,Ctor=isBindKey?undefined:createCtor(func);return wrapper}function createInverter(setter,toIteratee){return function(object,iteratee){return baseInverter(object,setter,toIteratee(iteratee),{})}}function createMathOperation(operator,defaultValue){return function(value,other){var result;if(value===undefined&&other===undefined)return defaultValue;if(value!==undefined&&(result=value),other!==undefined){if(result===undefined)return other;"string"==typeof value||"string"==typeof other?(value=baseToString(value),other=baseToString(other)):(value=baseToNumber(value),other=baseToNumber(other)),result=operator(value,other)}return result}}function createOver(arrayFunc){return flatRest(function(iteratees){return iteratees=arrayMap(iteratees,baseUnary(getIteratee())),baseRest(function(args){var thisArg=this;return arrayFunc(iteratees,function(iteratee){return apply(iteratee,thisArg,args)})})})}function createPadding(length,chars){chars=chars===undefined?" ":baseToString(chars);var charsLength=chars.length;if(charsLength<2)return charsLength?baseRepeat(chars,length):chars;var result=baseRepeat(chars,nativeCeil(length/stringSize(chars)));return hasUnicode(chars)?castSlice(stringToArray(result),0,length).join(""):result.slice(0,length)}function createPartial(func,bitmask,thisArg,partials){function wrapper(){for(var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength),fn=this&&this!==root&&this instanceof wrapper?Ctor:func;++leftIndex<leftLength;)args[leftIndex]=partials[leftIndex];for(;argsLength--;)args[leftIndex++]=arguments[++argsIndex];return apply(fn,isBind?thisArg:this,args)}var isBind=bitmask&WRAP_BIND_FLAG,Ctor=createCtor(func);return wrapper}function createRange(fromRight){return function(start,end,step){return step&&"number"!=typeof step&&isIterateeCall(start,end,step)&&(end=step=undefined),start=toFinite(start),end===undefined?(end=start,start=0):end=toFinite(end),step=step===undefined?start<end?1:-1:toFinite(step),baseRange(start,end,step,fromRight)}}function createRelationalOperation(operator){return function(value,other){return"string"==typeof value&&"string"==typeof other||(value=toNumber(value),other=toNumber(other)),operator(value,other)}}function createRecurry(func,bitmask,wrapFunc,placeholder,thisArg,partials,holders,argPos,ary,arity){var isCurry=bitmask&WRAP_CURRY_FLAG,newHolders=isCurry?holders:undefined,newHoldersRight=isCurry?undefined:holders,newPartials=isCurry?partials:undefined,newPartialsRight=isCurry?undefined:partials;bitmask|=isCurry?WRAP_PARTIAL_FLAG:WRAP_PARTIAL_RIGHT_FLAG,bitmask&=~(isCurry?WRAP_PARTIAL_RIGHT_FLAG:WRAP_PARTIAL_FLAG),bitmask&WRAP_CURRY_BOUND_FLAG||(bitmask&=~(WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG));var newData=[func,bitmask,thisArg,newPartials,newHolders,newPartialsRight,newHoldersRight,argPos,ary,arity],result=wrapFunc.apply(undefined,newData);return isLaziable(func)&&setData(result,newData),result.placeholder=placeholder,setWrapToString(result,func,bitmask)}function createRound(methodName){var func=Math[methodName];return function(number,precision){if(number=toNumber(number),precision=nativeMin(toInteger(precision),292)){var pair=(toString(number)+"e").split("e"),value=func(pair[0]+"e"+(+pair[1]+precision));return pair=(toString(value)+"e").split("e"),+(pair[0]+"e"+(+pair[1]-precision))}return func(number)}}function createToPairs(keysFunc){return function(object){var tag=getTag(object);return tag==mapTag?mapToArray(object):tag==setTag?setToPairs(object):baseToPairs(object,keysFunc(object))}}function createWrap(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&WRAP_BIND_KEY_FLAG;if(!isBindKey&&"function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);var length=partials?partials.length:0;if(length||(bitmask&=~(WRAP_PARTIAL_FLAG|WRAP_PARTIAL_RIGHT_FLAG),partials=holders=undefined),ary=ary===undefined?ary:nativeMax(toInteger(ary),0),arity=arity===undefined?arity:toInteger(arity),length-=holders?holders.length:0,bitmask&WRAP_PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=undefined}var data=isBindKey?undefined:getData(func),newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data&&mergeData(newData,data),func=newData[0],bitmask=newData[1],thisArg=newData[2],partials=newData[3],holders=newData[4],arity=newData[9]=null==newData[9]?isBindKey?0:func.length:nativeMax(newData[9]-length,0),!arity&&bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)&&(bitmask&=~(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)),bitmask&&bitmask!=WRAP_BIND_FLAG)result=bitmask==WRAP_CURRY_FLAG||bitmask==WRAP_CURRY_RIGHT_FLAG?createCurry(func,bitmask,arity):bitmask!=WRAP_PARTIAL_FLAG&&bitmask!=(WRAP_BIND_FLAG|WRAP_PARTIAL_FLAG)||holders.length?createHybrid.apply(undefined,newData):createPartial(func,bitmask,thisArg,partials);else var result=createBind(func,bitmask,thisArg);var setter=data?baseSetData:setData;return setWrapToString(setter(result,newData),func,bitmask)}function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength))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<arrLength;){var arrValue=array[index],othValue=other[index];if(customizer)var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);if(compared!==undefined){if(compared)continue;result=!1;break}if(seen){if(!arraySome(other,function(othValue,othIndex){if(!cacheHas(seen,othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack)))return seen.push(othIndex)})){result=!1;break}}else if(arrValue!==othValue&&!equalFunc(arrValue,othValue,bitmask,customizer,stack)){result=!1;break}}return stack.delete(array),stack.delete(other),result}function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset)return!1;object=object.buffer,other=other.buffer;case arrayBufferTag:return!(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other)));case boolTag:case dateTag:case numberTag:return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:return object==other+"";case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&COMPARE_PARTIAL_FLAG;if(convert||(convert=setToArray),object.size!=other.size&&!isPartial)return!1;var stacked=stack.get(object);if(stacked)return stacked==other;bitmask|=COMPARE_UNORDERED_FLAG,stack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);return stack.delete(object),result;case symbolTag:if(symbolValueOf)return symbolValueOf.call(object)==symbolValueOf.call(other)}return!1}function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial)return!1;for(var index=objLength;index--;){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key)))return!1}var stacked=stack.get(object);if(stacked&&stack.get(other))return stacked==other;var result=!0;stack.set(object,other),stack.set(other,object);for(var skipCtor=isPartial;++index<objLength;){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer)var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);if(!(compared===undefined?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=!1;break}skipCtor||(skipCtor="constructor"==key)}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;objCtor!=othCtor&&"constructor"in object&&"constructor"in other&&!("function"==typeof objCtor&&objCtor instanceof objCtor&&"function"==typeof othCtor&&othCtor instanceof othCtor)&&(result=!1)}return stack.delete(object),stack.delete(other),result}function flatRest(func){return setToString(overRest(func,undefined,flatten),func+"")}function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols)}function getAllKeysIn(object){return baseGetAllKeys(object,keysIn,getSymbolsIn)}function getFuncName(func){for(var result=func.name+"",array=realNames[result],length=hasOwnProperty.call(realNames,result)?array.length:0;length--;){var data=array[length],otherFunc=data.func;if(null==otherFunc||otherFunc==func)return data.name}return result}function getHolder(func){var object=hasOwnProperty.call(lodash,"placeholder")?lodash:func;return object.placeholder}function getIteratee(){var result=lodash.iteratee||iteratee;return result=result===iteratee?baseIteratee:result,arguments.length?result(arguments[0],arguments[1]):result}function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data["string"==typeof key?"string":"hash"]:data.map}function getMatchData(object){for(var result=keys(object),length=result.length;length--;){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)]}return result}function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined}function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined;var unmasked=!0}catch(e){}var result=nativeObjectToString.call(value);return unmasked&&(isOwn?value[symToStringTag]=tag:delete value[symToStringTag]),result}function getView(start,end,transforms){for(var index=-1,length=transforms.length;++index<length;){var data=transforms[index],size=data.size;switch(data.type){case"drop":start+=size;break;case"dropRight":end-=size;break;case"take":end=nativeMin(end,start+size);break;case"takeRight":start=nativeMax(start,end-size)}}return{start:start,end:end}}function getWrapDetails(source){var match=source.match(reWrapDetails);return match?match[1].split(reSplitDetails):[]}function hasPath(object,path,hasFunc){path=castPath(path,object);for(var index=-1,length=path.length,result=!1;++index<length;){var key=toKey(path[index]);if(!(result=null!=object&&hasFunc(object,key)))break;object=object[key]}return result||++index!=length?result:(length=null==object?0:object.length,!!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object)))}function initCloneArray(array){var length=array.length,result=array.constructor(length);return length&&"string"==typeof array[0]&&hasOwnProperty.call(array,"index")&&(result.index=array.index,result.input=array.input),result}function initCloneObject(object){return"function"!=typeof object.constructor||isPrototype(object)?{}:baseCreate(getPrototype(object))}function initCloneByTag(object,tag,cloneFunc,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return cloneDataView(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 cloneMap(object,isDeep,cloneFunc);case numberTag:case stringTag:return new Ctor(object);case regexpTag:return cloneRegExp(object);case setTag:return cloneSet(object,isDeep,cloneFunc);case symbolTag:return cloneSymbol(object)}}function insertWrapDetails(source,details){var length=details.length;if(!length)return source;var lastIndex=length-1;return details[lastIndex]=(length>1?"& ":"")+details[lastIndex],details=details.join(length>2?", ":" "),source.replace(reWrapComment,"{\n/* [wrapped with "+details+"] */\n")}function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol])}function isIndex(value,length){return length=null==length?MAX_SAFE_INTEGER:length,!!length&&("number"==typeof value||reIsUint.test(value))&&value>-1&&value%1==0&&value<length}function isIterateeCall(value,index,object){if(!isObject(object))return!1;var type=typeof index;return!!("number"==type?isArrayLike(object)&&isIndex(index,object.length):"string"==type&&index in object)&&eq(object[index],value)}function isKey(value,object){if(isArray(value))return!1;var type=typeof value;return!("number"!=type&&"symbol"!=type&&"boolean"!=type&&null!=value&&!isSymbol(value))||(reIsPlainProp.test(value)||!reIsDeepProp.test(value)||null!=object&&value in Object(object))}function isKeyable(value){var type=typeof value;return"string"==type||"number"==type||"symbol"==type||"boolean"==type?"__proto__"!==value:null===value}function isLaziable(func){var funcName=getFuncName(func),other=lodash[funcName];if("function"!=typeof other||!(funcName in LazyWrapper.prototype))return!1;if(func===other)return!0;var data=getData(other);return!!data&&func===data[0]}function isMasked(func){return!!maskSrcKey&&maskSrcKey in func}function isPrototype(value){var Ctor=value&&value.constructor,proto="function"==typeof Ctor&&Ctor.prototype||objectProto;return value===proto}function isStrictComparable(value){return value===value&&!isObject(value)}function matchesStrictComparable(key,srcValue){return function(object){return null!=object&&(object[key]===srcValue&&(srcValue!==undefined||key in Object(object)))}}function memoizeCapped(func){var result=memoize(func,function(key){return cache.size===MAX_MEMOIZE_SIZE&&cache.clear(),key}),cache=result.cache;return result}function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<(WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG|WRAP_ARY_FLAG),isCombo=srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_CURRY_FLAG||srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(WRAP_ARY_FLAG|WRAP_REARG_FLAG)&&source[7].length<=source[8]&&bitmask==WRAP_CURRY_FLAG;if(!isCommon&&!isCombo)return data;srcBitmask&WRAP_BIND_FLAG&&(data[2]=source[2],newBitmask|=bitmask&WRAP_BIND_FLAG?0:WRAP_CURRY_BOUND_FLAG);var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):value,data[4]=partials?replaceHolders(data[3],PLACEHOLDER):source[4]}return value=source[5],value&&(partials=data[5],data[5]=partials?composeArgsRight(partials,value,source[6]):value,data[6]=partials?replaceHolders(data[5],PLACEHOLDER):source[6]),value=source[7],value&&(data[7]=value),srcBitmask&WRAP_ARY_FLAG&&(data[8]=null==data[8]?source[8]:nativeMin(data[8],source[8])),null==data[9]&&(data[9]=source[9]),data[0]=source[0],data[1]=newBitmask,data}function mergeDefaults(objValue,srcValue,key,object,source,stack){return isObject(objValue)&&isObject(srcValue)&&(stack.set(srcValue,objValue),baseMerge(objValue,srcValue,undefined,mergeDefaults,stack),stack.delete(srcValue)),objValue}function nativeKeysIn(object){var result=[];if(null!=object)for(var key in Object(object))result.push(key);return result}function objectToString(value){return nativeObjectToString.call(value)}function overRest(func,start,transform){return start=nativeMax(start===undefined?func.length-1:start,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),array=Array(length);++index<length;)array[index]=args[start+index];index=-1;for(var otherArgs=Array(start+1);++index<start;)otherArgs[index]=args[index];return otherArgs[start]=transform(array),apply(func,this,otherArgs)}}function parent(object,path){return path.length<2?object:baseGet(object,baseSlice(path,0,-1))}function reorder(array,indexes){for(var arrLength=array.length,length=nativeMin(indexes.length,arrLength),oldArray=copyArray(array);length--;){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:undefined}return array}function setWrapToString(wrapper,reference,bitmask){var source=reference+"";return setToString(wrapper,insertWrapDetails(source,updateWrapDetails(getWrapDetails(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;++index<size;){var rand=baseRandom(index,lastIndex),value=array[rand];array[rand]=array[index],array[index]=value}return array.length=size,array}function toKey(value){if("string"==typeof value||isSymbol(value))return value;var result=value+"";return"0"==result&&1/value==-INFINITY?"-0":result}function toSource(func){if(null!=func){try{return funcToString.call(func)}catch(e){}try{return func+""}catch(e){}}return""}function updateWrapDetails(details,bitmask){return arrayEach(wrapFlags,function(pair){var value="_."+pair[0];bitmask&pair[1]&&!arrayIncludes(details,value)&&details.push(value)}),details.sort()}function wrapperClone(wrapper){if(wrapper instanceof LazyWrapper)return wrapper.clone();var result=new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__);return result.__actions__=copyArray(wrapper.__actions__),result.__index__=wrapper.__index__,result.__values__=wrapper.__values__,result}function chunk(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));index<length;)result[resIndex++]=baseSlice(array,index,index+=size);return result}function compact(array){for(var index=-1,length=null==array?0:array.length,resIndex=0,result=[];++index<length;){var value=array[index];value&&(result[resIndex++]=value)}return result}function concat(){var length=arguments.length;if(!length)return[];for(var args=Array(length-1),array=arguments[0],index=length;index--;)args[index-1]=arguments[index];return arrayPush(isArray(array)?copyArray(array):[array],baseFlatten(args,1))}function drop(array,n,guard){var length=null==array?0:array.length;return length?(n=guard||n===undefined?1:toInteger(n),baseSlice(array,n<0?0:n,length)):[]}function dropRight(array,n,guard){var length=null==array?0:array.length;return length?(n=guard||n===undefined?1:toInteger(n),n=length-n,baseSlice(array,0,n<0?0:n)):[]}function dropRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!0,!0):[]}function dropWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!0):[]}function fill(array,value,start,end){var length=null==array?0:array.length;return length?(start&&"number"!=typeof start&&isIterateeCall(array,value,start)&&(start=0,end=length),baseFill(array,value,start,end)):[]}function findIndex(array,predicate,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)),baseFindIndex(array,getIteratee(predicate,3),index)}function findLastIndex(array,predicate,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=length-1;return fromIndex!==undefined&&(index=toInteger(fromIndex),index=fromIndex<0?nativeMax(length+index,0):nativeMin(index,length-1)),baseFindIndex(array,getIteratee(predicate,3),index,!0)}function flatten(array){var length=null==array?0:array.length;return length?baseFlatten(array,1):[]}function flattenDeep(array){var length=null==array?0:array.length;return length?baseFlatten(array,INFINITY):[]}function flattenDepth(array,depth){var length=null==array?0:array.length;return length?(depth=depth===undefined?1:toInteger(depth),baseFlatten(array,depth)):[]}function fromPairs(pairs){for(var index=-1,length=null==pairs?0:pairs.length,result={};++index<length;){var pair=pairs[index];result[pair[0]]=pair[1]}return result}function head(array){return array&&array.length?array[0]:undefined}function indexOf(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)}function initial(array){var length=null==array?0:array.length;return length?baseSlice(array,0,-1):[]}function join(array,separator){return null==array?"":nativeJoin.call(array,separator)}function last(array){var length=null==array?0:array.length;return length?array[length-1]:undefined}function lastIndexOf(array,value,fromIndex){var length=null==array?0:array.length;if(!length)return-1;var index=length;return fromIndex!==undefined&&(index=toInteger(fromIndex),index=index<0?nativeMax(length+index,0):nativeMin(index,length-1)),value===value?strictLastIndexOf(array,value,index):baseFindIndex(array,baseIsNaN,index,!0)}function nth(array,n){return array&&array.length?baseNth(array,toInteger(n)):undefined}function pullAll(array,values){return array&&array.length&&values&&values.length?basePullAll(array,values):array}function pullAllBy(array,values,iteratee){return array&&array.length&&values&&values.length?basePullAll(array,values,getIteratee(iteratee,2)):array}function pullAllWith(array,values,comparator){return array&&array.length&&values&&values.length?basePullAll(array,values,undefined,comparator):array}function remove(array,predicate){var result=[];if(!array||!array.length)return result;var index=-1,indexes=[],length=array.length;for(predicate=getIteratee(predicate,3);++index<length;){var value=array[index];predicate(value,index,array)&&(result.push(value),indexes.push(index))}return basePullAt(array,indexes),result}function reverse(array){return null==array?array:nativeReverse.call(array)}function slice(array,start,end){var length=null==array?0:array.length;return length?(end&&"number"!=typeof end&&isIterateeCall(array,start,end)?(start=0,end=length):(start=null==start?0:toInteger(start),end=end===undefined?length:toInteger(end)),baseSlice(array,start,end)):[]}function sortedIndex(array,value){return baseSortedIndex(array,value)}function sortedIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2))}function sortedIndexOf(array,value){var length=null==array?0:array.length;if(length){var index=baseSortedIndex(array,value);if(index<length&&eq(array[index],value))return index}return-1}function sortedLastIndex(array,value){return baseSortedIndex(array,value,!0)}function sortedLastIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2),!0)}function sortedLastIndexOf(array,value){var length=null==array?0:array.length;if(length){var index=baseSortedIndex(array,value,!0)-1;if(eq(array[index],value))return index}return-1}function sortedUniq(array){return array&&array.length?baseSortedUniq(array):[]}function sortedUniqBy(array,iteratee){return array&&array.length?baseSortedUniq(array,getIteratee(iteratee,2)):[]}function tail(array){var length=null==array?0:array.length;return length?baseSlice(array,1,length):[]}function take(array,n,guard){return array&&array.length?(n=guard||n===undefined?1:toInteger(n),baseSlice(array,0,n<0?0:n)):[]}function takeRight(array,n,guard){var length=null==array?0:array.length;return length?(n=guard||n===undefined?1:toInteger(n),n=length-n,baseSlice(array,n<0?0:n,length)):[]}function takeRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),!1,!0):[]}function takeWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3)):[]}function uniq(array){return array&&array.length?baseUniq(array):[]}function uniqBy(array,iteratee){return array&&array.length?baseUniq(array,getIteratee(iteratee,2)):[]}function uniqWith(array,comparator){return comparator="function"==typeof comparator?comparator:undefined,array&&array.length?baseUniq(array,undefined,comparator):[]}function unzip(array){if(!array||!array.length)return[];var length=0;return array=arrayFilter(array,function(group){if(isArrayLikeObject(group))return length=nativeMax(group.length,length),!0}),baseTimes(length,function(index){return arrayMap(array,baseProperty(index))})}function unzipWith(array,iteratee){if(!array||!array.length)return[];var result=unzip(array);return null==iteratee?result:arrayMap(result,function(group){return apply(iteratee,undefined,group)})}function zipObject(props,values){return baseZipObject(props||[],values||[],assignValue)}function zipObjectDeep(props,values){return baseZipObject(props||[],values||[],baseSet)}function chain(value){var result=lodash(value);return result.__chain__=!0,result}function tap(value,interceptor){return interceptor(value),value}function thru(value,interceptor){return interceptor(value)}function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}function wrapperNext(){this.__values__===undefined&&(this.__values__=toArray(this.value()));var done=this.__index__>=this.__values__.length,value=done?undefined:this.__values__[this.__index__++];return{done:done,value:value}}function wrapperToIterator(){return this}function wrapperPlant(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}function wrapperReverse(){var value=this.__wrapped__;if(value instanceof LazyWrapper){var wrapped=value;return this.__actions__.length&&(wrapped=new LazyWrapper(this)),wrapped=wrapped.reverse(),wrapped.__actions__.push({func:thru,args:[reverse],thisArg:undefined}),new LodashWrapper(wrapped,this.__chain__)}return this.thru(reverse)}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}function every(collection,predicate,guard){var func=isArray(collection)?arrayEvery:baseEvery;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,getIteratee(predicate,3))}function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,getIteratee(predicate,3))}function flatMap(collection,iteratee){return baseFlatten(map(collection,iteratee),1)}function flatMapDeep(collection,iteratee){return baseFlatten(map(collection,iteratee),INFINITY)}function flatMapDepth(collection,iteratee,depth){return depth=depth===undefined?1:toInteger(depth),baseFlatten(map(collection,iteratee),depth)}function forEach(collection,iteratee){var func=isArray(collection)?arrayEach:baseEach;return func(collection,getIteratee(iteratee,3))}function forEachRight(collection,iteratee){var func=isArray(collection)?arrayEachRight:baseEachRight;return func(collection,getIteratee(iteratee,3))}function includes(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}function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,getIteratee(iteratee,3))}function orderBy(collection,iteratees,orders,guard){return null==collection?[]:(isArray(iteratees)||(iteratees=null==iteratees?[]:[iteratees]),orders=guard?undefined:orders,isArray(orders)||(orders=null==orders?[]:[orders]),baseOrderBy(collection,iteratees,orders))}function reduce(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEach)}function reduceRight(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduceRight:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEachRight)}function reject(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;
return func(collection,negate(getIteratee(predicate,3)))}function sample(collection){var func=isArray(collection)?arraySample:baseSample;return func(collection)}function sampleSize(collection,n,guard){n=(guard?isIterateeCall(collection,n,guard):n===undefined)?1:toInteger(n);var func=isArray(collection)?arraySampleSize:baseSampleSize;return func(collection,n)}function shuffle(collection){var func=isArray(collection)?arrayShuffle:baseShuffle;return func(collection)}function size(collection){if(null==collection)return 0;if(isArrayLike(collection))return isString(collection)?stringSize(collection):collection.length;var tag=getTag(collection);return tag==mapTag||tag==setTag?collection.size:baseKeys(collection).length}function some(collection,predicate,guard){var func=isArray(collection)?arraySome:baseSome;return guard&&isIterateeCall(collection,predicate,guard)&&(predicate=undefined),func(collection,getIteratee(predicate,3))}function after(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)}}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}}function curry(func,arity,guard){arity=guard?undefined:arity;var result=createWrap(func,WRAP_CURRY_FLAG,undefined,undefined,undefined,undefined,undefined,arity);return result.placeholder=curry.placeholder,result}function curryRight(func,arity,guard){arity=guard?undefined:arity;var result=createWrap(func,WRAP_CURRY_RIGHT_FLAG,undefined,undefined,undefined,undefined,undefined,arity);return result.placeholder=curryRight.placeholder,result}function debounce(func,wait,options){function invokeFunc(time){var args=lastArgs,thisArg=lastThis;return lastArgs=lastThis=undefined,lastInvokeTime=time,result=func.apply(thisArg,args)}function leadingEdge(time){return lastInvokeTime=time,timerId=setTimeout(timerExpired,wait),leading?invokeFunc(time):result}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,result=wait-timeSinceLastCall;return maxing?nativeMin(result,maxWait-timeSinceLastInvoke):result}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;return lastCallTime===undefined||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait}function timerExpired(){var time=now();return shouldInvoke(time)?trailingEdge(time):void(timerId=setTimeout(timerExpired,remainingWait(time)))}function trailingEdge(time){return timerId=undefined,trailing&&lastArgs?invokeFunc(time):(lastArgs=lastThis=undefined,result)}function cancel(){timerId!==undefined&&clearTimeout(timerId),lastInvokeTime=0,lastArgs=lastCallTime=lastThis=timerId=undefined}function flush(){return timerId===undefined?result:trailingEdge(now())}function debounced(){var time=now(),isInvoking=shouldInvoke(time);if(lastArgs=arguments,lastThis=this,lastCallTime=time,isInvoking){if(timerId===undefined)return leadingEdge(lastCallTime);if(maxing)return timerId=setTimeout(timerExpired,wait),invokeFunc(lastCallTime)}return timerId===undefined&&(timerId=setTimeout(timerExpired,wait)),result}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);return wait=toNumber(wait)||0,isObject(options)&&(leading=!!options.leading,maxing="maxWait"in options,maxWait=maxing?nativeMax(toNumber(options.maxWait)||0,wait):maxWait,trailing="trailing"in options?!!options.trailing:trailing),debounced.cancel=cancel,debounced.flush=flush,debounced}function flip(func){return createWrap(func,WRAP_FLIP_FLAG)}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)}}function once(func){return before(2,func)}function rest(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=start===undefined?start:toInteger(start),baseRest(func,start)}function spread(func,start){if("function"!=typeof func)throw new TypeError(FUNC_ERROR_TEXT);return start=start===undefined?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)})}function throttle(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})}function unary(func){return ary(func,1)}function wrap(value,wrapper){return partial(castFunction(wrapper),value)}function castArray(){if(!arguments.length)return[];var value=arguments[0];return isArray(value)?value:[value]}function clone(value){return baseClone(value,CLONE_SYMBOLS_FLAG)}function cloneWith(value,customizer){return customizer="function"==typeof customizer?customizer:undefined,baseClone(value,CLONE_SYMBOLS_FLAG,customizer)}function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG)}function cloneDeepWith(value,customizer){return customizer="function"==typeof customizer?customizer:undefined,baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG,customizer)}function conformsTo(object,source){return null==source||baseConformsTo(object,source,keys(source))}function eq(value,other){return value===other||value!==value&&other!==other}function isArrayLike(value){return null!=value&&isLength(value.length)&&!isFunction(value)}function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value)}function isBoolean(value){return value===!0||value===!1||isObjectLike(value)&&baseGetTag(value)==boolTag}function isElement(value){return isObjectLike(value)&&1===value.nodeType&&!isPlainObject(value)}function isEmpty(value){if(null==value)return!0;if(isArrayLike(value)&&(isArray(value)||"string"==typeof value||"function"==typeof value.splice||isBuffer(value)||isTypedArray(value)||isArguments(value)))return!value.length;var tag=getTag(value);if(tag==mapTag||tag==setTag)return!value.size;if(isPrototype(value))return!baseKeys(value).length;for(var key in value)if(hasOwnProperty.call(value,key))return!1;return!0}function isEqual(value,other){return baseIsEqual(value,other)}function isEqualWith(value,other,customizer){customizer="function"==typeof customizer?customizer:undefined;var result=customizer?customizer(value,other):undefined;return result===undefined?baseIsEqual(value,other,undefined,customizer):!!result}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 isFinite(value){return"number"==typeof value&&nativeIsFinite(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}function isMatch(object,source){return object===source||baseIsMatch(object,source,getMatchData(source))}function isMatchWith(object,source,customizer){return customizer="function"==typeof customizer?customizer:undefined,baseIsMatch(object,source,getMatchData(source),customizer)}function isNaN(value){return isNumber(value)&&value!=+value}function isNative(value){if(isMaskable(value))throw new Error(CORE_ERROR_TEXT);return baseIsNative(value)}function isNull(value){return null===value}function isNil(value){return null==value}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}function isSafeInteger(value){return isInteger(value)&&value>=-MAX_SAFE_INTEGER&&value<=MAX_SAFE_INTEGER}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}function isUndefined(value){return value===undefined}function isWeakMap(value){return isObjectLike(value)&&getTag(value)==weakMapTag}function isWeakSet(value){return isObjectLike(value)&&baseGetTag(value)==weakSetTag}function toArray(value){if(!value)return[];if(isArrayLike(value))return isString(value)?stringToArray(value):copyArray(value);if(symIterator&&value[symIterator])return iteratorToArray(value[symIterator]());var tag=getTag(value),func=tag==mapTag?mapToArray:tag==setTag?setToArray:values;return func(value)}function toFinite(value){if(!value)return 0===value?value:0;if(value=toNumber(value),value===INFINITY||value===-INFINITY){var sign=value<0?-1:1;return sign*MAX_INTEGER}return value===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 toSafeInteger(value){return baseClamp(toInteger(value),-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER)}function toString(value){return null==value?"":baseToString(value)}function create(prototype,properties){var result=baseCreate(prototype);return null==properties?result:baseAssign(result,properties)}function findKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwn)}function findLastKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwnRight)}function forIn(object,iteratee){return null==object?object:baseFor(object,getIteratee(iteratee,3),keysIn)}function forInRight(object,iteratee){return null==object?object:baseForRight(object,getIteratee(iteratee,3),keysIn)}function forOwn(object,iteratee){return object&&baseForOwn(object,getIteratee(iteratee,3))}function forOwnRight(object,iteratee){return object&&baseForOwnRight(object,getIteratee(iteratee,3))}function functions(object){return null==object?[]:baseFunctions(object,keys(object))}function functionsIn(object){return null==object?[]:baseFunctions(object,keysIn(object))}function get(object,path,defaultValue){var result=null==object?undefined:baseGet(object,path);return result===undefined?defaultValue:result}function has(object,path){return null!=object&&hasPath(object,path,baseHas)}function hasIn(object,path){return null!=object&&hasPath(object,path,baseHasIn)}function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object)}function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,!0):baseKeysIn(object)}function mapKeys(object,iteratee){var result={};return iteratee=getIteratee(iteratee,3),baseForOwn(object,function(value,key,object){baseAssignValue(result,iteratee(value,key,object),value)}),result}function mapValues(object,iteratee){var result={};return iteratee=getIteratee(iteratee,3),baseForOwn(object,function(value,key,object){baseAssignValue(result,key,iteratee(value,key,object))}),result}function omitBy(object,predicate){return pickBy(object,negate(getIteratee(predicate)))}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])})}function result(object,path,defaultValue){path=castPath(path,object);var index=-1,length=path.length;for(length||(length=1,object=undefined);++index<length;){var value=null==object?undefined:object[toKey(path[index])];value===undefined&&(index=length,value=defaultValue),object=isFunction(value)?value.call(object):value}return object}function set(object,path,value){return null==object?object:baseSet(object,path,value)}function setWith(object,path,value,customizer){return customizer="function"==typeof customizer?customizer:undefined,null==object?object:baseSet(object,path,value,customizer)}function transform(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}function unset(object,path){return null==object||baseUnset(object,path)}function update(object,path,updater){return null==object?object:baseUpdate(object,path,castFunction(updater))}function updateWith(object,path,updater,customizer){return customizer="function"==typeof customizer?customizer:undefined,null==object?object:baseUpdate(object,path,castFunction(updater),customizer)}function values(object){return null==object?[]:baseValues(object,keys(object))}function valuesIn(object){return null==object?[]:baseValues(object,keysIn(object))}function clamp(number,lower,upper){return upper===undefined&&(upper=lower,lower=undefined),upper!==undefined&&(upper=toNumber(upper),upper=upper===upper?upper:0),lower!==undefined&&(lower=toNumber(lower),lower=lower===lower?lower:0),baseClamp(toNumber(number),lower,upper)}function inRange(number,start,end){return start=toFinite(start),end===undefined?(end=start,start=0):end=toFinite(end),number=toNumber(number),baseInRange(number,start,end)}function random(lower,upper,floating){if(floating&&"boolean"!=typeof floating&&isIterateeCall(lower,upper,floating)&&(upper=floating=undefined),floating===undefined&&("boolean"==typeof upper?(floating=upper,upper=undefined):"boolean"==typeof lower&&(floating=lower,lower=undefined)),lower===undefined&&upper===undefined?(lower=0,upper=1):(lower=toFinite(lower),upper===undefined?(upper=lower,lower=0):upper=toFinite(upper)),lower>upper){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)}function capitalize(string){return upperFirst(toString(string).toLowerCase())}function deburr(string){return string=toString(string),string&&string.replace(reLatin,deburrLetter).replace(reComboMark,"")}function endsWith(string,target,position){string=toString(string),target=baseToString(target);var length=string.length;position=position===undefined?length:baseClamp(toInteger(position),0,length);var end=position;return position-=target.length,position>=0&&string.slice(position,end)==target}function escape(string){return string=toString(string),string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string}function escapeRegExp(string){return string=toString(string),string&&reHasRegExpChar.test(string)?string.replace(reRegExpChar,"\\$&"):string}function pad(string,length,chars){string=toString(string),length=toInteger(length);var strLength=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)}function padEnd(string,length,chars){string=toString(string),length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength<length?string+createPadding(length-strLength,chars):string}function padStart(string,length,chars){string=toString(string),length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength<length?createPadding(length-strLength,chars)+string:string}function parseInt(string,radix,guard){return guard||null==radix?radix=0:radix&&(radix=+radix),nativeParseInt(toString(string).replace(reTrimStart,""),radix||0)}function repeat(string,n,guard){return n=(guard?isIterateeCall(string,n,guard):n===undefined)?1:toInteger(n),baseRepeat(toString(string),n)}function replace(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2])}function split(string,separator,limit){return limit&&"number"!=typeof limit&&isIterateeCall(string,separator,limit)&&(separator=limit=undefined),(limit=limit===undefined?MAX_ARRAY_LENGTH:limit>>>0)?(string=toString(string),string&&("string"==typeof separator||null!=separator&&!isRegExp(separator))&&(separator=baseToString(separator),!separator&&hasUnicode(string))?castSlice(stringToArray(string),0,limit):string.split(separator,limit)):[]}function startsWith(string,target,position){return string=toString(string),position=baseClamp(toInteger(position),0,string.length),target=baseToString(target),string.slice(position,position+target.length)==target}function template(string,options,guard){var settings=lodash.templateSettings;guard&&isIterateeCall(string,options,guard)&&(options=undefined),string=toString(string),options=assignInWith({},options,settings,assignInDefaults);var isEscaping,isEvaluating,imports=assignInWith({},options.imports,settings.imports,assignInDefaults),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys),index=0,interpolate=options.interpolate||reNoMatch,source="__p += '",reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g"),sourceURL="//# sourceURL="+("sourceURL"in options?options.sourceURL:"lodash.templateSources["+ ++templateCounter+"]")+"\n";string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){return interpolateValue||(interpolateValue=esTemplateValue),source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar),escapeValue&&(isEscaping=!0,source+="' +\n__e("+escapeValue+") +\n'"),evaluateValue&&(isEvaluating=!0,source+="';\n"+evaluateValue+";\n__p += '"),interpolateValue&&(source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"),index=offset+match.length,match}),source+="';\n";var variable=options.variable;variable||(source="with (obj) {\n"+source+"\n}\n"),source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;"),source="function("+(variable||"obj")+") {\n"+(variable?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(isEscaping?", __e = _.escape":"")+(isEvaluating?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var result=attempt(function(){return Function(importsKeys,sourceURL+"return "+source).apply(undefined,importsValues)});if(result.source=source,isError(result))throw result;return result}function toLower(value){return toString(value).toLowerCase()}function toUpper(value){return toString(value).toUpperCase()}function trim(string,chars,guard){if(string=toString(string),string&&(guard||chars===undefined))return string.replace(reTrim,"");if(!string||!(chars=baseToString(chars)))return string;var strSymbols=stringToArray(string),chrSymbols=stringToArray(chars),start=charsStartIndex(strSymbols,chrSymbols),end=charsEndIndex(strSymbols,chrSymbols)+1;return castSlice(strSymbols,start,end).join("")}function trimEnd(string,chars,guard){if(string=toString(string),string&&(guard||chars===undefined))return string.replace(reTrimEnd,"");if(!string||!(chars=baseToString(chars)))return string;var strSymbols=stringToArray(string),end=charsEndIndex(strSymbols,stringToArray(chars))+1;return castSlice(strSymbols,0,end).join("")}function trimStart(string,chars,guard){if(string=toString(string),string&&(guard||chars===undefined))return string.replace(reTrimStart,"");if(!string||!(chars=baseToString(chars)))return string;var strSymbols=stringToArray(string),start=charsStartIndex(strSymbols,stringToArray(chars));return castSlice(strSymbols,start).join("")}function truncate(string,options){var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(isObject(options)){var separator="separator"in options?options.separator:separator;length="length"in options?toInteger(options.length):length,omission="omission"in options?baseToString(options.omission):omission}string=toString(string);var strLength=string.length;if(hasUnicode(string)){var strSymbols=stringToArray(string);strLength=strSymbols.length}if(length>=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}function unescape(string){return string=toString(string),string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string}function words(string,pattern,guard){return string=toString(string),pattern=guard?undefined:pattern,pattern===undefined?hasUnicodeWord(string)?unicodeWords(string):asciiWords(string):string.match(pattern)||[]}function cond(pairs){var length=null==pairs?0:pairs.length,toIteratee=getIteratee();return pairs=length?arrayMap(pairs,function(pair){if("function"!=typeof pair[1])throw new TypeError(FUNC_ERROR_TEXT);return[toIteratee(pair[0]),pair[1]]}):[],baseRest(function(args){for(var index=-1;++index<length;){var pair=pairs[index];if(apply(pair[0],this,args))return apply(pair[1],this,args)}})}function conforms(source){return baseConforms(baseClone(source,CLONE_DEEP_FLAG))}function constant(value){return function(){return value}}function defaultTo(value,defaultValue){return null==value||value!==value?defaultValue:value}function identity(value){return value}function iteratee(func){return baseIteratee("function"==typeof func?func:baseClone(func,CLONE_DEEP_FLAG))}function matches(source){return baseMatches(baseClone(source,CLONE_DEEP_FLAG))}function matchesProperty(path,srcValue){return baseMatchesProperty(path,baseClone(srcValue,CLONE_DEEP_FLAG))}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__),actions=result.__actions__=copyArray(this.__actions__);return actions.push({func:func,args:arguments,thisArg:object}),result.__chain__=chainAll,result}return func.apply(object,arrayPush([this.value()],arguments))})}),object}function noConflict(){return root._===this&&(root._=oldDash),this}function noop(){}function nthArg(n){return n=toInteger(n),baseRest(function(args){return baseNth(args,n)})}function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path)}function propertyOf(object){return function(path){return null==object?undefined:baseGet(object,path)}}function stubArray(){return[]}function stubFalse(){return!1}function stubObject(){return{}}function stubString(){return""}function stubTrue(){return!0}function times(n,iteratee){if(n=toInteger(n),n<1||n>MAX_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<n;)iteratee(index);return result}function toPath(value){return isArray(value)?arrayMap(value,toKey):isSymbol(value)?[value]:copyArray(stringToPath(toString(value)))}function uniqueId(prefix){var id=++idCounter;return toString(prefix)+id}function max(array){return array&&array.length?baseExtremum(array,identity,baseGt):undefined}function maxBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseGt):undefined}function mean(array){return baseMean(array,identity)}function meanBy(array,iteratee){return baseMean(array,getIteratee(iteratee,2))}function min(array){return array&&array.length?baseExtremum(array,identity,baseLt):undefined}function minBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseLt):undefined}function sum(array){return array&&array.length?baseSum(array,identity):0}function sumBy(array,iteratee){return array&&array.length?baseSum(array,getIteratee(iteratee,2)):0}context=null==context?root:_.defaults(root.Object(),context,_.pick(root,contextProps));var Array=context.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=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return uid?"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,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}}();lodash.templateSettings={escape:reEscape,evaluate:reEvaluate,interpolate:reInterpolate,variable:"",imports:{_:lodash}},lodash.prototype=baseLodash.prototype,lodash.prototype.constructor=lodash,LodashWrapper.prototype=baseCreate(baseLodash.prototype),LodashWrapper.prototype.constructor=LodashWrapper,LazyWrapper.prototype=baseCreate(baseLodash.prototype),LazyWrapper.prototype.constructor=LazyWrapper,Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet,ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet,MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet,SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas,Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;var baseEach=createBaseEach(baseForOwn),baseEachRight=createBaseEach(baseForOwnRight,!0),baseFor=createBaseFor(),baseForRight=createBaseFor(!0),baseSetData=metaMap?function(func,data){return metaMap.set(func,data),func}:identity,baseSetToString=defineProperty?function(func,string){return defineProperty(func,"toString",{configurable:!0,enumerable:!1,value:constant(string),writable:!0})}:identity,castRest=baseRest,clearTimeout=ctxClearTimeout||function(id){return root.clearTimeout(id)},createSet=Set&&1/setToArray(new Set([,-0]))[1]==INFINITY?function(values){return new Set(values)}:noop,getData=metaMap?function(func){return metaMap.get(func)}:noop,getSymbols=nativeGetSymbols?overArg(nativeGetSymbols,Object):stubArray,getSymbolsIn=nativeGetSymbols?function(object){for(var result=[];object;)arrayPush(result,getSymbols(object)),object=getPrototype(object);return result}:stubArray,getTag=baseGetTag;(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map)!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set)!=setTag||WeakMap&&getTag(new WeakMap)!=weakMapTag)&&(getTag=function(value){
var result=baseGetTag(value),Ctor=result==objectTag?value.constructor:undefined,ctorString=Ctor?toSource(Ctor):"";if(ctorString)switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag}return result});var isMaskable=coreJsData?isFunction:stubFalse,setData=shortOut(baseSetData),setTimeout=ctxSetTimeout||function(func,wait){return root.setTimeout(func,wait)},setToString=shortOut(baseSetToString),stringToPath=memoizeCapped(function(string){var result=[];return reLeadingDot.test(string)&&result.push(""),string.replace(rePropName,function(match,number,quote,string){result.push(quote?string.replace(reEscapeChar,"$1"):number||match)}),result}),difference=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,!0)):[]}),differenceBy=baseRest(function(array,values){var iteratee=last(values);return isArrayLikeObject(iteratee)&&(iteratee=undefined),isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,!0),getIteratee(iteratee,2)):[]}),differenceWith=baseRest(function(array,values){var comparator=last(values);return isArrayLikeObject(comparator)&&(comparator=undefined),isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,!0),undefined,comparator):[]}),intersection=baseRest(function(arrays){var mapped=arrayMap(arrays,castArrayLikeObject);return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped):[]}),intersectionBy=baseRest(function(arrays){var iteratee=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);return iteratee===last(mapped)?iteratee=undefined:mapped.pop(),mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,getIteratee(iteratee,2)):[]}),intersectionWith=baseRest(function(arrays){var comparator=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);return comparator="function"==typeof comparator?comparator:undefined,comparator&&mapped.pop(),mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,undefined,comparator):[]}),pull=baseRest(pullAll),pullAt=flatRest(function(array,indexes){var length=null==array?0:array.length,result=baseAt(array,indexes);return basePullAt(array,arrayMap(indexes,function(index){return isIndex(index,length)?+index:index}).sort(compareAscending)),result}),union=baseRest(function(arrays){return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,!0))}),unionBy=baseRest(function(arrays){var iteratee=last(arrays);return isArrayLikeObject(iteratee)&&(iteratee=undefined),baseUniq(baseFlatten(arrays,1,isArrayLikeObject,!0),getIteratee(iteratee,2))}),unionWith=baseRest(function(arrays){var comparator=last(arrays);return comparator="function"==typeof comparator?comparator:undefined,baseUniq(baseFlatten(arrays,1,isArrayLikeObject,!0),undefined,comparator)}),without=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,values):[]}),xor=baseRest(function(arrays){return baseXor(arrayFilter(arrays,isArrayLikeObject))}),xorBy=baseRest(function(arrays){var iteratee=last(arrays);return isArrayLikeObject(iteratee)&&(iteratee=undefined),baseXor(arrayFilter(arrays,isArrayLikeObject),getIteratee(iteratee,2))}),xorWith=baseRest(function(arrays){var comparator=last(arrays);return comparator="function"==typeof comparator?comparator:undefined,baseXor(arrayFilter(arrays,isArrayLikeObject),undefined,comparator)}),zip=baseRest(unzip),zipWith=baseRest(function(arrays){var length=arrays.length,iteratee=length>1?arrays[length-1]:undefined;return iteratee="function"==typeof iteratee?(arrays.pop(),iteratee):undefined,unzipWith(arrays,iteratee)}),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)),value.__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)}),countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:baseAssignValue(result,key,1)}),find=createFind(findIndex),findLast=createFind(findLastIndex),groupBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key].push(value):baseAssignValue(result,key,[value])}),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)}),partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]}),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()},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)}),defer=baseRest(function(func,args){return baseDelay(func,1,args)}),delay=baseRest(function(func,wait,args){return baseDelay(func,toNumber(wait)||0,args)});memoize.Cache=MapCache;var overArgs=castRest(function(func,transforms){transforms=1==transforms.length&&isArray(transforms[0])?arrayMap(transforms[0],baseUnary(getIteratee())):arrayMap(baseFlatten(transforms,1),baseUnary(getIteratee()));var funcsLength=transforms.length;return baseRest(function(args){for(var index=-1,length=nativeMin(args.length,funcsLength);++index<length;)args[index]=transforms[index].call(this,args[index]);return apply(func,this,args)})}),partial=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partial));return createWrap(func,WRAP_PARTIAL_FLAG,undefined,partials,holders)}),partialRight=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partialRight));return createWrap(func,WRAP_PARTIAL_RIGHT_FLAG,undefined,partials,holders)}),rearg=flatRest(function(func,indexes){return createWrap(func,WRAP_REARG_FLAG,undefined,undefined,undefined,indexes)}),gt=createRelationalOperation(baseGt),gte=createRelationalOperation(function(value,other){return value>=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):baseIsArrayBuffer,isBuffer=nativeIsBuffer||stubFalse,isDate=nodeIsDate?baseUnary(nodeIsDate):baseIsDate,isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap,isRegExp=nodeIsRegExp?baseUnary(nodeIsRegExp):baseIsRegExp,isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,lt=createRelationalOperation(baseLt),lte=createRelationalOperation(function(value,other){return value<=other}),assign=createAssigner(function(object,source){if(isPrototype(source)||isArrayLike(source))return void copyObject(source,keys(source),object);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),defaults=baseRest(function(args){return args.push(undefined,assignInDefaults),apply(assignInWith,undefined,args)}),defaultsDeep=baseRest(function(args){return args.push(undefined,mergeDefaults),apply(mergeWith,undefined,args)}),invert=createInverter(function(result,value,key){result[value]=key},constant(identity)),invertBy=createInverter(function(result,value,key){hasOwnProperty.call(result,value)?result[value].push(key):result[value]=[key]},getIteratee),invoke=baseRest(baseInvoke),merge=createAssigner(function(object,source,srcIndex){baseMerge(object,source,srcIndex)}),mergeWith=createAssigner(function(object,source,srcIndex,customizer){baseMerge(object,source,srcIndex,customizer)}),omit=flatRest(function(object,paths){var result={};if(null==object)return result;var isDeep=!1;paths=arrayMap(paths,function(path){return path=castPath(path,object),isDeep||(isDeep=path.length>1),path}),copyObject(object,getAllKeysIn(object),result),isDeep&&(result=baseClone(result,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG));for(var length=paths.length;length--;)baseUnset(result,paths[length]);return result}),pick=flatRest(function(object,paths){return null==object?{}:basePick(object,paths)}),toPairs=createToPairs(keys),toPairsIn=createToPairs(keysIn),camelCase=createCompounder(function(result,word,index){return word=word.toLowerCase(),result+(index?capitalize(word):word)}),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"),snakeCase=createCompounder(function(result,word,index){return result+(index?"_":"")+word.toLowerCase()}),startCase=createCompounder(function(result,word,index){return result+(index?" ":"")+upperFirst(word)}),upperCase=createCompounder(function(result,word,index){return result+(index?" ":"")+word.toUpperCase()}),upperFirst=createCaseFirst("toUpperCase"),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}),flow=createFlow(),flowRight=createFlow(!0),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)}}),over=createOver(arrayMap),overEvery=createOver(arrayEvery),overSome=createOver(arraySome),range=createRange(),rangeRight=createRange(!0),add=createMathOperation(function(augend,addend){return augend+addend},0),ceil=createRound("ceil"),divide=createMathOperation(function(dividend,divisor){return dividend/divisor},1),floor=createRound("floor"),multiply=createMathOperation(function(multiplier,multiplicand){return multiplier*multiplicand},1),round=createRound("round"),subtract=createMathOperation(function(minuend,subtrahend){return minuend-subtrahend},0);return lodash.after=after,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=castArray,lodash.chain=chain,lodash.chunk=chunk,lodash.compact=compact,lodash.concat=concat,lodash.cond=cond,lodash.conforms=conforms,lodash.constant=constant,lodash.countBy=countBy,lodash.create=create,lodash.curry=curry,lodash.curryRight=curryRight,lodash.debounce=debounce,lodash.defaults=defaults,lodash.defaultsDeep=defaultsDeep,lodash.defer=defer,lodash.delay=delay,lodash.difference=difference,lodash.differenceBy=differenceBy,lodash.differenceWith=differenceWith,lodash.drop=drop,lodash.dropRight=dropRight,lodash.dropRightWhile=dropRightWhile,lodash.dropWhile=dropWhile,lodash.fill=fill,lodash.filter=filter,lodash.flatMap=flatMap,lodash.flatMapDeep=flatMapDeep,lodash.flatMapDepth=flatMapDepth,lodash.flatten=flatten,lodash.flattenDeep=flattenDeep,lodash.flattenDepth=flattenDepth,lodash.flip=flip,lodash.flow=flow,lodash.flowRight=flowRight,lodash.fromPairs=fromPairs,lodash.functions=functions,lodash.functionsIn=functionsIn,lodash.groupBy=groupBy,lodash.initial=initial,lodash.intersection=intersection,lodash.intersectionBy=intersectionBy,lodash.intersectionWith=intersectionWith,lodash.invert=invert,lodash.invertBy=invertBy,lodash.invokeMap=invokeMap,lodash.iteratee=iteratee,lodash.keyBy=keyBy,lodash.keys=keys,lodash.keysIn=keysIn,lodash.map=map,lodash.mapKeys=mapKeys,lodash.mapValues=mapValues,lodash.matches=matches,lodash.matchesProperty=matchesProperty,lodash.memoize=memoize,lodash.merge=merge,lodash.mergeWith=mergeWith,lodash.method=method,lodash.methodOf=methodOf,lodash.mixin=mixin,lodash.negate=negate,lodash.nthArg=nthArg,lodash.omit=omit,lodash.omitBy=omitBy,lodash.once=once,lodash.orderBy=orderBy,lodash.over=over,lodash.overArgs=overArgs,lodash.overEvery=overEvery,lodash.overSome=overSome,lodash.partial=partial,lodash.partialRight=partialRight,lodash.partition=partition,lodash.pick=pick,lodash.pickBy=pickBy,lodash.property=property,lodash.propertyOf=propertyOf,lodash.pull=pull,lodash.pullAll=pullAll,lodash.pullAllBy=pullAllBy,lodash.pullAllWith=pullAllWith,lodash.pullAt=pullAt,lodash.range=range,lodash.rangeRight=rangeRight,lodash.rearg=rearg,lodash.reject=reject,lodash.remove=remove,lodash.rest=rest,lodash.reverse=reverse,lodash.sampleSize=sampleSize,lodash.set=set,lodash.setWith=setWith,lodash.shuffle=shuffle,lodash.slice=slice,lodash.sortBy=sortBy,lodash.sortedUniq=sortedUniq,lodash.sortedUniqBy=sortedUniqBy,lodash.split=split,lodash.spread=spread,lodash.tail=tail,lodash.take=take,lodash.takeRight=takeRight,lodash.takeRightWhile=takeRightWhile,lodash.takeWhile=takeWhile,lodash.tap=tap,lodash.throttle=throttle,lodash.thru=thru,lodash.toArray=toArray,lodash.toPairs=toPairs,lodash.toPairsIn=toPairsIn,lodash.toPath=toPath,lodash.toPlainObject=toPlainObject,lodash.transform=transform,lodash.unary=unary,lodash.union=union,lodash.unionBy=unionBy,lodash.unionWith=unionWith,lodash.uniq=uniq,lodash.uniqBy=uniqBy,lodash.uniqWith=uniqWith,lodash.unset=unset,lodash.unzip=unzip,lodash.unzipWith=unzipWith,lodash.update=update,lodash.updateWith=updateWith,lodash.values=values,lodash.valuesIn=valuesIn,lodash.without=without,lodash.words=words,lodash.wrap=wrap,lodash.xor=xor,lodash.xorBy=xorBy,lodash.xorWith=xorWith,lodash.zip=zip,lodash.zipObject=zipObject,lodash.zipObjectDeep=zipObjectDeep,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=clamp,lodash.clone=clone,lodash.cloneDeep=cloneDeep,lodash.cloneDeepWith=cloneDeepWith,lodash.cloneWith=cloneWith,lodash.conformsTo=conformsTo,lodash.deburr=deburr,lodash.defaultTo=defaultTo,lodash.divide=divide,lodash.endsWith=endsWith,lodash.eq=eq,lodash.escape=escape,lodash.escapeRegExp=escapeRegExp,lodash.every=every,lodash.find=find,lodash.findIndex=findIndex,lodash.findKey=findKey,lodash.findLast=findLast,lodash.findLastIndex=findLastIndex,lodash.findLastKey=findLastKey,lodash.floor=floor,lodash.forEach=forEach,lodash.forEachRight=forEachRight,lodash.forIn=forIn,lodash.forInRight=forInRight,lodash.forOwn=forOwn,lodash.forOwnRight=forOwnRight,lodash.get=get,lodash.gt=gt,lodash.gte=gte,lodash.has=has,lodash.hasIn=hasIn,lodash.head=head,lodash.identity=identity,lodash.includes=includes,lodash.indexOf=indexOf,lodash.inRange=inRange,lodash.invoke=invoke,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isArrayBuffer=isArrayBuffer,lodash.isArrayLike=isArrayLike,lodash.isArrayLikeObject=isArrayLikeObject,lodash.isBoolean=isBoolean,lodash.isBuffer=isBuffer,lodash.isDate=isDate,lodash.isElement=isElement,lodash.isEmpty=isEmpty,lodash.isEqual=isEqual,lodash.isEqualWith=isEqualWith,lodash.isError=isError,lodash.isFinite=isFinite,lodash.isFunction=isFunction,lodash.isInteger=isInteger,lodash.isLength=isLength,lodash.isMap=isMap,lodash.isMatch=isMatch,lodash.isMatchWith=isMatchWith,lodash.isNaN=isNaN,lodash.isNative=isNative,lodash.isNil=isNil,lodash.isNull=isNull,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isObjectLike=isObjectLike,lodash.isPlainObject=isPlainObject,lodash.isRegExp=isRegExp,lodash.isSafeInteger=isSafeInteger,lodash.isSet=isSet,lodash.isString=isString,lodash.isSymbol=isSymbol,lodash.isTypedArray=isTypedArray,lodash.isUndefined=isUndefined,lodash.isWeakMap=isWeakMap,lodash.isWeakSet=isWeakSet,lodash.join=join,lodash.kebabCase=kebabCase,lodash.last=last,lodash.lastIndexOf=lastIndexOf,lodash.lowerCase=lowerCase,lodash.lowerFirst=lowerFirst,lodash.lt=lt,lodash.lte=lte,lodash.max=max,lodash.maxBy=maxBy,lodash.mean=mean,lodash.meanBy=meanBy,lodash.min=min,lodash.minBy=minBy,lodash.stubArray=stubArray,lodash.stubFalse=stubFalse,lodash.stubObject=stubObject,lodash.stubString=stubString,lodash.stubTrue=stubTrue,lodash.multiply=multiply,lodash.nth=nth,lodash.noConflict=noConflict,lodash.noop=noop,lodash.now=now,lodash.pad=pad,lodash.padEnd=padEnd,lodash.padStart=padStart,lodash.parseInt=parseInt,lodash.random=random,lodash.reduce=reduce,lodash.reduceRight=reduceRight,lodash.repeat=repeat,lodash.replace=replace,lodash.result=result,lodash.round=round,lodash.runInContext=runInContext,lodash.sample=sample,lodash.size=size,lodash.snakeCase=snakeCase,lodash.some=some,lodash.sortedIndex=sortedIndex,lodash.sortedIndexBy=sortedIndexBy,lodash.sortedIndexOf=sortedIndexOf,lodash.sortedLastIndex=sortedLastIndex,lodash.sortedLastIndexBy=sortedLastIndexBy,lodash.sortedLastIndexOf=sortedLastIndexOf,lodash.startCase=startCase,lodash.startsWith=startsWith,lodash.subtract=subtract,lodash.sum=sum,lodash.sumBy=sumBy,lodash.template=template,lodash.times=times,lodash.toFinite=toFinite,lodash.toInteger=toInteger,lodash.toLength=toLength,lodash.toLower=toLower,lodash.toNumber=toNumber,lodash.toSafeInteger=toSafeInteger,lodash.toString=toString,lodash.toUpper=toUpper,lodash.trim=trim,lodash.trimEnd=trimEnd,lodash.trimStart=trimStart,lodash.truncate=truncate,lodash.unescape=unescape,lodash.uniqueId=uniqueId,lodash.upperCase=upperCase,lodash.upperFirst=upperFirst,lodash.each=forEach,lodash.eachRight=forEachRight,lodash.first=head,mixin(lodash,function(){var source={};return baseForOwn(lodash,function(func,methodName){hasOwnProperty.call(lodash.prototype,methodName)||(source[methodName]=func)}),source}(),{chain:!1}),lodash.VERSION=VERSION,arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],function(methodName){lodash[methodName].placeholder=lodash}),arrayEach(["drop","take"],function(methodName,index){LazyWrapper.prototype[methodName]=function(n){var filtered=this.__filtered__;if(filtered&&!index)return new LazyWrapper(this);n=n===undefined?1:nativeMax(toInteger(n),0);var result=this.clone();return 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||type==LAZY_WHILE_FLAG;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&&(end=toInteger(end),result=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+"",names=realNames[key]||(realNames[key]=[]);names.push({name:methodName,func:lodashFunc})}}),realNames[createHybrid(undefined,WRAP_BIND_KEY_FLAG).name]=[{name:"wrapper",func:undefined}],LazyWrapper.prototype.clone=lazyClone,LazyWrapper.prototype.reverse=lazyReverse,LazyWrapper.prototype.value=lazyValue,lodash.prototype.at=wrapperAt,lodash.prototype.chain=wrapperChain,lodash.prototype.commit=wrapperCommit,lodash.prototype.next=wrapperNext,lodash.prototype.plant=wrapperPlant,lodash.prototype.reverse=wrapperReverse,lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue,lodash.prototype.first=lodash.prototype.head,symIterator&&(lodash.prototype[symIterator]=wrapperToIterator),lodash},_=runInContext();root._=_,__WEBPACK_AMD_DEFINE_RESULT__=function(){return _}.call(exports,__webpack_require__,exports,module),!(__WEBPACK_AMD_DEFINE_RESULT__!==undefined&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}).call(this)}).call(exports,__webpack_require__(8),__webpack_require__(16)(module))},function(module,exports){function stubFalse(){return!1}module.exports=stubFalse},function(module,exports,__webpack_require__){function priv(obj,key,val){var sym;return symbols[key]?sym=symbols[key]:(sym=makeSymbol(key),symbols[key]=sym),2===arguments.length?obj[sym]:(obj[sym]=val,val)}function naiveLength(){return 1}function LRUCache(options){if(!(this instanceof LRUCache))return new LRUCache(options);"number"==typeof options&&(options={max:options}),options||(options={});var max=priv(this,"max",options.max);(!max||"number"!=typeof max||max<=0)&&priv(this,"max",1/0);var lc=options.length||naiveLength;"function"!=typeof lc&&(lc=naiveLength),priv(this,"lengthCalculator",lc),priv(this,"allowStale",options.stale||!1),priv(this,"maxAge",options.maxAge||0),priv(this,"dispose",options.dispose),this.reset()}function forEachStep(self,fn,node,thisp){var hit=node.value;isStale(self,hit)&&(del(self,node),priv(self,"allowStale")||(hit=void 0)),hit&&fn.call(thisp,hit.value,hit.key,self)}function get(self,key,doUse){var node=priv(self,"cache").get(key);if(node){var hit=node.value;isStale(self,hit)?(del(self,node),priv(self,"allowStale")||(hit=void 0)):doUse&&priv(self,"lruList").unshiftNode(node),hit&&(hit=hit.value)}return hit}function isStale(self,hit){if(!hit||!hit.maxAge&&!priv(self,"maxAge"))return!1;var stale=!1,diff=Date.now()-hit.now;return stale=hit.maxAge?diff>hit.maxAge:priv(self,"maxAge")&&diff>priv(self,"maxAge")}function trim(self){if(priv(self,"length")>priv(self,"max"))for(var walker=priv(self,"lruList").tail;priv(self,"length")>priv(self,"max")&&null!==walker;){var prev=walker.prev;del(self,walker),walker=prev}}function del(self,node){if(node){var hit=node.value;priv(self,"dispose")&&priv(self,"dispose").call(this,hit.key,hit.value),priv(self,"length",priv(self,"length")-hit.length),priv(self,"cache").delete(hit.key),priv(self,"lruList").removeNode(node)}}function Entry(key,value,length,now,maxAge){this.key=key,this.value=value,this.length=length,this.now=now,this.maxAge=maxAge||0}module.exports=LRUCache;var makeSymbol,Map=__webpack_require__(261),util=__webpack_require__(12),Yallist=__webpack_require__(312),symbols={},hasSymbol="function"==typeof Symbol;makeSymbol=hasSymbol?function(key){return Symbol.for(key)}:function(key){return"_"+key},Object.defineProperty(LRUCache.prototype,"max",{set:function(mL){(!mL||"number"!=typeof mL||mL<=0)&&(mL=1/0),priv(this,"max",mL),trim(this)},get:function(){return priv(this,"max")},enumerable:!0}),Object.defineProperty(LRUCache.prototype,"allowStale",{set:function(allowStale){priv(this,"allowStale",!!allowStale)},get:function(){return priv(this,"allowStale")},enumerable:!0}),Object.defineProperty(LRUCache.prototype,"maxAge",{set:function(mA){(!mA||"number"!=typeof mA||mA<0)&&(mA=0),priv(this,"maxAge",mA),trim(this)},get:function(){return priv(this,"maxAge")},enumerable:!0}),Object.defineProperty(LRUCache.prototype,"lengthCalculator",{set:function(lC){"function"!=typeof lC&&(lC=naiveLength),lC!==priv(this,"lengthCalculator")&&(priv(this,"lengthCalculator",lC),priv(this,"length",0),priv(this,"lruList").forEach(function(hit){hit.length=priv(this,"lengthCalculator").call(this,hit.value,hit.key),priv(this,"length",priv(this,"length")+hit.length)},this)),trim(this)},get:function(){return priv(this,"lengthCalculator")},enumerable:!0}),Object.defineProperty(LRUCache.prototype,"length",{get:function(){return priv(this,"length")},enumerable:!0}),Object.defineProperty(LRUCache.prototype,"itemCount",{get:function(){return priv(this,"lruList").length},enumerable:!0}),LRUCache.prototype.rforEach=function(fn,thisp){thisp=thisp||this;for(var walker=priv(this,"lruList").tail;null!==walker;){var prev=walker.prev;forEachStep(this,fn,walker,thisp),walker=prev}},LRUCache.prototype.forEach=function(fn,thisp){thisp=thisp||this;for(var walker=priv(this,"lruList").head;null!==walker;){var next=walker.next;forEachStep(this,fn,walker,thisp),walker=next}},LRUCache.prototype.keys=function(){return priv(this,"lruList").toArray().map(function(k){return k.key},this)},LRUCache.prototype.values=function(){return priv(this,"lruList").toArray().map(function(k){return k.value},this)},LRUCache.prototype.reset=function(){priv(this,"dispose")&&priv(this,"lruList")&&priv(this,"lruList").length&&priv(this,"lruList").forEach(function(hit){priv(this,"dispose").call(this,hit.key,hit.value)},this),priv(this,"cache",new Map),priv(this,"lruList",new Yallist),priv(this,"length",0)},LRUCache.prototype.dump=function(){return priv(this,"lruList").map(function(hit){if(!isStale(this,hit))return{k:hit.key,v:hit.value,e:hit.now+(hit.maxAge||0)}},this).toArray().filter(function(h){return h})},LRUCache.prototype.dumpLru=function(){return priv(this,"lruList")},LRUCache.prototype.inspect=function(n,opts){var str="LRUCache {",extras=!1,as=priv(this,"allowStale");as&&(str+="\n allowStale: true",extras=!0);var max=priv(this,"max");max&&max!==1/0&&(extras&&(str+=","),str+="\n max: "+util.inspect(max,opts),extras=!0);var maxAge=priv(this,"maxAge");maxAge&&(extras&&(str+=","),str+="\n maxAge: "+util.inspect(maxAge,opts),extras=!0);var lc=priv(this,"lengthCalculator");lc&&lc!==naiveLength&&(extras&&(str+=","),str+="\n length: "+util.inspect(priv(this,"length"),opts),extras=!0);var didFirst=!1;return priv(this,"lruList").forEach(function(item){didFirst?str+=",\n ":(extras&&(str+=",\n"),didFirst=!0,str+="\n ");var key=util.inspect(item.key).split("\n").join("\n "),val={value:item.value};item.maxAge!==maxAge&&(val.maxAge=item.maxAge),lc!==naiveLength&&(val.length=item.length),isStale(this,item)&&(val.stale=!0),val=util.inspect(val,opts).split("\n").join("\n "),str+=key+" => "+val}),(didFirst||extras)&&(str+="\n"),str+="}"},LRUCache.prototype.set=function(key,value,maxAge){maxAge=maxAge||priv(this,"maxAge");var now=maxAge?Date.now():0,len=priv(this,"lengthCalculator").call(this,value,key);if(priv(this,"cache").has(key)){if(len>priv(this,"max"))return del(this,priv(this,"cache").get(key)),!1;var node=priv(this,"cache").get(key),item=node.value;return priv(this,"dispose")&&priv(this,"dispose").call(this,key,item.value),item.now=now,item.maxAge=maxAge,item.value=value,priv(this,"length",priv(this,"length")+(len-item.length)),item.length=len,this.get(key),trim(this),!0}var hit=new Entry(key,value,len,now,maxAge);return hit.length>priv(this,"max")?(priv(this,"dispose")&&priv(this,"dispose").call(this,key,value),!1):(priv(this,"length",priv(this,"length")+hit.length),priv(this,"lruList").unshift(hit),priv(this,"cache").set(key,priv(this,"lruList").head),trim(this),!0)},LRUCache.prototype.has=function(key){if(!priv(this,"cache").has(key))return!1;var hit=priv(this,"cache").get(key).value;return!isStale(this,hit)},LRUCache.prototype.get=function(key){return get(this,key,!0)},LRUCache.prototype.peek=function(key){return get(this,key,!1)},LRUCache.prototype.pop=function(){var node=priv(this,"lruList").tail;return node?(del(this,node),node.value):null},LRUCache.prototype.del=function(key){del(this,priv(this,"cache").get(key))},LRUCache.prototype.load=function(arr){this.reset();for(var now=Date.now(),l=arr.length-1;l>=0;l--){var hit=arr[l],expiresAt=hit.e||0;if(0===expiresAt)this.set(hit.k,hit.v);else{var maxAge=expiresAt-now;maxAge>0&&this.set(hit.k,hit.v,maxAge)}}},LRUCache.prototype.prune=function(){var self=this;priv(this,"cache").forEach(function(value,key){get(self,key,!1)})}},function(module,exports){function assert(val,msg){if(!val)throw new Error(msg||"Assertion failed")}module.exports=assert,assert.equal=function(l,r,msg){if(l!=r)throw new Error(msg||"Assertion failed: "+l+" != "+r);
}},function(module,exports){function read(buf,offset){var b,res=0,offset=offset||0,shift=0,counter=offset,l=buf.length;do{if(counter>=l)throw read.bytes=0,new RangeError("Could not decode varint");b=buf[counter++],res+=shift<28?(b&REST)<<shift:(b&REST)*Math.pow(2,shift),shift+=7}while(b>=MSB);return read.bytes=counter-offset,res}module.exports=read;var MSB=128,REST=127},function(module,exports){function encode(num,out,offset){out=out||[],offset=offset||0;for(var oldOffset=offset;num>=INT;)out[offset++]=255&num|MSB,num/=128;for(;num&MSBALL;)out[offset++]=255&num|MSB,num>>>=7;return out[offset]=0|num,encode.bytes=offset-oldOffset+1,out}module.exports=encode;var MSB=128,REST=127,MSBALL=~REST,INT=Math.pow(2,31)},function(module,exports){var N1=Math.pow(2,7),N2=Math.pow(2,14),N3=Math.pow(2,21),N4=Math.pow(2,28),N5=Math.pow(2,35),N6=Math.pow(2,42),N7=Math.pow(2,49),N8=Math.pow(2,56),N9=Math.pow(2,63);module.exports=function(value){return value<N1?1:value<N2?2:value<N3?3:value<N4?4:value<N5?5:value<N6?6:value<N7?7:value<N8?8:value<N9?9:10}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function stringToStringTuples(str){var tuples=[],parts=str.split("/").slice(1);if(1===parts.length&&""===parts[0])return[];for(var p=0;p<parts.length;p++){var part=parts[p],proto=protocols(part);if(0!==proto.size){if(p++,p>=parts.length)throw ParseError("invalid address: "+str);tuples.push([part,parts[p]])}else tuples.push([part])}return tuples}function stringTuplesToString(tuples){var parts=[];return map(tuples,function(tup){var proto=protoFromTuple(tup);parts.push(proto.name),tup.length>1&&parts.push(tup[1])}),"/"+parts.join("/")}function stringTuplesToTuples(tuples){return map(tuples,function(tup){Array.isArray(tup)||(tup=[tup]);var proto=protoFromTuple(tup);return tup.length>1?[proto.code,convert.toBuffer(proto.code,tup[1])]:[proto.code]})}function tuplesToStringTuples(tuples){return map(tuples,function(tup){var proto=protoFromTuple(tup);return tup.length>1?[proto.code,convert.toString(proto.code,tup[1])]:[proto.code]})}function tuplesToBuffer(tuples){return fromBuffer(Buffer.concat(map(tuples,function(tup){var proto=protoFromTuple(tup),buf=new Buffer(varint.encode(proto.code));return tup.length>1&&(buf=Buffer.concat([buf,tup[1]])),buf})))}function sizeForAddr(p,addr){if(p.size>0)return p.size/8;if(0===p.size)return 0;{const size=varint.decode(addr);return size+varint.decode.bytes}}function bufferToTuples(buf){const tuples=[];let i=0;for(;i<buf.length;){const code=varint.decode(buf,i),n=varint.decode.bytes,p=protocols(code),size=sizeForAddr(p,buf.slice(i+n));if(0!==size){const addr=buf.slice(i+n,i+n+size);if(i+=size+n,i>buf.length)throw ParseError("Invalid address buffer: "+buf.toString("hex"));tuples.push([code,addr])}else tuples.push([code]),i+=n}return tuples}function bufferToString(buf){var a=bufferToTuples(buf),b=tuplesToStringTuples(a);return stringTuplesToString(b)}function stringToBuffer(str){str=cleanPath(str);var a=stringToStringTuples(str),b=stringTuplesToTuples(a);return tuplesToBuffer(b)}function fromString(str){return stringToBuffer(str)}function fromBuffer(buf){var err=validateBuffer(buf);if(err)throw err;return new Buffer(buf)}function validateBuffer(buf){try{bufferToTuples(buf)}catch(err){return err}}function isValidBuffer(buf){return void 0===validateBuffer(buf)}function cleanPath(str){return"/"+filter(str.trim().split("/")).join("/")}function ParseError(str){return new Error("Error parsing address: "+str)}function protoFromTuple(tup){var proto=protocols(tup[0]);return proto}var map=__webpack_require__(52),filter=__webpack_require__(203),convert=__webpack_require__(234),protocols=__webpack_require__(57),varint=__webpack_require__(55);module.exports={stringToStringTuples:stringToStringTuples,stringTuplesToString:stringTuplesToString,tuplesToStringTuples:tuplesToStringTuples,stringTuplesToTuples:stringTuplesToTuples,bufferToTuples:bufferToTuples,tuplesToBuffer:tuplesToBuffer,bufferToString:bufferToString,stringToBuffer:stringToBuffer,fromString:fromString,fromBuffer:fromBuffer,validateBuffer:validateBuffer,isValidBuffer:isValidBuffer,cleanPath:cleanPath,ParseError:ParseError,protoFromTuple:protoFromTuple,sizeForAddr:sizeForAddr}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function Convert(proto,a){return a instanceof Buffer?Convert.toString(proto,a):Convert.toBuffer(proto,a)}function port2buf(port){var buf=new Buffer(2);return buf.writeUInt16BE(port,0),buf}function buf2port(buf){return buf.readUInt16BE(0)}function mh2buf(hash){const mh=new Buffer(bs58.decode(hash)),size=new Buffer(varint.encode(mh.length));return Buffer.concat([size,mh])}function buf2mh(buf){const size=varint.decode(buf),address=buf.slice(varint.decode.bytes);if(address.length!==size)throw new Error("inconsistent lengths");return bs58.encode(address)}var ip=__webpack_require__(170),protocols=__webpack_require__(57),bs58=__webpack_require__(10),varint=__webpack_require__(55);module.exports=Convert,Convert.toString=function(proto,buf){switch(proto=protocols(proto),proto.code){case 4:case 41:return ip.toString(buf);case 6:case 17:case 33:case 132:return buf2port(buf);case 421:return buf2mh(buf);default:return buf.toString("hex")}},Convert.toBuffer=function(proto,str){switch(proto=protocols(proto),proto.code){case 4:case 41:return ip.toBuffer(str);case 6:case 17:case 33:case 132:return port2buf(parseInt(str,10));case 421:return mh2buf(str);default:return new Buffer(str,"hex")}}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){"use strict";var constants=[["base1","1"],["base2","0"],["base8","7"],["base10","9"],["base16","f"],["base58flickr","Z"],["base58btc","z"],["base64","y"],["base64url","Y"]],names=constants.reduce(function(prev,tupple){return prev[tupple[0]]=tupple[1],prev},{}),codes=constants.reduce(function(prev,tupple){return prev[tupple[1]]=tupple[0],prev},{});module.exports={names:names,codes:codes}},function(module,exports,__webpack_require__){"use strict";exports=module.exports=__webpack_require__(237)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function multibase(nameOrCode,buf){if(!buf)throw new Error("requires an encoded buffer");var code=getCode(nameOrCode),codeBuf=new Buffer(code),name=getName(nameOrCode);return validEncode(name,buf),Buffer.concat([codeBuf,buf])}function encode(nameOrCode,buf){var name=getName(nameOrCode),encode=void 0;switch(name){case"base58btc":encode=function(buf){return new Buffer(bs58.encode(buf))};break;default:throw errNotSupported}return multibase(name,encode(buf))}function decode(bufOrString){Buffer.isBuffer(bufOrString)&&(bufOrString=bufOrString.toString());var code=bufOrString.substring(0,1);bufOrString=bufOrString.substring(1,bufOrString.length),"string"==typeof bufOrString&&(bufOrString=new Buffer(bufOrString));var decode=void 0;switch(code){case"z":decode=function(buf){return new Buffer(bs58.decode(buf.toString()))};break;default:throw errNotSupported}return decode(bufOrString)}function isEncoded(bufOrString){Buffer.isBuffer(bufOrString)&&(bufOrString=bufOrString.toString());var code=bufOrString.substring(0,1);try{var name=getName(code);return name}catch(err){return!1}}function validNameOrCode(nameOrCode){var err=new Error("Unsupported encoding");if(!constants.names[nameOrCode]&&!constants.codes[nameOrCode])throw err}function validEncode(name,buf){var decode=void 0;switch(name){case"base58btc":decode=bs58.decode,buf=buf.toString();break;default:throw errNotSupported}decode(buf)}function getCode(nameOrCode){validNameOrCode(nameOrCode);var code=nameOrCode;return constants.names[nameOrCode]&&(code=constants.names[nameOrCode]),code}function getName(nameOrCode){validNameOrCode(nameOrCode);var name=nameOrCode;return constants.codes[nameOrCode]&&(name=constants.codes[nameOrCode]),name}var constants=__webpack_require__(235),bs58=__webpack_require__(10);exports=module.exports=multibase,exports.encode=encode,exports.decode=decode,exports.isEncoded=isEncoded;var errNotSupported=new Error("Unsupported encoding")}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function varintBuf(n){return new Buffer(varint.encode(n))}var varint=__webpack_require__(117);exports=module.exports,exports.raw=varintBuf(0),exports.protobuf=varintBuf(80),exports.cbor=varintBuf(81),exports.rlp=varintBuf(96),exports.multicodec=varintBuf(64),exports.multihash=varintBuf(65),exports.multiaddr=varintBuf(66),exports["dag-pb"]=new Buffer("70","hex"),exports["dag-cbor"]=new Buffer("71","hex"),exports["eth-block"]=new Buffer("90","hex"),exports["eth-tx"]=new Buffer("91","hex")}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var table=__webpack_require__(238),varint=__webpack_require__(117);exports=module.exports,exports.addPrefix=function(multicodecStrOrCode,data){var pfx=void 0;if(Buffer.isBuffer(multicodecStrOrCode))pfx=multicodecStrOrCode;else{if(!table[multicodecStrOrCode])throw new Error("multicodec not recognized");pfx=table[multicodecStrOrCode]}return Buffer.concat([pfx,data])},exports.rmPrefix=function(data){return varint.decode(data),data.slice(varint.decode.bytes)},exports.getCodec=function(prefixedData){var v=varint.decode(prefixedData),code=new Buffer(v.toString(16),"hex"),codec=void 0;return Object.keys(table).forEach(function(mc){code.equals(table[mc])&&(codec=mc)}),codec}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){"use strict";exports.names={sha1:17,"sha2-256":18,"sha2-512":19,sha3:20,blake2b:64,blake2s:65},exports.codes={17:"sha1",18:"sha2-256",19:"sha2-512",20:"sha3",64:"blake2b",65:"blake2s"},exports.defaultLengths={17:20,18:32,19:64,20:64,64:64,65:32}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function getWebCrypto(){if("undefined"!=typeof window){if(window.crypto)return window.crypto.subtle||window.crypto.webkitSubtle;if(window.msCrypto)return window.msCrypto.subtle}}function webCryptoHash(type){if(!webCrypto)throw new Error("Please use a browser with webcrypto support");return(data,callback)=>{const res=webCrypto.digest({name:type},data);return"function"!=typeof res.then?(res.onerror=(()=>{callback(`Error hashing data using ${type}`)}),void(res.oncomplete=(e=>{callback(null,e.target.result)}))):void nodeify(res.then(raw=>new Buffer(new Uint8Array(raw))),callback)}}function sha1(buf,callback){webCryptoHash("SHA-1")(buf,callback)}function sha2256(buf,callback){webCryptoHash("SHA-256")(buf,callback)}function sha2512(buf,callback){webCryptoHash("SHA-512")(buf,callback)}function sha3(buf,callback){const d=new SHA3.SHA3Hash,digest=new Buffer(d.update(buf).digest("hex"),"hex");callback(null,digest)}const SHA3=__webpack_require__(154),nodeify=__webpack_require__(29),webCrypto=getWebCrypto();module.exports={sha1:sha1,sha2256:sha2256,sha2512:sha2512,sha3:sha3}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){function Multipart(boundary){return!this instanceof Multipart?new Multipart(boundary):(this.boundary=boundary||Math.random().toString(36).slice(2),Sandwich.call(this,{head:"--"+this.boundary+CRNL,tail:CRNL+"--"+this.boundary+"--",separator:CRNL+"--"+this.boundary+CRNL}),this._add=this.add,void(this.add=this.addPart))}var Sandwich=__webpack_require__(272).SandwichStream,stream=__webpack_require__(5),inherits=__webpack_require__(1),isStream=__webpack_require__(180),CRNL="\r\n";module.exports=Multipart,inherits(Multipart,Sandwich),Multipart.prototype.addPart=function(part){part=part||{};var partStream=new stream.PassThrough;if(part.headers)for(var key in part.headers){var header=part.headers[key];partStream.write(key+": "+header+CRNL)}partStream.write(CRNL),isStream(part.body)?part.body.pipe(partStream):partStream.end(part.body),this._add(partStream)}},function(module,exports){module.exports=Array.isArray||function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}},function(module,exports,__webpack_require__){(function(process){function ReadableState(options,stream){options=options||{};var hwm=options.highWaterMark;this.highWaterMark=hwm||0===hwm?hwm:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!options.objectMode,this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){return this instanceof Readable?(this._readableState=new ReadableState(options,this),this.readable=!0,void Stream.call(this)):new Readable(options)}function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(null===chunk||void 0===chunk)state.reading=!1,state.ended||onEofChunk(stream,state);else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk)),state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):(state.reading=!1,state.buffer.push(chunk)),state.needReadable&&emitReadable(stream),maybeReadMore(stream,state);else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function roundUpToNextPowerOf2(n){if(n>=MAX_HWM)n=MAX_HWM;else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){return 0===state.length&&state.ended?0:state.objectMode?0===n?0:1:null===n||isNaN(n)?state.flowing&&state.buffer.length?state.buffer[0].length:state.length:n<=0?0:(n>state.highWaterMark&&(state.highWaterMark=roundUpToNextPowerOf2(n)),n>state.length?state.ended?state.length:(state.needReadable=!0,0):n)}function chunkInvalid(state,chunk){var er=null;return Buffer.isBuffer(chunk)||"string"==typeof chunk||null===chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,state.length>0?emitReadable(stream):endReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(state.emittedReadable=!0,state.sync?process.nextTick(function(){emitReadable_(stream)}):emitReadable_(stream))}function emitReadable_(stream){stream.emit("readable")}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,process.nextTick(function(){maybeReadMore_(stream,state)}))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){return function(){var state=src._readableState;state.awaitDrain--,0===state.awaitDrain&&flow(src)}}function flow(src){function write(dest,i,list){var written=dest.write(chunk);!1===written&&state.awaitDrain++}var chunk,state=src._readableState;for(state.awaitDrain=0;state.pipesCount&&null!==(chunk=src.read());)if(1===state.pipesCount?write(state.pipes,0,null):forEach(state.pipes,write),src.emit("data",chunk),state.awaitDrain>0)return;return 0===state.pipesCount?(state.flowing=!1,void(EE.listenerCount(src,"data")>0&&emitDataEvents(src))):void(state.ranOut=!0)}function pipeOnReadable(){this._readableState.ranOut&&(this._readableState.ranOut=!1,flow(this))}function emitDataEvents(stream,startPaused){var state=stream._readableState;if(state.flowing)throw new Error("Cannot switch to old mode now.");var paused=startPaused||!1,readable=!1;stream.readable=!0,stream.pipe=Stream.prototype.pipe,stream.on=stream.addListener=Stream.prototype.on,stream.on("readable",function(){readable=!0;for(var c;!paused&&null!==(c=stream.read());)stream.emit("data",c);null===c&&(readable=!1,stream._readableState.needReadable=!0)}),stream.pause=function(){paused=!0,this.emit("pause")},stream.resume=function(){paused=!1,readable?process.nextTick(function(){stream.emit("readable")}):this.read(0),this.emit("resume")},stream.emit("readable")}function fromList(n,state){var ret,list=state.buffer,length=state.length,stringMode=!!state.decoder,objectMode=!!state.objectMode;if(0===list.length)return null;if(0===length)ret=null;else if(objectMode)ret=list.shift();else if(!n||n>=length)ret=stringMode?list.join(""):Buffer.concat(list,length),list.length=0;else if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n),list[0]=buf.slice(n)}else if(n===list[0].length)ret=list.shift();else{ret=stringMode?"":new Buffer(n);for(var c=0,i=0,l=list.length;i<l&&c<n;i++){var buf=list[0],cpy=Math.min(n-c,buf.length);stringMode?ret+=buf.slice(0,cpy):buf.copy(ret,c,0,cpy),cpy<buf.length?list[0]=buf.slice(cpy):list.shift(),c+=cpy}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error("endReadable called on non-empty stream");!state.endEmitted&&state.calledRead&&(state.ended=!0,process.nextTick(function(){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var isArray=__webpack_require__(243),Buffer=__webpack_require__(0).Buffer;Readable.ReadableState=ReadableState;var EE=__webpack_require__(6).EventEmitter;EE.listenerCount||(EE.listenerCount=function(emitter,type){return emitter.listeners(type).length});var Stream=__webpack_require__(5),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var StringDecoder;util.inherits(Readable,Stream),Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return"string"!=typeof chunk||state.objectMode||(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=new Buffer(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.setEncoding=function(enc){StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc};var MAX_HWM=8388608;Readable.prototype.read=function(n){var state=this._readableState;state.calledRead=!0;var ret,nOrig=n;if(("number"!=typeof n||n>0)&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return ret=null,state.length>0&&state.decoder&&(ret=fromList(n,state),state.length-=ret.length),0===state.length&&endReadable(this),ret;var doRead=state.needReadable;return state.length-n<=state.highWaterMark&&(doRead=!0),(state.ended||state.reading)&&(doRead=!1),doRead&&(state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1),doRead&&!state.reading&&(n=howMuchToRead(nOrig,state)),ret=n>0?fromList(n,state):null,null===ret&&(state.needReadable=!0,n=0),state.length-=n,0!==state.length||state.ended||(state.needReadable=!0),state.ended&&!state.endEmitted&&0===state.length&&endReadable(this),ret},Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){readable===src&&cleanup()}function onend(){dest.end()}function cleanup(){dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),dest._writableState&&!dest._writableState.needDrain||ondrain()}function onerror(er){unpipe(),dest.removeListener("error",onerror),0===EE.listenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){dest.removeListener("close",onclose),unpipe()}function unpipe(){src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1;var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);return dest.on("drain",ondrain),dest._events&&dest._events.error?isArray(dest._events.error)?dest._events.error.unshift(onerror):dest._events.error=[onerror,dest._events.error]:dest.on("error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(this.on("readable",pipeOnReadable),state.flowing=!0,process.nextTick(function(){flow(src)})),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,this.removeListener("readable",pipeOnReadable),state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,this.removeListener("readable",pipeOnReadable),state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);return i===-1?this:(state.pipes.splice(i,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"!==ev||this._readableState.flowing||emitDataEvents(this),"readable"===ev&&this.readable){var state=this._readableState;state.readableListening||(state.readableListening=!0,state.emittedReadable=!1,state.needReadable=!0,state.reading?state.length&&emitReadable(this,state):this.read(0))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){emitDataEvents(this),this.read(0),this.emit("resume")},Readable.prototype.pause=function(){emitDataEvents(this,!0),this.emit("pause")},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(state.decoder&&(chunk=state.decoder.write(chunk)),(!state.objectMode||null!==chunk&&void 0!==chunk)&&(state.objectMode||chunk&&chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)"function"==typeof stream[i]&&"undefined"==typeof this[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){function TransformState(options,stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null,ts.writecb=null,null!==data&&void 0!==data&&stream.push(data),cb&&cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options);var stream=(this._transformState=new TransformState(options,this),this);this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(er){done(stream,er)}):done(stream)})}function done(stream,er){if(er)return stream.emit("error",er);var ws=stream._writableState,ts=(stream._readableState,stream._transformState);if(ws.length)throw new Error("calling transform done when ws.length != 0");if(ts.transforming)throw new Error("calling transform done when still transforming");return stream.push(null)}module.exports=Transform;var Duplex=__webpack_require__(93),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;null!==ts.writechunk&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0}},function(module,exports,__webpack_require__){(function(process){function WriteReq(chunk,encoding,cb){this.chunk=chunk,this.encoding=encoding,this.callback=cb}function WritableState(options,stream){options=options||{};var hwm=options.highWaterMark;this.highWaterMark=hwm||0===hwm?hwm:16384,this.objectMode=!!options.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function Writable(options){var Duplex=__webpack_require__(93);return this instanceof Writable||this instanceof Duplex?(this._writableState=new WritableState(options,this),this.writable=!0,void Stream.call(this)):new Writable(options)}function writeAfterEnd(stream,state,cb){var er=new Error("write after end");stream.emit("error",er),process.nextTick(function(){cb(er)})}function validChunk(stream,state,chunk,cb){var valid=!0;if(!Buffer.isBuffer(chunk)&&"string"!=typeof chunk&&null!==chunk&&void 0!==chunk&&!state.objectMode){var er=new TypeError("Invalid non-string/buffer chunk");stream.emit("error",er),process.nextTick(function(){cb(er)}),valid=!1}return valid}function decodeChunk(state,chunk,encoding){return state.objectMode||state.decodeStrings===!1||"string"!=typeof chunk||(chunk=new Buffer(chunk,encoding)),chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding),Buffer.isBuffer(chunk)&&(encoding="buffer");var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;return ret||(state.needDrain=!0),state.writing?state.buffer.push(new WriteReq(chunk,encoding,cb)):doWrite(stream,state,len,chunk,encoding,cb),ret}function doWrite(stream,state,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){sync?process.nextTick(function(){cb(er)}):cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(stream,state);finished||state.bufferProcessing||!state.buffer.length||clearBuffer(stream,state),sync?process.nextTick(function(){afterWrite(stream,state,finished,cb)}):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),cb(),finished&&finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;for(var c=0;c<state.buffer.length;c++){var entry=state.buffer[c],chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,len,chunk,encoding,cb),state.writing){c++;break}}state.bufferProcessing=!1,c<state.buffer.length?state.buffer=state.buffer.slice(c):state.buffer.length=0}function needFinish(stream,state){return state.ending&&0===state.length&&!state.finished&&!state.writing}function finishMaybe(stream,state){var need=needFinish(stream,state);return need&&(state.finished=!0,stream.emit("finish")),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?process.nextTick(cb):stream.once("finish",cb)),state.ended=!0}module.exports=Writable;var Buffer=__webpack_require__(0).Buffer;Writable.WritableState=WritableState;var util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Stream=__webpack_require__(5);util.inherits(Writable,Stream),Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return"function"==typeof encoding&&(cb=encoding,encoding=null),Buffer.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=function(){}),state.ended?writeAfterEnd(this,state,cb):validChunk(this,state,chunk,cb)&&(ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))},Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),"undefined"!=typeof chunk&&null!==chunk&&this.write(chunk,encoding),state.ending||state.finished||endWritable(this,state,cb)}}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){module.exports=__webpack_require__(245)},function(module,exports,__webpack_require__){(function(process){function DestroyableTransform(opts){Transform.call(this,opts),this._destroyed=!1}function noop(chunk,enc,callback){callback(null,chunk)}function through2(construct){return function(options,transform,flush){return"function"==typeof options&&(flush=transform,transform=options,options={}),"function"!=typeof transform&&(transform=noop),"function"!=typeof flush&&(flush=null),construct(options,transform,flush)}}var Transform=__webpack_require__(247),inherits=__webpack_require__(12).inherits,xtend=__webpack_require__(31);inherits(DestroyableTransform,Transform),
DestroyableTransform.prototype.destroy=function(err){if(!this._destroyed){this._destroyed=!0;var self=this;process.nextTick(function(){err&&self.emit("error",err),self.emit("close")})}},module.exports=through2(function(options,transform,flush){var t2=new DestroyableTransform(options);return t2._transform=transform,flush&&(t2._flush=flush),t2}),module.exports.ctor=through2(function(options,transform,flush){function Through2(override){return this instanceof Through2?(this.options=xtend(options,override),void DestroyableTransform.call(this,this.options)):new Through2(override)}return inherits(Through2,DestroyableTransform),Through2.prototype._transform=transform,flush&&(Through2.prototype._flush=flush),Through2}),module.exports.obj=through2(function(options,transform,flush){var t2=new DestroyableTransform(xtend({objectMode:!0,highWaterMark:16},options));return t2._transform=transform,flush&&(t2._flush=flush),t2})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){(function(process){function normalizeArray(parts,allowAboveRoot){for(var up=0,i=parts.length-1;i>=0;i--){var last=parts[i];"."===last?parts.splice(i,1):".."===last?(parts.splice(i,1),up++):up&&(parts.splice(i,1),up--)}if(allowAboveRoot)for(;up--;up)parts.unshift("..");return parts}function filter(xs,f){if(xs.filter)return xs.filter(f);for(var res=[],i=0;i<xs.length;i++)f(xs[i],i,xs)&&res.push(xs[i]);return res}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){for(var resolvedPath="",resolvedAbsolute=!1,i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if("string"!=typeof path)throw new TypeError("Arguments to path.resolve must be strings");path&&(resolvedPath=path+"/"+resolvedPath,resolvedAbsolute="/"===path.charAt(0))}return resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/"),(resolvedAbsolute?"/":"")+resolvedPath||"."},exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash="/"===substr(path,-1);return path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/"),path||isAbsolute||(path="."),path&&trailingSlash&&(path+="/"),(isAbsolute?"/":"")+path},exports.isAbsolute=function(path){return"/"===path.charAt(0)},exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if("string"!=typeof p)throw new TypeError("Arguments to path.join must be strings");return p}).join("/"))},exports.relative=function(from,to){function trim(arr){for(var start=0;start<arr.length&&""===arr[start];start++);for(var end=arr.length-1;end>=0&&""===arr[end];end--);return start>end?[]:arr.slice(start,end-start+1)}from=exports.resolve(from).substr(1),to=exports.resolve(to).substr(1);for(var fromParts=trim(from.split("/")),toParts=trim(to.split("/")),length=Math.min(fromParts.length,toParts.length),samePartsLength=length,i=0;i<length;i++)if(fromParts[i]!==toParts[i]){samePartsLength=i;break}for(var outputParts=[],i=samePartsLength;i<fromParts.length;i++)outputParts.push("..");return outputParts=outputParts.concat(toParts.slice(samePartsLength)),outputParts.join("/")},exports.sep="/",exports.delimiter=":",exports.dirname=function(path){var result=splitPath(path),root=result[0],dir=result[1];return root||dir?(dir&&(dir=dir.substr(0,dir.length-1)),root+dir):"."},exports.basename=function(path,ext){var f=splitPath(path)[2];return ext&&f.substr(-1*ext.length)===ext&&(f=f.substr(0,f.length-ext.length)),f},exports.extname=function(path){return splitPath(path)[3]};var substr="b"==="ab".substr(-1)?function(str,start,len){return str.substr(start,len)}:function(str,start,len){return start<0&&(start=str.length+start),str.substr(start,len)}}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){"use strict";function ensureMultiaddr(addr){return multiaddr.isMultiaddr(addr)?addr:multiaddr(addr)}function PeerInfo(peerId){if(!(this instanceof PeerInfo))return new PeerInfo(peerId);if(!peerId)throw new Error("Missing peerId. Use Peer.create(cb) to create one");this.id=peerId,this.multiaddrs=[];const observedMultiaddrs=[];this.multiaddr={},this.multiaddr.add=(addr=>{addr=ensureMultiaddr(addr);var exists=!1;this.multiaddrs.some((m,i)=>{if(m.equals(addr))return exists=!0,!0}),exists||this.multiaddrs.push(addr)}),this.multiaddr.addSafe=(addr=>{addr=ensureMultiaddr(addr);var check=!1;observedMultiaddrs.some((m,i)=>{m.equals(addr)&&(this.multiaddr.add(addr),observedMultiaddrs.splice(i,1),check=!0)}),check||observedMultiaddrs.push(addr)}),this.multiaddr.rm=(addr=>{addr=ensureMultiaddr(addr),this.multiaddrs.some((m,i)=>{if(m.equals(addr))return this.multiaddrs.splice(i,1),!0})}),this.multiaddr.replace=((existing,fresh)=>{Array.isArray(existing)||(existing=[existing]),Array.isArray(fresh)||(fresh=[fresh]),existing.forEach(m=>{this.multiaddr.rm(m)}),fresh.forEach(m=>{this.multiaddr.add(m)})}),this.distinctMultiaddr=(()=>{var result=uniqBy(this.multiaddrs,function(item){return[item.toOptions().port,item.toOptions().transport].join()});return result})}const Id=__webpack_require__(96),multiaddr=__webpack_require__(56),uniqBy=__webpack_require__(226).uniqBy;exports=module.exports=PeerInfo,PeerInfo.create=((id,callback)=>{return"function"==typeof id?(callback=id,id=null,void Id.create((err,id)=>{return err?callback(err):void callback(null,new PeerInfo(id))})):void callback(null,new PeerInfo(id))})},function(module,exports,__webpack_require__){(function(process){function Promise(fn){function next(skipTimeout){waiting.length?(running=!0,waiting.shift()(skipTimeout||!1)):running=!1}function then(cb,eb){return new Promise(function(resolver){function done(skipTimeout){function timeoutDone(){var val;try{val=callback(value)}catch(ex){return resolver.reject(ex),next()}resolver.fulfill(val),next(!0)}var callback=isFulfilled?cb:eb;"function"==typeof callback?skipTimeout?timeoutDone():nextTick(timeoutDone):isFulfilled?(resolver.fulfill(value),next(skipTimeout)):(resolver.reject(value),next(skipTimeout))}waiting.push(done),isResolved&&!running&&next()})}if(!(this instanceof Promise))return"function"==typeof fn?new Promise(fn):defer();var value,isResolved=!1,isFulfilled=!1,waiting=[],running=!1;this.then=then,function(){function fulfill(val){isResolved||(isPromise(val)?val.then(fulfill,reject):(isResolved=isFulfilled=!0,value=val,next()))}function reject(err){isResolved||(isResolved=!0,isFulfilled=!1,value=err,next())}for(var resolver={fulfill:fulfill,reject:reject},i=0;i<extensions.length;i++)extensions[i](this,resolver);if("function"==typeof fn)try{fn(resolver)}catch(ex){resolver.reject(ex)}}()}function defer(){var resolver,promise=new Promise(function(res){resolver=res});return{resolver:resolver,promise:promise}}var nextTick,isPromise=__webpack_require__(82);nextTick="function"==typeof setImediate?setImediate:"object"==typeof process&&process&&process.nextTick?process.nextTick:function(cb){setTimeout(cb,0)};var extensions=[];module.exports=Promise,Promise.use=function(extension){extensions.push(extension)}}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){var parse=__webpack_require__(253),stringify=__webpack_require__(254);module.exports=parse,module.exports.parse=parse,module.exports.stringify=stringify},function(module,exports,__webpack_require__){var tokenize=__webpack_require__(255),MAX_RANGE=536870911,onfieldoptions=function(tokens){for(var opts={};tokens.length;)switch(tokens[0]){case"[":case",":tokens.shift();var name=tokens.shift();if("("===name&&(name=tokens.shift(),tokens.shift()),"="!==tokens[0])throw new Error("Unexpected token in field options: "+tokens[0]);if(tokens.shift(),"]"===tokens[0])throw new Error("Unexpected ] in field option");opts[name]=tokens.shift();break;case"]":return tokens.shift(),opts;default:throw new Error("Unexpected token in field options: "+tokens[0])}throw new Error("No closing tag for field options")},onfield=function(tokens){for(var field={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};tokens.length;)switch(tokens[0]){case"=":tokens.shift(),field.tag=Number(tokens.shift());break;case"map":if(field.type="map",field.map={from:null,to:null},tokens.shift(),"<"!==tokens[0])throw new Error("Unexpected token in map type: "+tokens[0]);if(tokens.shift(),field.map.from=tokens.shift(),","!==tokens[0])throw new Error("Unexpected token in map type: "+tokens[0]);if(tokens.shift(),field.map.to=tokens.shift(),">"!==tokens[0])throw new Error("Unexpected token in map type: "+tokens[0]);tokens.shift(),field.name=tokens.shift();break;case"repeated":case"required":case"optional":var t=tokens.shift();field.required="required"===t,field.repeated="repeated"===t,field.type=tokens.shift(),field.name=tokens.shift();break;case"[":field.options=onfieldoptions(tokens);break;case";":if(null===field.name)throw new Error("Missing field name");if(null===field.type)throw new Error("Missing type in message field: "+field.name);if(field.tag===-1)throw new Error("Missing tag number in message field: "+field.name);return tokens.shift(),field;default:throw new Error("Unexpected token in message field: "+tokens[0])}throw new Error("No ; found for message field")},onmessagebody=function(tokens){for(var body={enums:[],messages:[],fields:[],extends:[],extensions:null};tokens.length;)switch(tokens[0]){case"map":case"repeated":case"optional":case"required":body.fields.push(onfield(tokens));break;case"enum":body.enums.push(onenum(tokens));break;case"message":body.messages.push(onmessage(tokens));break;case"extensions":body.extensions=onextensions(tokens);break;case"oneof":tokens.shift();var name=tokens.shift();if("{"!==tokens[0])throw new Error("Unexpected token in oneof: "+tokens[0]);for(tokens.shift();"}"!==tokens[0];){tokens.unshift("optional");var field=onfield(tokens);field.oneof=name,body.fields.push(field)}tokens.shift();break;case"extend":body.extends.push(onextend(tokens));break;case";":tokens.shift();break;default:tokens.unshift("optional"),body.fields.push(onfield(tokens))}return body},onextend=function(tokens){var out={name:tokens[1],message:onmessage(tokens)};return out},onextensions=function(tokens){tokens.shift();var from=Number(tokens.shift());if(isNaN(from))throw new Error("Invalid from in extensions definition");if("to"!==tokens.shift())throw new Error("Expected keyword 'to' in extensions definition");var to=tokens.shift();if("max"===to&&(to=MAX_RANGE),to=Number(to),isNaN(to))throw new Error("Invalid to in extensions definition");if(";"!==tokens.shift())throw new Error("Missing ; in extensions definition");return{from:from,to:to}},onmessage=function(tokens){tokens.shift();var lvl=1,body=[],msg={name:tokens.shift(),enums:[],extends:[],messages:[],fields:[]};if("{"!==tokens[0])throw new Error("Expected { but found "+tokens[0]);for(tokens.shift();tokens.length;){if("{"===tokens[0]?lvl++:"}"===tokens[0]&&lvl--,!lvl)return tokens.shift(),body=onmessagebody(body),msg.enums=body.enums,msg.messages=body.messages,msg.fields=body.fields,msg.extends=body.extends,msg.extensions=body.extensions,msg;body.push(tokens.shift())}if(lvl)throw new Error("No closing tag for message")},onpackagename=function(tokens){tokens.shift();var name=tokens.shift();if(";"!==tokens[0])throw new Error("Expected ; but found "+tokens[0]);return tokens.shift(),name},onsyntaxversion=function(tokens){if(tokens.shift(),"="!==tokens[0])throw new Error("Expected = but found "+tokens[0]);tokens.shift();var version=tokens.shift();switch(version){case'"proto2"':version=2;break;case'"proto3"':version=3;break;default:throw new Error("Expected protobuf syntax version but found "+version)}if(";"!==tokens[0])throw new Error("Expected ; but found "+tokens[0]);return tokens.shift(),version},onenumvalue=function(tokens){if(tokens.length<4)throw new Error("Invalid enum value: "+tokens.slice(0,3).join(" "));if("="!==tokens[1])throw new Error("Expected = but found "+tokens[1]);if(";"!==tokens[3]&&"["!==tokens[3])throw new Error("Expected ; or [ but found "+tokens[1]);var name=tokens.shift();tokens.shift();var val={value:null,options:{}};return val.value=Number(tokens.shift()),"["===tokens[0]&&(val.options=onfieldoptions(tokens)),tokens.shift(),{name:name,val:val}},onenum=function(tokens){tokens.shift();var options={},e={name:tokens.shift(),values:{},options:{}};if("{"!==tokens[0])throw new Error("Expected { but found "+tokens[0]);for(tokens.shift();tokens.length;){if("}"===tokens[0])return tokens.shift(),";"===tokens[0]&&tokens.shift(),e;if("option"!==tokens[0]){var val=onenumvalue(tokens);e.values[val.name]=val.val}else options=onoption(tokens),e.options[options.name]=options.value}throw new Error("No closing tag for enum")},onoption=function(tokens){for(var name=null,value=null,parse=function(value){return"true"===value||"false"!==value&&value.replace(/^"+|"+$/gm,"")};tokens.length;){if(";"===tokens[0])return tokens.shift(),{name:name,value:value};switch(tokens[0]){case"option":tokens.shift();var hasBracket="("===tokens[0];if(hasBracket&&tokens.shift(),name=tokens.shift(),hasBracket){if(")"!==tokens[0])throw new Error("Expected ) but found "+tokens[0]);tokens.shift()}break;case"=":if(tokens.shift(),null===name)throw new Error("Expected key for option with value: "+tokens[0]);if(value=parse(tokens.shift()),"optimize_for"===name&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(value))throw new Error("Unexpected value for option optimize_for: "+value);"{"===value&&(value=onoptionMap(tokens));break;default:throw new Error("Unexpected token in option: "+tokens[0])}}},onoptionMap=function(tokens){for(var parse=function(value){return"true"===value||"false"!==value&&value.replace(/^"+|"+$/gm,"")},map={};tokens.length;){if("}"===tokens[0])return tokens.shift(),map;var hasBracket="("===tokens[0];hasBracket&&tokens.shift();var key=tokens.shift();if(hasBracket){if(")"!==tokens[0])throw new Error("Expected ) but found "+tokens[0]);tokens.shift()}var value=null;switch(tokens[0]){case":":if(void 0!==map[key])throw new Error("Duplicate option map key "+key);tokens.shift(),value=parse(tokens.shift()),"{"===value&&(value=onoptionMap(tokens)),map[key]=value;break;case"{":if(tokens.shift(),value=onoptionMap(tokens),void 0===map[key]&&(map[key]=[]),!Array.isArray(map[key]))throw new Error("Duplicate option map key "+key);map[key].push(value);break;default:throw new Error("Unexpected token in option map: "+tokens[0])}}throw new Error("No closing tag for option map")},onimport=function(tokens){tokens.shift();var file=tokens.shift().replace(/^"+|"+$/gm,"");if(";"!==tokens[0])throw new Error("Unexpected token: "+tokens[0]+'. Expected ";"');return tokens.shift(),file},onservice=function(tokens){tokens.shift();var service={name:tokens.shift(),methods:[],options:{}};if("{"!==tokens[0])throw new Error("Expected { but found "+tokens[0]);for(tokens.shift();tokens.length;){if("}"===tokens[0])return tokens.shift(),";"===tokens[0]&&tokens.shift(),service;switch(tokens[0]){case"option":var opt=onoption(tokens);if(void 0!==service.options[opt.name])throw new Error("Duplicate option "+opt.name);service.options[opt.name]=opt.value;break;case"rpc":service.methods.push(onrpc(tokens));break;default:throw new Error("Unexpected token in service: "+tokens[0])}}throw new Error("No closing tag for service")},onrpc=function(tokens){tokens.shift();var rpc={name:tokens.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}};if("("!==tokens[0])throw new Error("Expected ( but found "+tokens[0]);if(tokens.shift(),"stream"===tokens[0]&&(tokens.shift(),rpc.client_streaming=!0),rpc.input_type=tokens.shift(),")"!==tokens[0])throw new Error("Expected ) but found "+tokens[0]);if(tokens.shift(),"returns"!==tokens[0])throw new Error("Expected returns but found "+tokens[0]);if(tokens.shift(),"("!==tokens[0])throw new Error("Expected ( but found "+tokens[0]);if(tokens.shift(),"stream"===tokens[0]&&(tokens.shift(),rpc.server_streaming=!0),rpc.output_type=tokens.shift(),")"!==tokens[0])throw new Error("Expected ) but found "+tokens[0]);if(tokens.shift(),";"===tokens[0])return tokens.shift(),rpc;if("{"!==tokens[0])throw new Error("Expected { but found "+tokens[0]);for(tokens.shift();tokens.length;){if("}"===tokens[0])return tokens.shift(),";"===tokens[0]&&tokens.shift(),rpc;if("option"!==tokens[0])throw new Error("Unexpected token in rpc options: "+tokens[0]);var opt=onoption(tokens);if(void 0!==rpc.options[opt.name])throw new Error("Duplicate option "+opt.name);rpc.options[opt.name]=opt.value}throw new Error("No closing tag for rpc")},parse=function(buf){for(var tokens=tokenize(buf.toString()),i=0;i<tokens.length;i++)if(/^(\"|\')([^\'\"]*)$/.test(tokens[i])){var j;for(j=1===tokens[i].length?i+1:i;j<tokens.length;j++)if(/^([^\'\"]*)(\"|\')$/.test(tokens[j])){tokens=tokens.slice(0,i).concat(tokens.slice(i,j+1).join("")).concat(tokens.slice(j+1));break}}for(var schema={syntax:3,package:null,imports:[],enums:[],messages:[],options:{},extends:[]},firstline=!0;tokens.length;){switch(tokens[0]){case"package":schema.package=onpackagename(tokens);break;case"syntax":if(!firstline)throw new Error("Protobuf syntax version should be first thing in file");schema.syntax=onsyntaxversion(tokens);break;case"message":schema.messages.push(onmessage(tokens));break;case"enum":schema.enums.push(onenum(tokens));break;case"option":var opt=onoption(tokens);if(schema.options[opt.name])throw new Error("Duplicate option "+opt.name);schema.options[opt.name]=opt.value;break;case"import":schema.imports.push(onimport(tokens));break;case"extend":schema.extends.push(onextend(tokens));break;case"service":schema.services||(schema.services=[]),schema.services.push(onservice(tokens));break;default:throw new Error("Unexpected token: "+tokens[0])}firstline=!1}return schema.extends.forEach(function(ext){schema.messages.forEach(function(msg){msg.name===ext.name&&ext.message.fields.forEach(function(field){if(!msg.extensions||field.tag<msg.extensions.from||field.tag>msg.extensions.to)throw new Error(msg.name+" does not declare "+field.tag+" as an extension number");msg.fields.push(field)})})}),schema};module.exports=parse},function(module,exports){var onfield=function(f,result){var prefix=f.repeated?"repeated":f.required?"required":"optional";"map"===f.type&&(prefix="map<"+f.map.from+","+f.map.to+">"),f.oneof&&(prefix="");var opts=Object.keys(f.options||{}).map(function(key){return key+" = "+f.options[key]}).join(",");return opts&&(opts=" ["+opts+"]"),result.push((prefix?prefix+" ":"")+("map"===f.map?"":f.type+" ")+f.name+" = "+f.tag+opts+";"),result},onmessage=function(m,result){result.push("message "+m.name+" {"),m.enums||(m.enums=[]),m.enums.forEach(function(e){result.push(onenum(e,[]))}),m.messages||(m.messages=[]),m.messages.forEach(function(m){result.push(onmessage(m,[]))});var oneofs={};return m.fields||(m.fields=[]),m.fields.forEach(function(f){f.oneof?(oneofs[f.oneof]||(oneofs[f.oneof]=[]),oneofs[f.oneof].push(onfield(f,[]))):result.push(onfield(f,[]))}),Object.keys(oneofs).forEach(function(n){oneofs[n].unshift("oneof "+n+" {"),oneofs[n].push("}"),result.push(oneofs[n])}),result.push("}",""),result},onenum=function(e,result){result.push("enum "+e.name+" {"),e.options||(e.options={});var options=onoption(e.options,[]);return options.length>1&&result.push(options.slice(0,-1)),Object.keys(e.values).map(function(v){var val=onenumvalue(e.values[v]);result.push([v+" = "+val+";"])}),result.push("}",""),result},onenumvalue=function(v,result){var opts=Object.keys(v.options||{}).map(function(key){return key+" = "+v.options[key]}).join(",");opts&&(opts=" ["+opts+"]");var val=v.value+opts;return val},onoption=function(o,result){var keys=Object.keys(o);return keys.forEach(function(option){var v=o[option];~option.indexOf(".")&&(option="("+option+")");var type=typeof v;"object"===type?(v=onoptionMap(v,[]),v.length&&result.push("option "+option+" = {",v,"};")):("string"===type&&"optimize_for"!==option&&(v='"'+v+'"'),result.push("option "+option+" = "+v+";"))}),keys.length>0&&result.push(""),result},onoptionMap=function(o,result){var keys=Object.keys(o);return keys.forEach(function(k){var v=o[k],type=typeof v;"object"===type?Array.isArray(v)?v.forEach(function(v){v=onoptionMap(v,[]),v.length&&result.push(k+" {",v,"}")}):(v=onoptionMap(v,[]),v.length&&result.push(k+" {",v,"}")):("string"===type&&(v='"'+v+'"'),result.push(k+": "+v))}),result},onservices=function(s,result){return result.push("service "+s.name+" {"),s.options||(s.options={}),onoption(s.options,result),s.methods||(s.methods=[]),s.methods.forEach(function(m){result.push(onrpc(m,[]))}),result.push("}",""),result},onrpc=function(rpc,result){var def="rpc "+rpc.name+"(";rpc.client_streaming&&(def+="stream "),def+=rpc.input_type+") returns (",rpc.server_streaming&&(def+="stream "),def+=rpc.output_type+")",rpc.options||(rpc.options={});var options=onoption(rpc.options,[]);return options.length>1?result.push(def+" {",options.slice(0,-1),"}"):result.push(def+";"),result},indent=function(lvl){return function(line){return Array.isArray(line)?line.map(indent(lvl+" ")).join("\n"):lvl+line}};module.exports=function(schema){var result=[];return result.push('syntax = "proto'+schema.syntax+'";',""),schema.package&&result.push("package "+schema.package+";",""),schema.options||(schema.options={}),onoption(schema.options,result),schema.enums||(schema.enums=[]),schema.enums.forEach(function(e){onenum(e,result)}),schema.messages||(schema.messages=[]),schema.messages.forEach(function(m){onmessage(m,result)}),schema.services&&schema.services.forEach(function(s){onservices(s,result)}),result.map(indent("")).join("\n")}},function(module,exports){module.exports=function(sch){var noComments=function(line){var i=line.indexOf("//");return i>-1?line.slice(0,i):line},noMultilineComments=function(){var inside=!1;return function(token){return"/*"===token?(inside=!0,!1):"*/"===token?(inside=!1,!1):!inside}},trim=function(line){return line.trim()};return sch.replace(/([;,{}\(\)=\:\[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(trim).filter(Boolean).map(noComments).map(trim).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter(noMultilineComments())}},function(module,exports,__webpack_require__){(function(Buffer){var encodings=__webpack_require__(257),varint=__webpack_require__(97),genobj=__webpack_require__(166),genfun=__webpack_require__(165),flatten=function(values){if(!values)return null;var result={};return Object.keys(values).forEach(function(k){result[k]=values[k].value}),result},skip=function(type,buffer,offset){switch(type){case 0:return varint.decode(buffer,offset),offset+varint.decode.bytes;case 1:return offset+8;case 2:var len=varint.decode(buffer,offset);return offset+varint.decode.bytes+len;case 3:case 4:throw new Error("Groups are not supported");case 5:return offset+4}throw new Error("Unknown wire type: "+type)},defined=function(val){return null!==val&&void 0!==val&&("number"!=typeof val||!isNaN(val))},isString=function(def){try{return!!def&&"string"==typeof JSON.parse(def)}catch(err){return!1}},defaultValue=function(f,def){if(f.map)return"{}";if(f.repeated)return"[]";switch(f.type){case"string":return isString(def)?def:'""';case"bool":return"true"===def?"true":"false";case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return""+Number(def||0);default:return"null"}};module.exports=function(schema,extraEncodings){var messages={},enums={},cache={},visit=function(schema,prefix){schema.enums&&schema.enums.forEach(function(e){e.id=prefix+(prefix?".":"")+e.name,enums[e.id]=e,visit(e,e.id)}),schema.messages&&schema.messages.forEach(function(m){m.id=prefix+(prefix?".":"")+m.name,messages[m.id]=m,m.fields.forEach(function(f){if(f.map){var name="Map_"+f.map.from+"_"+f.map.to,map={name:name,enums:[],messages:[],fields:[{name:"key",type:f.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:f.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:prefix+(prefix?".":"")+name};messages[map.id]||(messages[map.id]=map,schema.messages.push(map)),f.type=name,f.repeated=!0}}),visit(m,m.id)})};visit(schema,"");var compileEnum=function(e){var conditions=Object.keys(e.values).map(function(k){return"val !== "+parseInt(e.values[k].value,10)}).join(" && ");conditions||(conditions="true");var encode=genfun()("function encode (val, buf, offset) {")('if (%s) throw new Error("Invalid enum value: "+val)',conditions)("varint.encode(val, buf, offset)")("encode.bytes = varint.encode.bytes")("return buf")("}").toFunction({varint:varint}),decode=genfun()("function decode (buf, offset) {")("var val = varint.decode(buf, offset)")('if (%s) throw new Error("Invalid enum value: "+val)',conditions)("decode.bytes = varint.decode.bytes")("return val")("}").toFunction({varint:varint});return encodings.make(0,encode,decode,varint.encodingLength)},compileMessage=function(m,exports){m.messages.forEach(function(nested){exports[nested.name]=resolve(nested.name,m.id)}),m.enums.forEach(function(val){exports[val.name]=flatten(val.values)}),exports.type=2,exports.message=!0,exports.name=m.name;var oneofs={};m.fields.forEach(function(f){f.oneof&&(oneofs[f.oneof]||(oneofs[f.oneof]=[]),oneofs[f.oneof].push(f.name))});var enc=m.fields.map(function(f){return resolve(f.type,m.id)}),forEach=function(fn){for(var i=0;i<enc.length;i++)fn(enc[i],m.fields[i],genobj("obj",m.fields[i].name),i)},encodingLength=genfun()("function encodingLength (obj) {")("var length = 0");Object.keys(oneofs).forEach(function(name){var msg=JSON.stringify("only one of the properties defined in oneof "+name+" can be set"),cnt=oneofs[name].map(function(prop){return"+defined("+genobj("obj",prop)+")"}).join(" + ");encodingLength("if ((%s) > 1) throw new Error(%s)",cnt,msg)}),forEach(function(e,f,val,i){var packed=f.repeated&&f.options&&f.options.packed&&"false"!==f.options.packed,hl=varint.encodingLength(f.tag<<3|e.type);f.required?encodingLength("if (!defined(%s)) throw new Error(%s)",val,JSON.stringify(f.name+" is required")):encodingLength("if (defined(%s)) {",val),f.map&&(encodingLength()("var tmp = Object.keys(%s)",val)("for (var i = 0; i < tmp.length; i++) {")("tmp[i] = {key: tmp[i], value: %s[tmp[i]]}",val)("}"),val="tmp"),packed?(encodingLength()("var packedLen = 0")("for (var i = 0; i < %s.length; i++) {",val)("if (!defined(%s)) continue",val+"[i]")("var len = enc[%d].encodingLength(%s)",i,val+"[i]")("packedLen += len"),e.message&&encodingLength("packedLen += varint.encodingLength(len)"),encodingLength("}")("if (packedLen) {")("length += %d + packedLen + varint.encodingLength(packedLen)",hl)("}")):(f.repeated&&(encodingLength("for (var i = 0; i < %s.length; i++) {",val),val+="[i]",encodingLength("if (!defined(%s)) continue",val)),encodingLength("var len = enc[%d].encodingLength(%s)",i,val),e.message&&encodingLength("length += varint.encodingLength(len)"),encodingLength("length += %d + len",hl),f.repeated&&encodingLength("}")),f.required||encodingLength("}")}),encodingLength()("return length")("}"),encodingLength=encodingLength.toFunction({defined:defined,varint:varint,enc:enc});var encode=genfun()("function encode (obj, buf, offset) {")("if (!offset) offset = 0")("if (!buf) buf = new Buffer(encodingLength(obj))")("var oldOffset = offset");Object.keys(oneofs).forEach(function(name){var msg=JSON.stringify("only one of the properties defined in oneof "+name+" can be set"),cnt=oneofs[name].map(function(prop){return"+defined("+genobj("obj",prop)+")"}).join(" + ");encode("if ((%s) > 1) throw new Error(%s)",cnt,msg)}),forEach(function(e,f,val,i){f.required?encode("if (!defined(%s)) throw new Error(%s)",val,JSON.stringify(f.name+" is required")):encode("if (defined(%s)) {",val);var j,packed=f.repeated&&f.options&&f.options.packed&&"false"!==f.options.packed,p=varint.encode(f.tag<<3|2),h=varint.encode(f.tag<<3|e.type);if(f.map&&(encode()("var tmp = Object.keys(%s)",val)("for (var i = 0; i < tmp.length; i++) {")("tmp[i] = {key: tmp[i], value: %s[tmp[i]]}",val)("}"),val="tmp"),packed){for(encode()("var packedLen = 0")("for (var i = 0; i < %s.length; i++) {",val)("if (!defined(%s)) continue",val+"[i]")("packedLen += enc[%d].encodingLength(%s)",i,val+"[i]")("}"),encode("if (packedLen) {"),j=0;j<h.length;j++)encode("buf[offset++] = %d",p[j]);encode("varint.encode(packedLen, buf, offset)"),encode("offset += varint.encode.bytes"),encode("}")}if(f.repeated&&(encode("for (var i = 0; i < %s.length; i++) {",val),val+="[i]",encode("if (!defined(%s)) continue",val)),!packed)for(j=0;j<h.length;j++)encode("buf[offset++] = %d",h[j]);e.message&&(encode("varint.encode(enc[%d].encodingLength(%s), buf, offset)",i,val),encode("offset += varint.encode.bytes")),encode("enc[%d].encode(%s, buf, offset)",i,val),encode("offset += enc[%d].encode.bytes",i),f.repeated&&encode("}"),f.required||encode("}")}),encode()("encode.bytes = offset - oldOffset")("return buf")("}"),encode=encode.toFunction({encodingLength:encodingLength,defined:defined,varint:varint,enc:enc,Buffer:Buffer});var invalid=m.fields.map(function(f,i){return f.required&&"!found"+i}).filter(function(f){return f}).join(" || "),decode=genfun(),objectKeys=[];return forEach(function(e,f){var def=f.options&&f.options.default,resolved=resolve(f.type,m.id,!1),vals=resolved&&resolved.values;return vals?void(f.repeated?objectKeys.push(genobj.property(f.name)+": []"):(def=def&&vals[def]?vals[def].value:vals[Object.keys(vals)[0]].value,objectKeys.push(genobj.property(f.name)+": "+parseInt(def||0,10)))):void objectKeys.push(genobj.property(f.name)+": "+defaultValue(f,def))}),decode()("function decode (buf, offset, end) {")("if (!offset) offset = 0")("if (!end) end = buf.length")('if (!(end <= buf.length && offset <= buf.length)) throw new Error("Decoded message is not valid")')("var oldOffset = offset")("var obj = {"),objectKeys.forEach(function(prop,i){decode(prop+(i===objectKeys.length-1?"":","))}),decode("}"),forEach(function(e,f,val,i){f.required&&decode("var found%d = false",i)}),decode("while (true) {")("if (end <= offset) {")(invalid&&'if (%s) throw new Error("Decoded message is not valid")',invalid)("decode.bytes = offset - oldOffset")("return obj")("}")("var prefix = varint.decode(buf, offset)")("offset += varint.decode.bytes")("var tag = prefix >> 3")("switch (tag) {"),forEach(function(e,f,val,i){var packed=f.repeated&&f.options&&f.options.packed&&"false"!==f.options.packed;decode("case %d:",f.tag),f.oneof&&m.fields.forEach(function(otherField){otherField.oneof===f.oneof&&f.name!==otherField.name&&decode("delete %s",genobj("obj",otherField.name))}),packed&&decode()("var packedEnd = varint.decode(buf, offset)")("offset += varint.decode.bytes")("packedEnd += offset")("while (offset < packedEnd) {"),e.message?(decode("var len = varint.decode(buf, offset)"),decode("offset += varint.decode.bytes"),f.map?(decode("var tmp = enc[%d].decode(buf, offset, offset + len)",i),decode("%s[tmp.key] = tmp.value",val)):f.repeated?decode("%s.push(enc[%d].decode(buf, offset, offset + len))",val,i):decode("%s = enc[%d].decode(buf, offset, offset + len)",val,i)):f.repeated?decode("%s.push(enc[%d].decode(buf, offset))",val,i):decode("%s = enc[%d].decode(buf, offset)",val,i),decode("offset += enc[%d].decode.bytes",i),packed&&decode("}"),f.required&&decode("found%d = true",i),decode("break")}),decode()("default:")("offset = skip(prefix & 7, buf, offset)")("}")("}")("}"),decode=decode.toFunction({varint:varint,skip:skip,enc:enc}),encode.bytes=decode.bytes=0,exports.buffer=!0,exports.encode=encode,exports.decode=decode,exports.encodingLength=encodingLength,exports},resolve=function(name,from,compile){if(extraEncodings&&extraEncodings[name])return extraEncodings[name];if(encodings[name])return encodings[name];var m=(from?from+"."+name:name).split(".").map(function(part,i,list){
return list.slice(0,i).concat(name).join(".")}).reverse().reduce(function(result,id){return result||messages[id]||enums[id]},null);if(compile===!1)return m;if(!m)throw new Error("Could not resolve "+name);return m.values?compileEnum(m):cache[m.id]||compileMessage(m,cache[m.id]={})};return(schema.enums||[]).concat((schema.messages||[]).map(function(message){return resolve(message.id)}))}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){(function(Buffer){var varint=__webpack_require__(97),svarint=__webpack_require__(273),encoder=function(type,encode,decode,encodingLength){return encode.bytes=decode.bytes=0,{type:type,encode:encode,decode:decode,encodingLength:encodingLength}};exports.make=encoder,exports.bytes=function(tag){var bufferLength=function(val){return Buffer.isBuffer(val)?val.length:Buffer.byteLength(val)},encodingLength=function(val){var len=bufferLength(val);return varint.encodingLength(len)+len},encode=function(val,buffer,offset){var oldOffset=offset,len=bufferLength(val);return varint.encode(len,buffer,offset),offset+=varint.encode.bytes,Buffer.isBuffer(val)?val.copy(buffer,offset):buffer.write(val,offset,len),offset+=len,encode.bytes=offset-oldOffset,buffer},decode=function(buffer,offset){var oldOffset=offset,len=varint.decode(buffer,offset);offset+=varint.decode.bytes;var val=buffer.slice(offset,offset+len);return offset+=val.length,decode.bytes=offset-oldOffset,val};return encoder(2,encode,decode,encodingLength)}(),exports.string=function(){var encodingLength=function(val){var len=Buffer.byteLength(val);return varint.encodingLength(len)+len},encode=function(val,buffer,offset){var oldOffset=offset,len=Buffer.byteLength(val);return varint.encode(len,buffer,offset,"utf-8"),offset+=varint.encode.bytes,buffer.write(val,offset,len),offset+=len,encode.bytes=offset-oldOffset,buffer},decode=function(buffer,offset){var oldOffset=offset,len=varint.decode(buffer,offset);offset+=varint.decode.bytes;var val=buffer.toString("utf-8",offset,offset+len);return offset+=len,decode.bytes=offset-oldOffset,val};return encoder(2,encode,decode,encodingLength)}(),exports.bool=function(){var encodingLength=function(val){return 1},encode=function(val,buffer,offset){return buffer[offset]=val?1:0,encode.bytes=1,buffer},decode=function(buffer,offset){var bool=buffer[offset]>0;return decode.bytes=1,bool};return encoder(0,encode,decode,encodingLength)}(),exports.int32=function(){var decode=function(buffer,offset){var val=varint.decode(buffer,offset);return decode.bytes=varint.decode.bytes,val>2147483647?val-4294967296:val},encodingLength=function(val){return varint.encodingLength(val<0?val+4294967296:val)};return encoder(0,varint.encode,decode,encodingLength)}(),exports.int64=function(){var decode=function(buffer,offset){var val=varint.decode(buffer,offset);if(val>=Math.pow(2,63)){for(var limit=9;255===buffer[offset+limit-1];)limit--;limit=limit||9;var subset=new Buffer(limit);buffer.copy(subset,0,offset,offset+limit),subset[limit-1]=127&subset[limit-1],val=-1*varint.decode(subset,0),decode.bytes=10}else decode.bytes=varint.decode.bytes;return val},encode=function(val,buffer,offset){if(val<0){var last=offset+9;for(varint.encode(val*-1,buffer,offset),offset+=varint.encode.bytes-1,buffer[offset]=128|buffer[offset];offset<last-1;)offset++,buffer[offset]=255;buffer[last]=1,encode.bytes=10}else varint.encode(val,buffer,offset),encode.bytes=varint.encode.bytes;return buffer},encodingLength=function(val){return val<0?10:varint.encodingLength(val)};return encoder(0,encode,decode,encodingLength)}(),exports.sint32=exports.sint64=function(){return encoder(0,svarint.encode,svarint.decode,svarint.encodingLength)}(),exports.uint32=exports.uint64=exports.enum=exports.varint=function(){return encoder(0,varint.encode,varint.decode,varint.encodingLength)}(),exports.fixed64=exports.sfixed64=function(){var encodingLength=function(val){return 8},encode=function(val,buffer,offset){return val.copy(buffer,offset),encode.bytes=8,buffer},decode=function(buffer,offset){var val=buffer.slice(offset,offset+8);return decode.bytes=8,val};return encoder(1,encode,decode,encodingLength)}(),exports.double=function(){var encodingLength=function(val){return 8},encode=function(val,buffer,offset){return buffer.writeDoubleLE(val,offset),encode.bytes=8,buffer},decode=function(buffer,offset){var val=buffer.readDoubleLE(offset);return decode.bytes=8,val};return encoder(1,encode,decode,encodingLength)}(),exports.fixed32=function(){var encodingLength=function(val){return 4},encode=function(val,buffer,offset){return buffer.writeUInt32LE(val,offset),encode.bytes=4,buffer},decode=function(buffer,offset){var val=buffer.readUInt32LE(offset);return decode.bytes=4,val};return encoder(5,encode,decode,encodingLength)}(),exports.sfixed32=function(){var encodingLength=function(val){return 4},encode=function(val,buffer,offset){return buffer.writeInt32LE(val,offset),encode.bytes=4,buffer},decode=function(buffer,offset){var val=buffer.readInt32LE(offset);return decode.bytes=4,val};return encoder(5,encode,decode,encodingLength)}(),exports.float=function(){var encodingLength=function(val){return 4},encode=function(val,buffer,offset){return buffer.writeFloatLE(val,offset),encode.bytes=4,buffer},decode=function(buffer,offset){var val=buffer.readFloatLE(offset);return decode.bytes=4,val};return encoder(5,encode,decode,encodingLength)}()}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){function read(buf,offset){var b,res=0,offset=offset||0,shift=0,counter=offset,l=buf.length;do{if(counter>=l)throw read.bytes=0,new RangeError("Could not decode varint");b=buf[counter++],res+=shift<28?(b&REST)<<shift:(b&REST)*Math.pow(2,shift),shift+=7}while(b>=MSB);return read.bytes=counter-offset,res}module.exports=read;var MSB=128,REST=127},function(module,exports){function encode(num,out,offset){out=out||[],offset=offset||0;for(var oldOffset=offset;num>=INT;)out[offset++]=255&num|MSB,num/=128;for(;num&MSBALL;)out[offset++]=255&num|MSB,num>>>=7;return out[offset]=0|num,encode.bytes=offset-oldOffset+1,out}module.exports=encode;var MSB=128,REST=127,MSBALL=~REST,INT=Math.pow(2,31)},function(module,exports){var N1=Math.pow(2,7),N2=Math.pow(2,14),N3=Math.pow(2,21),N4=Math.pow(2,28),N5=Math.pow(2,35),N6=Math.pow(2,42),N7=Math.pow(2,49),N8=Math.pow(2,56),N9=Math.pow(2,63);module.exports=function(value){return value<N1?1:value<N2?2:value<N3?3:value<N4?4:value<N5?5:value<N6?6:value<N7?7:value<N8?8:value<N9?9:10}},function(module,exports,__webpack_require__){(function(process){"pseudomap"===process.env.npm_package_name&&"test"===process.env.npm_lifecycle_script&&(process.env.TEST_PSEUDOMAP="true"),"function"!=typeof Map||process.env.TEST_PSEUDOMAP?module.exports=__webpack_require__(262):module.exports=Map}).call(exports,__webpack_require__(2))},function(module,exports){function PseudoMap(set){if(!(this instanceof PseudoMap))throw new TypeError("Constructor PseudoMap requires 'new'");if(this.clear(),set)if(set instanceof PseudoMap||"function"==typeof Map&&set instanceof Map)set.forEach(function(value,key){this.set(key,value)},this);else{if(!Array.isArray(set))throw new TypeError("invalid argument");set.forEach(function(kv){this.set(kv[0],kv[1])},this)}}function same(a,b){return a===b||a!==a&&b!==b}function Entry(k,v,i){this.key=k,this.value=v,this._index=i}function find(data,k){for(var i=0,s="_"+k,key=s;hasOwnProperty.call(data,key);key=s+i++)if(same(data[key].key,k))return data[key]}function set(data,k,v){for(var i=0,s="_"+k,key=s;hasOwnProperty.call(data,key);key=s+i++)if(same(data[key].key,k))return void(data[key].value=v);data.size++,data[key]=new Entry(k,v,key)}var hasOwnProperty=Object.prototype.hasOwnProperty;module.exports=PseudoMap,PseudoMap.prototype.forEach=function(fn,thisp){thisp=thisp||this,Object.keys(this._data).forEach(function(k){"size"!==k&&fn.call(thisp,this._data[k].value,this._data[k].key)},this)},PseudoMap.prototype.has=function(k){return!!find(this._data,k)},PseudoMap.prototype.get=function(k){var res=find(this._data,k);return res&&res.value},PseudoMap.prototype.set=function(k,v){set(this._data,k,v)},PseudoMap.prototype.delete=function(k){var res=find(this._data,k);res&&(delete this._data[res._index],this._data.size--)},PseudoMap.prototype.clear=function(){var data=Object.create(null);data.size=0,Object.defineProperty(this,"_data",{value:data,enumerable:!1,configurable:!0,writable:!1})},Object.defineProperty(PseudoMap.prototype,"size",{get:function(){return this._data.size},set:function(n){},enumerable:!0,configurable:!0}),PseudoMap.prototype.values=PseudoMap.prototype.keys=PseudoMap.prototype.entries=function(){throw new Error("iterators are not implemented in this version")}},function(module,exports,__webpack_require__){(function(module,global){var __WEBPACK_AMD_DEFINE_RESULT__;!function(root){function error(type){throw new RangeError(errors[type])}function map(array,fn){for(var length=array.length,result=[];length--;)result[length]=fn(array[length]);return result}function mapDomain(string,fn){var parts=string.split("@"),result="";parts.length>1&&(result=parts[0]+"@",string=parts[1]),string=string.replace(regexSeparators,".");var labels=string.split("."),encoded=map(labels,fn).join(".");return result+encoded}function ucs2decode(string){for(var value,extra,output=[],counter=0,length=string.length;counter<length;)value=string.charCodeAt(counter++),value>=55296&&value<=56319&&counter<length?(extra=string.charCodeAt(counter++),56320==(64512&extra)?output.push(((1023&value)<<10)+(1023&extra)+65536):(output.push(value),counter--)):output.push(value);return output}function ucs2encode(array){return map(array,function(value){var output="";return value>65535&&(value-=65536,output+=stringFromCharCode(value>>>10&1023|55296),value=56320|1023&value),output+=stringFromCharCode(value)}).join("")}function basicToDigit(codePoint){return codePoint-48<10?codePoint-22:codePoint-65<26?codePoint-65:codePoint-97<26?codePoint-97:base}function digitToBasic(digit,flag){return digit+22+75*(digit<26)-((0!=flag)<<5)}function adapt(delta,numPoints,firstTime){var k=0;for(delta=firstTime?floor(delta/damp):delta>>1,delta+=floor(delta/numPoints);delta>baseMinusTMin*tMax>>1;k+=base)delta=floor(delta/baseMinusTMin);return floor(k+(baseMinusTMin+1)*delta/(delta+skew))}function decode(input){var out,basic,j,index,oldi,w,k,digit,t,baseMinusT,output=[],inputLength=input.length,i=0,n=initialN,bias=initialBias;for(basic=input.lastIndexOf(delimiter),basic<0&&(basic=0),j=0;j<basic;++j)input.charCodeAt(j)>=128&&error("not-basic"),output.push(input.charCodeAt(j));for(index=basic>0?basic+1:0;index<inputLength;){for(oldi=i,w=1,k=base;index>=inputLength&&error("invalid-input"),digit=basicToDigit(input.charCodeAt(index++)),(digit>=base||digit>floor((maxInt-i)/w))&&error("overflow"),i+=digit*w,t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(digit<t);k+=base)baseMinusT=base-t,w>floor(maxInt/baseMinusT)&&error("overflow"),w*=baseMinusT;out=output.length+1,bias=adapt(i-oldi,out,0==oldi),floor(i/out)>maxInt-n&&error("overflow"),n+=floor(i/out),i%=out,output.splice(i++,0,n)}return ucs2encode(output)}function encode(input){var n,delta,handledCPCount,basicLength,bias,j,m,q,k,t,currentValue,inputLength,handledCPCountPlusOne,baseMinusT,qMinusT,output=[];for(input=ucs2decode(input),inputLength=input.length,n=initialN,delta=0,bias=initialBias,j=0;j<inputLength;++j)currentValue=input[j],currentValue<128&&output.push(stringFromCharCode(currentValue));for(handledCPCount=basicLength=output.length,basicLength&&output.push(delimiter);handledCPCount<inputLength;){for(m=maxInt,j=0;j<inputLength;++j)currentValue=input[j],currentValue>=n&&currentValue<m&&(m=currentValue);for(handledCPCountPlusOne=handledCPCount+1,m-n>floor((maxInt-delta)/handledCPCountPlusOne)&&error("overflow"),delta+=(m-n)*handledCPCountPlusOne,n=m,j=0;j<inputLength;++j)if(currentValue=input[j],currentValue<n&&++delta>maxInt&&error("overflow"),currentValue==n){for(q=delta,k=base;t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias,!(q<t);k+=base)qMinusT=q-t,baseMinusT=base-t,output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT,0))),q=floor(qMinusT/baseMinusT);output.push(stringFromCharCode(digitToBasic(q,0))),bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength),delta=0,++handledCPCount}++delta,++n}return output.join("")}function toUnicode(input){return mapDomain(input,function(string){return regexPunycode.test(string)?decode(string.slice(4).toLowerCase()):string})}function toASCII(input){return mapDomain(input,function(string){return regexNonASCII.test(string)?"xn--"+encode(string):string})}var freeGlobal=("object"==typeof exports&&exports&&!exports.nodeType&&exports,"object"==typeof module&&module&&!module.nodeType&&module,"object"==typeof global&&global);freeGlobal.global!==freeGlobal&&freeGlobal.window!==freeGlobal&&freeGlobal.self!==freeGlobal||(root=freeGlobal);var punycode,maxInt=2147483647,base=36,tMin=1,tMax=26,skew=38,damp=700,initialBias=72,initialN=128,delimiter="-",regexPunycode=/^xn--/,regexNonASCII=/[^\x20-\x7E]/,regexSeparators=/[\x2E\u3002\uFF0E\uFF61]/g,errors={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},baseMinusTMin=base-tMin,floor=Math.floor,stringFromCharCode=String.fromCharCode;punycode={version:"1.4.1",ucs2:{decode:ucs2decode,encode:ucs2encode},decode:decode,encode:encode,toASCII:toASCII,toUnicode:toUnicode},__WEBPACK_AMD_DEFINE_RESULT__=function(){return punycode}.call(exports,__webpack_require__,exports,module),!(void 0!==__WEBPACK_AMD_DEFINE_RESULT__&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__))}(this)}).call(exports,__webpack_require__(16)(module),__webpack_require__(8))},function(module,exports,__webpack_require__){"use strict";var stringify=__webpack_require__(266),parse=__webpack_require__(265),formats=__webpack_require__(98);module.exports={formats:formats,parse:parse,stringify:stringify}},function(module,exports,__webpack_require__){"use strict";var utils=__webpack_require__(99),has=Object.prototype.hasOwnProperty,defaults={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:utils.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},parseValues=function(str,options){for(var obj={},parts=str.split(options.delimiter,options.parameterLimit===1/0?void 0:options.parameterLimit),i=0;i<parts.length;++i){var key,val,part=parts[i],pos=part.indexOf("]=")===-1?part.indexOf("="):part.indexOf("]=")+1;pos===-1?(key=options.decoder(part),val=options.strictNullHandling?null:""):(key=options.decoder(part.slice(0,pos)),val=options.decoder(part.slice(pos+1))),has.call(obj,key)?obj[key]=[].concat(obj[key]).concat(val):obj[key]=val}return obj},parseObject=function parseObject(chain,val,options){if(!chain.length)return val;var obj,root=chain.shift();if("[]"===root)obj=[],obj=obj.concat(parseObject(chain,val,options));else{obj=options.plainObjects?Object.create(null):{};var cleanRoot="["===root[0]&&"]"===root[root.length-1]?root.slice(1,root.length-1):root,index=parseInt(cleanRoot,10);!isNaN(index)&&root!==cleanRoot&&String(index)===cleanRoot&&index>=0&&options.parseArrays&&index<=options.arrayLimit?(obj=[],obj[index]=parseObject(chain,val,options)):obj[cleanRoot]=parseObject(chain,val,options)}return obj},parseKeys=function(givenKey,val,options){if(givenKey){var key=options.allowDots?givenKey.replace(/\.([^\.\[]+)/g,"[$1]"):givenKey,parent=/^([^\[\]]*)/,child=/(\[[^\[\]]*\])/g,segment=parent.exec(key),keys=[];if(segment[1]){if(!options.plainObjects&&has.call(Object.prototype,segment[1])&&!options.allowPrototypes)return;keys.push(segment[1])}for(var i=0;null!==(segment=child.exec(key))&&i<options.depth;)i+=1,(options.plainObjects||!has.call(Object.prototype,segment[1].replace(/\[|\]/g,""))||options.allowPrototypes)&&keys.push(segment[1]);return segment&&keys.push("["+key.slice(segment.index)+"]"),parseObject(keys,val,options)}};module.exports=function(str,opts){var options=opts||{};if(null!==options.decoder&&void 0!==options.decoder&&"function"!=typeof options.decoder)throw new TypeError("Decoder has to be a function.");if(options.delimiter="string"==typeof options.delimiter||utils.isRegExp(options.delimiter)?options.delimiter:defaults.delimiter,options.depth="number"==typeof options.depth?options.depth:defaults.depth,options.arrayLimit="number"==typeof options.arrayLimit?options.arrayLimit:defaults.arrayLimit,options.parseArrays=options.parseArrays!==!1,options.decoder="function"==typeof options.decoder?options.decoder:defaults.decoder,options.allowDots="boolean"==typeof options.allowDots?options.allowDots:defaults.allowDots,options.plainObjects="boolean"==typeof options.plainObjects?options.plainObjects:defaults.plainObjects,options.allowPrototypes="boolean"==typeof options.allowPrototypes?options.allowPrototypes:defaults.allowPrototypes,options.parameterLimit="number"==typeof options.parameterLimit?options.parameterLimit:defaults.parameterLimit,options.strictNullHandling="boolean"==typeof options.strictNullHandling?options.strictNullHandling:defaults.strictNullHandling,""===str||null===str||"undefined"==typeof str)return options.plainObjects?Object.create(null):{};for(var tempObj="string"==typeof str?parseValues(str,options):str,obj=options.plainObjects?Object.create(null):{},keys=Object.keys(tempObj),i=0;i<keys.length;++i){var key=keys[i],newObj=parseKeys(key,tempObj[key],options);obj=utils.merge(obj,newObj,options)}return utils.compact(obj)}},function(module,exports,__webpack_require__){"use strict";var utils=__webpack_require__(99),formats=__webpack_require__(98),arrayPrefixGenerators={brackets:function(prefix){return prefix+"[]"},indices:function(prefix,key){return prefix+"["+key+"]"},repeat:function(prefix){return prefix}},toISO=Date.prototype.toISOString,defaults={delimiter:"&",encode:!0,encoder:utils.encode,serializeDate:function(date){return toISO.call(date)},skipNulls:!1,strictNullHandling:!1},stringify=function stringify(object,prefix,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter){var obj=object;if("function"==typeof filter)obj=filter(prefix,obj);else if(obj instanceof Date)obj=serializeDate(obj);else if(null===obj){if(strictNullHandling)return encoder?encoder(prefix):prefix;obj=""}if("string"==typeof obj||"number"==typeof obj||"boolean"==typeof obj||utils.isBuffer(obj))return encoder?[formatter(encoder(prefix))+"="+formatter(encoder(obj))]:[formatter(prefix)+"="+formatter(String(obj))];var values=[];if("undefined"==typeof obj)return values;var objKeys;if(Array.isArray(filter))objKeys=filter;else{var keys=Object.keys(obj);objKeys=sort?keys.sort(sort):keys}for(var i=0;i<objKeys.length;++i){var key=objKeys[i];skipNulls&&null===obj[key]||(values=Array.isArray(obj)?values.concat(stringify(obj[key],generateArrayPrefix(prefix,key),generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter)):values.concat(stringify(obj[key],prefix+(allowDots?"."+key:"["+key+"]"),generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter)))}return values};module.exports=function(object,opts){var obj=object,options=opts||{},delimiter="undefined"==typeof options.delimiter?defaults.delimiter:options.delimiter,strictNullHandling="boolean"==typeof options.strictNullHandling?options.strictNullHandling:defaults.strictNullHandling,skipNulls="boolean"==typeof options.skipNulls?options.skipNulls:defaults.skipNulls,encode="boolean"==typeof options.encode?options.encode:defaults.encode,encoder=encode?"function"==typeof options.encoder?options.encoder:defaults.encoder:null,sort="function"==typeof options.sort?options.sort:null,allowDots="undefined"!=typeof options.allowDots&&options.allowDots,serializeDate="function"==typeof options.serializeDate?options.serializeDate:defaults.serializeDate;if("undefined"==typeof options.format)options.format=formats.default;else if(!Object.prototype.hasOwnProperty.call(formats.formatters,options.format))throw new TypeError("Unknown format option provided.");var objKeys,filter,formatter=formats.formatters[options.format];if(null!==options.encoder&&void 0!==options.encoder&&"function"!=typeof options.encoder)throw new TypeError("Encoder has to be a function.");"function"==typeof options.filter?(filter=options.filter,obj=filter("",obj)):Array.isArray(options.filter)&&(filter=options.filter,objKeys=filter);var keys=[];if("object"!=typeof obj||null===obj)return"";var arrayFormat;arrayFormat=options.arrayFormat in arrayPrefixGenerators?options.arrayFormat:"indices"in options?options.indices?"indices":"repeat":"indices";var generateArrayPrefix=arrayPrefixGenerators[arrayFormat];objKeys||(objKeys=Object.keys(obj)),sort&&objKeys.sort(sort);for(var i=0;i<objKeys.length;++i){var key=objKeys[i];skipNulls&&null===obj[key]||(keys=keys.concat(stringify(obj[key],key,generateArrayPrefix,strictNullHandling,skipNulls,encoder,filter,sort,allowDots,serializeDate,formatter)))}return keys.join(delimiter)}},function(module,exports){"use strict";function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}module.exports=function(qs,sep,eq,options){sep=sep||"&",eq=eq||"=";var obj={};if("string"!=typeof qs||0===qs.length)return obj;var regexp=/\+/g;qs=qs.split(sep);var maxKeys=1e3;options&&"number"==typeof options.maxKeys&&(maxKeys=options.maxKeys);var len=qs.length;maxKeys>0&&len>maxKeys&&(len=maxKeys);for(var i=0;i<len;++i){var kstr,vstr,k,v,x=qs[i].replace(regexp,"%20"),idx=x.indexOf(eq);idx>=0?(kstr=x.substr(0,idx),vstr=x.substr(idx+1)):(kstr=x,vstr=""),k=decodeURIComponent(kstr),v=decodeURIComponent(vstr),hasOwnProperty(obj,k)?isArray(obj[k])?obj[k].push(v):obj[k]=[obj[k],v]:obj[k]=v}return obj};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)}},function(module,exports){"use strict";function map(xs,f){if(xs.map)return xs.map(f);for(var res=[],i=0;i<xs.length;i++)res.push(f(xs[i],i));return res}var stringifyPrimitive=function(v){switch(typeof v){case"string":return v;case"boolean":return v?"true":"false";case"number":return isFinite(v)?v:"";default:return""}};module.exports=function(obj,sep,eq,name){return sep=sep||"&",eq=eq||"=",null===obj&&(obj=void 0),"object"==typeof obj?map(objectKeys(obj),function(k){var ks=encodeURIComponent(stringifyPrimitive(k))+eq;return isArray(obj[k])?map(obj[k],function(v){return ks+encodeURIComponent(stringifyPrimitive(v))}).join(sep):ks+encodeURIComponent(stringifyPrimitive(obj[k]))}).join(sep):name?encodeURIComponent(stringifyPrimitive(name))+eq+encodeURIComponent(stringifyPrimitive(obj)):""};var isArray=Array.isArray||function(xs){return"[object Array]"===Object.prototype.toString.call(xs)},objectKeys=Object.keys||function(obj){var res=[];for(var key in obj)Object.prototype.hasOwnProperty.call(obj,key)&&res.push(key);return res}},function(module,exports,__webpack_require__){"use strict";exports.decode=exports.parse=__webpack_require__(267),exports.encode=exports.stringify=__webpack_require__(268)},function(module,exports,__webpack_require__){function PassThrough(options){return this instanceof PassThrough?void Transform.call(this,options):new PassThrough(options)}module.exports=PassThrough;var Transform=__webpack_require__(101),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},function(module,exports){module.exports=Array.isArray||function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}},function(module,exports,__webpack_require__){function SandwichStream(options){Readable.call(this,options),options=options||{},this._streamsActive=!1,this._streamsAdded=!1,this._streams=[],this._currentStream=void 0,this._errorsEmitted=!1,options.head&&(this._head=options.head),options.tail&&(this._tail=options.tail),options.separator&&(this._separator=options.separator)}function sandwichStream(options){var stream=new SandwichStream(options);return stream}var Readable=__webpack_require__(5).Readable;__webpack_require__(5).PassThrough;SandwichStream.prototype=Object.create(Readable.prototype,{constructor:SandwichStream}),SandwichStream.prototype._read=function(){this._streamsActive||(this._streamsActive=!0,this._pushHead(),this._streamNextStream())},SandwichStream.prototype.add=function(newStream){if(this._streamsActive)throw new Error("SandwichStream error adding new stream while streaming");this._streamsAdded=!0,this._streams.push(newStream),newStream.on("error",this._substreamOnError.bind(this))},SandwichStream.prototype._substreamOnError=function(error){this._errorsEmitted=!0,this.emit("error",error)},SandwichStream.prototype._pushHead=function(){this._head&&this.push(this._head)},SandwichStream.prototype._streamNextStream=function(){this._nextStream()?this._bindCurrentStreamEvents():(this._pushTail(),this.push(null))},SandwichStream.prototype._nextStream=function(){return this._currentStream=this._streams.shift(),void 0!==this._currentStream},SandwichStream.prototype._bindCurrentStreamEvents=function(){this._currentStream.on("readable",this._currentStreamOnReadable.bind(this)),this._currentStream.on("end",this._currentStreamOnEnd.bind(this))},SandwichStream.prototype._currentStreamOnReadable=function(){this.push(this._currentStream.read()||"")},SandwichStream.prototype._currentStreamOnEnd=function(){this._pushSeparator(),this._streamNextStream()},SandwichStream.prototype._pushSeparator=function(){this._streams.length>0&&this._separator&&this.push(this._separator)},SandwichStream.prototype._pushTail=function(){this._tail&&this.push(this._tail)},sandwichStream.SandwichStream=SandwichStream,module.exports=sandwichStream},function(module,exports,__webpack_require__){var varint=__webpack_require__(276);exports.encode=function encode(v,b,o){v=v>=0?2*v:v*-2-1;var r=varint.encode(v,b,o);return encode.bytes=varint.encode.bytes,r},exports.decode=function decode(b,o){var v=varint.decode(b,o);return decode.bytes=varint.decode.bytes,1&v?(v+1)/-2:v/2},exports.encodingLength=function(v){return varint.encodingLength(v>=0?2*v:v*-2-1)}},function(module,exports){function read(buf,offset){var b,res=0,offset=offset||0,shift=0,counter=offset,l=buf.length;do{if(counter>=l)throw read.bytes=0,new RangeError("Could not decode varint");b=buf[counter++],res+=shift<28?(b&REST)<<shift:(b&REST)*Math.pow(2,shift),shift+=7}while(b>=MSB);return read.bytes=counter-offset,res}module.exports=read;var MSB=128,REST=127},function(module,exports){function encode(num,out,offset){out=out||[],offset=offset||0;for(var oldOffset=offset;num>=INT;)out[offset++]=255&num|MSB,num/=128;for(;num&MSBALL;)out[offset++]=255&num|MSB,num>>>=7;return out[offset]=0|num,encode.bytes=offset-oldOffset+1,out}module.exports=encode;var MSB=128,REST=127,MSBALL=~REST,INT=Math.pow(2,31)},function(module,exports,__webpack_require__){module.exports={encode:__webpack_require__(275),decode:__webpack_require__(274),encodingLength:__webpack_require__(277)}},function(module,exports){var N1=Math.pow(2,7),N2=Math.pow(2,14),N3=Math.pow(2,21),N4=Math.pow(2,28),N5=Math.pow(2,35),N6=Math.pow(2,42),N7=Math.pow(2,49),N8=Math.pow(2,56),N9=Math.pow(2,63);module.exports=function(value){return value<N1?1:value<N2?2:value<N3?3:value<N4?4:value<N5?5:value<N6?6:value<N7?7:value<N8?8:value<N9?9:10}},function(module,exports,__webpack_require__){"use strict";function transform(chunk,enc,cb){var i,list=chunk.toString("utf8").split(this.matcher),remaining=list.pop();for(list.length>=1?push(this,this.mapper(this._last+list.shift())):remaining=this._last+remaining,i=0;i<list.length;i++)push(this,this.mapper(list[i]));this._last=remaining,cb()}function flush(cb){this._last&&push(this,this.mapper(this._last)),cb()}function push(self,val){void 0!==val&&self.push(val)}function noop(incoming){return incoming}function split(matcher,mapper,options){"object"!=typeof matcher||matcher instanceof RegExp||(options=matcher,matcher=null),"function"==typeof matcher&&(mapper=matcher,matcher=null),options=options||{};var stream=through(options,transform,flush);return stream._readableState.objectMode=!0,stream._last="",stream.matcher=matcher||/\r?\n/,stream.mapper=mapper||noop,stream}var through=__webpack_require__(284);module.exports=split},function(module,exports){module.exports=Array.isArray||function(arr){return"[object Array]"==Object.prototype.toString.call(arr)}},function(module,exports,__webpack_require__){(function(process){function ReadableState(options,stream){options=options||{};var hwm=options.highWaterMark;this.highWaterMark=hwm||0===hwm?hwm:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!options.objectMode,this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding&&(StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding)}function Readable(options){return this instanceof Readable?(this._readableState=new ReadableState(options,this),this.readable=!0,void Stream.call(this)):new Readable(options)}function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(null===chunk||void 0===chunk)state.reading=!1,state.ended||onEofChunk(stream,state);else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else!state.decoder||addToFront||encoding||(chunk=state.decoder.write(chunk)),state.length+=state.objectMode?1:chunk.length,addToFront?state.buffer.unshift(chunk):(state.reading=!1,state.buffer.push(chunk)),state.needReadable&&emitReadable(stream),maybeReadMore(stream,state);else addToFront||(state.reading=!1);return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||0===state.length)}function roundUpToNextPowerOf2(n){if(n>=MAX_HWM)n=MAX_HWM;else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){return 0===state.length&&state.ended?0:state.objectMode?0===n?0:1:null===n||isNaN(n)?state.flowing&&state.buffer.length?state.buffer[0].length:state.length:n<=0?0:(n>state.highWaterMark&&(state.highWaterMark=roundUpToNextPowerOf2(n)),n>state.length?state.ended?state.length:(state.needReadable=!0,0):n)}function chunkInvalid(state,chunk){var er=null;return Buffer.isBuffer(chunk)||"string"==typeof chunk||null===chunk||void 0===chunk||state.objectMode||(er=new TypeError("Invalid non-string/buffer chunk")),er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&(state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length)}state.ended=!0,state.length>0?emitReadable(stream):endReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=!1,state.emittedReadable||(state.emittedReadable=!0,state.sync?process.nextTick(function(){emitReadable_(stream)}):emitReadable_(stream))}function emitReadable_(stream){stream.emit("readable")}function maybeReadMore(stream,state){state.readingMore||(state.readingMore=!0,process.nextTick(function(){maybeReadMore_(stream,state)}))}function maybeReadMore_(stream,state){for(var len=state.length;!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark&&(stream.read(0),len!==state.length);)len=state.length;state.readingMore=!1}function pipeOnDrain(src){
return function(){var state=src._readableState;state.awaitDrain--,0===state.awaitDrain&&flow(src)}}function flow(src){function write(dest,i,list){var written=dest.write(chunk);!1===written&&state.awaitDrain++}var chunk,state=src._readableState;for(state.awaitDrain=0;state.pipesCount&&null!==(chunk=src.read());)if(1===state.pipesCount?write(state.pipes,0,null):forEach(state.pipes,write),src.emit("data",chunk),state.awaitDrain>0)return;return 0===state.pipesCount?(state.flowing=!1,void(EE.listenerCount(src,"data")>0&&emitDataEvents(src))):void(state.ranOut=!0)}function pipeOnReadable(){this._readableState.ranOut&&(this._readableState.ranOut=!1,flow(this))}function emitDataEvents(stream,startPaused){var state=stream._readableState;if(state.flowing)throw new Error("Cannot switch to old mode now.");var paused=startPaused||!1,readable=!1;stream.readable=!0,stream.pipe=Stream.prototype.pipe,stream.on=stream.addListener=Stream.prototype.on,stream.on("readable",function(){readable=!0;for(var c;!paused&&null!==(c=stream.read());)stream.emit("data",c);null===c&&(readable=!1,stream._readableState.needReadable=!0)}),stream.pause=function(){paused=!0,this.emit("pause")},stream.resume=function(){paused=!1,readable?process.nextTick(function(){stream.emit("readable")}):this.read(0),this.emit("resume")},stream.emit("readable")}function fromList(n,state){var ret,list=state.buffer,length=state.length,stringMode=!!state.decoder,objectMode=!!state.objectMode;if(0===list.length)return null;if(0===length)ret=null;else if(objectMode)ret=list.shift();else if(!n||n>=length)ret=stringMode?list.join(""):Buffer.concat(list,length),list.length=0;else if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n),list[0]=buf.slice(n)}else if(n===list[0].length)ret=list.shift();else{ret=stringMode?"":new Buffer(n);for(var c=0,i=0,l=list.length;i<l&&c<n;i++){var buf=list[0],cpy=Math.min(n-c,buf.length);stringMode?ret+=buf.slice(0,cpy):buf.copy(ret,c,0,cpy),cpy<buf.length?list[0]=buf.slice(cpy):list.shift(),c+=cpy}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw new Error("endReadable called on non-empty stream");!state.endEmitted&&state.calledRead&&(state.ended=!0,process.nextTick(function(){state.endEmitted||0!==state.length||(state.endEmitted=!0,stream.readable=!1,stream.emit("end"))}))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}module.exports=Readable;var isArray=__webpack_require__(279),Buffer=__webpack_require__(0).Buffer;Readable.ReadableState=ReadableState;var EE=__webpack_require__(6).EventEmitter;EE.listenerCount||(EE.listenerCount=function(emitter,type){return emitter.listeners(type).length});var Stream=__webpack_require__(5),util=__webpack_require__(3);util.inherits=__webpack_require__(1);var StringDecoder;util.inherits(Readable,Stream),Readable.prototype.push=function(chunk,encoding){var state=this._readableState;return"string"!=typeof chunk||state.objectMode||(encoding=encoding||state.defaultEncoding,encoding!==state.encoding&&(chunk=new Buffer(chunk,encoding),encoding="")),readableAddChunk(this,state,chunk,encoding,!1)},Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)},Readable.prototype.setEncoding=function(enc){StringDecoder||(StringDecoder=__webpack_require__(7).StringDecoder),this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc};var MAX_HWM=8388608;Readable.prototype.read=function(n){var state=this._readableState;state.calledRead=!0;var ret,nOrig=n;if(("number"!=typeof n||n>0)&&(state.emittedReadable=!1),0===n&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return emitReadable(this),null;if(n=howMuchToRead(n,state),0===n&&state.ended)return ret=null,state.length>0&&state.decoder&&(ret=fromList(n,state),state.length-=ret.length),0===state.length&&endReadable(this),ret;var doRead=state.needReadable;return state.length-n<=state.highWaterMark&&(doRead=!0),(state.ended||state.reading)&&(doRead=!1),doRead&&(state.reading=!0,state.sync=!0,0===state.length&&(state.needReadable=!0),this._read(state.highWaterMark),state.sync=!1),doRead&&!state.reading&&(n=howMuchToRead(nOrig,state)),ret=n>0?fromList(n,state):null,null===ret&&(state.needReadable=!0,n=0),state.length-=n,0!==state.length||state.ended||(state.needReadable=!0),state.ended&&!state.endEmitted&&0===state.length&&endReadable(this),ret},Readable.prototype._read=function(n){this.emit("error",new Error("not implemented"))},Readable.prototype.pipe=function(dest,pipeOpts){function onunpipe(readable){readable===src&&cleanup()}function onend(){dest.end()}function cleanup(){dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),dest._writableState&&!dest._writableState.needDrain||ondrain()}function onerror(er){unpipe(),dest.removeListener("error",onerror),0===EE.listenerCount(dest,"error")&&dest.emit("error",er)}function onclose(){dest.removeListener("finish",onfinish),unpipe()}function onfinish(){dest.removeListener("close",onclose),unpipe()}function unpipe(){src.unpipe(dest)}var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest)}state.pipesCount+=1;var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;state.endEmitted?process.nextTick(endFn):src.once("end",endFn),dest.on("unpipe",onunpipe);var ondrain=pipeOnDrain(src);return dest.on("drain",ondrain),dest._events&&dest._events.error?isArray(dest._events.error)?dest._events.error.unshift(onerror):dest._events.error=[onerror,dest._events.error]:dest.on("error",onerror),dest.once("close",onclose),dest.once("finish",onfinish),dest.emit("pipe",src),state.flowing||(this.on("readable",pipeOnReadable),state.flowing=!0,process.nextTick(function(){flow(src)})),dest},Readable.prototype.unpipe=function(dest){var state=this._readableState;if(0===state.pipesCount)return this;if(1===state.pipesCount)return dest&&dest!==state.pipes?this:(dest||(dest=state.pipes),state.pipes=null,state.pipesCount=0,this.removeListener("readable",pipeOnReadable),state.flowing=!1,dest&&dest.emit("unpipe",this),this);if(!dest){var dests=state.pipes,len=state.pipesCount;state.pipes=null,state.pipesCount=0,this.removeListener("readable",pipeOnReadable),state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);return i===-1?this:(state.pipes.splice(i,1),state.pipesCount-=1,1===state.pipesCount&&(state.pipes=state.pipes[0]),dest.emit("unpipe",this),this)},Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if("data"!==ev||this._readableState.flowing||emitDataEvents(this),"readable"===ev&&this.readable){var state=this._readableState;state.readableListening||(state.readableListening=!0,state.emittedReadable=!1,state.needReadable=!0,state.reading?state.length&&emitReadable(this,state):this.read(0))}return res},Readable.prototype.addListener=Readable.prototype.on,Readable.prototype.resume=function(){emitDataEvents(this),this.read(0),this.emit("resume")},Readable.prototype.pause=function(){emitDataEvents(this,!0),this.emit("pause")},Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self=this;stream.on("end",function(){if(state.decoder&&!state.ended){var chunk=state.decoder.end();chunk&&chunk.length&&self.push(chunk)}self.push(null)}),stream.on("data",function(chunk){if(state.decoder&&(chunk=state.decoder.write(chunk)),(!state.objectMode||null!==chunk&&void 0!==chunk)&&(state.objectMode||chunk&&chunk.length)){var ret=self.push(chunk);ret||(paused=!0,stream.pause())}});for(var i in stream)"function"==typeof stream[i]&&"undefined"==typeof this[i]&&(this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i));var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self.emit.bind(self,ev))}),self._read=function(n){paused&&(paused=!1,stream.resume())},self},Readable._fromList=fromList}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){function TransformState(options,stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",new Error("no writecb in Transform class"));ts.writechunk=null,ts.writecb=null,null!==data&&void 0!==data&&stream.push(data),cb&&cb(er);var rs=stream._readableState;rs.reading=!1,(rs.needReadable||rs.length<rs.highWaterMark)&&stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options);var stream=(this._transformState=new TransformState(options,this),this);this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(er){done(stream,er)}):done(stream)})}function done(stream,er){if(er)return stream.emit("error",er);var ws=stream._writableState,ts=(stream._readableState,stream._transformState);if(ws.length)throw new Error("calling transform done when ws.length != 0");if(ts.transforming)throw new Error("calling transform done when still transforming");return stream.push(null)}module.exports=Transform;var Duplex=__webpack_require__(103),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(Transform,Duplex),Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)},Transform.prototype._transform=function(chunk,encoding,cb){throw new Error("not implemented")},Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)&&this._read(rs.highWaterMark)}},Transform.prototype._read=function(n){var ts=this._transformState;null!==ts.writechunk&&ts.writecb&&!ts.transforming?(ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform)):ts.needTransform=!0}},function(module,exports,__webpack_require__){(function(process){function WriteReq(chunk,encoding,cb){this.chunk=chunk,this.encoding=encoding,this.callback=cb}function WritableState(options,stream){options=options||{};var hwm=options.highWaterMark;this.highWaterMark=hwm||0===hwm?hwm:16384,this.objectMode=!!options.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function Writable(options){var Duplex=__webpack_require__(103);return this instanceof Writable||this instanceof Duplex?(this._writableState=new WritableState(options,this),this.writable=!0,void Stream.call(this)):new Writable(options)}function writeAfterEnd(stream,state,cb){var er=new Error("write after end");stream.emit("error",er),process.nextTick(function(){cb(er)})}function validChunk(stream,state,chunk,cb){var valid=!0;if(!Buffer.isBuffer(chunk)&&"string"!=typeof chunk&&null!==chunk&&void 0!==chunk&&!state.objectMode){var er=new TypeError("Invalid non-string/buffer chunk");stream.emit("error",er),process.nextTick(function(){cb(er)}),valid=!1}return valid}function decodeChunk(state,chunk,encoding){return state.objectMode||state.decodeStrings===!1||"string"!=typeof chunk||(chunk=new Buffer(chunk,encoding)),chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){chunk=decodeChunk(state,chunk,encoding),Buffer.isBuffer(chunk)&&(encoding="buffer");var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;return ret||(state.needDrain=!0),state.writing?state.buffer.push(new WriteReq(chunk,encoding,cb)):doWrite(stream,state,len,chunk,encoding,cb),ret}function doWrite(stream,state,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){sync?process.nextTick(function(){cb(er)}):cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,sync=state.sync,cb=state.writecb;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(stream,state);finished||state.bufferProcessing||!state.buffer.length||clearBuffer(stream,state),sync?process.nextTick(function(){afterWrite(stream,state,finished,cb)}):afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){finished||onwriteDrain(stream,state),cb(),finished&&finishMaybe(stream,state)}function onwriteDrain(stream,state){0===state.length&&state.needDrain&&(state.needDrain=!1,stream.emit("drain"))}function clearBuffer(stream,state){state.bufferProcessing=!0;for(var c=0;c<state.buffer.length;c++){var entry=state.buffer[c],chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,len,chunk,encoding,cb),state.writing){c++;break}}state.bufferProcessing=!1,c<state.buffer.length?state.buffer=state.buffer.slice(c):state.buffer.length=0}function needFinish(stream,state){return state.ending&&0===state.length&&!state.finished&&!state.writing}function finishMaybe(stream,state){var need=needFinish(stream,state);return need&&(state.finished=!0,stream.emit("finish")),need}function endWritable(stream,state,cb){state.ending=!0,finishMaybe(stream,state),cb&&(state.finished?process.nextTick(cb):stream.once("finish",cb)),state.ended=!0}module.exports=Writable;var Buffer=__webpack_require__(0).Buffer;Writable.WritableState=WritableState;var util=__webpack_require__(3);util.inherits=__webpack_require__(1);var Stream=__webpack_require__(5);util.inherits(Writable,Stream),Writable.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;return"function"==typeof encoding&&(cb=encoding,encoding=null),Buffer.isBuffer(chunk)?encoding="buffer":encoding||(encoding=state.defaultEncoding),"function"!=typeof cb&&(cb=function(){}),state.ended?writeAfterEnd(this,state,cb):validChunk(this,state,chunk,cb)&&(ret=writeOrBuffer(this,state,chunk,encoding,cb)),ret},Writable.prototype._write=function(chunk,encoding,cb){cb(new Error("not implemented"))},Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;"function"==typeof chunk?(cb=chunk,chunk=null,encoding=null):"function"==typeof encoding&&(cb=encoding,encoding=null),"undefined"!=typeof chunk&&null!==chunk&&this.write(chunk,encoding),state.ending||state.finished||endWritable(this,state,cb)}}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){module.exports=__webpack_require__(281)},function(module,exports,__webpack_require__){(function(process){function DestroyableTransform(opts){Transform.call(this,opts),this._destroyed=!1}function noop(chunk,enc,callback){callback(null,chunk)}function through2(construct){return function(options,transform,flush){return"function"==typeof options&&(flush=transform,transform=options,options={}),"function"!=typeof transform&&(transform=noop),"function"!=typeof flush&&(flush=null),construct(options,transform,flush)}}var Transform=__webpack_require__(283),inherits=__webpack_require__(12).inherits,xtend=__webpack_require__(31);inherits(DestroyableTransform,Transform),DestroyableTransform.prototype.destroy=function(err){if(!this._destroyed){this._destroyed=!0;var self=this;process.nextTick(function(){err&&self.emit("error",err),self.emit("close")})}},module.exports=through2(function(options,transform,flush){var t2=new DestroyableTransform(options);return t2._transform=transform,flush&&(t2._flush=flush),t2}),module.exports.ctor=through2(function(options,transform,flush){function Through2(override){return this instanceof Through2?(this.options=xtend(options,override),void DestroyableTransform.call(this,this.options)):new Through2(override)}return inherits(Through2,DestroyableTransform),Through2.prototype._transform=transform,flush&&(Through2.prototype._flush=flush),Through2}),module.exports.obj=through2(function(options,transform,flush){var t2=new DestroyableTransform(xtend({objectMode:!0,highWaterMark:16},options));return t2._transform=transform,flush&&(t2._flush=flush),t2})}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){!function(){function exec(arr,comp){"function"!=typeof comp&&(comp=function(a,b){return String(a).localeCompare(b)});var len=arr.length;if(len<=1)return arr;for(var buffer=new Array(len),chk=1;chk<len;chk*=2){pass(arr,comp,chk,buffer);var tmp=arr;arr=buffer,buffer=tmp}return arr}var stable=function(arr,comp){return exec(arr.slice(),comp)};stable.inplace=function(arr,comp){var result=exec(arr,comp);return result!==arr&&pass(result,null,arr.length,arr),arr};var pass=function(arr,comp,chk,result){var l,r,e,li,ri,len=arr.length,i=0,dbl=2*chk;for(l=0;l<len;l+=dbl)for(r=l+chk,e=r+chk,r>len&&(r=len),e>len&&(e=len),li=l,ri=r;;)if(li<r&&ri<e)comp(arr[li],arr[ri])<=0?result[i++]=arr[li++]:result[i++]=arr[ri++];else if(li<r)result[i++]=arr[li++];else{if(!(ri<e))break;result[i++]=arr[ri++]}};module.exports=stable}()},function(module,exports,__webpack_require__){module.exports=__webpack_require__(15)},function(module,exports,__webpack_require__){"use strict";function BufferList(){this.head=null,this.tail=null,this.length=0}var bufferShim=(__webpack_require__(0).Buffer,__webpack_require__(11));module.exports=BufferList,BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length},BufferList.prototype.shift=function(){if(0!==this.length){var ret=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(0===this.length)return bufferShim.alloc(0);if(1===this.length)return this.head.data;for(var ret=bufferShim.allocUnsafe(n>>>0),p=this.head,i=0;p;)p.data.copy(ret,i),i+=p.data.length,p=p.next;return ret}},function(module,exports,__webpack_require__){module.exports=__webpack_require__(104)},function(module,exports,__webpack_require__){(function(process){var Stream=function(){try{return __webpack_require__(5)}catch(_){}}();exports=module.exports=__webpack_require__(105),exports.Stream=Stream||exports,exports.Readable=exports,exports.Writable=__webpack_require__(60),exports.Duplex=__webpack_require__(15),exports.Transform=__webpack_require__(59),exports.PassThrough=__webpack_require__(104),!process.browser&&"disable"===process.env.READABLE_STREAM&&Stream&&(module.exports=Stream)}).call(exports,__webpack_require__(2))},function(module,exports,__webpack_require__){module.exports=__webpack_require__(59)},function(module,exports,__webpack_require__){module.exports=__webpack_require__(60)},function(module,exports,__webpack_require__){(function(Buffer,global,process){function decideMode(preferBinary,useFetch){return capability.fetch&&useFetch?"fetch":capability.mozchunkedarraybuffer?"moz-chunked-arraybuffer":capability.msstream?"ms-stream":capability.arraybuffer&&preferBinary?"arraybuffer":capability.vbArray&&preferBinary?"text:vbarray":"text"}function statusValid(xhr){try{var status=xhr.status;return null!==status&&0!==status}catch(e){return!1}}var capability=__webpack_require__(107),inherits=__webpack_require__(1),response=__webpack_require__(293),stream=__webpack_require__(111),toArrayBuffer=__webpack_require__(302),IncomingMessage=response.IncomingMessage,rStates=response.readyStates,ClientRequest=module.exports=function(opts){var self=this;stream.Writable.call(self),self._opts=opts,self._body=[],self._headers={},opts.auth&&self.setHeader("Authorization","Basic "+new Buffer(opts.auth).toString("base64")),Object.keys(opts.headers).forEach(function(name){self.setHeader(name,opts.headers[name])});var preferBinary,useFetch=!0;if("disable-fetch"===opts.mode)useFetch=!1,preferBinary=!0;else if("prefer-streaming"===opts.mode)preferBinary=!1;else if("allow-wrong-content-type"===opts.mode)preferBinary=!capability.overrideMimeType;else{if(opts.mode&&"default"!==opts.mode&&"prefer-fast"!==opts.mode)throw new Error("Invalid value for opts.mode");preferBinary=!0}self._mode=decideMode(preferBinary,useFetch),self.on("finish",function(){self._onFinish()})};inherits(ClientRequest,stream.Writable),ClientRequest.prototype.setHeader=function(name,value){var self=this,lowerName=name.toLowerCase();unsafeHeaders.indexOf(lowerName)===-1&&(self._headers[lowerName]={name:name,value:value})},ClientRequest.prototype.getHeader=function(name){var self=this;return self._headers[name.toLowerCase()].value},ClientRequest.prototype.removeHeader=function(name){var self=this;delete self._headers[name.toLowerCase()]},ClientRequest.prototype._onFinish=function(){var self=this;if(!self._destroyed){var body,opts=self._opts,headersObj=self._headers;if("POST"!==opts.method&&"PUT"!==opts.method&&"PATCH"!==opts.method&&"MERGE"!==opts.method||(body=capability.blobConstructor?new global.Blob(self._body.map(function(buffer){return toArrayBuffer(buffer)}),{type:(headersObj["content-type"]||{}).value||""}):Buffer.concat(self._body).toString()),"fetch"===self._mode){var headers=Object.keys(headersObj).map(function(name){return[headersObj[name].name,headersObj[name].value]});global.fetch(self._opts.url,{method:self._opts.method,headers:headers,body:body,mode:"cors",credentials:opts.withCredentials?"include":"same-origin"}).then(function(response){self._fetchResponse=response,self._connect()},function(reason){self.emit("error",reason)})}else{var xhr=self._xhr=new global.XMLHttpRequest;try{xhr.open(self._opts.method,self._opts.url,!0)}catch(err){return void process.nextTick(function(){self.emit("error",err)})}"responseType"in xhr&&(xhr.responseType=self._mode.split(":")[0]),"withCredentials"in xhr&&(xhr.withCredentials=!!opts.withCredentials),"text"===self._mode&&"overrideMimeType"in xhr&&xhr.overrideMimeType("text/plain; charset=x-user-defined"),Object.keys(headersObj).forEach(function(name){xhr.setRequestHeader(headersObj[name].name,headersObj[name].value)}),self._response=null,xhr.onreadystatechange=function(){switch(xhr.readyState){case rStates.LOADING:case rStates.DONE:self._onXHRProgress()}},"moz-chunked-arraybuffer"===self._mode&&(xhr.onprogress=function(){self._onXHRProgress()}),xhr.onerror=function(){self._destroyed||self.emit("error",new Error("XHR error"))};try{xhr.send(body)}catch(err){return void process.nextTick(function(){self.emit("error",err)})}}}},ClientRequest.prototype._onXHRProgress=function(){var self=this;statusValid(self._xhr)&&!self._destroyed&&(self._response||self._connect(),self._response._onXHRProgress())},ClientRequest.prototype._connect=function(){var self=this;self._destroyed||(self._response=new IncomingMessage(self._xhr,self._fetchResponse,self._mode),self.emit("response",self._response))},ClientRequest.prototype._write=function(chunk,encoding,cb){var self=this;self._body.push(chunk),cb()},ClientRequest.prototype.abort=ClientRequest.prototype.destroy=function(){var self=this;self._destroyed=!0,self._response&&(self._response._destroyed=!0),self._xhr&&self._xhr.abort()},ClientRequest.prototype.end=function(data,encoding,cb){var self=this;"function"==typeof data&&(cb=data,data=void 0),stream.Writable.prototype.end.call(self,data,encoding,cb)},ClientRequest.prototype.flushHeaders=function(){},ClientRequest.prototype.setTimeout=function(){},ClientRequest.prototype.setNoDelay=function(){},ClientRequest.prototype.setSocketKeepAlive=function(){};var unsafeHeaders=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(exports,__webpack_require__(0).Buffer,__webpack_require__(8),__webpack_require__(2))},function(module,exports,__webpack_require__){(function(process,Buffer,global){var capability=__webpack_require__(107),inherits=__webpack_require__(1),stream=__webpack_require__(111),rStates=exports.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},IncomingMessage=exports.IncomingMessage=function(xhr,response,mode){function read(){reader.read().then(function(result){if(!self._destroyed){if(result.done)return void self.push(null);self.push(new Buffer(result.value)),read()}})}var self=this;if(stream.Readable.call(self),self._mode=mode,self.headers={},self.rawHeaders=[],self.trailers={},self.rawTrailers=[],self.on("end",function(){process.nextTick(function(){self.emit("close")})}),"fetch"===mode){self._fetchResponse=response,self.url=response.url,self.statusCode=response.status,self.statusMessage=response.statusText,response.headers.forEach(function(header,key){self.headers[key.toLowerCase()]=header,self.rawHeaders.push(key,header)});var reader=response.body.getReader();read()}else{self._xhr=xhr,self._pos=0,self.url=xhr.responseURL,self.statusCode=xhr.status,self.statusMessage=xhr.statusText;var headers=xhr.getAllResponseHeaders().split(/\r?\n/);if(headers.forEach(function(header){var matches=header.match(/^([^:]+):\s*(.*)/);if(matches){var key=matches[1].toLowerCase();"set-cookie"===key?(void 0===self.headers[key]&&(self.headers[key]=[]),self.headers[key].push(matches[2])):void 0!==self.headers[key]?self.headers[key]+=", "+matches[2]:self.headers[key]=matches[2],self.rawHeaders.push(matches[1],matches[2])}}),self._charset="x-user-defined",!capability.overrideMimeType){var mimeType=self.rawHeaders["mime-type"];if(mimeType){var charsetMatch=mimeType.match(/;\s*charset=([^;])(;|$)/);charsetMatch&&(self._charset=charsetMatch[1].toLowerCase())}self._charset||(self._charset="utf-8")}}};inherits(IncomingMessage,stream.Readable),IncomingMessage.prototype._read=function(){},IncomingMessage.prototype._onXHRProgress=function(){var self=this,xhr=self._xhr,response=null;switch(self._mode){case"text:vbarray":if(xhr.readyState!==rStates.DONE)break;try{response=new global.VBArray(xhr.responseBody).toArray()}catch(e){}if(null!==response){self.push(new Buffer(response));break}case"text":try{response=xhr.responseText}catch(e){self._mode="text:vbarray";break}if(response.length>self._pos){var newData=response.substr(self._pos);if("x-user-defined"===self._charset){for(var buffer=new Buffer(newData.length),i=0;i<newData.length;i++)buffer[i]=255&newData.charCodeAt(i);self.push(buffer)}else self.push(newData,self._charset);self._pos=response.length}break;case"arraybuffer":if(xhr.readyState!==rStates.DONE||!xhr.response)break;response=xhr.response,self.push(new Buffer(new Uint8Array(response)));break;case"moz-chunked-arraybuffer":if(response=xhr.response,xhr.readyState!==rStates.LOADING||!response)break;self.push(new Buffer(new Uint8Array(response)));break;case"ms-stream":if(response=xhr.response,xhr.readyState!==rStates.LOADING)break;var reader=new global.MSStreamReader;reader.onprogress=function(){reader.result.byteLength>self._pos&&(self.push(new Buffer(new Uint8Array(reader.result.slice(self._pos)))),self._pos=reader.result.byteLength)},reader.onload=function(){self.push(null)},reader.readAsArrayBuffer(response)}self._xhr.readyState===rStates.DONE&&"ms-stream"!==self._mode&&self.push(null)}}).call(exports,__webpack_require__(2),__webpack_require__(0).Buffer,__webpack_require__(8))},function(module,exports,__webpack_require__){"use strict";function PassThrough(options){return this instanceof PassThrough?void Transform.call(this,options):new PassThrough(options)}module.exports=PassThrough;var Transform=__webpack_require__(109),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},function(module,exports,__webpack_require__){"use strict";function BufferList(){this.head=null,this.tail=null,this.length=0}var bufferShim=(__webpack_require__(0).Buffer,__webpack_require__(11));module.exports=BufferList,BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length},BufferList.prototype.shift=function(){if(0!==this.length){var ret=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(0===this.length)return bufferShim.alloc(0);if(1===this.length)return this.head.data;for(var ret=bufferShim.allocUnsafe(n>>>0),p=this.head,i=0;p;)p.data.copy(ret,i),i+=p.data.length,p=p.next;return ret}},function(module,exports,__webpack_require__){"use strict";(function(Buffer){var util=__webpack_require__(12),stream=__webpack_require__(5);module.exports.createReadStream=function(object,options){return new MultiStream(object,options)};var MultiStream=function(object,options){object instanceof Buffer||"string"==typeof object?(options=options||{},stream.Readable.call(this,{highWaterMark:options.highWaterMark,encoding:options.encoding})):stream.Readable.call(this,{objectMode:!0}),this._object=object};util.inherits(MultiStream,stream.Readable),MultiStream.prototype._read=function(){this.push(this._object),this._object=null}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){var util=__webpack_require__(12),bl=__webpack_require__(47),xtend=__webpack_require__(31),headers=__webpack_require__(112),Writable=__webpack_require__(43).Writable,PassThrough=__webpack_require__(43).PassThrough,noop=function(){},overflow=function(size){return size&=511,size&&512-size},emptyStream=function(self,offset){var s=new Source(self,offset);return s.end(),s},mixinPax=function(header,pax){return pax.path&&(header.name=pax.path),pax.linkpath&&(header.linkname=pax.linkpath),header.pax=pax,header},Source=function(self,offset){this._parent=self,this.offset=offset,PassThrough.call(this)};util.inherits(Source,PassThrough),Source.prototype.destroy=function(err){this._parent.destroy(err)};var Extract=function(opts){if(!(this instanceof Extract))return new Extract(opts);Writable.call(this,opts),this._offset=0,this._buffer=bl(),this._missing=0,this._onparse=noop,this._header=null,
this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var self=this,b=self._buffer,oncontinue=function(){self._continue()},onunlock=function(err){return self._locked=!1,err?self.destroy(err):void(self._stream||oncontinue())},onstreamend=function(){self._stream=null;var drain=overflow(self._header.size);drain?self._parse(drain,ondrain):self._parse(512,onheader),self._locked||oncontinue()},ondrain=function(){self._buffer.consume(overflow(self._header.size)),self._parse(512,onheader),oncontinue()},onpaxglobalheader=function(){var size=self._header.size;self._paxGlobal=headers.decodePax(b.slice(0,size)),b.consume(size),onstreamend()},onpaxheader=function(){var size=self._header.size;self._pax=headers.decodePax(b.slice(0,size)),self._paxGlobal&&(self._pax=xtend(self._paxGlobal,self._pax)),b.consume(size),onstreamend()},ongnulongpath=function(){var size=self._header.size;this._gnuLongPath=headers.decodeLongPath(b.slice(0,size)),b.consume(size),onstreamend()},ongnulonglinkpath=function(){var size=self._header.size;this._gnuLongLinkPath=headers.decodeLongPath(b.slice(0,size)),b.consume(size),onstreamend()},onheader=function(){var header,offset=self._offset;try{header=self._header=headers.decode(b.slice(0,512))}catch(err){self.emit("error",err)}return b.consume(512),header?"gnu-long-path"===header.type?(self._parse(header.size,ongnulongpath),void oncontinue()):"gnu-long-link-path"===header.type?(self._parse(header.size,ongnulonglinkpath),void oncontinue()):"pax-global-header"===header.type?(self._parse(header.size,onpaxglobalheader),void oncontinue()):"pax-header"===header.type?(self._parse(header.size,onpaxheader),void oncontinue()):(self._gnuLongPath&&(header.name=self._gnuLongPath,self._gnuLongPath=null),self._gnuLongLinkPath&&(header.linkname=self._gnuLongLinkPath,self._gnuLongLinkPath=null),self._pax&&(self._header=header=mixinPax(header,self._pax),self._pax=null),self._locked=!0,header.size?(self._stream=new Source(self,offset),self.emit("entry",header,self._stream,onunlock),self._parse(header.size,onstreamend),void oncontinue()):(self._parse(512,onheader),void self.emit("entry",header,emptyStream(self,offset),onunlock))):(self._parse(512,onheader),void oncontinue())};this._parse(512,onheader)};util.inherits(Extract,Writable),Extract.prototype.destroy=function(err){this._destroyed||(this._destroyed=!0,err&&this.emit("error",err),this.emit("close"),this._stream&&this._stream.emit("close"))},Extract.prototype._parse=function(size,onparse){this._destroyed||(this._offset+=size,this._missing=size,this._onparse=onparse)},Extract.prototype._continue=function(){if(!this._destroyed){var cb=this._cb;this._cb=noop,this._overflow?this._write(this._overflow,void 0,cb):cb()}},Extract.prototype._write=function(data,enc,cb){if(!this._destroyed){var s=this._stream,b=this._buffer,missing=this._missing;if(data.length<missing)return this._missing-=data.length,this._overflow=null,s?s.write(data,cb):(b.append(data),cb());this._cb=cb,this._missing=0;var overflow=null;data.length>missing&&(overflow=data.slice(missing),data=data.slice(0,missing)),s?s.end(data):b.append(data),this._overflow=overflow,this._onparse()}},module.exports=Extract},function(module,exports,__webpack_require__){exports.extract=__webpack_require__(297),exports.pack=__webpack_require__(301)},function(module,exports,__webpack_require__){"use strict";function PassThrough(options){return this instanceof PassThrough?void Transform.call(this,options):new PassThrough(options)}module.exports=PassThrough;var Transform=__webpack_require__(114),util=__webpack_require__(3);util.inherits=__webpack_require__(1),util.inherits(PassThrough,Transform),PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}},function(module,exports,__webpack_require__){"use strict";function BufferList(){this.head=null,this.tail=null,this.length=0}var bufferShim=(__webpack_require__(0).Buffer,__webpack_require__(11));module.exports=BufferList,BufferList.prototype.push=function(v){var entry={data:v,next:null};this.length>0?this.tail.next=entry:this.head=entry,this.tail=entry,++this.length},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};0===this.length&&(this.tail=entry),this.head=entry,++this.length},BufferList.prototype.shift=function(){if(0!==this.length){var ret=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,ret}},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(s){if(0===this.length)return"";for(var p=this.head,ret=""+p.data;p=p.next;)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(0===this.length)return bufferShim.alloc(0);if(1===this.length)return this.head.data;for(var ret=bufferShim.allocUnsafe(n>>>0),p=this.head,i=0;p;)p.data.copy(ret,i),i+=p.data.length,p=p.next;return ret}},function(module,exports,__webpack_require__){(function(Buffer,process){function modeToType(mode){switch(mode&constants.S_IFMT){case constants.S_IFBLK:return"block-device";case constants.S_IFCHR:return"character-device";case constants.S_IFDIR:return"directory";case constants.S_IFIFO:return"fifo";case constants.S_IFLNK:return"symlink"}return"file"}var constants=__webpack_require__(183),eos=__webpack_require__(162),util=__webpack_require__(12),Readable=__webpack_require__(43).Readable,Writable=__webpack_require__(43).Writable,StringDecoder=__webpack_require__(7).StringDecoder,headers=__webpack_require__(112),DMODE=parseInt("755",8),FMODE=parseInt("644",8),END_OF_TAR=new Buffer(1024);END_OF_TAR.fill(0);var noop=function(){},overflow=function(self,size){size&=511,size&&self.push(END_OF_TAR.slice(0,512-size))},Sink=function(to){Writable.call(this),this.written=0,this._to=to,this._destroyed=!1};util.inherits(Sink,Writable),Sink.prototype._write=function(data,enc,cb){return this.written+=data.length,this._to.push(data)?cb():void(this._to._drain=cb)},Sink.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var LinkSink=function(){Writable.call(this),this.linkname="",this._decoder=new StringDecoder("utf-8"),this._destroyed=!1};util.inherits(LinkSink,Writable),LinkSink.prototype._write=function(data,enc,cb){this.linkname+=this._decoder.write(data),cb()},LinkSink.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Void=function(){Writable.call(this),this._destroyed=!1};util.inherits(Void,Writable),Void.prototype._write=function(data,enc,cb){cb(new Error("No body allowed for this entry"))},Void.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var Pack=function(opts){return this instanceof Pack?(Readable.call(this,opts),this._drain=noop,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,void(this._stream=null)):new Pack(opts)};util.inherits(Pack,Readable),Pack.prototype.entry=function(header,buffer,callback){if(this._stream)throw new Error("already piping an entry");if(!this._finalized&&!this._destroyed){"function"==typeof buffer&&(callback=buffer,buffer=null),callback||(callback=noop);var self=this;if(header.size&&"symlink"!==header.type||(header.size=0),header.type||(header.type=modeToType(header.mode)),header.mode||(header.mode="directory"===header.type?DMODE:FMODE),header.uid||(header.uid=0),header.gid||(header.gid=0),header.mtime||(header.mtime=new Date),"string"==typeof buffer&&(buffer=new Buffer(buffer)),Buffer.isBuffer(buffer))return header.size=buffer.length,this._encode(header),this.push(buffer),overflow(self,header.size),process.nextTick(callback),new Void;if("symlink"===header.type&&!header.linkname){var linkSink=new LinkSink;return eos(linkSink,function(err){return err?(self.destroy(),callback(err)):(header.linkname=linkSink.linkname,self._encode(header),void callback())}),linkSink}if(this._encode(header),"file"!==header.type&&"contiguous-file"!==header.type)return process.nextTick(callback),new Void;var sink=new Sink(this);return this._stream=sink,eos(sink,function(err){return self._stream=null,err?(self.destroy(),callback(err)):sink.written!==header.size?(self.destroy(),callback(new Error("size mismatch"))):(overflow(self,header.size),self._finalizing&&self.finalize(),void callback())}),sink}},Pack.prototype.finalize=function(){return this._stream?void(this._finalizing=!0):void(this._finalized||(this._finalized=!0,this.push(END_OF_TAR),this.push(null)))},Pack.prototype.destroy=function(err){this._destroyed||(this._destroyed=!0,err&&this.emit("error",err),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())},Pack.prototype._encode=function(header){if(!header.pax){var buf=headers.encode(header);if(buf)return void this.push(buf)}this._encodePax(header)},Pack.prototype._encodePax=function(header){var paxHeader=headers.encodePax({name:header.name,linkname:header.linkname,pax:header.pax}),newHeader={name:"PaxHeader",mode:header.mode,uid:header.uid,gid:header.gid,size:paxHeader.length,mtime:header.mtime,type:"pax-header",linkname:header.linkname&&"PaxHeader",uname:header.uname,gname:header.gname,devmajor:header.devmajor,devminor:header.devminor};this.push(headers.encode(newHeader)),this.push(paxHeader),overflow(this,paxHeader.length),newHeader.size=header.size,newHeader.type=header.type,this.push(headers.encode(newHeader))},Pack.prototype._read=function(n){var drain=this._drain;this._drain=noop,drain()},module.exports=Pack}).call(exports,__webpack_require__(0).Buffer,__webpack_require__(2))},function(module,exports,__webpack_require__){var Buffer=__webpack_require__(0).Buffer;module.exports=function(buf){if(buf instanceof Uint8Array){if(0===buf.byteOffset&&buf.byteLength===buf.buffer.byteLength)return buf.buffer;if("function"==typeof buf.buffer.slice)return buf.buffer.slice(buf.byteOffset,buf.byteOffset+buf.byteLength)}if(Buffer.isBuffer(buf)){for(var arrayCopy=new Uint8Array(buf.length),len=buf.length,i=0;i<len;i++)arrayCopy[i]=buf[i];return arrayCopy.buffer}throw new Error("Argument must be a Buffer")}},function(module,exports){function configureProperties(obj){if(getOwnPropNames&&defineProp){var i,props=getOwnPropNames(obj);for(i=0;i<props.length;i+=1)defineProp(obj,props[i],{value:obj[props[i]],writable:!1,enumerable:!1,configurable:!1})}}function makeArrayAccessors(obj){function makeArrayAccessor(index){defineProp(obj,index,{get:function(){return obj._getter(index)},set:function(v){obj._setter(index,v)},enumerable:!0,configurable:!1})}if(defineProp){if(obj.length>MAX_ARRAY_LENGTH)throw new RangeError("Array too large for polyfill");var i;for(i=0;i<obj.length;i+=1)makeArrayAccessor(i)}}function as_signed(value,bits){var s=32-bits;return value<<s>>s}function as_unsigned(value,bits){var s=32-bits;return value<<s>>>s}function packI8(n){return[255&n]}function unpackI8(bytes){return as_signed(bytes[0],8)}function packU8(n){return[255&n]}function unpackU8(bytes){return as_unsigned(bytes[0],8)}function packU8Clamped(n){return n=round(Number(n)),[n<0?0:n>255?255:255&n]}function packI16(n){return[n>>8&255,255&n]}function unpackI16(bytes){return as_signed(bytes[0]<<8|bytes[1],16)}function packU16(n){return[n>>8&255,255&n]}function unpackU16(bytes){return as_unsigned(bytes[0]<<8|bytes[1],16)}function packI32(n){return[n>>24&255,n>>16&255,n>>8&255,255&n]}function unpackI32(bytes){return as_signed(bytes[0]<<24|bytes[1]<<16|bytes[2]<<8|bytes[3],32)}function packU32(n){return[n>>24&255,n>>16&255,n>>8&255,255&n]}function unpackU32(bytes){return as_unsigned(bytes[0]<<24|bytes[1]<<16|bytes[2]<<8|bytes[3],32)}function packIEEE754(v,ebits,fbits){function roundToEven(n){var w=floor(n),f=n-w;return f<.5?w:f>.5?w+1:w%2?w+1:w}var s,e,f,i,bits,str,bytes,bias=(1<<ebits-1)-1;for(v!==v?(e=(1<<ebits)-1,f=pow(2,fbits-1),s=0):v===1/0||v===-(1/0)?(e=(1<<ebits)-1,f=0,s=v<0?1:0):0===v?(e=0,f=0,s=1/v===-(1/0)?1:0):(s=v<0,v=abs(v),v>=pow(2,1-bias)?(e=min(floor(log(v)/LN2),1023),f=roundToEven(v/pow(2,e)*pow(2,fbits)),f/pow(2,fbits)>=2&&(e+=1,f=1),e>bias?(e=(1<<ebits)-1,f=0):(e+=bias,f-=pow(2,fbits))):(e=0,f=roundToEven(v/pow(2,1-bias-fbits)))),bits=[],i=fbits;i;i-=1)bits.push(f%2?1:0),f=floor(f/2);for(i=ebits;i;i-=1)bits.push(e%2?1:0),e=floor(e/2);for(bits.push(s?1:0),bits.reverse(),str=bits.join(""),bytes=[];str.length;)bytes.push(parseInt(str.substring(0,8),2)),str=str.substring(8);return bytes}function unpackIEEE754(bytes,ebits,fbits){var i,j,b,str,bias,s,e,f,bits=[];for(i=bytes.length;i;i-=1)for(b=bytes[i-1],j=8;j;j-=1)bits.push(b%2?1:0),b>>=1;return bits.reverse(),str=bits.join(""),bias=(1<<ebits-1)-1,s=parseInt(str.substring(0,1),2)?-1:1,e=parseInt(str.substring(1,1+ebits),2),f=parseInt(str.substring(1+ebits),2),e===(1<<ebits)-1?0!==f?NaN:s*(1/0):e>0?s*pow(2,e-bias)*(1+f/pow(2,fbits)):0!==f?s*pow(2,-(bias-1))*(f/pow(2,fbits)):s<0?-0:0}function unpackF64(b){return unpackIEEE754(b,11,52)}function packF64(v){return packIEEE754(v,11,52)}function unpackF32(b){return unpackIEEE754(b,8,23)}function packF32(v){return packIEEE754(v,8,23)}var defineProp,undefined=void 0,MAX_ARRAY_LENGTH=1e5,ECMAScript=function(){var opts=Object.prototype.toString,ophop=Object.prototype.hasOwnProperty;return{Class:function(v){return opts.call(v).replace(/^\[object *|\]$/g,"")},HasProperty:function(o,p){return p in o},HasOwnProperty:function(o,p){return ophop.call(o,p)},IsCallable:function(o){return"function"==typeof o},ToInt32:function(v){return v>>0},ToUint32:function(v){return v>>>0}}}(),LN2=Math.LN2,abs=Math.abs,floor=Math.floor,log=Math.log,min=Math.min,pow=Math.pow,round=Math.round;defineProp=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}()?Object.defineProperty:function(o,p,desc){if(!o===Object(o))throw new TypeError("Object.defineProperty called on non-object");return ECMAScript.HasProperty(desc,"get")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(o,p,desc.get),ECMAScript.HasProperty(desc,"set")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(o,p,desc.set),ECMAScript.HasProperty(desc,"value")&&(o[p]=desc.value),o};var getOwnPropNames=Object.getOwnPropertyNames||function(o){if(o!==Object(o))throw new TypeError("Object.getOwnPropertyNames called on non-object");var p,props=[];for(p in o)ECMAScript.HasOwnProperty(o,p)&&props.push(p);return props};!function(){function makeConstructor(bytesPerElement,pack,unpack){var ctor;return ctor=function(buffer,byteOffset,length){var array,sequence,i,s;if(arguments.length&&"number"!=typeof arguments[0])if("object"==typeof arguments[0]&&arguments[0].constructor===ctor)for(array=arguments[0],this.length=array.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new ArrayBuffer(this.byteLength),this.byteOffset=0,i=0;i<this.length;i+=1)this._setter(i,array._getter(i));else if("object"!=typeof arguments[0]||(arguments[0]instanceof ArrayBuffer||"ArrayBuffer"===ECMAScript.Class(arguments[0]))){if("object"!=typeof arguments[0]||!(arguments[0]instanceof ArrayBuffer||"ArrayBuffer"===ECMAScript.Class(arguments[0])))throw new TypeError("Unexpected argument type(s)");if(this.buffer=buffer,this.byteOffset=ECMAScript.ToUint32(byteOffset),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=ECMAScript.ToUint32(length),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer")}else for(sequence=arguments[0],this.length=ECMAScript.ToUint32(sequence.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new ArrayBuffer(this.byteLength),this.byteOffset=0,i=0;i<this.length;i+=1)s=sequence[i],this._setter(i,Number(s));else{if(this.length=ECMAScript.ToInt32(arguments[0]),length<0)throw new RangeError("ArrayBufferView size is not a small enough positive integer");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new ArrayBuffer(this.byteLength),this.byteOffset=0}this.constructor=ctor,configureProperties(this),makeArrayAccessors(this)},ctor.prototype=new ArrayBufferView,ctor.prototype.BYTES_PER_ELEMENT=bytesPerElement,ctor.prototype._pack=pack,ctor.prototype._unpack=unpack,ctor.BYTES_PER_ELEMENT=bytesPerElement,ctor.prototype._getter=function(index){if(arguments.length<1)throw new SyntaxError("Not enough arguments");if(index=ECMAScript.ToUint32(index),index>=this.length)return undefined;var i,o,bytes=[];for(i=0,o=this.byteOffset+index*this.BYTES_PER_ELEMENT;i<this.BYTES_PER_ELEMENT;i+=1,o+=1)bytes.push(this.buffer._bytes[o]);return this._unpack(bytes)},ctor.prototype.get=ctor.prototype._getter,ctor.prototype._setter=function(index,value){if(arguments.length<2)throw new SyntaxError("Not enough arguments");if(index=ECMAScript.ToUint32(index),index>=this.length)return undefined;var i,o,bytes=this._pack(value);for(i=0,o=this.byteOffset+index*this.BYTES_PER_ELEMENT;i<this.BYTES_PER_ELEMENT;i+=1,o+=1)this.buffer._bytes[o]=bytes[i]},ctor.prototype.set=function(index,value){if(arguments.length<1)throw new SyntaxError("Not enough arguments");var array,sequence,offset,len,i,s,d,byteOffset,byteLength,tmp;if("object"==typeof arguments[0]&&arguments[0].constructor===this.constructor){if(array=arguments[0],offset=ECMAScript.ToUint32(arguments[1]),offset+array.length>this.length)throw new RangeError("Offset plus length of array is out of range");if(byteOffset=this.byteOffset+offset*this.BYTES_PER_ELEMENT,byteLength=array.length*this.BYTES_PER_ELEMENT,array.buffer===this.buffer){for(tmp=[],i=0,s=array.byteOffset;i<byteLength;i+=1,s+=1)tmp[i]=array.buffer._bytes[s];for(i=0,d=byteOffset;i<byteLength;i+=1,d+=1)this.buffer._bytes[d]=tmp[i]}else for(i=0,s=array.byteOffset,d=byteOffset;i<byteLength;i+=1,s+=1,d+=1)this.buffer._bytes[d]=array.buffer._bytes[s]}else{if("object"!=typeof arguments[0]||"undefined"==typeof arguments[0].length)throw new TypeError("Unexpected argument type(s)");if(sequence=arguments[0],len=ECMAScript.ToUint32(sequence.length),offset=ECMAScript.ToUint32(arguments[1]),offset+len>this.length)throw new RangeError("Offset plus length of array is out of range");for(i=0;i<len;i+=1)s=sequence[i],this._setter(offset+i,Number(s))}},ctor.prototype.subarray=function(start,end){function clamp(v,min,max){return v<min?min:v>max?max:v}start=ECMAScript.ToInt32(start),end=ECMAScript.ToInt32(end),arguments.length<1&&(start=0),arguments.length<2&&(end=this.length),start<0&&(start=this.length+start),end<0&&(end=this.length+end),start=clamp(start,0,this.length),end=clamp(end,0,this.length);var len=end-start;return len<0&&(len=0),new this.constructor(this.buffer,this.byteOffset+start*this.BYTES_PER_ELEMENT,len)},ctor}var ArrayBuffer=function(length){if(length=ECMAScript.ToInt32(length),length<0)throw new RangeError("ArrayBuffer size is not a small enough positive integer");this.byteLength=length,this._bytes=[],this._bytes.length=length;var i;for(i=0;i<this.byteLength;i+=1)this._bytes[i]=0;configureProperties(this)};exports.ArrayBuffer=exports.ArrayBuffer||ArrayBuffer;var ArrayBufferView=function(){},Int8Array=makeConstructor(1,packI8,unpackI8),Uint8Array=makeConstructor(1,packU8,unpackU8),Uint8ClampedArray=makeConstructor(1,packU8Clamped,unpackU8),Int16Array=makeConstructor(2,packI16,unpackI16),Uint16Array=makeConstructor(2,packU16,unpackU16),Int32Array=makeConstructor(4,packI32,unpackI32),Uint32Array=makeConstructor(4,packU32,unpackU32),Float32Array=makeConstructor(4,packF32,unpackF32),Float64Array=makeConstructor(8,packF64,unpackF64);exports.Int8Array=exports.Int8Array||Int8Array,exports.Uint8Array=exports.Uint8Array||Uint8Array,exports.Uint8ClampedArray=exports.Uint8ClampedArray||Uint8ClampedArray,exports.Int16Array=exports.Int16Array||Int16Array,exports.Uint16Array=exports.Uint16Array||Uint16Array,exports.Int32Array=exports.Int32Array||Int32Array,exports.Uint32Array=exports.Uint32Array||Uint32Array,exports.Float32Array=exports.Float32Array||Float32Array,exports.Float64Array=exports.Float64Array||Float64Array}(),function(){function r(array,index){return ECMAScript.IsCallable(array.get)?array.get(index):array[index]}function makeGetter(arrayType){return function(byteOffset,littleEndian){if(byteOffset=ECMAScript.ToUint32(byteOffset),byteOffset+arrayType.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");byteOffset+=this.byteOffset;var i,uint8Array=new exports.Uint8Array(this.buffer,byteOffset,arrayType.BYTES_PER_ELEMENT),bytes=[];for(i=0;i<arrayType.BYTES_PER_ELEMENT;i+=1)bytes.push(r(uint8Array,i));return Boolean(littleEndian)===Boolean(IS_BIG_ENDIAN)&&bytes.reverse(),r(new arrayType(new exports.Uint8Array(bytes).buffer),0)}}function makeSetter(arrayType){return function(byteOffset,value,littleEndian){if(byteOffset=ECMAScript.ToUint32(byteOffset),byteOffset+arrayType.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError("Array index out of range");var i,byteView,typeArray=new arrayType([value]),byteArray=new exports.Uint8Array(typeArray.buffer),bytes=[];for(i=0;i<arrayType.BYTES_PER_ELEMENT;i+=1)bytes.push(r(byteArray,i));Boolean(littleEndian)===Boolean(IS_BIG_ENDIAN)&&bytes.reverse(),byteView=new exports.Uint8Array(this.buffer,byteOffset,arrayType.BYTES_PER_ELEMENT),byteView.set(bytes)}}var IS_BIG_ENDIAN=function(){var u16array=new exports.Uint16Array([4660]),u8array=new exports.Uint8Array(u16array.buffer);return 18===r(u8array,0)}(),DataView=function(buffer,byteOffset,byteLength){if(0===arguments.length)buffer=new exports.ArrayBuffer(0);else if(!(buffer instanceof exports.ArrayBuffer||"ArrayBuffer"===ECMAScript.Class(buffer)))throw new TypeError("TypeError");if(this.buffer=buffer||new exports.ArrayBuffer(0),this.byteOffset=ECMAScript.ToUint32(byteOffset),this.byteOffset>this.buffer.byteLength)throw new RangeError("byteOffset out of range");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=ECMAScript.ToUint32(byteLength),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");configureProperties(this)};DataView.prototype.getUint8=makeGetter(exports.Uint8Array),DataView.prototype.getInt8=makeGetter(exports.Int8Array),DataView.prototype.getUint16=makeGetter(exports.Uint16Array),DataView.prototype.getInt16=makeGetter(exports.Int16Array),DataView.prototype.getUint32=makeGetter(exports.Uint32Array),DataView.prototype.getInt32=makeGetter(exports.Int32Array),DataView.prototype.getFloat32=makeGetter(exports.Float32Array),DataView.prototype.getFloat64=makeGetter(exports.Float64Array),DataView.prototype.setUint8=makeSetter(exports.Uint8Array),DataView.prototype.setInt8=makeSetter(exports.Int8Array),DataView.prototype.setUint16=makeSetter(exports.Uint16Array),DataView.prototype.setInt16=makeSetter(exports.Int16Array),DataView.prototype.setUint32=makeSetter(exports.Uint32Array),DataView.prototype.setInt32=makeSetter(exports.Int32Array),DataView.prototype.setFloat32=makeSetter(exports.Float32Array),DataView.prototype.setFloat64=makeSetter(exports.Float64Array),exports.DataView=exports.DataView||DataView}()},function(module,exports){"use strict";module.exports={isString:function(arg){return"string"==typeof arg},isObject:function(arg){return"object"==typeof arg&&null!==arg},isNull:function(arg){return null===arg},isNullOrUndefined:function(arg){return null==arg}}},function(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}},function(module,exports){module.exports=function(arg){return arg&&"object"==typeof arg&&"function"==typeof arg.copy&&"function"==typeof arg.fill&&"function"==typeof arg.readUInt8}},function(module,exports){function read(buf,offset){var b,res=0,offset=offset||0,shift=0,counter=offset,l=buf.length;do{if(counter>=l)return read.bytes=0,void(read.bytesRead=0);b=buf[counter++],res+=shift<28?(b&REST)<<shift:(b&REST)*Math.pow(2,shift),shift+=7}while(b>=MSB);return read.bytes=counter-offset,res}module.exports=read;var MSB=128,REST=127},function(module,exports){function encode(num,out,offset){out=out||[],offset=offset||0;for(var oldOffset=offset;num>=INT;)out[offset++]=255&num|MSB,num/=128;for(;num&MSBALL;)out[offset++]=255&num|MSB,num>>>=7;return out[offset]=0|num,encode.bytes=offset-oldOffset+1,out}module.exports=encode;var MSB=128,REST=127,MSBALL=~REST,INT=Math.pow(2,31)},function(module,exports){var N1=Math.pow(2,7),N2=Math.pow(2,14),N3=Math.pow(2,21),N4=Math.pow(2,28),N5=Math.pow(2,35),N6=Math.pow(2,42),N7=Math.pow(2,49),N8=Math.pow(2,56),N9=Math.pow(2,63);module.exports=function(value){return value<N1?1:value<N2?2:value<N3?3:value<N4?4:value<N5?5:value<N6?6:value<N7?7:value<N8?8:value<N9?9:10}},function(module,exports,__webpack_require__){function Context(){}var indexOf=__webpack_require__(169),Object_keys=function(obj){if(Object.keys)return Object.keys(obj);var res=[];for(var key in obj)res.push(key);return res},forEach=function(xs,fn){if(xs.forEach)return xs.forEach(fn);for(var i=0;i<xs.length;i++)fn(xs[i],i,xs)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(obj,name,value){Object.defineProperty(obj,name,{writable:!0,enumerable:!1,configurable:!0,value:value})}}catch(e){return function(obj,name,value){obj[name]=value}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];Context.prototype={};var Script=exports.Script=function(code){return this instanceof Script?void(this.code=code):new Script(code)};Script.prototype.runInContext=function(context){if(!(context instanceof Context))throw new TypeError("needs a 'context' argument.");var iframe=document.createElement("iframe");iframe.style||(iframe.style={}),iframe.style.display="none",document.body.appendChild(iframe);var win=iframe.contentWindow,wEval=win.eval,wExecScript=win.execScript;!wEval&&wExecScript&&(wExecScript.call(win,"null"),wEval=win.eval),forEach(Object_keys(context),function(key){win[key]=context[key]}),forEach(globals,function(key){context[key]&&(win[key]=context[key])});var winKeys=Object_keys(win),res=wEval.call(win,this.code);return forEach(Object_keys(win),function(key){(key in context||indexOf(winKeys,key)===-1)&&(context[key]=win[key])}),forEach(globals,function(key){key in context||defineProp(context,key,win[key])}),document.body.removeChild(iframe),res},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(context){var ctx=Script.createContext(context),res=this.runInContext(ctx);return forEach(Object_keys(ctx),function(key){context[key]=ctx[key]}),res},forEach(Object_keys(Script.prototype),function(name){exports[name]=Script[name]=function(code){var s=Script(code);return s[name].apply(s,[].slice.call(arguments,1))}}),exports.createScript=function(code){return exports.Script(code)},exports.createContext=Script.createContext=function(context){var copy=new Context;return"object"==typeof context&&forEach(Object_keys(context),function(key){copy[key]=context[key]}),copy}},function(module,exports){module.exports=function(global){"use strict";function s2a(s){return btoa(s).replace(/\=+$/,"").replace(/\+/g,"-").replace(/\//g,"_")}function a2s(s){return s+="===",s=s.slice(0,-s.length%4),atob(s.replace(/-/g,"+").replace(/_/g,"/"))}function s2b(s){for(var b=new Uint8Array(s.length),i=0;i<s.length;i++)b[i]=s.charCodeAt(i);return b}function b2s(b){return b instanceof ArrayBuffer&&(b=new Uint8Array(b)),String.fromCharCode.apply(String,b)}function alg(a){var r={name:(a.name||a||"").toUpperCase().replace("V","v")};switch(r.name){case"SHA-1":case"SHA-256":case"SHA-384":case"SHA-512":break;case"AES-CBC":case"AES-GCM":case"AES-KW":a.length&&(r.length=a.length);break;case"HMAC":a.hash&&(r.hash=alg(a.hash)),a.length&&(r.length=a.length);break;case"RSAES-PKCS1-v1_5":a.publicExponent&&(r.publicExponent=new Uint8Array(a.publicExponent)),a.modulusLength&&(r.modulusLength=a.modulusLength);break;case"RSASSA-PKCS1-v1_5":case"RSA-OAEP":a.hash&&(r.hash=alg(a.hash)),a.publicExponent&&(r.publicExponent=new Uint8Array(a.publicExponent)),a.modulusLength&&(r.modulusLength=a.modulusLength);break;default:throw new SyntaxError("Bad algorithm name")}return r}function jwkAlg(a){return{HMAC:{"SHA-1":"HS1","SHA-256":"HS256","SHA-384":"HS384","SHA-512":"HS512"},"RSASSA-PKCS1-v1_5":{"SHA-1":"RS1","SHA-256":"RS256","SHA-384":"RS384","SHA-512":"RS512"},"RSAES-PKCS1-v1_5":{"":"RSA1_5"},"RSA-OAEP":{"SHA-1":"RSA-OAEP","SHA-256":"RSA-OAEP-256"},"AES-KW":{128:"A128KW",192:"A192KW",256:"A256KW"},"AES-GCM":{128:"A128GCM",192:"A192GCM",256:"A256GCM"},"AES-CBC":{128:"A128CBC",192:"A192CBC",256:"A256CBC"}}[a.name][(a.hash||{}).name||a.length||""]}function b2jwk(k){(k instanceof ArrayBuffer||k instanceof Uint8Array)&&(k=JSON.parse(decodeURIComponent(escape(b2s(k)))));var jwk={kty:k.kty,alg:k.alg,ext:k.ext||k.extractable};switch(jwk.kty){case"oct":jwk.k=k.k;case"RSA":["n","e","d","p","q","dp","dq","qi","oth"].forEach(function(x){x in k&&(jwk[x]=k[x])});break;default:throw new TypeError("Unsupported key type")}return jwk}function jwk2b(k){var jwk=b2jwk(k);return isIE&&(jwk.extractable=jwk.ext,delete jwk.ext),s2b(unescape(encodeURIComponent(JSON.stringify(jwk)))).buffer}function pkcs2jwk(k){var info=b2der(k),prv=!1;info.length>2&&(prv=!0,info.shift());var jwk={ext:!0};switch(info[0][0]){case"1.2.840.113549.1.1.1":var rsaComp=["n","e","d","p","q","dp","dq","qi"],rsaKey=b2der(info[1]);prv&&rsaKey.shift();for(var i=0;i<rsaKey.length;i++)rsaKey[i][0]||(rsaKey[i]=rsaKey[i].subarray(1)),jwk[rsaComp[i]]=s2a(b2s(rsaKey[i]));jwk.kty="RSA";break;default:throw new TypeError("Unsupported key type")}return jwk}function jwk2pkcs(k){var key,info=[["",null]],prv=!1;switch(k.kty){case"RSA":for(var rsaComp=["n","e","d","p","q","dp","dq","qi"],rsaKey=[],i=0;i<rsaComp.length&&rsaComp[i]in k;i++){var b=rsaKey[i]=s2b(a2s(k[rsaComp[i]]));128&b[0]&&(rsaKey[i]=new Uint8Array(b.length+1),rsaKey[i].set(b,1))}rsaKey.length>2&&(prv=!0,rsaKey.unshift(new Uint8Array([0]))),info[0][0]="1.2.840.113549.1.1.1",key=rsaKey;break;default:throw new TypeError("Unsupported key type")}return info.push(new Uint8Array(der2b(key)).buffer),prv?info.unshift(new Uint8Array([0])):info[1]={tag:3,value:info[1]},new Uint8Array(der2b(info)).buffer}function b2der(buf,ctx){if(buf instanceof ArrayBuffer&&(buf=new Uint8Array(buf)),ctx||(ctx={pos:0,end:buf.length}),ctx.end-ctx.pos<2||ctx.end>buf.length)throw new RangeError("Malformed DER");var tag=buf[ctx.pos++],len=buf[ctx.pos++];if(len>=128){if(len&=127,ctx.end-ctx.pos<len)throw new RangeError("Malformed DER");for(var xlen=0;len--;)xlen<<=8,xlen|=buf[ctx.pos++];len=xlen}if(ctx.end-ctx.pos<len)throw new RangeError("Malformed DER");var rv;switch(tag){case 2:rv=buf.subarray(ctx.pos,ctx.pos+=len);break;case 3:if(buf[ctx.pos++])throw new Error("Unsupported bit string");len--;case 4:rv=new Uint8Array(buf.subarray(ctx.pos,ctx.pos+=len)).buffer;break;case 5:rv=null;
break;case 6:var oid=btoa(b2s(buf.subarray(ctx.pos,ctx.pos+=len)));if(!(oid in oid2str))throw new Error("Unsupported OBJECT ID "+oid);rv=oid2str[oid];break;case 48:rv=[];for(var end=ctx.pos+len;ctx.pos<end;)rv.push(b2der(buf,ctx));break;default:throw new Error("Unsupported DER tag 0x"+tag.toString(16))}return rv}function der2b(val,buf){buf||(buf=[]);var tag=0,len=0,pos=buf.length+2;if(buf.push(0,0),val instanceof Uint8Array){tag=2,len=val.length;for(var i=0;i<len;i++)buf.push(val[i])}else if(val instanceof ArrayBuffer){tag=4,len=val.byteLength,val=new Uint8Array(val);for(var i=0;i<len;i++)buf.push(val[i])}else if(null===val)tag=5,len=0;else if("string"==typeof val&&val in str2oid){var oid=s2b(atob(str2oid[val]));tag=6,len=oid.length;for(var i=0;i<len;i++)buf.push(oid[i])}else if(val instanceof Array){for(var i=0;i<val.length;i++)der2b(val[i],buf);tag=48,len=buf.length-pos}else{if(!("object"==typeof val&&3===val.tag&&val.value instanceof ArrayBuffer))throw new Error("Unsupported DER value "+val);val=new Uint8Array(val.value),tag=3,len=val.byteLength,buf.push(0);for(var i=0;i<len;i++)buf.push(val[i]);len++}if(len>=128){var xlen=len,len=4;for(buf.splice(pos,0,xlen>>24&255,xlen>>16&255,xlen>>8&255,255&xlen);len>1&&!(xlen>>24);)xlen<<=8,len--;len<4&&buf.splice(pos,4-len),len|=128}return buf.splice(pos-2,2,tag,len),buf}function CryptoKey(key,alg,ext,use){Object.defineProperties(this,{_key:{value:key},type:{value:key.type,enumerable:!0},extractable:{value:void 0===ext?key.extractable:ext,enumerable:!0},algorithm:{value:void 0===alg?key.algorithm:alg,enumerable:!0},usages:{value:void 0===use?key.usages:use,enumerable:!0}})}function isPubKeyUse(u){return"verify"===u||"encrypt"===u||"wrapKey"===u}function isPrvKeyUse(u){return"sign"===u||"decrypt"===u||"unwrapKey"===u}if("function"!=typeof Promise)throw"Promise support required";var _crypto=global.crypto||global.msCrypto;if(_crypto){var _subtle=_crypto.subtle||_crypto.webkitSubtle;if(_subtle){var _Crypto=global.Crypto||_crypto.constructor||Object,_SubtleCrypto=global.SubtleCrypto||_subtle.constructor||Object,isEdge=(global.CryptoKey||global.Key||Object,window.navigator.userAgent.indexOf("Edge/")>-1),isIE=!!global.msCrypto&&!isEdge,isWebkit=!!_crypto.webkitSubtle;if(isIE||isWebkit){var oid2str={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},str2oid={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"};if(["generateKey","importKey","unwrapKey"].forEach(function(m){var _fn=_subtle[m];_subtle[m]=function(a,b,c){var ka,kx,ku,args=[].slice.call(arguments);switch(m){case"generateKey":ka=alg(a),kx=b,ku=c;break;case"importKey":ka=alg(c),kx=args[3],ku=args[4],"jwk"===a&&(b=b2jwk(b),b.alg||(b.alg=jwkAlg(ka)),b.key_ops||(b.key_ops="oct"!==b.kty?"d"in b?ku.filter(isPrvKeyUse):ku.filter(isPubKeyUse):ku.slice()),args[1]=jwk2b(b));break;case"unwrapKey":ka=args[4],kx=args[5],ku=args[6],args[2]=c._key}if("generateKey"===m&&"HMAC"===ka.name&&ka.hash)return ka.length=ka.length||{"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024}[ka.hash.name],_subtle.importKey("raw",_crypto.getRandomValues(new Uint8Array(ka.length+7>>3)),ka,kx,ku);if(isWebkit&&"generateKey"===m&&"RSASSA-PKCS1-v1_5"===ka.name&&(!ka.modulusLength||ka.modulusLength>=2048))return a=alg(a),a.name="RSAES-PKCS1-v1_5",delete a.hash,_subtle.generateKey(a,!0,["encrypt","decrypt"]).then(function(k){return Promise.all([_subtle.exportKey("jwk",k.publicKey),_subtle.exportKey("jwk",k.privateKey)])}).then(function(keys){return keys[0].alg=keys[1].alg=jwkAlg(ka),keys[0].key_ops=ku.filter(isPubKeyUse),keys[1].key_ops=ku.filter(isPrvKeyUse),Promise.all([_subtle.importKey("jwk",keys[0],ka,!0,keys[0].key_ops),_subtle.importKey("jwk",keys[1],ka,kx,keys[1].key_ops)])}).then(function(keys){return{publicKey:keys[0],privateKey:keys[1]}});if((isWebkit||isIE&&"SHA-1"===(ka.hash||{}).name)&&"importKey"===m&&"jwk"===a&&"HMAC"===ka.name&&"oct"===b.kty)return _subtle.importKey("raw",s2b(a2s(b.k)),c,args[3],args[4]);if(isWebkit&&"importKey"===m&&("spki"===a||"pkcs8"===a))return _subtle.importKey("jwk",pkcs2jwk(b),c,args[3],args[4]);if(isIE&&"unwrapKey"===m)return _subtle.decrypt(args[3],c,b).then(function(k){return _subtle.importKey(a,k,args[4],args[5],args[6])});var op;try{op=_fn.apply(_subtle,args)}catch(e){return Promise.reject(e)}return isIE&&(op=new Promise(function(res,rej){op.onabort=op.onerror=function(e){rej(e)},op.oncomplete=function(r){res(r.target.result)}})),op=op.then(function(k){return"HMAC"===ka.name&&(ka.length||(ka.length=8*k.algorithm.length)),0==ka.name.search("RSA")&&(ka.modulusLength||(ka.modulusLength=(k.publicKey||k).algorithm.modulusLength),ka.publicExponent||(ka.publicExponent=(k.publicKey||k).algorithm.publicExponent)),k=k.publicKey&&k.privateKey?{publicKey:new CryptoKey(k.publicKey,ka,kx,ku.filter(isPubKeyUse)),privateKey:new CryptoKey(k.privateKey,ka,kx,ku.filter(isPrvKeyUse))}:new CryptoKey(k,ka,kx,ku)})}}),["exportKey","wrapKey"].forEach(function(m){var _fn=_subtle[m];_subtle[m]=function(a,b,c){var args=[].slice.call(arguments);switch(m){case"exportKey":args[1]=b._key;break;case"wrapKey":args[1]=b._key,args[2]=c._key}if((isWebkit||isIE&&"SHA-1"===(b.algorithm.hash||{}).name)&&"exportKey"===m&&"jwk"===a&&"HMAC"===b.algorithm.name&&(args[0]="raw"),!isWebkit||"exportKey"!==m||"spki"!==a&&"pkcs8"!==a||(args[0]="jwk"),isIE&&"wrapKey"===m)return _subtle.exportKey(a,b).then(function(k){return"jwk"===a&&(k=s2b(unescape(encodeURIComponent(JSON.stringify(b2jwk(k)))))),_subtle.encrypt(args[3],c,k)});var op;try{op=_fn.apply(_subtle,args)}catch(e){return Promise.reject(e)}return isIE&&(op=new Promise(function(res,rej){op.onabort=op.onerror=function(e){rej(e)},op.oncomplete=function(r){res(r.target.result)}})),"exportKey"===m&&"jwk"===a&&(op=op.then(function(k){return(isWebkit||isIE&&"SHA-1"===(b.algorithm.hash||{}).name)&&"HMAC"===b.algorithm.name?{kty:"oct",alg:jwkAlg(b.algorithm),key_ops:b.usages.slice(),ext:!0,k:s2a(b2s(k))}:(k=b2jwk(k),k.alg||(k.alg=jwkAlg(b.algorithm)),k.key_ops||(k.key_ops="public"===b.type?b.usages.filter(isPubKeyUse):"private"===b.type?b.usages.filter(isPrvKeyUse):b.usages.slice()),k)})),!isWebkit||"exportKey"!==m||"spki"!==a&&"pkcs8"!==a||(op=op.then(function(k){return k=jwk2pkcs(b2jwk(k))})),op}}),["encrypt","decrypt","sign","verify"].forEach(function(m){var _fn=_subtle[m];_subtle[m]=function(a,b,c,d){if(isIE&&(!c.byteLength||d&&!d.byteLength))throw new Error("Empy input is not allowed");var args=[].slice.call(arguments),ka=alg(a);if(isIE&&"decrypt"===m&&"AES-GCM"===ka.name){var tl=a.tagLength>>3;args[2]=(c.buffer||c).slice(0,c.byteLength-tl),a.tag=(c.buffer||c).slice(c.byteLength-tl)}args[1]=b._key;var op;try{op=_fn.apply(_subtle,args)}catch(e){return Promise.reject(e)}return isIE&&(op=new Promise(function(res,rej){op.onabort=op.onerror=function(e){rej(e)},op.oncomplete=function(r){var r=r.target.result;if("encrypt"===m&&r instanceof AesGcmEncryptResult){var c=r.ciphertext,t=r.tag;r=new Uint8Array(c.byteLength+t.byteLength),r.set(new Uint8Array(c),0),r.set(new Uint8Array(t),c.byteLength),r=r.buffer}res(r)}})),op}}),isIE){var _digest=_subtle.digest;_subtle.digest=function(a,b){if(!b.byteLength)throw new Error("Empy input is not allowed");var op;try{op=_digest.call(_subtle,a,b)}catch(e){return Promise.reject(e)}return op=new Promise(function(res,rej){op.onabort=op.onerror=function(e){rej(e)},op.oncomplete=function(r){res(r.target.result)}})},global.crypto=Object.create(_crypto,{getRandomValues:{value:function(a){return _crypto.getRandomValues(a)}},subtle:{value:_subtle}}),global.CryptoKey=CryptoKey}isWebkit&&(_crypto.subtle=_subtle,global.Crypto=_Crypto,global.SubtleCrypto=_SubtleCrypto,global.CryptoKey=CryptoKey)}}}}},function(module,exports){function Yallist(list){var self=this;if(self instanceof Yallist||(self=new Yallist),self.tail=null,self.head=null,self.length=0,list&&"function"==typeof list.forEach)list.forEach(function(item){self.push(item)});else if(arguments.length>0)for(var i=0,l=arguments.length;i<l;i++)self.push(arguments[i]);return self}function push(self,item){self.tail=new Node(item,self.tail,null,self),self.head||(self.head=self.tail),self.length++}function unshift(self,item){self.head=new Node(item,null,self.head,self),self.tail||(self.tail=self.head),self.length++}function Node(value,prev,next,list){return this instanceof Node?(this.list=list,this.value=value,prev?(prev.next=this,this.prev=prev):this.prev=null,void(next?(next.prev=this,this.next=next):this.next=null)):new Node(value,prev,next,list)}module.exports=Yallist,Yallist.Node=Node,Yallist.create=Yallist,Yallist.prototype.removeNode=function(node){if(node.list!==this)throw new Error("removing node which does not belong to this list");var next=node.next,prev=node.prev;next&&(next.prev=prev),prev&&(prev.next=next),node===this.head&&(this.head=next),node===this.tail&&(this.tail=prev),node.list.length--,node.next=null,node.prev=null,node.list=null},Yallist.prototype.unshiftNode=function(node){if(node!==this.head){node.list&&node.list.removeNode(node);var head=this.head;node.list=this,node.next=head,head&&(head.prev=node),this.head=node,this.tail||(this.tail=node),this.length++}},Yallist.prototype.pushNode=function(node){if(node!==this.tail){node.list&&node.list.removeNode(node);var tail=this.tail;node.list=this,node.prev=tail,tail&&(tail.next=node),this.tail=node,this.head||(this.head=node),this.length++}},Yallist.prototype.push=function(){for(var i=0,l=arguments.length;i<l;i++)push(this,arguments[i]);return this.length},Yallist.prototype.unshift=function(){for(var i=0,l=arguments.length;i<l;i++)unshift(this,arguments[i]);return this.length},Yallist.prototype.pop=function(){if(this.tail){var res=this.tail.value;return this.tail=this.tail.prev,this.tail.next=null,this.length--,res}},Yallist.prototype.shift=function(){if(this.head){var res=this.head.value;return this.head=this.head.next,this.head.prev=null,this.length--,res}},Yallist.prototype.forEach=function(fn,thisp){thisp=thisp||this;for(var walker=this.head,i=0;null!==walker;i++)fn.call(thisp,walker.value,i,this),walker=walker.next},Yallist.prototype.forEachReverse=function(fn,thisp){thisp=thisp||this;for(var walker=this.tail,i=this.length-1;null!==walker;i--)fn.call(thisp,walker.value,i,this),walker=walker.prev},Yallist.prototype.get=function(n){for(var i=0,walker=this.head;null!==walker&&i<n;i++)walker=walker.next;if(i===n&&null!==walker)return walker.value},Yallist.prototype.getReverse=function(n){for(var i=0,walker=this.tail;null!==walker&&i<n;i++)walker=walker.prev;if(i===n&&null!==walker)return walker.value},Yallist.prototype.map=function(fn,thisp){thisp=thisp||this;for(var res=new Yallist,walker=this.head;null!==walker;)res.push(fn.call(thisp,walker.value,this)),walker=walker.next;return res},Yallist.prototype.mapReverse=function(fn,thisp){thisp=thisp||this;for(var res=new Yallist,walker=this.tail;null!==walker;)res.push(fn.call(thisp,walker.value,this)),walker=walker.prev;return res},Yallist.prototype.reduce=function(fn,initial){var acc,walker=this.head;if(arguments.length>1)acc=initial;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");walker=this.head.next,acc=this.head.value}for(var i=0;null!==walker;i++)acc=fn(acc,walker.value,i),walker=walker.next;return acc},Yallist.prototype.reduceReverse=function(fn,initial){var acc,walker=this.tail;if(arguments.length>1)acc=initial;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");walker=this.tail.prev,acc=this.tail.value}for(var i=this.length-1;null!==walker;i--)acc=fn(acc,walker.value,i),walker=walker.prev;return acc},Yallist.prototype.toArray=function(){for(var arr=new Array(this.length),i=0,walker=this.head;null!==walker;i++)arr[i]=walker.value,walker=walker.next;return arr},Yallist.prototype.toArrayReverse=function(){for(var arr=new Array(this.length),i=0,walker=this.tail;null!==walker;i++)arr[i]=walker.value,walker=walker.prev;return arr},Yallist.prototype.slice=function(from,to){to=to||this.length,to<0&&(to+=this.length),from=from||0,from<0&&(from+=this.length);var ret=new Yallist;if(to<from||to<0)return ret;from<0&&(from=0),to>this.length&&(to=this.length);for(var i=0,walker=this.head;null!==walker&&i<from;i++)walker=walker.next;for(;null!==walker&&i<to;i++,walker=walker.next)ret.push(walker.value);return ret},Yallist.prototype.sliceReverse=function(from,to){to=to||this.length,to<0&&(to+=this.length),from=from||0,from<0&&(from+=this.length);var ret=new Yallist;if(to<from||to<0)return ret;from<0&&(from=0),to>this.length&&(to=this.length);for(var i=this.length,walker=this.tail;null!==walker&&i>to;i--)walker=walker.prev;for(;null!==walker&&i>from;i--,walker=walker.prev)ret.push(walker.value);return ret},Yallist.prototype.reverse=function(){for(var head=this.head,tail=this.tail,walker=head;null!==walker;walker=walker.prev){var p=walker.prev;walker.prev=walker.next,walker.next=p}return this.head=tail,this.tail=head,this}},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return{wantlist:promisify(callback=>{send({path:"bitswap/wantlist"},callback)}),stat:promisify(callback=>{send({path:"bitswap/stat"},callback)}),unwant:promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"bitswap/unwant",args:args,qs:opts},callback)})}})},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const promisify=__webpack_require__(4),bl=__webpack_require__(47),Block=__webpack_require__(171),multihash=__webpack_require__(14),CID=__webpack_require__(76);module.exports=(send=>{return{get:promisify((args,opts,callback)=>{return args&&CID.isCID(args)&&(args=multihash.toB58String(args.multihash)),"function"==typeof opts&&(callback=opts,opts={}),send({path:"block/get",args:args,qs:opts},(err,res)=>{return err?callback(err):void(Buffer.isBuffer(res)?callback(null,new Block(res)):res.pipe(bl((err,data)=>{return err?callback(err):void callback(null,new Block(data))})))})}),stat:promisify((args,opts,callback)=>{return args&&CID.isCID(args)&&(args=multihash.toB58String(args.multihash)),"function"==typeof opts&&(callback=opts,opts={}),send({path:"block/stat",args:args,qs:opts},(err,stats)=>{return err?callback(err):void callback(null,{key:stats.Key,size:stats.Size})})}),put:promisify((block,cid,callback)=>{if("function"==typeof cid&&(callback=cid,cid={}),Array.isArray(block)){const err=new Error("block.put() only accepts 1 file");return callback(err)}return"object"==typeof block&&block.data&&(block=block.data),send({path:"block/put",files:block},(err,blockInfo)=>{return err?callback(err):void callback(null,new Block(block))})})}})}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return{add:promisify((args,opts,callback)=>{"function"!=typeof opts||callback||(callback=opts,opts={}),"function"==typeof opts&&"function"==typeof callback&&(callback=opts,opts={}),args&&"object"==typeof args&&(opts=args,args=void 0),send({path:"bootstrap/add",args:args,qs:opts},callback)}),rm:promisify((args,opts,callback)=>{"function"!=typeof opts||callback||(callback=opts,opts={}),"function"==typeof opts&&"function"==typeof callback&&(callback=opts,opts={}),args&&"object"==typeof args&&(opts=args,args=void 0),send({path:"bootstrap/rm",args:args,qs:opts},callback)}),list:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"bootstrap/list",qs:opts},callback)})}})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return promisify(callback=>{send({path:"commands"},callback)})})},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const streamifier=__webpack_require__(296),promisify=__webpack_require__(4);module.exports=(send=>{return{get:promisify((key,callback)=>{return"function"==typeof key&&(callback=key,key=void 0),key?void send({path:"config",args:key,buffer:!0},(err,response)=>{return err?callback(err):void callback(null,response.Value)}):void send({path:"config/show",buffer:!0},callback)}),set:promisify((key,value,opts,callback)=>{return"function"==typeof opts&&(callback=opts,opts={}),"string"!=typeof key?callback(new Error("Invalid key type")):"object"!=typeof value&&"boolean"!=typeof value&&"string"!=typeof value?callback(new Error("Invalid value type")):("object"==typeof value&&(value=JSON.stringify(value),opts={json:!0}),"boolean"==typeof value&&(value=value.toString(),opts={bool:!0}),void send({path:"config",args:[key,value],qs:opts,files:void 0,buffer:!0},callback))}),replace:promisify((config,callback)=>{"object"==typeof config&&(config=streamifier.createReadStream(new Buffer(JSON.stringify(config)))),send({path:"config/replace",files:config,buffer:!0},callback)})}})}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4),streamToValue=__webpack_require__(17);module.exports=(send=>{return{findprovs:promisify((args,opts,callback)=>{"function"!=typeof opts||callback||(callback=opts,opts={}),"function"==typeof opts&&"function"==typeof callback&&(callback=opts,opts={});const request={path:"dht/findprovs",args:args,qs:opts};send.andTransform(request,streamToValue,callback)}),get:promisify((key,opts,callback)=>{"function"!=typeof opts||callback||(callback=opts,opts={}),"function"==typeof opts&&"function"==typeof callback&&(callback=opts,opts={});const handleResult=(done,err,res)=>{if(err)return done(err);if(!res)return done(new Error("empty response"));if(0===res.length)return done(new Error("no value returned for key"));if(Array.isArray(res)&&(res=res[0]),5===res.Type)done(null,res.Extra);else{let error=new Error("key was not found (type 6)");done(error)}};send({path:"dht/get",args:key,qs:opts},handleResult.bind(null,callback))}),put:promisify((key,value,opts,callback)=>{"function"!=typeof opts||callback||(callback=opts,opts={}),"function"==typeof opts&&"function"==typeof callback&&(callback=opts,opts={}),send({path:"dht/put",args:[key,value],qs:opts},callback)})}})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return{net:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"diag/net",qs:opts},callback)}),sys:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"diag/sys",qs:opts},callback)}),cmds:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"diag/cmds",qs:opts},callback)})}})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return{cp:promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"files/cp",args:args,qs:opts},callback)}),ls:promisify((args,opts,callback)=>{return"function"==typeof opts&&(callback=opts,opts={}),send({path:"files/ls",args:args,qs:opts},callback)}),mkdir:promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"files/mkdir",args:args,qs:opts},callback)}),stat:promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"files/stat",args:args,qs:opts},callback)}),rm:promisify((path,opts,callback)=>{"function"!=typeof opts||callback||(callback=opts,opts={}),"function"==typeof opts&&"function"==typeof callback&&(callback=opts,opts={}),send({path:"files/rm",args:path,qs:opts},callback)}),read:promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"files/read",args:args,qs:opts},callback)}),write:promisify((pathDst,files,opts,callback)=>{"function"!=typeof opts||callback||(callback=opts,opts={}),"function"==typeof opts&&"function"==typeof callback&&(callback=opts,opts={}),send({path:"files/write",args:pathDst,qs:opts,files:files},callback)}),mv:promisify((args,opts,callback)=>{"function"==typeof opts&&void 0===callback&&(callback=opts,opts={}),send({path:"files/mv",args:args,qs:opts},callback)})}})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts=void 0),send({path:"id",args:opts},(err,result)=>{if(err)return callback(err);const identity={id:result.ID,publicKey:result.PublicKey,addresses:result.Addresses,agentVersion:result.AgentVersion,protocolVersion:result.ProtocolVersion};callback(null,identity)})})})},function(module,exports,__webpack_require__){"use strict";const ndjson=__webpack_require__(92),promisify=__webpack_require__(4);module.exports=(send=>{return{tail:promisify(callback=>{return send({path:"log/tail"},(err,response)=>{return err?callback(err):void callback(null,response.pipe(ndjson.parse()))})})}})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"ls",args:args,qs:opts},callback)})})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return promisify((ipfs,ipns,callback)=>{"function"==typeof ipfs?(callback=ipfs,ipfs=null):"function"==typeof ipns&&(callback=ipns,ipns=null);const opts={};ipfs&&(opts.f=ipfs),ipns&&(opts.n=ipns),send({path:"mount",qs:opts},callback)})})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return{publish:promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"name/publish",args:args,qs:opts},callback)}),resolve:promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"name/resolve",args:args,qs:opts},callback)})}})},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const dagPB=__webpack_require__(81),DAGNode=dagPB.DAGNode,DAGLink=dagPB.DAGLink,promisify=__webpack_require__(4),bs58=__webpack_require__(10),bl=__webpack_require__(47),cleanMultihash=__webpack_require__(61),LRU=__webpack_require__(228),lruOptions={max:128},cache=LRU(lruOptions);module.exports=(send=>{const api={get:promisify((multihash,options,callback)=>{"function"==typeof options&&(callback=options,options={}),options||(options={});try{multihash=cleanMultihash(multihash,options)}catch(err){return callback(err)}const node=cache.get(multihash);return node?callback(null,node):void send({path:"object/get",args:multihash},(err,result)=>{if(err)return callback(err);const links=result.Links.map(l=>{return new DAGLink(l.Name,l.Size,new Buffer(bs58.decode(l.Hash)))});DAGNode.create(result.Data,links,(err,node)=>{return err?callback(err):(cache.set(multihash,node),void callback(null,node))})})}),put:promisify((obj,options,callback)=>{"function"==typeof options&&(callback=options,options={}),options||(options={});let tmpObj={Data:null,Links:[]};if(Buffer.isBuffer(obj))options.enc||(tmpObj={Data:obj.toString(),Links:[]});else if(obj.multihash)tmpObj={Data:obj.data.toString(),Links:obj.links.map(l=>{const link=l.toJSON();return link.hash=link.multihash,link})};else{if("object"!=typeof obj)return callback(new Error("obj not recognized"));tmpObj.Data=obj.Data.toString()}let buf;buf=Buffer.isBuffer(obj)&&options.enc?obj:new Buffer(JSON.stringify(tmpObj));const enc=options.enc||"json";send({path:"object/put",qs:{inputenc:enc},files:buf},(err,result)=>{function next(){const nodeJSON=node.toJSON();if(nodeJSON.multihash!==result.Hash){const err=new Error("multihashes do not match");return callback(err)}cache.set(result.Hash,node),callback(null,node)}if(err)return callback(err);Buffer.isBuffer(obj)&&(options.enc?"json"===options.enc&&(obj=JSON.parse(obj.toString())):obj={Data:obj,Links:[]});let node;return obj.multihash?(node=obj,void next()):"protobuf"===options.enc?void dagPB.util.deserialize(obj,(err,_node)=>{return err?callback(err):(node=_node,void next())}):void DAGNode.create(new Buffer(obj.Data),obj.Links,(err,_node)=>{return err?callback(err):(node=_node,void next())})})}),data:promisify((multihash,options,callback)=>{"function"==typeof options&&(callback=options,options={}),options||(options={});try{multihash=cleanMultihash(multihash,options)}catch(err){return callback(err)}const node=cache.get(multihash);return node?callback(null,node.data):void send({path:"object/data",args:multihash},(err,result)=>{return err?callback(err):void("function"==typeof result.pipe?result.pipe(bl(callback)):callback(null,result))})}),links:promisify((multihash,options,callback)=>{"function"==typeof options&&(callback=options,options={}),options||(options={});try{multihash=cleanMultihash(multihash,options)}catch(err){return callback(err)}const node=cache.get(multihash);return node?callback(null,node.links):void send({path:"object/links",args:multihash},(err,result)=>{if(err)return callback(err);let links=[];result.Links&&(links=result.Links.map(l=>{return new DAGLink(l.Name,l.Size,new Buffer(bs58.decode(l.Hash)))})),callback(null,links)})}),stat:promisify((multihash,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),opts||(opts={});try{multihash=cleanMultihash(multihash,opts)}catch(err){return callback(err)}send({path:"object/stat",args:multihash},callback)}),new:promisify(callback=>{send({path:"object/new"},(err,result)=>{return err?callback(err):void DAGNode.create(new Buffer(0),(err,node)=>{return err?callback(err):node.toJSON().multihash!==result.Hash?(console.log(node.toJSON()),console.log(result),callback(new Error("multihashes do not match"))):void callback(null,node)})})}),patch:{addLink:promisify((multihash,dLink,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),opts||(opts={});try{multihash=cleanMultihash(multihash,opts)}catch(err){return callback(err)}send({path:"object/patch/add-link",args:[multihash,dLink.name,bs58.encode(dLink.multihash).toString()]},(err,result)=>{return err?callback(err):void api.get(result.Hash,{enc:"base58"},callback)})}),rmLink:promisify((multihash,dLink,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),opts||(opts={});try{multihash=cleanMultihash(multihash,opts)}catch(err){return callback(err)}send({path:"object/patch/rm-link",args:[multihash,dLink.name]},(err,result)=>{return err?callback(err):void api.get(result.Hash,{enc:"base58"},callback)})}),setData:promisify((multihash,data,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),opts||(opts={});try{multihash=cleanMultihash(multihash,opts)}catch(err){return callback(err)}send({path:"object/patch/set-data",args:[multihash],files:data},(err,result)=>{return err?callback(err):void api.get(result.Hash,{enc:"base58"},callback)})}),appendData:promisify((multihash,data,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),opts||(opts={});try{multihash=cleanMultihash(multihash,opts)}catch(err){return callback(err)}send({path:"object/patch/append-data",args:[multihash],files:data},(err,result)=>{return err?callback(err):void api.get(result.Hash,{enc:"base58"},callback)})})}};return api})}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return{add:promisify((hash,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts=null),send({path:"pin/add",args:hash,qs:opts},(err,res)=>{return err?callback(err):void callback(null,res.Pins)})}),rm:promisify((hash,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts=null),send({path:"pin/rm",args:hash,qs:opts},(err,res)=>{return err?callback(err):void callback(null,res.Pins)})}),ls:promisify((hash,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),"object"==typeof hash&&(opts=hash,hash=void 0),"function"==typeof hash&&(callback=hash,hash=void 0,opts={}),send({path:"pin/ls",args:hash,qs:opts},(err,res)=>{return err?callback(err):void callback(null,res.Keys)})})}})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4),streamToValue=__webpack_require__(17);module.exports=(send=>{return promisify((id,callback)=>{const request={path:"ping",args:id,qs:{n:1}},transform=(res,callback)=>{streamToValue(res,(err,res)=>{if(err)return callback(err);const pingResult={Success:res[1].Success,Time:res[1].Time,Text:res[2].Text};callback(null,pingResult)})};send.andTransform(request,transform,callback)})})},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const promisify=__webpack_require__(4),PubsubMessageStream=__webpack_require__(341),stringlistToArray=__webpack_require__(346);let subscriptions={};const addSubscription=(topic,request)=>{subscriptions[topic]={request:request}},removeSubscription=promisify((topic,callback)=>{return subscriptions[topic]?(subscriptions[topic].request.abort(),delete subscriptions[topic],void(callback&&callback(null))):callback(new Error(`Not subscribed to ${topic}`))});module.exports=(send=>{return{subscribe:promisify((topic,options,callback)=>{const defaultOptions={discover:!1};if("function"==typeof options&&(callback=options,options=defaultOptions),options||(options=defaultOptions),subscriptions[topic])return callback(new Error(`Already subscribed to '${topic}'`));const request={path:"pubsub/sub",args:[topic],qs:{discover:options.discover}},req=send.andTransform(request,PubsubMessageStream.from,(err,stream)=>{return err?callback(err):(stream.cancel=promisify(cb=>removeSubscription(topic,cb)),addSubscription(topic,req),void callback(null,stream))})}),publish:promisify((topic,data,callback)=>{const buf=Buffer.isBuffer(data)?data:new Buffer(data),request={path:"pubsub/pub",args:[topic,buf]};send(request,callback)}),ls:promisify(callback=>{const request={path:"pubsub/ls"};send.andTransform(request,stringlistToArray,callback)}),peers:promisify((topic,callback)=>{if(!subscriptions[topic])return callback(new Error(`Not subscribed to '${topic}'`));const request={path:"pubsub/peers",args:[topic]};send.andTransform(request,stringlistToArray,callback)})}})}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4),streamToValue=__webpack_require__(17);module.exports=(send=>{const refs=promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={});const request={path:"refs",args:args,qs:opts};send.andTransform(request,streamToValue,callback)});return refs.local=promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={});const request={path:"refs",qs:opts};send.andTransform(request,streamToValue,callback)}),refs})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return{gc:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"repo/gc",qs:opts},callback)}),stat:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"repo/stat",qs:opts},callback)})}})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4),multiaddr=__webpack_require__(56),PeerId=__webpack_require__(96),PeerInfo=__webpack_require__(250);module.exports=(send=>{return{peers:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={});const verbose=opts.v||opts.verbose;send({path:"swarm/peers",qs:opts},(err,result)=>{return err?callback(err):void(result.Strings?callback(null,result.Strings.map(p=>{const res={};if(verbose){const parts=p.split(" ");res.addr=multiaddr(parts[0]),res.latency=parts[1]}else res.addr=multiaddr(p);return res.peer=PeerId.createFromB58String(res.addr.decapsulate("ipfs")),res})):result.Peers&&callback(null,result.Peers.map(p=>{const res={addr:multiaddr(p.Addr),peer:PeerId.createFromB58String(p.Peer),muxer:p.Muxer
};return p.Latency&&(res.latency=p.Latency),p.Streams&&(res.streams=p.Streams),res})))})}),connect:promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"swarm/connect",args:args,qs:opts},callback)}),disconnect:promisify((args,opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"swarm/disconnect",args:args,qs:opts},callback)}),addrs:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"swarm/addrs",qs:opts},(err,result)=>{if(err)return callback(err);const peers=Object.keys(result.Addrs).map(id=>{const info=new PeerInfo(PeerId.createFromB58String(id));return result.Addrs[id].forEach(addr=>{info.multiaddr.add(multiaddr(addr))}),info});callback(null,peers)})}),localAddrs:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"swarm/addrs/local",qs:opts},(err,result)=>{return err?callback(err):void callback(null,result.Strings.map(addr=>{return multiaddr(addr)}))})})}})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return{apply:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"update",qs:opts},callback)}),check:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"update/check",qs:opts},callback)}),log:promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"update/log",qs:opts},callback)})}})},function(module,exports,__webpack_require__){"use strict";const isNode=__webpack_require__(49),promisify=__webpack_require__(4),DAGNodeStream=__webpack_require__(62);module.exports=(send=>{return promisify((path,opts,callback)=>{if("function"==typeof opts&&void 0===callback&&(callback=opts,opts={}),"function"==typeof opts&&"function"==typeof callback&&(callback=opts,opts={}),!isNode)return callback(new Error("fsAdd does not work in the browser"));if("string"!=typeof path)return callback(new Error('"path" must be a string'));const request={path:"add",qs:opts,files:path},transform=(res,callback)=>DAGNodeStream.streamToValue(send,res,callback);send.andTransform(request,transform,callback)})})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4),once=__webpack_require__(94),parseUrl=__webpack_require__(116).parse,request=__webpack_require__(122),DAGNodeStream=__webpack_require__(62);module.exports=(send=>{return promisify((url,opts,callback)=>{return"function"==typeof opts&&void 0===callback&&(callback=opts,opts={}),"function"==typeof opts&&"function"==typeof callback&&(callback=opts,opts={}),"string"==typeof url&&url.startsWith("http")?(callback=once(callback),void request(parseUrl(url).protocol)(url,res=>{if(res.once("error",callback),res.statusCode>=400)return callback(new Error(`Failed to download with ${res.statusCode}`));const params={path:"add",qs:opts,files:res},transform=(res,callback)=>DAGNodeStream.streamToValue(send,res,callback);send.andTransform(params,transform,callback)}).end()):callback(new Error('"url" param must be an http(s) url'))})})},function(module,exports,__webpack_require__){"use strict";const promisify=__webpack_require__(4);module.exports=(send=>{return promisify((opts,callback)=>{"function"==typeof opts&&(callback=opts,opts={}),send({path:"version",qs:opts},(err,result)=>{if(err)return callback(err);const version={version:result.Version,commit:result.Commit,repo:result.Repo};callback(null,version)})})})},function(module,exports,__webpack_require__){"use strict";const pkg=__webpack_require__(184);exports=module.exports=(()=>{return{"api-path":"/api/v0/","user-agent":`/node-${pkg.name}/${pkg.version}/`,host:"localhost",port:"5001",protocol:"http"}})},function(module,exports,__webpack_require__){"use strict";(function(Buffer){const DAGNode=__webpack_require__(81).DAGNode,parallel=__webpack_require__(141),streamToValue=__webpack_require__(17);module.exports=function(send,hash,callback){parallel([function(done){send({path:"object/get",args:hash},done)},function(done){send({path:"object/data",args:hash},done)}],function(err,res){if(err)return callback(err);var object=res[0],stream=res[1];Buffer.isBuffer(stream)?DAGNode.create(stream,object.Links,callback):streamToValue(stream,(err,data)=>{return err?callback(err):void DAGNode.create(data,object.Links,callback)})})}}).call(exports,__webpack_require__(0).Buffer)},function(module,exports,__webpack_require__){"use strict";function headers(file){const name=file.path||"",header={"Content-Disposition":`file; filename="${name}"`};return file.dir||!file.content?header["Content-Type"]="application/x-directory":file.symlink?header["Content-Type"]="application/symlink":header["Content-Type"]="application/octet-stream",header}function strip(name,base){const smallBase=base.split("/").slice(0,-1).join("/")+"/";return name.replace(smallBase,"")}function loadPaths(opts,file){const path=__webpack_require__(249),fs=__webpack_require__(354),glob=__webpack_require__(355),followSymlinks=null==opts.followSymlinks||opts.followSymlinks;file=path.resolve(file);const stats=fs.statSync(file);if(stats.isDirectory()&&!opts.recursive)throw new Error("Can only add directories using --recursive");if(stats.isDirectory()&&opts.recursive){const mg=new glob.sync.GlobSync(`${file}/**/*`,{follow:followSymlinks});return mg.found.map(name=>{return mg.symlinks[name]===!0?{path:strip(name,file),symlink:!0,dir:!1,content:fs.readlinkSync(name)}:"FILE"===mg.cache[name]?{path:strip(name,file),symlink:!1,dir:!1,content:fs.createReadStream(name)}:"DIR"===mg.cache[name]||mg.cache[name]instanceof Array?{path:strip(name,file),symlink:!1,dir:!0}:void 0}).filter(Boolean)}return{path:file,content:fs.createReadStream(file)}}function getFilesStream(files,opts){if(!files)return null;const mp=new Multipart;return flatmap(files,file=>{if("string"==typeof file){if(!isNode)throw new Error("Can not add paths in node");return loadPaths(opts,file)}return file.path&&!file.content?(file.dir=!0,file):file.path&&(file.content||file.dir)?file:{path:"",symlink:!1,dir:!1,content:file}}).forEach(file=>{mp.addPart({headers:headers(file),body:file.content})}),mp}const isNode=__webpack_require__(49),Multipart=__webpack_require__(242),flatmap=__webpack_require__(164);exports=module.exports=getFilesStream},function(module,exports,__webpack_require__){"use strict";function requireCommands(){const cmds={add:__webpack_require__(44),cat:__webpack_require__(119),createAddStream:__webpack_require__(120),bitswap:__webpack_require__(313),block:__webpack_require__(314),bootstrap:__webpack_require__(315),commands:__webpack_require__(316),config:__webpack_require__(317),dht:__webpack_require__(318),diag:__webpack_require__(319),id:__webpack_require__(321),get:__webpack_require__(121),log:__webpack_require__(322),ls:__webpack_require__(323),mount:__webpack_require__(324),name:__webpack_require__(325),object:__webpack_require__(326),pin:__webpack_require__(327),ping:__webpack_require__(328),refs:__webpack_require__(330),repo:__webpack_require__(331),swarm:__webpack_require__(332),pubsub:__webpack_require__(329),update:__webpack_require__(333),version:__webpack_require__(336)};return cmds.files=function(send){const files=__webpack_require__(320)(send);return files.add=__webpack_require__(44)(send),files.createAddStream=__webpack_require__(120)(send),files.get=__webpack_require__(121)(send),files.cat=__webpack_require__(119)(send),files},cmds.util=function(send){const util={addFromFs:__webpack_require__(334)(send),addFromStream:__webpack_require__(44)(send),addFromURL:__webpack_require__(335)(send)};return util},cmds}function loadCommands(send){const files=requireCommands(),cmds={};return Object.keys(files).forEach(file=>{cmds[file]=files[file](send)}),cmds}module.exports=loadCommands},function(module,exports,__webpack_require__){"use strict";const TransformStream=__webpack_require__(42).Transform,PubsubMessage=__webpack_require__(342);class PubsubMessageStream extends TransformStream{constructor(options){const opts=Object.assign(options||{},{objectMode:!0});super(opts)}static from(inputStream,callback){let outputStream=inputStream.pipe(new PubsubMessageStream);inputStream.on("end",()=>outputStream.emit("end")),callback(null,outputStream)}_transform(obj,enc,callback){try{const message=PubsubMessage.deserialize(obj,"base64");this.push(message)}catch(e){}callback()}}module.exports=PubsubMessageStream},function(module,exports,__webpack_require__){"use strict";const Base58=__webpack_require__(10),Base64=__webpack_require__(182).Base64,PubsubMessage=__webpack_require__(343);class PubsubMessageUtils{static create(senderId,data,seqNo,topics){return new PubsubMessage(senderId,data,seqNo,topics)}static deserialize(data,enc="json"){if(enc=enc?enc.toLowerCase():null,"json"===enc)return PubsubMessageUtils._deserializeFromJson(data);if("base64"===enc)return PubsubMessageUtils._deserializeFromBase64(data);throw new Error(`Unsupported encoding: '${enc}'`)}static _deserializeFromJson(data){const json=JSON.parse(data);return PubsubMessageUtils._deserializeFromBase64(json)}static _deserializeFromBase64(obj){if(!PubsubMessageUtils._isPubsubMessage(obj))throw new Error(`Not a pubsub message`);const senderId=Base58.encode(obj.from),payload=Base64.decode(obj.data),seqno=Base64.decode(obj.seqno),topics=obj.topicIDs;return PubsubMessageUtils.create(senderId,payload,seqno,topics)}static _isPubsubMessage(obj){return obj&&obj.from&&obj.seqno&&obj.data&&obj.topicIDs}}module.exports=PubsubMessageUtils},function(module,exports){"use strict";class PubsubMessage{constructor(senderId,data,seqNo,topics){this._senderId=senderId,this._data=data,this._seqNo=seqNo,this._topics=topics}get from(){return this._senderId}get data(){return this._data}get seqno(){return this._seqNo}get topicIDs(){return this._topics}}module.exports=PubsubMessage},function(module,exports,__webpack_require__){"use strict";function parseError(res,cb){const error=new Error(`Server responded with ${res.statusCode}`);streamToJsonValue(res,(err,payload)=>{return err?cb(err):(payload&&(error.code=payload.Code,error.message=payload.Message||payload.toString()),void cb(error))})}function onRes(buffer,cb){return res=>{const stream=Boolean(res.headers["x-stream-output"]),chunkedObjects=Boolean(res.headers["x-chunked-output"]),isJson=res.headers["content-type"]&&0===res.headers["content-type"].indexOf("application/json");return res.statusCode>=400||!res.statusCode?parseError(res,cb):stream&&!buffer?cb(null,res):chunkedObjects&&isJson?cb(null,res.pipe(ndjson.parse())):isJson?streamToJsonValue(res,cb):streamToValue(res,cb)}}function requestAPI(config,options,callback){options.qs=options.qs||{},callback=once(callback),Array.isArray(options.files)&&(options.qs.recursive=!0),Array.isArray(options.path)&&(options.path=options.path.join("/")),options.args&&!Array.isArray(options.args)&&(options.args=[options.args]),options.args&&(options.qs.arg=options.args),options.files&&!Array.isArray(options.files)&&(options.files=[options.files]),options.qs.r&&(options.qs.recursive=options.qs.r,delete options.qs.r),options.qs["stream-channels"]=!0;let stream;options.files&&(stream=getFilesStream(options.files,options.qs)),delete options.qs.followSymlinks;const method="POST",headers={};if(isNode&&(headers["User-Agent"]=config["user-agent"]),options.files){if(!stream.boundary)return callback(new Error("No boundary in multipart stream"));headers["Content-Type"]=`multipart/form-data; boundary=${stream.boundary}`}const qs=Qs.stringify(options.qs,{arrayFormat:"repeat"}),req=request(config.protocol)({hostname:config.host,path:`${config["api-path"]}${options.path}?${qs}`,port:config.port,method:method,headers:headers},onRes(options.buffer,callback));return req.on("error",err=>{callback(err)}),options.files?stream.pipe(req):req.end(),req}const Qs=__webpack_require__(264),isNode=__webpack_require__(49),ndjson=__webpack_require__(92),once=__webpack_require__(94),getFilesStream=__webpack_require__(339),streamToValue=__webpack_require__(17),streamToJsonValue=__webpack_require__(345),request=__webpack_require__(122);exports=module.exports=(config=>{const send=(options,callback)=>{return"object"!=typeof options?callback(new Error("no options were passed")):requestAPI(config,options,callback)};return send.andTransform=((options,transform,callback)=>{return send(options,(err,res)=>{return err?callback(err):void transform(res,callback)})}),send})},function(module,exports,__webpack_require__){"use strict";(function(Buffer){function streamToJsonValue(res,cb){streamToValue(res,(err,data)=>{if(err)return cb(err);if(!data||0===data.length)return cb();Buffer.isBuffer(data)&&(data=data.toString());let res;try{res=JSON.parse(data)}catch(err){return cb(err)}cb(null,res)})}const streamToValue=__webpack_require__(17);module.exports=streamToJsonValue}).call(exports,__webpack_require__(0).Buffer)},function(module,exports){"use strict";function stringlistToArray(res,cb){cb(null,res.Strings||[])}module.exports=stringlistToArray},function(module,exports,__webpack_require__){"use strict";const tar=__webpack_require__(298),ReadableStream=__webpack_require__(42).Readable;class TarStreamToObjects extends ReadableStream{constructor(options){const opts=Object.assign(options||{},{objectMode:!0});super(opts)}static from(inputStream,callback){let outputStream=new TarStreamToObjects;inputStream.pipe(tar.extract()).on("entry",(header,stream,next)=>{stream.on("end",next),"directory"!==header.type?outputStream.push({path:header.name,content:stream}):(outputStream.push({path:header.name}),stream.resume())}).on("finish",()=>outputStream.push(null)),callback(null,outputStream)}_read(){}}module.exports=TarStreamToObjects},function(module,exports){},function(module,exports){},function(module,exports){},function(module,exports){},function(module,exports){},function(module,exports){},function(module,exports){},function(module,exports){},function(module,exports,__webpack_require__){module.exports=__webpack_require__(123)}]);