@taquito/taquito
Version:
High level functionality that builds upon the other packages in the Tezos Typescript Library Suite.
2 lines • 806 kB
JavaScript
/*! For license information please see taquito.min.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.taquito=e():t.taquito=e()}(self,(()=>(()=>{var t={9437:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(5457);function n(t,e,r){return void 0===e&&(e=new Uint8Array(2)),void 0===r&&(r=0),e[r+0]=t>>>8,e[r+1]=t>>>0,e}function s(t,e,r){return void 0===e&&(e=new Uint8Array(2)),void 0===r&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e}function o(t,e){return void 0===e&&(e=0),t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3]}function a(t,e){return void 0===e&&(e=0),(t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3])>>>0}function c(t,e){return void 0===e&&(e=0),t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e]}function u(t,e){return void 0===e&&(e=0),(t[e+3]<<24|t[e+2]<<16|t[e+1]<<8|t[e])>>>0}function h(t,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),e[r+0]=t>>>24,e[r+1]=t>>>16,e[r+2]=t>>>8,e[r+3]=t>>>0,e}function l(t,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),e[r+0]=t>>>0,e[r+1]=t>>>8,e[r+2]=t>>>16,e[r+3]=t>>>24,e}function f(t,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),h(t/4294967296>>>0,e,r),h(t>>>0,e,r+4),e}function d(t,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),l(t>>>0,e,r),l(t/4294967296>>>0,e,r+4),e}e.readInt16BE=function(t,e){return void 0===e&&(e=0),(t[e+0]<<8|t[e+1])<<16>>16},e.readUint16BE=function(t,e){return void 0===e&&(e=0),(t[e+0]<<8|t[e+1])>>>0},e.readInt16LE=function(t,e){return void 0===e&&(e=0),(t[e+1]<<8|t[e])<<16>>16},e.readUint16LE=function(t,e){return void 0===e&&(e=0),(t[e+1]<<8|t[e])>>>0},e.writeUint16BE=n,e.writeInt16BE=n,e.writeUint16LE=s,e.writeInt16LE=s,e.readInt32BE=o,e.readUint32BE=a,e.readInt32LE=c,e.readUint32LE=u,e.writeUint32BE=h,e.writeInt32BE=h,e.writeUint32LE=l,e.writeInt32LE=l,e.readInt64BE=function(t,e){void 0===e&&(e=0);var r=o(t,e),i=o(t,e+4);return 4294967296*r+i-4294967296*(i>>31)},e.readUint64BE=function(t,e){return void 0===e&&(e=0),4294967296*a(t,e)+a(t,e+4)},e.readInt64LE=function(t,e){void 0===e&&(e=0);var r=c(t,e);return 4294967296*c(t,e+4)+r-4294967296*(r>>31)},e.readUint64LE=function(t,e){void 0===e&&(e=0);var r=u(t,e);return 4294967296*u(t,e+4)+r},e.writeUint64BE=f,e.writeInt64BE=f,e.writeUint64LE=d,e.writeInt64LE=d,e.readUintBE=function(t,e,r){if(void 0===r&&(r=0),t%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var i=0,n=1,s=t/8+r-1;s>=r;s--)i+=e[s]*n,n*=256;return i},e.readUintLE=function(t,e,r){if(void 0===r&&(r=0),t%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(t/8>e.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var i=0,n=1,s=r;s<r+t/8;s++)i+=e[s]*n,n*=256;return i},e.writeUintBE=function(t,e,r,n){if(void 0===r&&(r=new Uint8Array(t/8)),void 0===n&&(n=0),t%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!i.isSafeInteger(e))throw new Error("writeUintBE value must be an integer");for(var s=1,o=t/8+n-1;o>=n;o--)r[o]=e/s&255,s*=256;return r},e.writeUintLE=function(t,e,r,n){if(void 0===r&&(r=new Uint8Array(t/8)),void 0===n&&(n=0),t%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!i.isSafeInteger(e))throw new Error("writeUintLE value must be an integer");for(var s=1,o=n;o<n+t/8;o++)r[o]=e/s&255,s*=256;return r},e.readFloat32BE=function(t,e){return void 0===e&&(e=0),new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat32(e)},e.readFloat32LE=function(t,e){return void 0===e&&(e=0),new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat32(e,!0)},e.readFloat64BE=function(t,e){return void 0===e&&(e=0),new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat64(e)},e.readFloat64LE=function(t,e){return void 0===e&&(e=0),new DataView(t.buffer,t.byteOffset,t.byteLength).getFloat64(e,!0)},e.writeFloat32BE=function(t,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat32(r,t),e},e.writeFloat32LE=function(t,e,r){return void 0===e&&(e=new Uint8Array(4)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat32(r,t,!0),e},e.writeFloat64BE=function(t,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat64(r,t),e},e.writeFloat64LE=function(t,e,r){return void 0===e&&(e=new Uint8Array(8)),void 0===r&&(r=0),new DataView(e.buffer,e.byteOffset,e.byteLength).setFloat64(r,t,!0),e}},6851:(t,e,r)=>{"use strict";var i=r(9437),n=r(2887);e.cn=128,e.k=64,e.Cv=64,e.fg=16,e.fe=16,e.zS=Math.pow(2,32)-1,e.d=255,e.lV=255;var s=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),o=[[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30],[28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6],[22,16,24,0,10,4,30,26,20,28,6,12,14,2,18,8],[14,18,6,2,26,24,22,28,4,12,10,20,8,0,30,16],[18,0,10,14,4,8,20,30,28,2,22,24,12,16,6,26],[4,24,12,20,0,22,16,6,8,26,14,10,30,28,2,18],[24,10,2,30,28,26,8,20,0,14,12,6,18,4,16,22],[26,22,14,28,24,2,6,18,10,0,30,8,16,12,4,20],[12,30,28,18,22,6,0,16,24,4,26,14,2,8,20,10],[20,4,16,8,14,12,2,10,30,22,18,28,6,24,26,0],[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30],[28,20,8,16,18,30,26,12,2,24,0,4,22,14,10,6]],a=function(){function t(t,r){if(void 0===t&&(t=64),this.digestLength=t,this.blockSize=e.cn,this._state=new Int32Array(s),this._buffer=new Uint8Array(e.cn),this._bufferLength=0,this._ctr=new Uint32Array(4),this._flag=new Uint32Array(4),this._lastNode=!1,this._finished=!1,this._vtmp=new Uint32Array(32),this._mtmp=new Uint32Array(32),t<1||t>e.k)throw new Error("blake2b: wrong digest length");r&&this.validateConfig(r);var n=0;r&&r.key&&(n=r.key.length);var o=1,a=1;r&&r.tree&&(o=r.tree.fanout,a=r.tree.maxDepth),this._state[0]^=t|n<<8|o<<16|a<<24,r&&r.tree&&(this._state[1]^=r.tree.leafSize,this._state[2]^=r.tree.nodeOffsetLowBits,this._state[3]^=r.tree.nodeOffsetHighBits,this._state[4]^=r.tree.nodeDepth|r.tree.innerDigestLength<<8,this._lastNode=r.tree.lastNode),r&&r.salt&&(this._state[8]^=i.readUint32LE(r.salt,0),this._state[9]^=i.readUint32LE(r.salt,4),this._state[10]^=i.readUint32LE(r.salt,8),this._state[11]^=i.readUint32LE(r.salt,12)),r&&r.personalization&&(this._state[12]^=i.readUint32LE(r.personalization,0),this._state[13]^=i.readUint32LE(r.personalization,4),this._state[14]^=i.readUint32LE(r.personalization,8),this._state[15]^=i.readUint32LE(r.personalization,12)),this._initialState=new Uint32Array(this._state),r&&r.key&&n>0&&(this._paddedKey=new Uint8Array(e.cn),this._paddedKey.set(r.key),this._buffer.set(this._paddedKey),this._bufferLength=e.cn)}return t.prototype.reset=function(){return this._state.set(this._initialState),this._paddedKey?(this._buffer.set(this._paddedKey),this._bufferLength=e.cn):this._bufferLength=0,n.wipe(this._ctr),n.wipe(this._flag),this._finished=!1,this},t.prototype.validateConfig=function(t){if(t.key&&t.key.length>e.Cv)throw new Error("blake2b: wrong key length");if(t.salt&&t.salt.length!==e.fe)throw new Error("blake2b: wrong salt length");if(t.personalization&&t.personalization.length!==e.fg)throw new Error("blake2b: wrong personalization length");if(t.tree){if(t.tree.fanout<0||t.tree.fanout>e.d)throw new Error("blake2b: wrong tree fanout");if(t.tree.maxDepth<0||t.tree.maxDepth>e.lV)throw new Error("blake2b: wrong tree depth");if(t.tree.leafSize<0||t.tree.leafSize>e.zS)throw new Error("blake2b: wrong leaf size");if(t.tree.innerDigestLength<0||t.tree.innerDigestLength>e.k)throw new Error("blake2b: wrong tree inner digest length")}},t.prototype.update=function(t,r){if(void 0===r&&(r=t.length),this._finished)throw new Error("blake2b: can't update because hash was finished.");var i=e.cn-this._bufferLength,n=0;if(0===r)return this;if(r>i){for(var s=0;s<i;s++)this._buffer[this._bufferLength+s]=t[n+s];this._processBlock(e.cn),n+=i,r-=i,this._bufferLength=0}for(;r>e.cn;){for(s=0;s<e.cn;s++)this._buffer[s]=t[n+s];this._processBlock(e.cn),n+=e.cn,r-=e.cn,this._bufferLength=0}for(s=0;s<r;s++)this._buffer[this._bufferLength+s]=t[n+s];return this._bufferLength+=r,this},t.prototype.finish=function(t){if(!this._finished){for(var r=this._bufferLength;r<e.cn;r++)this._buffer[r]=0;this._flag[0]=4294967295,this._flag[1]=4294967295,this._lastNode&&(this._flag[2]=4294967295,this._flag[3]=4294967295),this._processBlock(this._bufferLength),this._finished=!0}var n=this._buffer.subarray(0,64);for(r=0;r<16;r++)i.writeUint32LE(this._state[r],n,4*r);return t.set(n.subarray(0,t.length)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t.prototype.clean=function(){n.wipe(this._vtmp),n.wipe(this._mtmp),n.wipe(this._state),n.wipe(this._buffer),n.wipe(this._initialState),this._paddedKey&&n.wipe(this._paddedKey),this._bufferLength=0,n.wipe(this._ctr),n.wipe(this._flag),this._lastNode=!1,this._finished=!1},t.prototype.saveState=function(){if(this._finished)throw new Error("blake2b: cannot save finished state");return{state:new Uint32Array(this._state),buffer:new Uint8Array(this._buffer),bufferLength:this._bufferLength,ctr:new Uint32Array(this._ctr),flag:new Uint32Array(this._flag),lastNode:this._lastNode,paddedKey:this._paddedKey?new Uint8Array(this._paddedKey):void 0,initialState:new Uint32Array(this._initialState)}},t.prototype.restoreState=function(t){return this._state.set(t.state),this._buffer.set(t.buffer),this._bufferLength=t.bufferLength,this._ctr.set(t.ctr),this._flag.set(t.flag),this._lastNode=t.lastNode,this._paddedKey&&n.wipe(this._paddedKey),this._paddedKey=t.paddedKey?new Uint8Array(t.paddedKey):void 0,this._initialState.set(t.initialState),this},t.prototype.cleanSavedState=function(t){n.wipe(t.state),n.wipe(t.buffer),n.wipe(t.initialState),t.paddedKey&&n.wipe(t.paddedKey),t.bufferLength=0,n.wipe(t.ctr),n.wipe(t.flag),t.lastNode=!1},t.prototype._G=function(t,e,r,i,n,s,o,a,c,u,h,l,f){var d=t[e],p=t[s],g=t[r],b=t[o],m=t[i],v=t[a],y=t[n],_=t[c],w=65535&d,E=d>>>16,S=65535&p,A=p>>>16;E+=g>>>16,S+=65535&b,A+=b>>>16,S+=(E+=(w+=65535&g)>>>16)>>>16,w=65535&(d=65535&w|E<<16),E=d>>>16,S=65535&(p=65535&S|(A+=S>>>16)<<16),A=p>>>16,E+=u>>>16,S+=65535&h,A+=h>>>16,d=65535&(w+=65535&u)|(E+=w>>>16)<<16,w=_^=p=65535&(S+=E>>>16)|(A+=S>>>16)<<16,_=y^=d,y=w,w=65535&m,E=m>>>16,S=65535&v,A=v>>>16,E+=y>>>16,S+=65535&_,A+=_>>>16,w=(g^=m=65535&(w+=65535&y)|(E+=w>>>16)<<16)<<8|(b^=v=65535&(S+=E>>>16)|(A+=S>>>16)<<16)>>>24,g=b<<8|g>>>24,b=w,w=65535&d,E=d>>>16,S=65535&p,A=p>>>16,E+=g>>>16,S+=65535&b,A+=b>>>16,S+=(E+=(w+=65535&g)>>>16)>>>16,w=65535&(d=65535&w|E<<16),E=d>>>16,S=65535&(p=65535&S|(A+=S>>>16)<<16),A=p>>>16,E+=l>>>16,S+=65535&f,A+=f>>>16,w=(y^=d=65535&(w+=65535&l)|(E+=w>>>16)<<16)<<16|(_^=p=65535&(S+=E>>>16)|(A+=S>>>16)<<16)>>>16,y=_<<16|y>>>16,_=w,w=65535&m,E=m>>>16,S=65535&v,A=v>>>16,E+=y>>>16,S+=65535&_,A+=_>>>16,w=(b^=v=65535&(S+=(E+=(w+=65535&y)>>>16)>>>16)|(A+=S>>>16)<<16)<<1|(g^=m=65535&w|E<<16)>>>31,g=g<<1|b>>>31,b=w,t[e]=d,t[s]=p,t[r]=g,t[o]=b,t[i]=m,t[a]=v,t[n]=y,t[c]=_},t.prototype._incrementCounter=function(t){for(var e=0;e<3;e++){var r=this._ctr[e]+t;if(this._ctr[e]=r>>>0,this._ctr[e]===r)return;t=1}},t.prototype._processBlock=function(t){this._incrementCounter(t);var e=this._vtmp;e.set(this._state),e.set(s,16),e[24]^=this._ctr[0],e[25]^=this._ctr[1],e[26]^=this._ctr[2],e[27]^=this._ctr[3],e[28]^=this._flag[0],e[29]^=this._flag[1],e[30]^=this._flag[2],e[31]^=this._flag[3];for(var r=this._mtmp,n=0;n<32;n++)r[n]=i.readUint32LE(this._buffer,4*n);for(var a=0;a<12;a++)this._G(e,0,8,16,24,1,9,17,25,r[o[a][0]],r[o[a][0]+1],r[o[a][1]],r[o[a][1]+1]),this._G(e,2,10,18,26,3,11,19,27,r[o[a][2]],r[o[a][2]+1],r[o[a][3]],r[o[a][3]+1]),this._G(e,4,12,20,28,5,13,21,29,r[o[a][4]],r[o[a][4]+1],r[o[a][5]],r[o[a][5]+1]),this._G(e,6,14,22,30,7,15,23,31,r[o[a][6]],r[o[a][6]+1],r[o[a][7]],r[o[a][7]+1]),this._G(e,0,10,20,30,1,11,21,31,r[o[a][8]],r[o[a][8]+1],r[o[a][9]],r[o[a][9]+1]),this._G(e,2,12,22,24,3,13,23,25,r[o[a][10]],r[o[a][10]+1],r[o[a][11]],r[o[a][11]+1]),this._G(e,4,14,16,26,5,15,17,27,r[o[a][12]],r[o[a][12]+1],r[o[a][13]],r[o[a][13]+1]),this._G(e,6,8,18,28,7,9,19,29,r[o[a][14]],r[o[a][14]+1],r[o[a][15]],r[o[a][15]+1]);for(n=0;n<16;n++)this._state[n]^=e[n]^e[n+16]},t}();e.vp=function(t,r,i){void 0===r&&(r=e.k);var n=new a(r,i);n.update(t);var s=n.digest();return n.clean(),s}},7728:(t,e,r)=>{"use strict";e.T=e.aP=e.KS=e.jQ=void 0;const i=r(1293),n=r(6756),s=r(2887);function o(t){const e=new Float64Array(16);if(t)for(let r=0;r<t.length;r++)e[r]=t[r];return e}e.jQ=64,e.KS=64,e.aP=32;new Uint8Array(32)[0]=9;const a=o(),c=o([1]),u=o([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=o([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=o([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=o([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=o([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(t,e){for(let r=0;r<16;r++)t[r]=0|e[r]}function g(t){let e=1;for(let r=0;r<16;r++){let i=t[r]+e+65535;e=Math.floor(i/65536),t[r]=i-65536*e}t[0]+=e-1+37*(e-1)}function b(t,e,r){const i=~(r-1);for(let r=0;r<16;r++){const n=i&(t[r]^e[r]);t[r]^=n,e[r]^=n}}function m(t,e){const r=o(),i=o();for(let t=0;t<16;t++)i[t]=e[t];g(i),g(i),g(i);for(let t=0;t<2;t++){r[0]=i[0]-65517;for(let t=1;t<15;t++)r[t]=i[t]-65535-(r[t-1]>>16&1),r[t-1]&=65535;r[15]=i[15]-32767-(r[14]>>16&1);const t=r[15]>>16&1;r[14]&=65535,b(i,r,1-t)}for(let e=0;e<16;e++)t[2*e]=255&i[e],t[2*e+1]=i[e]>>8}function v(t,e){let r=0;for(let i=0;i<32;i++)r|=t[i]^e[i];return(1&r-1>>>8)-1}function y(t,e){const r=new Uint8Array(32),i=new Uint8Array(32);return m(r,t),m(i,e),v(r,i)}function _(t){const e=new Uint8Array(32);return m(e,t),1&e[0]}function w(t,e,r){for(let i=0;i<16;i++)t[i]=e[i]+r[i]}function E(t,e,r){for(let i=0;i<16;i++)t[i]=e[i]-r[i]}function S(t,e,r){let i,n,s=0,o=0,a=0,c=0,u=0,h=0,l=0,f=0,d=0,p=0,g=0,b=0,m=0,v=0,y=0,_=0,w=0,E=0,S=0,A=0,O=0,T=0,P=0,x=0,R=0,I=0,L=0,M=0,N=0,k=0,C=0,D=r[0],B=r[1],U=r[2],j=r[3],K=r[4],H=r[5],V=r[6],F=r[7],G=r[8],$=r[9],z=r[10],q=r[11],Z=r[12],W=r[13],Y=r[14],J=r[15];i=e[0],s+=i*D,o+=i*B,a+=i*U,c+=i*j,u+=i*K,h+=i*H,l+=i*V,f+=i*F,d+=i*G,p+=i*$,g+=i*z,b+=i*q,m+=i*Z,v+=i*W,y+=i*Y,_+=i*J,i=e[1],o+=i*D,a+=i*B,c+=i*U,u+=i*j,h+=i*K,l+=i*H,f+=i*V,d+=i*F,p+=i*G,g+=i*$,b+=i*z,m+=i*q,v+=i*Z,y+=i*W,_+=i*Y,w+=i*J,i=e[2],a+=i*D,c+=i*B,u+=i*U,h+=i*j,l+=i*K,f+=i*H,d+=i*V,p+=i*F,g+=i*G,b+=i*$,m+=i*z,v+=i*q,y+=i*Z,_+=i*W,w+=i*Y,E+=i*J,i=e[3],c+=i*D,u+=i*B,h+=i*U,l+=i*j,f+=i*K,d+=i*H,p+=i*V,g+=i*F,b+=i*G,m+=i*$,v+=i*z,y+=i*q,_+=i*Z,w+=i*W,E+=i*Y,S+=i*J,i=e[4],u+=i*D,h+=i*B,l+=i*U,f+=i*j,d+=i*K,p+=i*H,g+=i*V,b+=i*F,m+=i*G,v+=i*$,y+=i*z,_+=i*q,w+=i*Z,E+=i*W,S+=i*Y,A+=i*J,i=e[5],h+=i*D,l+=i*B,f+=i*U,d+=i*j,p+=i*K,g+=i*H,b+=i*V,m+=i*F,v+=i*G,y+=i*$,_+=i*z,w+=i*q,E+=i*Z,S+=i*W,A+=i*Y,O+=i*J,i=e[6],l+=i*D,f+=i*B,d+=i*U,p+=i*j,g+=i*K,b+=i*H,m+=i*V,v+=i*F,y+=i*G,_+=i*$,w+=i*z,E+=i*q,S+=i*Z,A+=i*W,O+=i*Y,T+=i*J,i=e[7],f+=i*D,d+=i*B,p+=i*U,g+=i*j,b+=i*K,m+=i*H,v+=i*V,y+=i*F,_+=i*G,w+=i*$,E+=i*z,S+=i*q,A+=i*Z,O+=i*W,T+=i*Y,P+=i*J,i=e[8],d+=i*D,p+=i*B,g+=i*U,b+=i*j,m+=i*K,v+=i*H,y+=i*V,_+=i*F,w+=i*G,E+=i*$,S+=i*z,A+=i*q,O+=i*Z,T+=i*W,P+=i*Y,x+=i*J,i=e[9],p+=i*D,g+=i*B,b+=i*U,m+=i*j,v+=i*K,y+=i*H,_+=i*V,w+=i*F,E+=i*G,S+=i*$,A+=i*z,O+=i*q,T+=i*Z,P+=i*W,x+=i*Y,R+=i*J,i=e[10],g+=i*D,b+=i*B,m+=i*U,v+=i*j,y+=i*K,_+=i*H,w+=i*V,E+=i*F,S+=i*G,A+=i*$,O+=i*z,T+=i*q,P+=i*Z,x+=i*W,R+=i*Y,I+=i*J,i=e[11],b+=i*D,m+=i*B,v+=i*U,y+=i*j,_+=i*K,w+=i*H,E+=i*V,S+=i*F,A+=i*G,O+=i*$,T+=i*z,P+=i*q,x+=i*Z,R+=i*W,I+=i*Y,L+=i*J,i=e[12],m+=i*D,v+=i*B,y+=i*U,_+=i*j,w+=i*K,E+=i*H,S+=i*V,A+=i*F,O+=i*G,T+=i*$,P+=i*z,x+=i*q,R+=i*Z,I+=i*W,L+=i*Y,M+=i*J,i=e[13],v+=i*D,y+=i*B,_+=i*U,w+=i*j,E+=i*K,S+=i*H,A+=i*V,O+=i*F,T+=i*G,P+=i*$,x+=i*z,R+=i*q,I+=i*Z,L+=i*W,M+=i*Y,N+=i*J,i=e[14],y+=i*D,_+=i*B,w+=i*U,E+=i*j,S+=i*K,A+=i*H,O+=i*V,T+=i*F,P+=i*G,x+=i*$,R+=i*z,I+=i*q,L+=i*Z,M+=i*W,N+=i*Y,k+=i*J,i=e[15],_+=i*D,w+=i*B,E+=i*U,S+=i*j,A+=i*K,O+=i*H,T+=i*V,P+=i*F,x+=i*G,R+=i*$,I+=i*z,L+=i*q,M+=i*Z,N+=i*W,k+=i*Y,C+=i*J,s+=38*w,o+=38*E,a+=38*S,c+=38*A,u+=38*O,h+=38*T,l+=38*P,f+=38*x,d+=38*R,p+=38*I,g+=38*L,b+=38*M,m+=38*N,v+=38*k,y+=38*C,n=1,i=s+n+65535,n=Math.floor(i/65536),s=i-65536*n,i=o+n+65535,n=Math.floor(i/65536),o=i-65536*n,i=a+n+65535,n=Math.floor(i/65536),a=i-65536*n,i=c+n+65535,n=Math.floor(i/65536),c=i-65536*n,i=u+n+65535,n=Math.floor(i/65536),u=i-65536*n,i=h+n+65535,n=Math.floor(i/65536),h=i-65536*n,i=l+n+65535,n=Math.floor(i/65536),l=i-65536*n,i=f+n+65535,n=Math.floor(i/65536),f=i-65536*n,i=d+n+65535,n=Math.floor(i/65536),d=i-65536*n,i=p+n+65535,n=Math.floor(i/65536),p=i-65536*n,i=g+n+65535,n=Math.floor(i/65536),g=i-65536*n,i=b+n+65535,n=Math.floor(i/65536),b=i-65536*n,i=m+n+65535,n=Math.floor(i/65536),m=i-65536*n,i=v+n+65535,n=Math.floor(i/65536),v=i-65536*n,i=y+n+65535,n=Math.floor(i/65536),y=i-65536*n,i=_+n+65535,n=Math.floor(i/65536),_=i-65536*n,s+=n-1+37*(n-1),n=1,i=s+n+65535,n=Math.floor(i/65536),s=i-65536*n,i=o+n+65535,n=Math.floor(i/65536),o=i-65536*n,i=a+n+65535,n=Math.floor(i/65536),a=i-65536*n,i=c+n+65535,n=Math.floor(i/65536),c=i-65536*n,i=u+n+65535,n=Math.floor(i/65536),u=i-65536*n,i=h+n+65535,n=Math.floor(i/65536),h=i-65536*n,i=l+n+65535,n=Math.floor(i/65536),l=i-65536*n,i=f+n+65535,n=Math.floor(i/65536),f=i-65536*n,i=d+n+65535,n=Math.floor(i/65536),d=i-65536*n,i=p+n+65535,n=Math.floor(i/65536),p=i-65536*n,i=g+n+65535,n=Math.floor(i/65536),g=i-65536*n,i=b+n+65535,n=Math.floor(i/65536),b=i-65536*n,i=m+n+65535,n=Math.floor(i/65536),m=i-65536*n,i=v+n+65535,n=Math.floor(i/65536),v=i-65536*n,i=y+n+65535,n=Math.floor(i/65536),y=i-65536*n,i=_+n+65535,n=Math.floor(i/65536),_=i-65536*n,s+=n-1+37*(n-1),t[0]=s,t[1]=o,t[2]=a,t[3]=c,t[4]=u,t[5]=h,t[6]=l,t[7]=f,t[8]=d,t[9]=p,t[10]=g,t[11]=b,t[12]=m,t[13]=v,t[14]=y,t[15]=_}function A(t,e){S(t,e,e)}function O(t,e){const r=o();let i;for(i=0;i<16;i++)r[i]=e[i];for(i=253;i>=0;i--)A(r,r),2!==i&&4!==i&&S(r,r,e);for(i=0;i<16;i++)t[i]=r[i]}function T(t,e){const r=o(),i=o(),n=o(),s=o(),a=o(),c=o(),u=o(),l=o(),f=o();E(r,t[1],t[0]),E(f,e[1],e[0]),S(r,r,f),w(i,t[0],t[1]),w(f,e[0],e[1]),S(i,i,f),S(n,t[3],e[3]),S(n,n,h),S(s,t[2],e[2]),w(s,s,s),E(a,i,r),E(c,s,n),w(u,s,n),w(l,i,r),S(t[0],a,c),S(t[1],l,u),S(t[2],u,c),S(t[3],a,l)}function P(t,e,r){for(let i=0;i<4;i++)b(t[i],e[i],r)}function x(t,e){const r=o(),i=o(),n=o();O(n,e[2]),S(r,e[0],n),S(i,e[1],n),m(t,i),t[31]^=_(r)<<7}function R(t,e,r){p(t[0],a),p(t[1],c),p(t[2],c),p(t[3],a);for(let i=255;i>=0;--i){const n=r[i/8|0]>>(7&i)&1;P(t,e,n),T(e,t),T(t,t),P(t,e,n)}}function I(t,e){const r=[o(),o(),o(),o()];p(r[0],l),p(r[1],f),p(r[2],c),S(r[3],l,f),R(t,r,e)}function L(t){if(t.length!==e.aP)throw new Error(`ed25519: seed must be ${e.aP} bytes`);const r=(0,n.hash)(t);r[0]&=248,r[31]&=127,r[31]|=64;const i=new Uint8Array(32),s=[o(),o(),o(),o()];I(s,r),x(i,s);const a=new Uint8Array(64);return a.set(t),a.set(i,32),{publicKey:i,secretKey:a}}const M=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function N(t,e){let r,i,n,s;for(i=63;i>=32;--i){for(r=0,n=i-32,s=i-12;n<s;++n)e[n]+=r-16*e[i]*M[n-(i-32)],r=Math.floor((e[n]+128)/256),e[n]-=256*r;e[n]+=r,e[i]=0}for(r=0,n=0;n<32;n++)e[n]+=r-(e[31]>>4)*M[n],r=e[n]>>8,e[n]&=255;for(n=0;n<32;n++)e[n]-=r*M[n];for(i=0;i<32;i++)e[i+1]+=e[i]>>8,t[i]=255&e[i]}function k(t){const e=new Float64Array(64);for(let r=0;r<64;r++)e[r]=t[r];for(let e=0;e<64;e++)t[e]=0;N(t,e)}function C(t,e){const r=o(),i=o(),n=o(),s=o(),h=o(),l=o(),f=o();return p(t[2],c),function(t,e){for(let r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}(t[1],e),A(n,t[1]),S(s,n,u),E(n,n,t[2]),w(s,t[2],s),A(h,s),A(l,h),S(f,l,h),S(r,f,n),S(r,r,s),function(t,e){const r=o();let i;for(i=0;i<16;i++)r[i]=e[i];for(i=250;i>=0;i--)A(r,r),1!==i&&S(r,r,e);for(i=0;i<16;i++)t[i]=r[i]}(r,r),S(r,r,n),S(r,r,s),S(r,r,s),S(t[0],r,s),A(i,t[0]),S(i,i,s),y(i,n)&&S(t[0],t[0],d),A(i,t[0]),S(i,i,s),y(i,n)?-1:(_(t[0])===e[31]>>7&&E(t[0],a,t[0]),S(t[3],t[0],t[1]),0)}e.T=function(t,r,i){const s=new Uint8Array(32),a=[o(),o(),o(),o()],c=[o(),o(),o(),o()];if(i.length!==e.jQ)throw new Error(`ed25519: signature must be ${e.jQ} bytes`);if(C(c,t))return!1;const u=new n.SHA512;u.update(i.subarray(0,32)),u.update(t),u.update(r);const h=u.digest();return k(h),R(a,c,h),I(c,i.subarray(32)),T(a,c),x(s,a),!v(i,s)}},5457:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mul=Math.imul||function(t,e){var r=65535&t,i=65535&e;return r*i+((t>>>16&65535)*i+r*(e>>>16&65535)<<16>>>0)|0},e.add=function(t,e){return t+e|0},e.sub=function(t,e){return t-e|0},e.rotl=function(t,e){return t<<e|t>>>32-e},e.rotr=function(t,e){return t<<32-e|t>>>e},e.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},e.MAX_SAFE_INTEGER=9007199254740991,e.isSafeInteger=function(t){return e.isInteger(t)&&t>=-e.MAX_SAFE_INTEGER&&t<=e.MAX_SAFE_INTEGER}},1293:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.randomStringForEntropy=e.randomString=e.randomUint32=e.randomBytes=e.defaultRandomSource=void 0;const i=r(5147),n=r(9437),s=r(2887);function o(t,r=e.defaultRandomSource){return r.randomBytes(t)}e.defaultRandomSource=new i.SystemRandomSource,e.randomBytes=o,e.randomUint32=function(t=e.defaultRandomSource){const r=o(4,t),i=(0,n.readUint32LE)(r);return(0,s.wipe)(r),i};const a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function c(t,r=a,i=e.defaultRandomSource){if(r.length<2)throw new Error("randomString charset is too short");if(r.length>256)throw new Error("randomString charset is too long");let n="";const c=r.length,u=256-256%c;for(;t>0;){const e=o(Math.ceil(256*t/u),i);for(let i=0;i<e.length&&t>0;i++){const s=e[i];s<u&&(n+=r.charAt(s%c),t--)}(0,s.wipe)(e)}return n}e.randomString=c,e.randomStringForEntropy=function(t,r=a,i=e.defaultRandomSource){return c(Math.ceil(t/(Math.log(r.length)/Math.LN2)),r,i)}},2017:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserRandomSource=void 0;e.BrowserRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&void 0!==t.getRandomValues&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const e=new Uint8Array(t);for(let t=0;t<e.length;t+=65536)this._crypto.getRandomValues(e.subarray(t,t+Math.min(e.length-t,65536)));return e}}},7879:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeRandomSource=void 0;const i=r(2887);e.NodeRandomSource=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const t=r(5477);t&&t.randomBytes&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(t){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let e=this._crypto.randomBytes(t);if(e.length!==t)throw new Error("NodeRandomSource: got fewer bytes than requested");const r=new Uint8Array(t);for(let t=0;t<r.length;t++)r[t]=e[t];return(0,i.wipe)(e),r}}},5147:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SystemRandomSource=void 0;const i=r(2017),n=r(7879);e.SystemRandomSource=class{constructor(){return this.isAvailable=!1,this.name="",this._source=new i.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new n.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}}},6756:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=r(9437),n=r(2887);e.DIGEST_LENGTH=64,e.BLOCK_SIZE=128;var s=function(){function t(){this.digestLength=e.DIGEST_LENGTH,this.blockSize=e.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return t.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},t.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},t.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},t.prototype.update=function(t,r){if(void 0===r&&(r=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var i=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<e.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=t[i++],r--;this._bufferLength===this.blockSize&&(a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(i=a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,i,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=t[i++],r--;return this},t.prototype.finish=function(t){if(!this._finished){var e=this._bytesHashed,r=this._bufferLength,n=e/536870912|0,s=e<<3,o=e%128<112?128:256;this._buffer[r]=128;for(var c=r+1;c<o-8;c++)this._buffer[c]=0;i.writeUint32BE(n,this._buffer,o-8),i.writeUint32BE(s,this._buffer,o-4),a(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,o),this._finished=!0}for(c=0;c<this.digestLength/8;c++)i.writeUint32BE(this._stateHi[c],t,8*c),i.writeUint32BE(this._stateLo[c],t,8*c+4);return this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},t.prototype.restoreState=function(t){return this._stateHi.set(t.stateHi),this._stateLo.set(t.stateLo),this._bufferLength=t.bufferLength,t.buffer&&this._buffer.set(t.buffer),this._bytesHashed=t.bytesHashed,this._finished=!1,this},t.prototype.cleanSavedState=function(t){n.wipe(t.stateHi),n.wipe(t.stateLo),t.buffer&&n.wipe(t.buffer),t.bufferLength=0,t.bytesHashed=0},t}();e.SHA512=s;var o=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function a(t,e,r,n,s,a,c){for(var u,h,l,f,d,p,g,b,m=r[0],v=r[1],y=r[2],_=r[3],w=r[4],E=r[5],S=r[6],A=r[7],O=n[0],T=n[1],P=n[2],x=n[3],R=n[4],I=n[5],L=n[6],M=n[7];c>=128;){for(var N=0;N<16;N++){var k=8*N+a;t[N]=i.readUint32BE(s,k),e[N]=i.readUint32BE(s,k+4)}for(N=0;N<80;N++){var C,D,B=m,U=v,j=y,K=_,H=w,V=E,F=S,G=O,$=T,z=P,q=x,Z=R,W=I,Y=L;if(d=65535&(h=M),p=h>>>16,g=65535&(u=A),b=u>>>16,d+=65535&(h=(R>>>14|w<<18)^(R>>>18|w<<14)^(w>>>9|R<<23)),p+=h>>>16,g+=65535&(u=(w>>>14|R<<18)^(w>>>18|R<<14)^(R>>>9|w<<23)),b+=u>>>16,d+=65535&(h=R&I^~R&L),p+=h>>>16,g+=65535&(u=w&E^~w&S),b+=u>>>16,u=o[2*N],d+=65535&(h=o[2*N+1]),p+=h>>>16,g+=65535&u,b+=u>>>16,u=t[N%16],p+=(h=e[N%16])>>>16,g+=65535&u,b+=u>>>16,g+=(p+=(d+=65535&h)>>>16)>>>16,d=65535&(h=f=65535&d|p<<16),p=h>>>16,g=65535&(u=l=65535&g|(b+=g>>>16)<<16),b=u>>>16,d+=65535&(h=(O>>>28|m<<4)^(m>>>2|O<<30)^(m>>>7|O<<25)),p+=h>>>16,g+=65535&(u=(m>>>28|O<<4)^(O>>>2|m<<30)^(O>>>7|m<<25)),b+=u>>>16,p+=(h=O&T^O&P^T&P)>>>16,g+=65535&(u=m&v^m&y^v&y),b+=u>>>16,C=65535&(g+=(p+=(d+=65535&h)>>>16)>>>16)|(b+=g>>>16)<<16,D=65535&d|p<<16,d=65535&(h=q),p=h>>>16,g=65535&(u=K),b=u>>>16,p+=(h=f)>>>16,g+=65535&(u=l),b+=u>>>16,v=B,y=U,_=j,w=K=65535&(g+=(p+=(d+=65535&h)>>>16)>>>16)|(b+=g>>>16)<<16,E=H,S=V,A=F,m=C,T=G,P=$,x=z,R=q=65535&d|p<<16,I=Z,L=W,M=Y,O=D,N%16==15)for(k=0;k<16;k++)u=t[k],d=65535&(h=e[k]),p=h>>>16,g=65535&u,b=u>>>16,u=t[(k+9)%16],d+=65535&(h=e[(k+9)%16]),p+=h>>>16,g+=65535&u,b+=u>>>16,l=t[(k+1)%16],d+=65535&(h=((f=e[(k+1)%16])>>>1|l<<31)^(f>>>8|l<<24)^(f>>>7|l<<25)),p+=h>>>16,g+=65535&(u=(l>>>1|f<<31)^(l>>>8|f<<24)^l>>>7),b+=u>>>16,l=t[(k+14)%16],p+=(h=((f=e[(k+14)%16])>>>19|l<<13)^(l>>>29|f<<3)^(f>>>6|l<<26))>>>16,g+=65535&(u=(l>>>19|f<<13)^(f>>>29|l<<3)^l>>>6),b+=u>>>16,b+=(g+=(p+=(d+=65535&h)>>>16)>>>16)>>>16,t[k]=65535&g|b<<16,e[k]=65535&d|p<<16}d=65535&(h=O),p=h>>>16,g=65535&(u=m),b=u>>>16,u=r[0],p+=(h=n[0])>>>16,g+=65535&u,b+=u>>>16,b+=(g+=(p+=(d+=65535&h)>>>16)>>>16)>>>16,r[0]=m=65535&g|b<<16,n[0]=O=65535&d|p<<16,d=65535&(h=T),p=h>>>16,g=65535&(u=v),b=u>>>16,u=r[1],p+=(h=n[1])>>>16,g+=65535&u,b+=u>>>16,b+=(g+=(p+=(d+=65535&h)>>>16)>>>16)>>>16,r[1]=v=65535&g|b<<16,n[1]=T=65535&d|p<<16,d=65535&(h=P),p=h>>>16,g=65535&(u=y),b=u>>>16,u=r[2],p+=(h=n[2])>>>16,g+=65535&u,b+=u>>>16,b+=(g+=(p+=(d+=65535&h)>>>16)>>>16)>>>16,r[2]=y=65535&g|b<<16,n[2]=P=65535&d|p<<16,d=65535&(h=x),p=h>>>16,g=65535&(u=_),b=u>>>16,u=r[3],p+=(h=n[3])>>>16,g+=65535&u,b+=u>>>16,b+=(g+=(p+=(d+=65535&h)>>>16)>>>16)>>>16,r[3]=_=65535&g|b<<16,n[3]=x=65535&d|p<<16,d=65535&(h=R),p=h>>>16,g=65535&(u=w),b=u>>>16,u=r[4],p+=(h=n[4])>>>16,g+=65535&u,b+=u>>>16,b+=(g+=(p+=(d+=65535&h)>>>16)>>>16)>>>16,r[4]=w=65535&g|b<<16,n[4]=R=65535&d|p<<16,d=65535&(h=I),p=h>>>16,g=65535&(u=E),b=u>>>16,u=r[5],p+=(h=n[5])>>>16,g+=65535&u,b+=u>>>16,b+=(g+=(p+=(d+=65535&h)>>>16)>>>16)>>>16,r[5]=E=65535&g|b<<16,n[5]=I=65535&d|p<<16,d=65535&(h=L),p=h>>>16,g=65535&(u=S),b=u>>>16,u=r[6],p+=(h=n[6])>>>16,g+=65535&u,b+=u>>>16,b+=(g+=(p+=(d+=65535&h)>>>16)>>>16)>>>16,r[6]=S=65535&g|b<<16,n[6]=L=65535&d|p<<16,d=65535&(h=M),p=h>>>16,g=65535&(u=A),b=u>>>16,u=r[7],p+=(h=n[7])>>>16,g+=65535&u,b+=u>>>16,b+=(g+=(p+=(d+=65535&h)>>>16)>>>16)>>>16,r[7]=A=65535&g|b<<16,n[7]=M=65535&d|p<<16,a+=128,c-=128}return a}e.hash=function(t){var e=new s;e.update(t);var r=e.digest();return e.clean(),r}},2887:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wipe=function(t){for(var e=0;e<t.length;e++)t[e]=0;return t}},8166:(t,e,r)=>{"use strict";var i=r(7834).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var n=0;n<t.length;n++){var s=t.charAt(n),o=s.charCodeAt(0);if(255!==e[o])throw new TypeError(s+" is ambiguous");e[o]=n}var a=t.length,c=t.charAt(0),u=Math.log(a)/Math.log(256),h=Math.log(256)/Math.log(a);function l(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return i.alloc(0);for(var r=0,n=0,s=0;t[r]===c;)n++,r++;for(var o=(t.length-r)*u+1>>>0,h=new Uint8Array(o);t[r];){var l=e[t.charCodeAt(r)];if(255===l)return;for(var f=0,d=o-1;(0!==l||f<s)&&-1!==d;d--,f++)l+=a*h[d]>>>0,h[d]=l%256>>>0,l=l/256>>>0;if(0!==l)throw new Error("Non-zero carry");s=f,r++}for(var p=o-s;p!==o&&0===h[p];)p++;var g=i.allocUnsafe(n+(o-p));g.fill(0,0,n);for(var b=n;p!==o;)g[b++]=h[p++];return g}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=i.from(e)),!i.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,n=0,s=0,o=e.length;s!==o&&0===e[s];)s++,r++;for(var u=(o-s)*h+1>>>0,l=new Uint8Array(u);s!==o;){for(var f=e[s],d=0,p=u-1;(0!==f||d<n)&&-1!==p;p--,d++)f+=256*l[p]>>>0,l[p]=f%a>>>0,f=f/a>>>0;if(0!==f)throw new Error("Non-zero carry");n=d,s++}for(var g=u-n;g!==u&&0===l[g];)g++;for(var b=c.repeat(r);g<u;++g)b+=t.charAt(l[g]);return b},decodeUnsafe:l,decode:function(t){var e=l(t);if(e)return e;throw new Error("Non-base"+a+" character")}}}},5766:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],i=e[1];return 3*(r+i)/4-i},e.toByteArray=function(t){var e,r,s=a(t),o=s[0],c=s[1],u=new n(function(t,e,r){return 3*(e+r)/4-r}(0,o,c)),h=0,l=c>0?o-4:o;for(r=0;r<l;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[h++]=e>>16&255,u[h++]=e>>8&255,u[h++]=255&e;2===c&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[h++]=255&e);1===c&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e);return u},e.fromByteArray=function(t){for(var e,i=t.length,n=i%3,s=[],o=16383,a=0,u=i-n;a<u;a+=o)s.push(c(t,a,a+o>u?u:a+o));1===n?(e=t[i-1],s.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],s.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return s.join("")};for(var r=[],i=[],n="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=s[o],i[s.charCodeAt(o)]=o;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,i){for(var n,s,o=[],a=e;a<i;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(r[(s=n)>>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},6391:function(t,e,r){var i;!function(n){"use strict";var s,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,c=Math.floor,u="[BigNumber Error] ",h=u+"Number primitive has more than 15 significant digits: ",l=1e14,f=14,d=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,b=1e9;function m(t){var e=0|t;return t>0||t===e?e:e-1}function v(t){for(var e,r,i=1,n=t.length,s=t[0]+"";i<n;){for(e=t[i++]+"",r=f-e.length;r--;e="0"+e);s+=e}for(n=s.length;48===s.charCodeAt(--n););return s.slice(0,n+1||1)}function y(t,e){var r,i,n=t.c,s=e.c,o=t.s,a=e.s,c=t.e,u=e.e;if(!o||!a)return null;if(r=n&&!n[0],i=s&&!s[0],r||i)return r?i?0:-a:o;if(o!=a)return o;if(r=o<0,i=c==u,!n||!s)return i?0:!n^r?1:-1;if(!i)return c>u^r?1:-1;for(a=(c=n.length)<(u=s.length)?c:u,o=0;o<a;o++)if(n[o]!=s[o])return n[o]>s[o]^r?1:-1;return c==u?0:c>u^r?1:-1}function _(t,e,r,i){if(t<e||t>r||t!==c(t))throw Error(u+(i||"Argument")+("number"==typeof t?t<e||t>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return m(t.e/f)==e&&t.c[e]%2!=0}function E(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function S(t,e,r){var i,n;if(e<0){for(n=r+".";++e;n+=r);t=n+t}else if(++e>(i=t.length)){for(n=r,e-=i;--e;n+=r);t+=n}else e<i&&(t=t.slice(0,e)+"."+t.slice(e));return t}s=function t(e){var r,i,n,s,A,O,T,P,x,R,I=G.prototype={constructor:G,toString:null,valueOf:null},L=new G(1),M=20,N=4,k=-7,C=21,D=-1e7,B=1e7,U=!1,j=1,K=0,H={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},V="0123456789abcdefghijklmnopqrstuvwxyz",F=!0;function G(t,e){var r,s,a,u,l,p,g,b,m=this;if(!(m instanceof G))return new G(t,e);if(null==e){if(t&&!0===t._isBigNumber)return m.s=t.s,void(!t.c||t.e>B?m.c=m.e=null:t.e<D?m.c=[m.e=0]:(m.e=t.e,m.c=t.c.slice()));if((p="number"==typeof t)&&0*t==0){if(m.s=1/t<0?(t=-t,-1):1,t===~~t){for(u=0,l=t;l>=10;l/=10,u++);return void(u>B?m.c=m.e=null:(m.e=u,m.c=[t]))}b=String(t)}else{if(!o.test(b=String(t)))return n(m,b,p);m.s=45==b.charCodeAt(0)?(b=b.slice(1),-1):1}(u=b.indexOf("."))>-1&&(b=b.replace(".","")),(l=b.search(/e/i))>0?(u<0&&(u=l),u+=+b.slice(l+1),b=b.substring(0,l)):u<0&&(u=b.length)}else{if(_(e,2,V.length,"Base"),10==e&&F)return Z(m=new G(t),M+m.e+1,N);if(b=String(t),p="number"==typeof t){if(0*t!=0)return n(m,b,p,e);if(m.s=1/t<0?(b=b.slice(1),-1):1,G.DEBUG&&b.replace(/^0\.0*|\./,"").length>15)throw Error(h+t)}else m.s=45===b.charCodeAt(0)?(b=b.slice(1),-1):1;for(r=V.slice(0,e),u=l=0,g=b.length;l<g;l++)if(r.indexOf(s=b.charAt(l))<0){if("."==s){if(l>u){u=g;continue}}else if(!a&&(b==b.toUpperCase()&&(b=b.toLowerCase())||b==b.toLowerCase()&&(b=b.toUpperCase()))){a=!0,l=-1,u=0;continue}return n(m,String(t),p,e)}p=!1,(u=(b=i(b,e,10,m.s)).indexOf("."))>-1?b=b.replace(".",""):u=b.length}for(l=0;48===b.charCodeAt(l);l++);for(g=b.length;48===b.charCodeAt(--g););if(b=b.slice(l,++g)){if(g-=l,p&&G.DEBUG&&g>15&&(t>d||t!==c(t)))throw Error(h+m.s*t);if((u=u-l-1)>B)m.c=m.e=null;else if(u<D)m.c=[m.e=0];else{if(m.e=u,m.c=[],l=(u+1)%f,u<0&&(l+=f),l<g){for(l&&m.c.push(+b.slice(0,l)),g-=f;l<g;)m.c.push(+b.slice(l,l+=f));l=f-(b=b.slice(l)).length}else l-=g;for(;l--;b+="0");m.c.push(+b)}}else m.c=[m.e=0]}function $(t,e,r,i){var n,s,o,a,c;if(null==r?r=N:_(r,0,8),!t.c)return t.toString();if(n=t.c[0],o=t.e,null==e)c=v(t.c),c=1==i||2==i&&(o<=k||o>=C)?E(c,o):S(c,o,"0");else if(s=(t=Z(new G(t),e,r)).e,a=(c=v(t.c)).length,1==i||2==i&&(e<=s||s<=k)){for(;a<e;c+="0",a++);c=E(c,s)}else if(e-=o,c=S(c,s,"0"),s+1>a){if(--e>0)for(c+=".";e--;c+="0");}else if((e+=s-a)>0)for(s+1==a&&(c+=".");e--;c+="0");return t.s<0&&n?"-"+c:c}function z(t,e){for(var r,i=1,n=new G(t[0]);i<t.length;i++){if(!(r=new G(t[i])).s){n=r;break}e.call(n,r)&&(n=r)}return n}function q(t,e,r){for(var i=1,n=e.length;!e[--n];e.pop());for(n=e[0];n>=10;n/=10,i++);return(r=i+r*f-1)>B?t.c=t.e=null:r<D?t.c=[t.e=0]:(t.e=r,t.c=e),t}function Z(t,e,r,i){var n,s,o,u,h,d,g,b=t.c,m=p;if(b){t:{for(n=1,u=b[0];u>=10;u/=10,n++);if((s=e-n)<0)s+=f,o=e,g=(h=b[d=0])/m[n-o-1]%10|0;else if((d=a((s+1)/f))>=b.length){if(!i)break t;for(;b.length<=d;b.push(0));h=g=0,n=1,o=(s%=f)-f+1}else{for(h=u=b[d],n=1;u>=10;u/=10,n++);g=(o=(s%=f)-f+n)<0?0:h/m[n-o-1]%10|0}if(i=i||e<0||null!=b[d+1]||(o<0?h:h%m[n-o-1]),i=r<4?(g||i)&&(0==r||r==(t.s<0?3:2)):g>5||5==g&&(4==r||i||6==r&&(s>0?o>0?h/m[n-o]:0:b[d-1])%10&1||r==(t.s<0?8:7)),e<1||!b[0])return b.length=0,i?(e-=t.e+1,b[0]=m[(f-e%f)%f],t.e=-e||0):b[0]=t.e=0,t;if(0==s?(b.length=d,u=1,d--):(b.length=d+1,u=m[f-s],b[d]=o>0?c(h/m[n-o]%m[o])*u:0),i)for(;;){if(0==d){for(s=1,o=b[0];o>=10;o/=10,s++);for(o=b[0]+=u,u=1;o>=10;o/=10,u++);s!=u&&(t.e++,b[0]==l&&(b[0]=1));break}if(b[d]+=u,b[d]!=l)break;b[d--]=0,u=1}for(s=b.length;0===b[--s];b.pop());}t.e>B?t.c=t.e=null:t.e<D&&(t.c=[t.e=0])}return t}function W(t){var e,r=t.e;return null===r?t.toString():(e=v(t.c),e=r<=k||r>=C?E(e,r):S(e,r,"0"),t.s<0?"-"+e:e)}return G.clone=t,G.ROUND_UP=0,G.ROUND_DOWN=1,G.ROUND_CEIL=2,G.ROUND_FLOOR=3,G.ROUND_HALF_UP=4,G.ROUND_HALF_DOWN=5,G.ROUND_HALF_EVEN=6,G.ROUND_HALF_CEIL=7,G.ROUND_HALF_FLOOR=8,G.EUCLID=9,G.config=G.set=function(t){var e,r;if(null!=t){if("object"!=typeof t)throw Error(u+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(_(r=t[e],0,b,e),M=r),t.hasOwnProperty(e="ROUNDING_MODE")&&(_(r=t[e],0,8,e),N=r),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((r=t[e])&&r.pop?(_(r[0],-b,0,e),_(r[1],0,b,e),k=r[0],C=r[1]):(_(r,-b,b,e),k=-(C=r<0?-r:r))),t.hasOwnProperty(e="RANGE"))if((r=t[e])&&r.pop)_(r[0],-b,-1,e),_(r[1],1,b,e),D=r[0],B=r[1];else{if(_(r,-b,b,e),!r)throw Error(u+e+" cannot be zero: "+r);D=-(B=r<0?-r:r)}if(t.hasOwnProperty(e="CRYPTO")){if((r=t[e])!==!!r)throw Error(u+e+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!r,Error(u+"crypto unavailable");U=r}else U=r}if(t.hasOwnProperty(e="MODULO_MODE")&&(_(r=t[e],0,9,e),j=r),t.hasOwnProperty(e="POW_PRECISION")&&(_(r=t[e],0,b,e),K=r),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(r=t[e]))throw Error(u+e+" not an object: "+r);H=r}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(r=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+e+" invalid: "+r);F="0123456789"==r.slice(0,10),V=r}}return{DECIMAL_PLACES:M,ROUNDING_MODE:N,EXPONENTIAL_AT:[k,C],RANGE:[D,B],CRYPTO:U,MODULO_MODE:j,POW_PRECISION:K,FORMAT:H,ALPHABET:V}},G.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!G.DEBUG)return!0;var e,r,i=t.c,n=t.e,s=t.s;t:if("[object Array]"=={}.toString.call(i)){if((1===s||-1===s)&&n>=-b&&n<=b&&n===c(n)){if(0===i[0]){if(0===n&&1===i.length)return!0;break t}if((e=(n+1)%f)<1&&(e+=f),String(i[0]).length==e){for(e=0;e<i.length;e++)if((r=i[e])<0||r>=l||r!==c(r))break t;if(0!==r)return!0}}}else if(null===i&&null===n&&(null===s||1===s||-1===s))return!0;throw Error(u+"Invalid BigNumber: "+t)},G.maximum=G.max=function(){return z(arguments,I.lt)},G.minimum=G.min=function(){return z(arguments,I.gt)},G.random=(s=9007199254740992,A=Math.random()*s&2097151?function(){return c(Math.random()*s)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,r,i,n,s,o=0,h=[],l=new G(L);if(null==t?t=M:_(t,0,b),n=a(t/f),U)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(n*=2));o<n;)(s=131072*e[o]+(e[o+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),e[o]=r[0],e[o+1]=r[1]):(h.push(s%1e14),o+=2);o=n/2}else{if(!crypto.randomBytes)throw U=!1,Error(u+"crypto unavailable");for(e=crypto.randomBytes(n*=7);o<n;)(s=281474976710656*(31&e[o])+1099511627776*e[o+1]+4294967296*e[o+2]+16777216*e[o+3]+(e[o+4]<<16)+(e[o+5]<<8)+e[o+6])>=9e15?crypto.randomBytes(7).copy(e,o):(h.push(s%1e14),o+=7);o=n/7}if(!U)for(;o<n;)(s=A())<9e15&&(h[o++]=s%1e14);for(n=h[--o],t%=f,n&&t&&(s=p[f-t],h[o]=c(n/s)*s);0===h[o];h.pop(),o--);if(o<0)h=[i=0];else{for(i=-1;0===h[0];h.splice(0,1),i-=f);for(o=1,s=h[0];s>=10;s/=10,o++);o<f&&(i-=f-o)}return l.e=i,l.c=h,l}),G.sum=function(){for(var t=1,e=arguments,r=new G(e[0]);t<e.length;)r=r.plus(e[t++]);return r},i=function(){var t="0123456789";function e(t,e,r,i){for(var n,s,o=[0],a=0,c=t.length;a<c;){for(s=o.length;s--;o[s]*=e);for(o[0]+=i.indexOf(t.charAt(a++)),n=0;n<o.length;n++)o[n]>r-1&&(null==o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}return function(i,n,s,o,a){var c,u,h,l,f,d,p,g,b=i.indexOf("."),m=M,y=N;for(b>=0&&(l=K,K=0,i=i.replace(".",""),d=(g=new G(n)).pow(i.length-b),K=l,g.c=e(S(v(d.c),d.e,"0"),10,s,t),g.e=g.c.length),h=l=(p=e(i,n,s,a?(c=V,t):(c=t,V))).length;0==p[--l];p.pop());if(!p[0])return c.charAt(0);if(b<0?--h:(d.c=p,d.e=h,d.s=o,p=(d=r(d,g,m,y,s)).c,f=d.r,h=d.e),b=p[u=h+m+1],l=s/2,f=f||u<0||null!=p[u+1],f=y<4?(null!=b||f)&&(0==y||y==(d.s<0?3:2)):b>l||b==l&&(4==y||f||6==y&&1&p[u-1]||y==(d.s<0?8:7)),u<1||!p[0])i=f?S(c.charAt(1),-m,c.charAt(0)):c.charAt(0);else{if(p.length=u,f)for(--s;++p[--u]>s;)p[u]=0,u||(++h,p=[1].concat(p));for(l=p.length;!p[--l];);for(b=0,i="";b<=l;i+=c.charAt(p[b++]));i=S(i,h,c.charAt(0))}return i}}(),r=function(){function t(t,e,r){var i,n,s,o,a=0,c=t.length,u=e%g,h=e/g|0;for(t=t.slice();c--;)a=((n=u*(s=t[c]%g)+(i=h*s+(o=t[c]/g|0)*u)%g*g+a)/r|0)+(i/g|0)+h*o,t[c]=n%r;return a&&(t=[a].concat(t)),t}function e(t,e,r,i){var n,s;if(r!=i)s=r>i?1:-1;else for(n=s=0;n<r;n++)if(t[n]!=e[n]){s=t[n]>e[n]?1:-1;break}return s}function r(t,e,r,i){for(var n=0;r--;)t[r]-=n,n=t[r]<e[r]?1:0,t[r]=n*i+t[r]-e[r];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(i,n,s,o,a){var u,h,d,p,g,b,v,y,_,w,E,S,A,O,T,P,x,R=i.s==n.s?1:-1,I=i.c,L=n.c;if(!(I&&I[0]&&L&&L[0]))return new G(i.s&&n.s&&(I?!L||I[0]!=L[0]:L)?I&&0==I[0]||!L?0*R:R/0:NaN);for(_=(y=new G(R)).c=[],R=s+(h=i.e-n.e)+1,a||(a=l,h=m(i.e/f)-m(n.e/f),R=R/f|0),d=0;L[d]==(I[d]||0);d++);if(L[d]>(I[d]||0)&&h--,R<0)_.push(1),p=!0;else{for(O=I.length,P=L.length,d=0,R+=2,(g=c(a/(L[0]+1)))>1&&(L=t(L,g,a),I=t(I,g,a),P=L.length,O=I.length),A=P,E=(w=I.slice(0,P)).length;E<P;w[E++]=0);x=L.slice(),x=[0].concat(x),T=L[0],L[1]>=a/2&&T++;do{if(g=0,(u=e(L,w,P,E))<0){if(S=w[0],P!=E&&(S=S*a+(w[1]||0)),(g=c(S/T))>1)for(g>=a&&(g=a-1),v=(b=t(L,g,a)).length,E=w.length;1==e(b,w,v,E);)g--,r(b,P<v?x:L,v,a),v=b.length,u=1;else 0==g&&(u=g=1),v=(b=L.slice()).length;if(v<E&&(b=[0].concat(b)),r(w,b,E,a),E=w.length,-1==u)for(;e(L,w,P,E)<1;)g++,r(w,P<E?x:L,E,a),E=w.length}else 0===u&&(g++,w=[0]);_[d++]=g,w[0]?w[E++]=I[A]||0:(w=[I[A]],E=1)}while((A++<O||null!=w[0])&&R--);p=null!=w[0],_[0]||_.splice(0,1)}if(a==l){for(d=1,R=_[0];R>=10;R/=10,d++);Z(y,s+(y.e=d+h*f-1)+1,o,p)}else y.e=h,y.r=+p;return y}}(),O=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,P=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,R=/^\s*\+(?=[\w.])|^\s+|\s+$/g,n=function(t,e,r,i){var n,s=r?e:e.replace(R,"");if(x.test(s))t.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(O,(function(t,e,r){return n="x"==(r=r.toLowerCase())?16:"b"==r?2:8,i&&i!=n?t:e})),i&&(n=i,s=s.replace(T,"$1").replace(P,"0.$1")),e!=s))return new G(s,n);if(G.DEBUG)throw Error(u+"Not a"+(i?" base "+i:"")+" number: "+e);t.s=null}t.c=t.e=null},I.absoluteValue=I.abs=function(){var t=new G(this);return t.s<0&&(t.s=1),t},I.comparedTo=function(t,e){return y(this,new G(t,e))},I.decimalPlaces=I.dp=function(t,e){var r,i,n,s=this;if(null!=t)return _(t,0,b),null==e?e=N:_(e,0,8),Z(new G(s),t+s.e+1,e);if(!(r=s.c))return null;if(i=((n=r.length-1)-m(this.e/f))*f,n=r[n])for(;n%10==0;n/=10,i--);return i<0&&(i=0),i},I.dividedBy=I.div=function(t,e){return r(this,new G(t,e),M,N)},I.dividedToIntegerBy=I.idiv=function(t,e){return r(this,new G(t,e),0,1)},I.exponentiatedBy=I.pow=function(t,e){var r,i,n,s,o,h,l,d,p=this;if((t=new G(t)).c&&!t.isInteger())throw Error(u+"Exponent not an integer: "+W(t));if(null!=e&&(e=new G(e)),o=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return d=new G(Math.pow(+W(p),o?t.s*(2-w(t)):+W(t))),e?d.mod(e):d;if(h=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new G(NaN);(i=!h&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||o&&p.c[1]>=24e7:p.c[0]<8e13||o&&p.c[0]<=9999975e7)))return s=p.s<0&&w(t)?-0:0,p.e>-1&&(s=1/s),new G(h?1/s:s);K&&(s=a(K/f+2))}for(o?(r=new G(.5),h&&(t.s=1),l=w(t)):l=(n=Math.abs(+W(t)))%2,d=new G(L);;){if(l){if(!(d=d.times(p)).c)break;s?d.c.length>s&&(d.c.length=s):i&&(d=d.mod(e))}if(n){if(0===(n=c(n/2)))break;l=n%2}else if(Z(t=t.times(r),t.e+1,1),t.e>14)l=w(t);else{if(0===(n=+W(t)))break;l=n%2}p=p.times(p),s?p.c&&p.c.length>s&&(p.c.length=s):i&&(p=p.mod(e))}return i?d:(h&&(d=L.div(d)),e?d.mod(e):s?Z(d,K,N,undefined):d)},I.integerValue=function(t){var e=new G(this);return null==t?t=N:_(t,0,8),Z(e,e.e+1,t)},I.isEqualTo=I.eq=function(t,e){return 0===y(this,new G(t,e))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(t,e){return y(this,new G(t,e))>0},I.isGreaterThanOrEqualTo=I.gte=function(t,e){return 1===(e=y(this,new G(t,e)))||0===e},I.isInteger=function(){return!!this.c&&m(this.e/f)>this.c.length-2},I.isLessThan=I.lt=function(t,e){return y(this,new G(t,e))<0},I.isLessThanOrEqualTo=I.lte=function(t,e){return-1===(e=y(this,new G(t,e)))||0===e},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(t,e){var r,i,n,s,o=this,a=o.s;if(e=(t=new G(t,e)).s,!a||!e)return new G(NaN);if(a!=e)return t.s=-e,o.plus(t);var c=o.e/f,u=t.e/f,h=o.c,d=t.c;if(!c||!u){if(!h||!d)return h?(t.s=-e,t):new G(d?o:NaN);if(!h[0]||!d[0])return d[0]?(t.s=-e,t):new G(h[0]?o:3==N?-0:0)}if(c=m(c),u=m(u),h=h.slice(),a=c-u){for((s=a<0)?(a=-a,n=h):(u=c,n=d),n.reverse(),e=a;e--;n.push(0));n.reverse()}else for(i=(s=(a=h.length)<(e=d.length))?a:e,a=e=0;e<i;e++)if(h[e]!=d[e]){s=h[e]<d[e];break}if(s&&(n=h,h=d,d=n,t.s=-t.s),(e=(i=d.length)-(r=h.length))>0)for(;e--;h[r++]=0);for(e=l-1;i>a;){if(h[--i]<d[i]){for(r=i;r&&!h[--r];h[r]=e);--h[r],h[i]+=l}h[i]-=d[i]}for(;0==h[0];h.splice(0,1),--u);return h[0]?q(t,h,u):(t.s=3==N?-1:1,t.c=[t.e=0],t)},I.modulo=I.mod=function(t,e){var i,n,s=this;return t=new G(t,e),!s.c||!t.s||t.c&&!t.c[0]?new G(NaN):!t.c||s.c&&!s.c[0]?new G(s):(9==j?(n=t.s,t.s=1,i=r(s,t,0,3),t.s=n,i.s*=n):i=r(s,t,0,j),(t=s.minus(i.times(t))).c[0]||1!=j||(t.s=s.s),t)},I.multipliedBy=I.times=function(t,e){var r,i,n,s,o,a,c,u,h,d,p,b,v,y,_,w=this,E=w.c,S=(t=new G(t,e)).c;if(!(E&&S&&E[0]&&S[0]))return!w.s||!t.s||E&&!E[0]&&!S||S&&!S[0]&&!E?t.c=t.e=t.s=null:(t.s*=w.s,E&&S?(t.c=[0],t.e=0):t.c=t.e=null),t;for(i=m(w.e/f)+m(t.e/f),t.s*=w.s,(c=E.length)<(d=S.length)&&(v=E,E=S,S=v,n=c,c=d,d=n),n=c+d,v=[];n--;v.push(0));for(y=l,_=g,n=d;--n>=0;){for(r=0,p=S[n]%_,b=S[n]/_|0,s=n+(