varn=r(661),i=r(357),o=r(355);functions(){try{vare=newUint8Array(1);returne.__proto__={__proto__:Uint8Array.prototype,foo:function(){return42}},42===e.foo()&&"function"==typeofe.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}functiona(){returnc.TYPED_ARRAY_SUPPORT?2147483647:1073741823}functionu(e,t){if(a()<t)thrownewRangeError("Invalid typed array length");returnc.TYPED_ARRAY_SUPPORT?(e=newUint8Array(t),e.__proto__=c.prototype):(null===e&&(e=newc(t)),e.length=t),e}functionc(e,t,r){if(!(c.TYPED_ARRAY_SUPPORT||thisinstanceofc))returnnewc(e,t,r);if("number"==typeofe){if("string"==typeoft)thrownewError("If encoding is specified then the first argument must be a string");returnp(this,e)}returnf(this,e,t,r)}functionf(e,t,r,n){if("number"==typeoft)thrownewTypeError('"value" argument must not be a number');return"undefined"!=typeofArrayBuffer&&tinstanceofArrayBuffer?g(e,t,r,n):"string"==typeoft?d(e,t,r):m(e,t)}functionl(e){if("number"!=typeofe)thrownewTypeError('"size" argument must be a number');if(e<0)thrownewRangeError('"size" argument must not be negative')}functionh(e,t,r,n){returnl(t),t<=0?u(e,t):void0!==r?"string"==typeofn?u(e,t).fill(r,n):u(e,t).fill(r):u(e,t)}functionp(e,t){if(l(t),e=u(e,t<0?0:0|b(t)),!c.TYPED_ARRAY_SUPPORT)for(varr=0;r<t;++r)e[r]=0;returne}functiond(e,t,r){if("string"==typeofr&&""!==r||(r="utf8"),!c.isEncoding(r))thrownewTypeError('"encoding" must be a valid string encoding');varn=0|_(t,r);e=u(e,n);vari=e.write(t,r);returni!==n&&(e=e.slice(0,i)),e}functiony(e,t){varr=t.length<0?0:0|b(t.length);e=u(e,r);for(varn=0;n<r;n+=1)e[n]=255&t[n];returne}functiong(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)thrownewRangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))thrownewRangeError("'length' is out of bounds");returnt=void0===r&&void0===n?newUint8Array(t):void0===n?newUint8Array(t,r):newUint8Array(t,r,n),c.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=c.prototype):e=y(e,t),e}functionm(e,t){if(c.isBuffer(t)){varr=0|b(t.length);returne=u(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeofArrayBuffer&&t.bufferinstanceofArrayBuffer||"length"int)return"number"!=typeoft.length||te(t.length)?u(e,0):y(e,t);if("Buffer"===t.type&&o(t.data))returny(e,t.data)}thrownewTypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}functionb(e){if(e>=a())thrownewRangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return0|e}functionv(e){return+e!=e&&(e=0),c.alloc(+e)}function_(e,t){if(c.isBuffer(e))returne.length;if("undefined"!=typeofArrayBuffer&&"function"==typeofArrayBuffer.isView&&(ArrayBuffer.isView(e)||einstanceofArrayBuffer))returne.byteLength;"string"!=typeofe&&(e=""+e);varr=e.length;if(0===r)return0;for(varn=!1;;)switch(t){case"ascii":case"latin1":case"binary":returnr;case"utf8":case"utf-8":casevoid0:returnJ(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return2*r;case"hex":returnr>>>1;case"base64":returnQ(e).length;default:if(n)returnJ(e).length;t=(""+t).toLowerCase(),n=!0}}functionw(e,t,r){varn=!1;if((void0===t||t<0)&&(t=0),t>this.length)return"";if((void0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":returnM(this,t,r);case"utf8":case"utf-8":returnO(this,t,r);case"ascii":returnL(this,t,r);case"latin1":case"binary":returnj(this,t,r);case"base64":returnP(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnD(this,t,r);default:if(n)thrownewTypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}functionS(e,t,r){varn=e[t];e[t]=e[r],e[r]=n}functionk(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeofr?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}elseif(r<0){if(!i)return-1;r=0}if("string"==typeoft&&(t=c.from(t,n)),c.isBuffer(t))return0===t.length?-1:E(e,t,r,n
varn=function(e,t){returnfunction(){varr=Array.prototype.slice.call(arguments),n=r.length-1,i=r&&r.length>0?r[n]:null,o="function"==typeofi?i:null;returno?e.apply(t,r):newPromise(function(n,i){r.push(function(e,t){if(e)returni(e);n(t)}),e.apply(t,r)})}};e.exports=function(e,t){t=t||{};varr=Object.prototype.toString.call(e);if("[object Object]"===r||"[object Array]"===r){vari=t.replace?e:{};for(varoine)e.hasOwnProperty(o)&&(i[o]=n(e[o]));returni}returnn(e,t.context||e)}},function(e,t,r){(function(n){functioni(){return!("undefined"==typeofwindow||!window.process||"renderer"!==window.process.type)||("undefined"==typeofnavigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeofdocument&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeofwindow&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeofnavigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeofnavigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}functiono(e){varr=this.useColors;if(e[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+e[0]+(r?"%c ":" ")+"+"+t.humanize(this.diff),r){varn="color: "+this.color;e.splice(1,0,n,"color: inherit");vari=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))}),e.splice(o,0,n)}}functions(){return"object"==typeofconsole&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}functiona(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}functionu(){vare;try{e=t.storage.debug}catch(e){}return!e&&void0!==n&&"env"inn&&(e=n.env.DEBUG),e}functionc(){try{returnwindow.localStorage}catch(e){}}t=e.exports=r(659),t.log=s,t.formatArgs=o,t.save=a,t.load=u,t.useColors=i,t.storage="undefined"!=typeofchrome&&void0!==chrome.storage?chrome.storage.local:c(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{returnJSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(this,r(7))},function(e,t,r){varn=r(0),i=n.Buffer;functiono(e,t){for(varrine)t[r]=e[r]}functions(e,t,r){returni(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeofe)thrownewTypeError("Argument must not be a number");returni(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeofe)thrownewTypeError("Argument must be a number");varn=i(e);returnvoid0!==t?"string"==typeofr?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeofe)thrownewTypeError("Argument must be a number");returni(e)},s.allocUnsafeSlow=function(e){if("number"!=typeofe)thrownewTypeError("Argument must be a number");returnn.SlowBuffer(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});varn=r(236),i=o(n);functiono(e){returne&&e.__esModule?e:{default:e}}t.default=i.default,e.exports=t.default},function(e,t){"function"==typeofObject.create?e.exports=functione(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}
!function(){"use strict";vars="input is invalid type",a="object"==typeofwindow,u=a?window:{};u.JS_SHA3_NO_WINDOW&&(a=!1);varc=!a&&"object"==typeofself,f=!u.JS_SHA3_NO_NODE_JS&&"object"==typeofn&&n.versions&&n.versions.node;f?u=i:c&&(u=self);varl=!u.JS_SHA3_NO_COMMON_JS&&"object"==typeofe&&e.exports,h=r(764),p=!u.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeofArrayBuffer,d="0123456789abcdef".split(""),y=[31,7936,2031616,520093696],g=[4,1024,262144,67108864],m=[1,256,65536,16777216],b=[6,1536,393216,100663296],v=[0,8,16,24],_=[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],w=[224,256,384,512],S=[128,256],k=["hex","buffer","arrayBuffer","array","digest"],E={128:168,256:136};!u.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!p||!u.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeofe&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(varA=function(e,t,r){returnfunction(n){returnnewH(e,t,e).update(n)[r]()}},x=function(e,t,r){returnfunction(n,i){returnnewH(e,t,i).update(n)[r]()}},I=function(e,t,r){returnfunction(t,n,i,o){returnL["cshake"+e].update(t,n,i,o)[r]()}},T=function(e,t,r){returnfunction(t,n,i,o){returnL["kmac"+e].update(t,n,i,o)[r]()}},B=function(e,t,r,n){for(vari=0;i<k.length;++i){varo=k[i];e[o]=t(r,n,o)}returne},C=function(e,t){varr=A(e,t,"hex");returnr.create=function(){returnnewH(e,t,e)},r.update=function(e){returnr.create().update(e)},B(r,A,e,t)},P=function(e,t){varr=x(e,t,"hex");returnr.create=function(r){returnnewH(e,t,r)},r.update=function(e,t){returnr.create(t).update(e)},B(r,x,e,t)},O=function(e,t){varr=E[e],n=I(e,t,"hex");returnn.create=function(n,i,o){returni||o?newH(e,t,n).bytepad([i,o],r):L["shake"+e].create(n)},n.update=function(e,t,r,i){returnn.create(t,r,i).update(e)},B(n,I,e,t)},R=function(e,t){varr=E[e],n=T(e,t,"hex");returnn.create=function(n,i,o){returnnewz(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){returnn.create(e,r,i).update(t)},B(n,T,e,t)},N=[{name:"keccak",padding:m,bits:w,createMethod:C},{name:"sha3",padding:b,bits:w,createMethod:C},{name:"shake",padding:y,bits:S,createMethod:P},{name:"cshake",padding:g,bits:S,createMethod:O},{name:"kmac",padding:g,bits:S,createMethod:R}],L={},j=[],M=0;M<N.length;++M)for(varD=N[M],K=D.bits,U=0;U<K.length;++U){varF=D.name+"_"+K[U];if(j.push(F),L[F]=D.createMethod(K[U],D.padding),"sha3"!==D.name){varq=D.name+K[U];j.push(q),L[q]=L[F]}}functionH(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(varn=0;n<50;++n)this.s[n]=0}functionz(e,t,r){H.call(this,e,t,r)}H.prototype.update=function(e){if(!this.finalized){vart,r=typeofe;if("string"!==r){if("object"!==r)throws;if(null===e)throws;if(p&&e.constructor===ArrayBuffer)e=newUint8Array(e);elseif(!(Array.isArray(e)||p&&ArrayBuffer.isView(e)))throws;t=!0}for(varn=this.blocks,i=this.byteCount,o=e.length,a=this.blockCount,u=0,c=this.s,f,l;u<o;){if(this.reset)for(this.reset=!1,n[0]=this.block,f=1;f<a+1;++f)n[f]=0;if(t)for(f=this.start;u<o&&f<i;++u)n[f>>2]|=e[u]<<v[3&f++];elsefor(f=this.start;u<o&&f<i;++u)l=e.charCodeAt(u),l<128?n[f>>2]|=l<<v[3&f++]:l<2048?(n[f>>2]|=(192|l>>6)<<v[3&f++],n[f>>2]|=(128|63&l)<<v[3&f++]):l<55296||l>=57344?(n[f>>2]|=(224|l>>12)<<v[3&f++],n[f>>2]|=(128|l>>6&63)<<v[3&f++],n[f>>2]|=(128|63&l)<<v[3&f++]):(l=65536+((1023&l)<<10|1023&e.charCodeAt(++u)),n[f>>2]|=(240|l>>18)<<v[3&f++],n[f>>2]|=(128|l>>12&63)<<v[3&f++],n[f>>2]|=(128|l>>6&63)<<v[3&f++],n[f>>2]|=(128|63&l)<<v[3&f++]);if(this.lastByteIndex=f,f>=i
/**
*@fileWebCryptographyAPIshim
*@authorArtemSVybornov<vybornov@gmail.com>
*@licenseMIT
*/
e.exports=functione(t){"use strict";if("function"!=typeofPromise)throw"Promise support required";varr=t.crypto||t.msCrypto;if(r){varn=r.subtle||r.webkitSubtle;if(n){vari=t.Crypto||r.constructor||Object,o=t.SubtleCrypto||n.constructor||Object,s=t.CryptoKey||t.Key||Object,a=t.navigator.userAgent.indexOf("Edge/")>-1,u=!!t.msCrypto&&!a,c=!r.subtle&&!!r.webkitSubtle;if(u||c){varf={KoZIhvcNAQEB:"1.2.840.113549.1.1.1"},l={"1.2.840.113549.1.1.1":"KoZIhvcNAQEB"};if(["generateKey","importKey","unwrapKey"].forEach(function(e){vart=n[e];n[e]=function(i,o,s){vara=[].slice.call(arguments),f,l,h,p;switch(e){case"generateKey":f=m(i),l=o,h=s;break;case"importKey":f=m(s),l=a[3],h=a[4],"jwk"===i&&(o=v(o),o.alg||(o.alg=b(f)),o.key_ops||(o.key_ops="oct"!==o.kty?"d"ino?h.filter(I):h.filter(x):h.slice()),a[1]=_(o));break;case"unwrapKey":f=a[4],l=a[5],h=a[6],a[2]=s._key}if("generateKey"===e&&"HMAC"===f.name&&f.hash)returnf.length=f.length||{"SHA-1":512,"SHA-256":512,"SHA-384":1024,"SHA-512":1024}[f.hash.name],n.importKey("raw",r.getRandomValues(newUint8Array(f.length+7>>3)),f,l,h);if(c&&"generateKey"===e&&"RSASSA-PKCS1-v1_5"===f.name&&(!f.modulusLength||f.modulusLength>=2048))returni=m(i),i.name="RSAES-PKCS1-v1_5",deletei.hash,n.generateKey(i,!0,["encrypt","decrypt"]).then(function(e){returnPromise.all([n.exportKey("jwk",e.publicKey),n.exportKey("jwk",e.privateKey)])}).then(function(e){returne[0].alg=e[1].alg=b(f),e[0].key_ops=h.filter(x),e[1].key_ops=h.filter(I),Promise.all([n.importKey("jwk",e[0],f,!0,e[0].key_ops),n.importKey("jwk",e[1],f,l,e[1].key_ops)])}).then(function(e){return{publicKey:e[0],privateKey:e[1]}});if((c||u&&"SHA-1"===(f.hash||{}).name)&&"importKey"===e&&"jwk"===i&&"HMAC"===f.name&&"oct"===o.kty)returnn.importKey("raw",y(d(o.k)),s,a[3],a[4]);if(c&&"importKey"===e&&("spki"===i||"pkcs8"===i))returnn.importKey("jwk",w(o),s,a[3],a[4]);if(u&&"unwrapKey"===e)returnn.decrypt(a[3],s,o).then(function(e){returnn.importKey(i,e,a[4],a[5],a[6])});try{p=t.apply(n,a)}catch(e){returnPromise.reject(e)}returnu&&(p=newPromise(function(e,t){p.onabort=p.onerror=function(e){t(e)},p.oncomplete=function(t){e(t.target.result)}})),p=p.then(function(e){return"HMAC"===f.name&&(f.length||(f.length=8*e.algorithm.length)),0==f.name.search("RSA")&&(f.modulusLength||(f.modulusLength=(e.publicKey||e).algorithm.modulusLength),f.publicExponent||(f.publicExponent=(e.publicKey||e).algorithm.publicExponent)),e=e.publicKey&&e.privateKey?{publicKey:newA(e.publicKey,f,l,h.filter(x)),privateKey:newA(e.privateKey,f,l,h.filter(I))}:newA(e,f,l,h),e}),p}}),["exportKey","wrapKey"].forEach(function(e){vart=n[e];n[e]=function(r,i,o){vars=[].slice.call(arguments),a;switch(e){case"exportKey":s[1]=i._key;break;case"wrapKey":s[1]=i._key,s[2]=o._key}if((c||u&&"SHA-1"===(i.algorithm.hash||{}).name)&&"exportKey"===e&&"jwk"===r&&"HMAC"===i.algorithm.name&&(s[0]="raw"),!c||"exportKey"!==e||"spki"!==r&&"pkcs8"!==r||(s[0]="jwk"),u&&"wrapKey"===e)returnn.exportKey(r,i).then(function(e){return"jwk"===r&&(e=y(unescape(encodeURIComponent(JSON.stringify(v(e)))))),n.encrypt(s[3],o,e)});try{a=t.apply(n,s)}catch(e){returnPromise.reject(e)}returnu&&(a=newPromise(function(e,t){a.onabort=a.onerror=function(e){t(e)},a.oncomplete=function(t){e(t.target.result)}})),"exportKey"===e&&"jwk"===r&&(a=a.then(function(e){return(c||u&&"SHA-1"===(i.algorithm.hash||{}).name)&&"HMAC"===i.algorithm.name?{kty:"oct",alg:b(i.algorithm),key_ops:i.usages.slice(),ext:!0,k:p(g(e))}:(e=v(e),e.alg||(e.alg=b(i.algorithm)),e.key_ops||(e.key_ops="public"===i.type?i.usages.filter(x):"private"===i.type?i.usages.filter(I):i.usages.slice()),e)})),!c||"exportKey"!==e||"spki"!==r&&"pkcs8"!==r||(a=a.then(function(e){returne=S(v(e)),e})),a}}),["encrypt","decrypt","sign","verify"].forEach(function(e){vart=n[e];n[e]=function(r,i,o,s){if(u&&(!o.byteLength||s&&!s.byteLength))thrownewError("Empy input is not allowed");vara=[].slice.call(arguments),c=m(r),f;if(u&&"decrypt"===e&&"AES-GCM"===c.name){varl=r.tagLength>>3;a[2]=(o.buffer||o).slice(0,o.byteLength-l),r.tag=(o.buffer||o).slice(o.byteLength-
varn=r(33),i=r(34),o=r(35);functions(){try{vare=newUint8Array(1);returne.__proto__={__proto__:Uint8Array.prototype,foo:function(){return42}},42===e.foo()&&"function"==typeofe.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}functiona(){returnc.TYPED_ARRAY_SUPPORT?2147483647:1073741823}functionu(e,t){if(a()<t)thrownewRangeError("Invalid typed array length");returnc.TYPED_ARRAY_SUPPORT?(e=newUint8Array(t),e.__proto__=c.prototype):(null===e&&(e=newc(t)),e.length=t),e}functionc(e,t,r){if(!(c.TYPED_ARRAY_SUPPORT||thisinstanceofc))returnnewc(e,t,r);if("number"==typeofe){if("string"==typeoft)thrownewError("If encoding is specified then the first argument must be a string");returnp(this,e)}returnf(this,e,t,r)}functionf(e,t,r,n){if("number"==typeoft)thrownewTypeError('"value" argument must not be a number');return"undefined"!=typeofArrayBuffer&&tinstanceofArrayBuffer?g(e,t,r,n):"string"==typeoft?d(e,t,r):m(e,t)}functionl(e){if("number"!=typeofe)thrownewTypeError('"size" argument must be a number');if(e<0)thrownewRangeError('"size" argument must not be negative')}functionh(e,t,r,n){returnl(t),t<=0?u(e,t):void0!==r?"string"==typeofn?u(e,t).fill(r,n):u(e,t).fill(r):u(e,t)}functionp(e,t){if(l(t),e=u(e,t<0?0:0|b(t)),!c.TYPED_ARRAY_SUPPORT)for(varr=0;r<t;++r)e[r]=0;returne}functiond(e,t,r){if("string"==typeofr&&""!==r||(r="utf8"),!c.isEncoding(r))thrownewTypeError('"encoding" must be a valid string encoding');varn=0|_(t,r);e=u(e,n);vari=e.write(t,r);returni!==n&&(e=e.slice(0,i)),e}functiony(e,t){varr=t.length<0?0:0|b(t.length);e=u(e,r);for(varn=0;n<r;n+=1)e[n]=255&t[n];returne}functiong(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)thrownewRangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))thrownewRangeError("'length' is out of bounds");returnt=void0===r&&void0===n?newUint8Array(t):void0===n?newUint8Array(t,r):newUint8Array(t,r,n),c.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=c.prototype):e=y(e,t),e}functionm(e,t){if(c.isBuffer(t)){varr=0|b(t.length);returne=u(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeofArrayBuffer&&t.bufferinstanceofArrayBuffer||"length"int)return"number"!=typeoft.length||te(t.length)?u(e,0):y(e,t);if("Buffer"===t.type&&o(t.data))returny(e,t.data)}thrownewTypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}functionb(e){if(e>=a())thrownewRangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return0|e}functionv(e){return+e!=e&&(e=0),c.alloc(+e)}function_(e,t){if(c.isBuffer(e))returne.length;if("undefined"!=typeofArrayBuffer&&"function"==typeofArrayBuffer.isView&&(ArrayBuffer.isView(e)||einstanceofArrayBuffer))returne.byteLength;"string"!=typeofe&&(e=""+e);varr=e.length;if(0===r)return0;for(varn=!1;;)switch(t){case"ascii":case"latin1":case"binary":returnr;case"utf8":case"utf-8":casevoid0:returnJ(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return2*r;case"hex":returnr>>>1;case"base64":returnQ(e).length;default:if(n)returnJ(e).length;t=(""+t).toLowerCase(),n=!0}}functionw(e,t,r){varn=!1;if((void0===t||t<0)&&(t=0),t>this.length)return"";if((void0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":returnM(this,t,r);case"utf8":case"utf-8":returnO(this,t,r);case"ascii":returnL(this,t,r);case"latin1":case"binary":returnj(this,t,r);case"base64":returnP(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":returnD(this,t,r);default:if(n)thrownewTypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}functionS(e,t,r){varn=e[t];e[t]=e[r],e[r]=n}functionk(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeofr?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}elseif(r<0){if(!i)return-1;r=0}if("string"==typeoft&&(t=c.from(t,n)),c.isBuffer(t))return0===t.length?-1:E(e,t,r,n,i)
functionn(e,t){if(e===t)return0;for(varr=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}returnr<n?-1:n<r?1:0}functioni(e){returnt.Buffer&&"function"==typeoft.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}varo=r(16),s=Object.prototype.hasOwnProperty,a=Array.prototype.slice,u="foo"===functione(){}.name;functionc(e){returnObject.prototype.toString.call(e)}functionf(e){return!i(e)&&("function"==typeoft.ArrayBuffer&&("function"==typeofArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(einstanceofDataView||!!(e.buffer&&e.bufferinstanceofArrayBuffer))))}varl=e.exports=b,h=/\s*function\s+([^\(\s]*)\s*/;functionp(e){if(o.isFunction(e)){if(u)returne.name;vart=e.toString(),r=t.match(h);returnr&&r[1]}}functiond(e,t){return"string"==typeofe?e.length<t?e:e.slice(0,t):e}functiony(e){if(u||!o.isFunction(e))returno.inspect(e);vart=p(e),r=t?": "+t:"";return"[Function"+r+"]"}functiong(e){returnd(y(e.actual),128)+" "+e.operator+" "+d(y(e.expected),128)}functionm(e,t,r,n,i){thrownewl.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}functionb(e,t){e||m(e,!0,t,"==",l.ok)}functionv(e,t,r,s){if(e===t)return!0;if(i(e)&&i(t))return0===n(e,t);if(o.isDate(e)&&o.isDate(t))returne.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))returne.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeofe||null!==t&&"object"==typeoft){if(f(e)&&f(t)&&c(e)===c(t)&&!(einstanceofFloat32Array||einstanceofFloat64Array))return0===n(newUint8Array(e.buffer),newUint8Array(t.buffer));if(i(e)!==i(t))return!1;s=s||{actual:[],expected:[]};vara=s.actual.indexOf(e);return-1!==a&&a===s.expected.indexOf(t)||(s.actual.push(e),s.expected.push(t),w(e,t,r,s))}returnr?e===t:e==t}function_(e){return"[object Arguments]"==Object.prototype.toString.call(e)}functionw(e,t,r,n){if(null===e||void0===e||null===t||void0===t)return!1;if(o.isPrimitive(e)||o.isPrimitive(t))returne===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;vari=_(e),s=_(t);if(i&&!s||!i&&s)return!1;if(i)returne=a.call(e),t=a.call(t),v(e,t,r);varu=x(e),c=x(t),f,l;if(u.length!==c.length)return!1;for(u.sort(),c.sort(),l=u.length-1;l>=0;l--)if(u[l]!==c[l])return!1;for(l=u.length-1;l>=0;l--)if(f=u[l],!v(e[f],t[f],r,n))return!1;return!0}functionS(e,t,r){v(e,t,!0)&&m(e,t,r,"notDeepStrictEqual",S)}functionk(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))returnt.test(e);try{if(einstanceoft)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}functionE(e){vart;try{e()}catch(e){t=e}returnt}functionA(e,t,r,n){vari;if("function"!=typeoft)thrownewTypeError('"block" argument must be a function');"string"==typeofr&&(n=r,r=null),i=E(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&m(i,r,"Missing expected exception"+n);vars="string"==typeofn,a=!e&&o.isError(i),u=!e&&i&&!r;if((a&&s&&k(i,r)||u)&&m(i,r,"Got unwanted exception"+n),e&&i&&r&&!k(i,r)||!e&&i)throwi}l.AssertionError=functione(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=g(this),this.generatedMessage=!0);varr=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{varn=newError;if(n.stack){vari=n.stack,o=p(r),s=i.indexOf("\n"+o);if(s>=0){vara=i.indexOf("\n",s+1);i=i.substring(a+1)}this.stack=i}}},o.inherits(l.AssertionError,Error),l.fail=m,l.ok=b,l.equal=functione(t,r,n){t!=r&&m(t,r,n,"==",l.equal)},l.notEqual=functione(t,r,n){t==r&&m(t,r,n,"!=",l.notEqual)},l.deepEqual=functione(t,r,n){v(t,r,!1)||m(t,r,n,"deepEqual",l.deepEqual)},l.deepStrictEqual=functione(t,r,n){v(t,r,!0)||m(t,r,n,"deepStrictEqual",l.deepStrictEqual)},l.notDeepEqual=functione(t,r,n){v(t,r,!1)&&m(t,r,n,"notDeepEqual",l.notDeepEqual)},l.notDeepStrictEqual=S,l.strictEqual=functione(t,r,n){t!==r&&m(t,r,n,"===",l.strictEq
/*!
*prr
*(c)2013RodVagg<rod@vagg.org>
*https://github.com/rvagg/prr
*License:MIT
*/
varn,i,o;n="prr",i=this,o=function(){vare="function"==typeofObject.defineProperty?function(e,t,r){returnObject.defineProperty(e,t,r),e}:function(e,t,r){returne[t]=r.value,e},t=function(e,t){varr="object"==typeoft,n=!r&&"string"==typeoft,i=function(e){returnr?!!t[e]:!!n&&t.indexOf(e[0])>-1};return{enumerable:i("enumerable"),configurable:i("configurable"),writable:i("writable"),value:e}},r=function(r,n,i,o){vars;if(o=t(i,o),"object"==typeofn){for(sinn)Object.hasOwnProperty.call(n,s)&&(o.value=n[s],e(r,s,o));returnr}returne(r,n,o)};returnr},e.exports?e.exports=o():i.prr=o()},function(e,t,r){"use strict";varn=r(247).AbstractLevelDOWN,i=r(247).AbstractChainedBatch,o=r(247).AbstractIterator,s=r(5),a=r(29),u=r(750),c=r(752).EncodingError;functionf(e,t){if(!(thisinstanceoff))returnnewf(e,t);n.call(this,""),t=t||{},void0===t.keyEncoding&&(t.keyEncoding="utf8"),void0===t.valueEncoding&&(t.valueEncoding="utf8"),this.db=e,this.codec=newu(t)}functionl(e,t){o.call(this,e),this.codec=e.codec,this.keys=t.keys,this.values=t.values,this.opts=this.codec.encodeLtgt(t),this.it=e.db.iterator(this.opts)}functionh(e,t){i.call(this,e),this.codec=e.codec,this.batch=e.db.batch()}e.exports=f.default=f,s(f,n),f.prototype._serializeKey=f.prototype._serializeValue=function(e){returne},f.prototype._open=function(e,t){this.db.open(e,t)},f.prototype._close=function(e){this.db.close(e)},f.prototype._put=function(e,t,r,n){e=this.codec.encodeKey(e,r),t=this.codec.encodeValue(t,r),this.db.put(e,t,r,n)},f.prototype._get=function(e,t,r){varn=this;e=this.codec.encodeKey(e,t),t.asBuffer=this.codec.valueAsBuffer(t),this.db.get(e,t,function(e,i){if(e)returnr(e);try{i=n.codec.decodeValue(i,t)}catch(e){returnr(newc(e))}r(null,i)})},f.prototype._del=function(e,t,r){e=this.codec.encodeKey(e,t),this.db.del(e,t,r)},f.prototype._chainedBatch=function(){returnnewh(this)},f.prototype._batch=function(e,t,r){e=this.codec.encodeBatch(e,t),this.db.batch(e,t,r)},f.prototype._iterator=function(e){returne.keyAsBuffer=this.codec.keyAsBuffer(e),e.valueAsBuffer=this.codec.valueAsBuffer(e),newl(this,e)},f.prototype._setupIteratorOptions=function(e){returne=a(e),e.reverse=!!e.reverse,e.keys=!1!==e.keys,e.values=!1!==e.values,e.limit="limit"ine?e.limit:-1,e.keyAsBuffer=!1!==e.keyAsBuffer,e.valueAsBuffer=!1!==e.valueAsBuffer,e},f.prototype.approximateSize=function(e,t,r,n){returnthis.db.approximateSize(e,t,r,n)},s(l,o),l.prototype._next=function(e){vart=this;this.it.next(function(r,n,i){if(r)returne(r);try{n=t.keys&&void0!==n?t.codec.decodeKey(n,t.opts):void0,i=t.values&&void0!==i?t.codec.decodeValue(i,t.opts):void0}catch(r){returne(newc(r))}e(null,n,i)})},l.prototype._end=function(e){this.it.end(e)},s(h,i),h.prototype._put=function(e,t){e=this.codec.encodeKey(e),t=this.codec.encodeValue(t),this.batch.put(e,t)},h.prototype._del=function(e){e=this.codec.encodeKey(e),this.batch.del(e)},h.prototype._clear=function(){this.batch.clear()},h.prototype._write=function(e,t){this.batch.write(e,t)}},function(e,t,r){(function(t,n){vari=r(29),o=r(396),s=r(397),a=Object.prototype.hasOwnProperty,u="start end gt gte lt lte".split(" ");functionc(e){if(!arguments.length||void0===e)thrownewError("constructor requires at least a location argument");if("string"!=typeofe)thrownewError("constructor requires a location string argument");this.location=e,this.status="new"}functionf(e){vart={};for(varrine)a.call(e,r)&&(l(r)&&h(e[r])||(t[r]=e[r]));returnt}functionl(e){return-1!==u.indexOf(e)}functionh(e){return""===e||null==e||p(e)}functionp(e){returnn.isBuffer(e)&&0===e.length}c.prototype.open=function(e,t){varr=this,n=this.status;if("function"==typeofe&&(t=e),"function"!=typeoft)thrownewError("open() requires a callback argument");"object"!=typeofe&&(e={}),e.createIfMissing=!1!==e.createIfMissing,e.errorIfExists=!!e.errorIfExists,this.status="opening",this._open(e,function(e){if(e)returnr.status=n,t(e);r.status="open",t()})},c.prototype._open=function(e,r){t.nextTick(r)},c.prototype.close=function(e){vart=this,r=this.status;if("function"!=
varn,i;n=this,i=function(){"use strict";vare=function(e,r){returnt(e.slice(),r)};functiont(e,t){"function"!=typeoft&&(t=function(e,t){returnString(e).localeCompare(t)});varn=e.length;if(n<=1)returne;for(vari=newArray(n),o=1;o<n;o*=2){r(e,t,o,i);vars=e;e=i,i=s}returne}e.inplace=function(e,n){vari=t(e,n);returni!==e&&r(i,null,e.length,e),e};varr=function(e,t,r,n){vari=e.length,o=0,s=2*r,a,u,c,f,l;for(a=0;a<i;a+=s)for(u=a+r,c=u+r,u>i&&(u=i),c>i&&(c=i),f=a,l=u;;)if(f<u&&l<c)t(e[f],e[l])<=0?n[o++]=e[f++]:n[o++]=e[l++];elseif(f<u)n[o++]=e[f++];else{if(!(l<c))break;n[o++]=e[l++]}};returne},e.exports=i()},function(e,t,r){varn=r(773),i=r(775);e.exports=n,e.exports.parse=n,e.exports.stringify=i},function(e,t,r){varn=r(774),i=536870911,o=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],s=function(e){for(vart={};e.length;)switch(e[0]){case"[":case",":e.shift();varr=e.shift();if("("===r&&(r=e.shift(),e.shift()),"="!==e[0])thrownewError("Unexpected token in field options: "+e[0]);if(e.shift(),"]"===e[0])thrownewError("Unexpected ] in field option");t[r]=e.shift();break;case"]":returne.shift(),t;default:thrownewError("Unexpected token in field options: "+e[0])}thrownewError("No closing tag for field options")},a=function(e){for(vart={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};e.length;)switch(e[0]){case"=":e.shift(),t.tag=Number(e.shift());break;case"map":if(t.type="map",t.map={from:null,to:null},e.shift(),"<"!==e[0])thrownewError("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.from=e.shift(),","!==e[0])thrownewError("Unexpected token in map type: "+e[0]);if(e.shift(),t.map.to=e.shift(),">"!==e[0])thrownewError("Unexpected token in map type: "+e[0]);e.shift(),t.name=e.shift();break;case"repeated":case"required":case"optional":varr=e.shift();t.required="required"===r,t.repeated="repeated"===r,t.type=e.shift(),t.name=e.shift();break;case"[":t.options=s(e);break;case";":if(null===t.name)thrownewError("Missing field name");if(null===t.type)thrownewError("Missing type in message field: "+t.name);if(-1===t.tag)thrownewError("Missing tag number in message field: "+t.name);returne.shift(),t;default:thrownewError("Unexpected token in message field: "+e[0])}thrownewError("No ; found for message field")},u=function(e){for(vart={enums:[],messages:[],fields:[],extends:[],extensions:null};e.length;)switch(e[0]){case"map":case"repeated":case"optional":case"required":t.fields.push(a(e));break;case"enum":t.enums.push(y(e));break;case"message":t.messages.push(l(e));break;case"extensions":t.extensions=f(e);break;case"oneof":e.shift();varr=e.shift();if("{"!==e[0])thrownewError("Unexpected token in oneof: "+e[0]);for(e.shift();"}"!==e[0];){e.unshift("optional");varn=a(e);n.oneof=r,t.fields.push(n)}e.shift();break;case"extend":t.extends.push(c(e));break;case";":e.shift();break;case"reserved":case"option":for(e.shift();";"!==e[0];)e.shift();break;default:e.unshift("optional"),t.fields.push(a(e))}returnt},c=function(e){vart={name:e[1],message:l(e)};returnt},f=function(e){e.shift();vart=Number(e.shift());if(isNaN(t))thrownewError("Invalid from in extensions definition");if("to"!==e.shift())thrownewError("Expected keyword 'to' in extensions definition");varr=e.shift();if("max"===r&&(r=536870911),r=Number(r),isNaN(r))thrownewError("Invalid to in extensions definition");if(";"!==e.shift())thrownewError("Missing ; in extensions definition");return{from:t,to:r}},l=function(e){e.shift();vart=1,r=[],n={name:e.shift(),enums:[],extends:[],messages:[],fields:[]};if("{"!==e[0])thrownewError("Expected { but found "+e[0]);for(e.shift();e.length;){if("{"===e[0]?t++:"}"===e[0]&&t--,!t)returne.shift(),r=u(r),n.enums=r.enums,n.messages=r.messages,n.fields=r.fields,n.extends=r.extends,n.extensions=r.extensions,n;r.push(e.shift())}if(t)thrownewError("No closing tag for message")},h=function(e){e.shift();vart=e.shift();if(";"!==e[0])thrownewError("Expected ; but found "+e[0]);returne