22 lines
48 KiB
JavaScript
22 lines
48 KiB
JavaScript
import{m as fn}from"./chunk-IAFVNOEB.js";import{a as Rt,b as P,c as ue,d as fe,o as d,q as h}from"./chunk-QTLWQ5AJ.js";var Kt=ue(Re=>{"use strict";d();h();Object.defineProperty(Re,"__esModule",{value:!0});Re.BrowserRandomSource=void 0;var kt=65536,Qe=class{constructor(){this.isAvailable=!1,this.isInstantiated=!1;let t=typeof self<"u"?self.crypto||self.msCrypto:null;t&&t.getRandomValues!==void 0&&(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.");let r=new Uint8Array(t);for(let e=0;e<r.length;e+=kt)this._crypto.getRandomValues(r.subarray(e,e+Math.min(r.length-e,kt)));return r}};Re.BrowserRandomSource=Qe});var ve=ue(We=>{"use strict";d();h();Object.defineProperty(We,"__esModule",{value:!0});function sn(n){for(var t=0;t<n.length;t++)n[t]=0;return n}We.wipe=sn});var Gt=ue(ke=>{"use strict";d();h();Object.defineProperty(ke,"__esModule",{value:!0});ke.NodeRandomSource=void 0;var an=ve(),et=class{constructor(){if(this.isAvailable=!1,this.isInstantiated=!1,typeof Rt<"u"){let t=fn();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 r=this._crypto.randomBytes(t);if(r.length!==t)throw new Error("NodeRandomSource: got fewer bytes than requested");let e=new Uint8Array(t);for(let i=0;i<e.length;i++)e[i]=r[i];return(0,an.wipe)(r),e}};ke.NodeRandomSource=et});var Vt=ue(Ke=>{"use strict";d();h();Object.defineProperty(Ke,"__esModule",{value:!0});Ke.SystemRandomSource=void 0;var un=Kt(),cn=Gt(),tt=class{constructor(){if(this.isAvailable=!1,this.name="",this._source=new un.BrowserRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Browser";return}if(this._source=new cn.NodeRandomSource,this._source.isAvailable){this.isAvailable=!0,this.name="Node";return}}randomBytes(t){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes(t)}};Ke.SystemRandomSource=tt});var jt=ue(se=>{"use strict";d();h();Object.defineProperty(se,"__esModule",{value:!0});function Dn(n,t){var r=n>>>16&65535,e=n&65535,i=t>>>16&65535,o=t&65535;return e*o+(r*o+e*i<<16>>>0)|0}se.mul=Math.imul||Dn;function dn(n,t){return n+t|0}se.add=dn;function hn(n,t){return n-t|0}se.sub=hn;function xn(n,t){return n<<t|n>>>32-t}se.rotl=xn;function bn(n,t){return n<<32-t|n>>>t}se.rotr=bn;function ln(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n}se.isInteger=Number.isInteger||ln;se.MAX_SAFE_INTEGER=9007199254740991;se.isSafeInteger=function(n){return se.isInteger(n)&&n>=-se.MAX_SAFE_INTEGER&&n<=se.MAX_SAFE_INTEGER}});var je=ue(S=>{"use strict";d();h();Object.defineProperty(S,"__esModule",{value:!0});var qt=jt();function pn(n,t){return t===void 0&&(t=0),(n[t+0]<<8|n[t+1])<<16>>16}S.readInt16BE=pn;function En(n,t){return t===void 0&&(t=0),(n[t+0]<<8|n[t+1])>>>0}S.readUint16BE=En;function wn(n,t){return t===void 0&&(t=0),(n[t+1]<<8|n[t])<<16>>16}S.readInt16LE=wn;function yn(n,t){return t===void 0&&(t=0),(n[t+1]<<8|n[t])>>>0}S.readUint16LE=yn;function Xt(n,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=n>>>8,t[r+1]=n>>>0,t}S.writeUint16BE=Xt;S.writeInt16BE=Xt;function $t(n,t,r){return t===void 0&&(t=new Uint8Array(2)),r===void 0&&(r=0),t[r+0]=n>>>0,t[r+1]=n>>>8,t}S.writeUint16LE=$t;S.writeInt16LE=$t;function rt(n,t){return t===void 0&&(t=0),n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3]}S.readInt32BE=rt;function nt(n,t){return t===void 0&&(t=0),(n[t]<<24|n[t+1]<<16|n[t+2]<<8|n[t+3])>>>0}S.readUint32BE=nt;function it(n,t){return t===void 0&&(t=0),n[t+3]<<24|n[t+2]<<16|n[t+1]<<8|n[t]}S.readInt32LE=it;function ot(n,t){return t===void 0&&(t=0),(n[t+3]<<24|n[t+2]<<16|n[t+1]<<8|n[t])>>>0}S.readUint32LE=ot;function Ge(n,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=n>>>24,t[r+1]=n>>>16,t[r+2]=n>>>8,t[r+3]=n>>>0,t}S.writeUint32BE=Ge;S.writeInt32BE=Ge;function Ve(n,t,r){return t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0),t[r+0]=n>>>0,t[r+1]=n>>>8,t[r+2]=n>>>16,t[r+3]=n>>>24,t}S.writeUint32LE=Ve;S.writeInt32LE=Ve;function mn(n,t){t===void 0&&(t=0);var r=rt(n,t),e=rt(n,t+4);return r*4294967296+e-(e>>31)*4294967296}S.readInt64BE=mn;function vn(n,t){t===void 0&&(t=0);var r=nt(n,t),e=nt(n,t+4);return r*4294967296+e}S.readUint64BE=vn;function gn(n,t){t===void 0&&(t=0);var r=it(n,t),e=it(n,t+4);return e*4294967296+r-(r>>31)*4294967296}S.readInt64LE=gn;function _n(n,t){t===void 0&&(t=0);var r=ot(n,t),e=ot(n,t+4);return e*4294967296+r}S.readUint64LE=_n;function Jt(n,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),Ge(n/4294967296>>>0,t,r),Ge(n>>>0,t,r+4),t}S.writeUint64BE=Jt;S.writeInt64BE=Jt;function Yt(n,t,r){return t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0),Ve(n>>>0,t,r),Ve(n/4294967296>>>0,t,r+4),t}S.writeUint64LE=Yt;S.writeInt64LE=Yt;function Cn(n,t,r){if(r===void 0&&(r=0),n%8!==0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(n/8>t.length-r)throw new Error("readUintBE: array is too short for the given bitLength");for(var e=0,i=1,o=n/8+r-1;o>=r;o--)e+=t[o]*i,i*=256;return e}S.readUintBE=Cn;function An(n,t,r){if(r===void 0&&(r=0),n%8!==0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(n/8>t.length-r)throw new Error("readUintLE: array is too short for the given bitLength");for(var e=0,i=1,o=r;o<r+n/8;o++)e+=t[o]*i,i*=256;return e}S.readUintLE=An;function Un(n,t,r,e){if(r===void 0&&(r=new Uint8Array(n/8)),e===void 0&&(e=0),n%8!==0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!qt.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var i=1,o=n/8+e-1;o>=e;o--)r[o]=t/i&255,i*=256;return r}S.writeUintBE=Un;function Sn(n,t,r,e){if(r===void 0&&(r=new Uint8Array(n/8)),e===void 0&&(e=0),n%8!==0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!qt.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var i=1,o=e;o<e+n/8;o++)r[o]=t/i&255,i*=256;return r}S.writeUintLE=Sn;function Bn(n,t){t===void 0&&(t=0);var r=new DataView(n.buffer,n.byteOffset,n.byteLength);return r.getFloat32(t)}S.readFloat32BE=Bn;function Ln(n,t){t===void 0&&(t=0);var r=new DataView(n.buffer,n.byteOffset,n.byteLength);return r.getFloat32(t,!0)}S.readFloat32LE=Ln;function Fn(n,t){t===void 0&&(t=0);var r=new DataView(n.buffer,n.byteOffset,n.byteLength);return r.getFloat64(t)}S.readFloat64BE=Fn;function In(n,t){t===void 0&&(t=0);var r=new DataView(n.buffer,n.byteOffset,n.byteLength);return r.getFloat64(t,!0)}S.readFloat64LE=In;function Mn(n,t,r){t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0);var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return e.setFloat32(r,n),t}S.writeFloat32BE=Mn;function Tn(n,t,r){t===void 0&&(t=new Uint8Array(4)),r===void 0&&(r=0);var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return e.setFloat32(r,n,!0),t}S.writeFloat32LE=Tn;function Hn(n,t,r){t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0);var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return e.setFloat64(r,n),t}S.writeFloat64BE=Hn;function Nn(n,t,r){t===void 0&&(t=new Uint8Array(8)),r===void 0&&(r=0);var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return e.setFloat64(r,n,!0),t}S.writeFloat64LE=Nn});var er=ue(oe=>{"use strict";d();h();Object.defineProperty(oe,"__esModule",{value:!0});oe.randomStringForEntropy=oe.randomString=oe.randomUint32=oe.randomBytes=oe.defaultRandomSource=void 0;var On=Vt(),Pn=je(),Zt=ve();oe.defaultRandomSource=new On.SystemRandomSource;function ft(n,t=oe.defaultRandomSource){return t.randomBytes(n)}oe.randomBytes=ft;function zn(n=oe.defaultRandomSource){let t=ft(4,n),r=(0,Pn.readUint32LE)(t);return(0,Zt.wipe)(t),r}oe.randomUint32=zn;var Qt="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function Wt(n,t=Qt,r=oe.defaultRandomSource){if(t.length<2)throw new Error("randomString charset is too short");if(t.length>256)throw new Error("randomString charset is too long");let e="",i=t.length,o=256-256%i;for(;n>0;){let u=ft(Math.ceil(n*256/o),r);for(let a=0;a<u.length&&n>0;a++){let y=u[a];y<o&&(e+=t.charAt(y%i),n--)}(0,Zt.wipe)(u)}return e}oe.randomString=Wt;function Rn(n,t=Qt,r=oe.defaultRandomSource){let e=Math.ceil(n/(Math.log(t.length)/Math.LN2));return Wt(e,t,r)}oe.randomStringForEntropy=Rn});var Gn=ue(he=>{"use strict";d();h();Object.defineProperty(he,"__esModule",{value:!0});var Xe=je(),qe=ve();he.DIGEST_LENGTH=32;he.BLOCK_SIZE=64;var tr=function(){function n(){this.digestLength=he.DIGEST_LENGTH,this.blockSize=he.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return n.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},n.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},n.prototype.clean=function(){qe.wipe(this._buffer),qe.wipe(this._temp),this.reset()},n.prototype.update=function(t,r){if(r===void 0&&(r=t.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var e=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<this.blockSize&&r>0;)this._buffer[this._bufferLength++]=t[e++],r--;this._bufferLength===this.blockSize&&(st(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(e=st(this._temp,this._state,t,e,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=t[e++],r--;return this},n.prototype.finish=function(t){if(!this._finished){var r=this._bytesHashed,e=this._bufferLength,i=r/536870912|0,o=r<<3,u=r%64<56?64:128;this._buffer[e]=128;for(var a=e+1;a<u-8;a++)this._buffer[a]=0;Xe.writeUint32BE(i,this._buffer,u-8),Xe.writeUint32BE(o,this._buffer,u-4),st(this._temp,this._state,this._buffer,0,u),this._finished=!0}for(var a=0;a<this.digestLength/4;a++)Xe.writeUint32BE(this._state[a],t,a*4);return this},n.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},n.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:this._bufferLength>0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},n.prototype.restoreState=function(t){return this._state.set(t.state),this._bufferLength=t.bufferLength,t.buffer&&this._buffer.set(t.buffer),this._bytesHashed=t.bytesHashed,this._finished=!1,this},n.prototype.cleanSavedState=function(t){qe.wipe(t.state),t.buffer&&qe.wipe(t.buffer),t.bufferLength=0,t.bytesHashed=0},n}();he.SHA256=tr;var kn=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function st(n,t,r,e,i){for(;i>=64;){for(var o=t[0],u=t[1],a=t[2],y=t[3],E=t[4],m=t[5],A=t[6],H=t[7],_=0;_<16;_++){var w=e+_*4;n[_]=Xe.readUint32BE(r,w)}for(var _=16;_<64;_++){var l=n[_-2],U=(l>>>17|l<<32-17)^(l>>>19|l<<32-19)^l>>>10;l=n[_-15];var g=(l>>>7|l<<32-7)^(l>>>18|l<<32-18)^l>>>3;n[_]=(U+n[_-7]|0)+(g+n[_-16]|0)}for(var _=0;_<64;_++){var U=(((E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&m^~E&A)|0)+(H+(kn[_]+n[_]|0)|0)|0,g=((o>>>2|o<<32-2)^(o>>>13|o<<32-13)^(o>>>22|o<<32-22))+(o&u^o&a^u&a)|0;H=A,A=m,m=E,E=y+U|0,y=a,a=u,u=o,o=U+g|0}t[0]+=o,t[1]+=u,t[2]+=a,t[3]+=y,t[4]+=E,t[5]+=m,t[6]+=A,t[7]+=H,e+=64,i-=64}return e}function Kn(n){var t=new tr;t.update(n);var r=t.digest();return t.clean(),r}he.hash=Kn});function Vn(n,t){if(n.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),e=0;e<r.length;e++)r[e]=255;for(var i=0;i<n.length;i++){var o=n.charAt(i),u=o.charCodeAt(0);if(r[u]!==255)throw new TypeError(o+" is ambiguous");r[u]=i}var a=n.length,y=n.charAt(0),E=Math.log(a)/Math.log(256),m=Math.log(256)/Math.log(a);function A(w){if(w instanceof Uint8Array||(ArrayBuffer.isView(w)?w=new Uint8Array(w.buffer,w.byteOffset,w.byteLength):Array.isArray(w)&&(w=Uint8Array.from(w))),!(w instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(w.length===0)return"";for(var l=0,U=0,g=0,B=w.length;g!==B&&w[g]===0;)g++,l++;for(var v=(B-g)*m+1>>>0,C=new Uint8Array(v);g!==B;){for(var I=w[g],M=0,f=v-1;(I!==0||M<U)&&f!==-1;f--,M++)I+=256*C[f]>>>0,C[f]=I%a>>>0,I=I/a>>>0;if(I!==0)throw new Error("Non-zero carry");U=M,g++}for(var s=v-U;s!==v&&C[s]===0;)s++;for(var F=y.repeat(l);s<v;++s)F+=n.charAt(C[s]);return F}function H(w){if(typeof w!="string")throw new TypeError("Expected String");if(w.length===0)return new Uint8Array;var l=0;if(w[l]!==" "){for(var U=0,g=0;w[l]===y;)U++,l++;for(var B=(w.length-l)*E+1>>>0,v=new Uint8Array(B);w[l];){var C=r[w.charCodeAt(l)];if(C===255)return;for(var I=0,M=B-1;(C!==0||I<g)&&M!==-1;M--,I++)C+=a*v[M]>>>0,v[M]=C%256>>>0,C=C/256>>>0;if(C!==0)throw new Error("Non-zero carry");g=I,l++}if(w[l]!==" "){for(var f=B-g;f!==B&&v[f]===0;)f++;for(var s=new Uint8Array(U+(B-f)),F=U;f!==B;)s[F++]=v[f++];return s}}}function _(w){var l=H(w);if(l)return l;throw new Error(`Non-${t} character`)}return{encode:A,decodeUnsafe:H,decode:_}}var jn,qn,rr,nr=P(()=>{d();h();jn=Vn,qn=jn,rr=qn});var Xo,ir,De,or,fr,xe=P(()=>{d();h();Xo=new Uint8Array(0),ir=(n,t)=>{if(n===t)return!0;if(n.byteLength!==t.byteLength)return!1;for(let r=0;r<n.byteLength;r++)if(n[r]!==t[r])return!1;return!0},De=n=>{if(n instanceof Uint8Array&&n.constructor.name==="Uint8Array")return n;if(n instanceof ArrayBuffer)return new Uint8Array(n);if(ArrayBuffer.isView(n))return new Uint8Array(n.buffer,n.byteOffset,n.byteLength);throw new Error("Unknown type, must be binary type")},or=n=>new TextEncoder().encode(n),fr=n=>new TextDecoder().decode(n)});var at,ut,ct,ar,Dt,ge,be,Xn,$n,z,ae=P(()=>{d();h();nr();xe();at=class{constructor(t,r,e){this.name=t,this.prefix=r,this.baseEncode=e}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}},ut=class{constructor(t,r,e){if(this.name=t,this.prefix=r,r.codePointAt(0)===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=e}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return ar(this,t)}},ct=class{constructor(t){this.decoders=t}or(t){return ar(this,t)}decode(t){let r=t[0],e=this.decoders[r];if(e)return e.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}},ar=(n,t)=>new ct({...n.decoders||{[n.prefix]:n},...t.decoders||{[t.prefix]:t}}),Dt=class{constructor(t,r,e,i){this.name=t,this.prefix=r,this.baseEncode=e,this.baseDecode=i,this.encoder=new at(t,r,e),this.decoder=new ut(t,r,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}},ge=({name:n,prefix:t,encode:r,decode:e})=>new Dt(n,t,r,e),be=({prefix:n,name:t,alphabet:r})=>{let{encode:e,decode:i}=rr(r,t);return ge({prefix:n,name:t,encode:e,decode:o=>De(i(o))})},Xn=(n,t,r,e)=>{let i={};for(let m=0;m<t.length;++m)i[t[m]]=m;let o=n.length;for(;n[o-1]==="=";)--o;let u=new Uint8Array(o*r/8|0),a=0,y=0,E=0;for(let m=0;m<o;++m){let A=i[n[m]];if(A===void 0)throw new SyntaxError(`Non-${e} character`);y=y<<r|A,a+=r,a>=8&&(a-=8,u[E++]=255&y>>a)}if(a>=r||255&y<<8-a)throw new SyntaxError("Unexpected end of data");return u},$n=(n,t,r)=>{let e=t[t.length-1]==="=",i=(1<<r)-1,o="",u=0,a=0;for(let y=0;y<n.length;++y)for(a=a<<8|n[y],u+=8;u>r;)u-=r,o+=t[i&a>>u];if(u&&(o+=t[i&a<<r-u]),e)for(;o.length*r&7;)o+="=";return o},z=({name:n,prefix:t,bitsPerChar:r,alphabet:e})=>ge({prefix:t,name:n,encode(i){return $n(i,e,r)},decode(i){return Xn(i,e,r,n)}})});var dt={};fe(dt,{identity:()=>Jn});var Jn,ur=P(()=>{d();h();ae();xe();Jn=ge({prefix:"\0",name:"identity",encode:n=>fr(n),decode:n=>or(n)})});var ht={};fe(ht,{base2:()=>Yn});var Yn,cr=P(()=>{d();h();ae();Yn=z({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})});var xt={};fe(xt,{base8:()=>Zn});var Zn,Dr=P(()=>{d();h();ae();Zn=z({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})});var bt={};fe(bt,{base10:()=>Qn});var Qn,dr=P(()=>{d();h();ae();Qn=be({prefix:"9",name:"base10",alphabet:"0123456789"})});var lt={};fe(lt,{base16:()=>Wn,base16upper:()=>ei});var Wn,ei,hr=P(()=>{d();h();ae();Wn=z({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),ei=z({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});var pt={};fe(pt,{base32:()=>_e,base32hex:()=>ii,base32hexpad:()=>fi,base32hexpadupper:()=>si,base32hexupper:()=>oi,base32pad:()=>ri,base32padupper:()=>ni,base32upper:()=>ti,base32z:()=>ai});var _e,ti,ri,ni,ii,oi,fi,si,ai,Et=P(()=>{d();h();ae();_e=z({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),ti=z({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),ri=z({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),ni=z({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ii=z({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),oi=z({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),fi=z({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),si=z({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),ai=z({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})});var wt={};fe(wt,{base36:()=>ui,base36upper:()=>ci});var ui,ci,xr=P(()=>{d();h();ae();ui=be({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),ci=be({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})});var yt={};fe(yt,{base58btc:()=>ce,base58flickr:()=>Di});var ce,Di,mt=P(()=>{d();h();ae();ce=be({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Di=be({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});var vt={};fe(vt,{base64:()=>di,base64pad:()=>hi,base64url:()=>xi,base64urlpad:()=>bi});var di,hi,xi,bi,br=P(()=>{d();h();ae();di=z({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),hi=z({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),xi=z({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),bi=z({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});var gt={};fe(gt,{base256emoji:()=>yi});function Ei(n){return n.reduce((t,r)=>(t+=li[r],t),"")}function wi(n){let t=[];for(let r of n){let e=pi[r.codePointAt(0)];if(e===void 0)throw new Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}var lr,li,pi,yi,pr=P(()=>{d();h();ae();lr=Array.from("\u{1F680}\u{1FA90}\u2604\u{1F6F0}\u{1F30C}\u{1F311}\u{1F312}\u{1F313}\u{1F314}\u{1F315}\u{1F316}\u{1F317}\u{1F318}\u{1F30D}\u{1F30F}\u{1F30E}\u{1F409}\u2600\u{1F4BB}\u{1F5A5}\u{1F4BE}\u{1F4BF}\u{1F602}\u2764\u{1F60D}\u{1F923}\u{1F60A}\u{1F64F}\u{1F495}\u{1F62D}\u{1F618}\u{1F44D}\u{1F605}\u{1F44F}\u{1F601}\u{1F525}\u{1F970}\u{1F494}\u{1F496}\u{1F499}\u{1F622}\u{1F914}\u{1F606}\u{1F644}\u{1F4AA}\u{1F609}\u263A\u{1F44C}\u{1F917}\u{1F49C}\u{1F614}\u{1F60E}\u{1F607}\u{1F339}\u{1F926}\u{1F389}\u{1F49E}\u270C\u2728\u{1F937}\u{1F631}\u{1F60C}\u{1F338}\u{1F64C}\u{1F60B}\u{1F497}\u{1F49A}\u{1F60F}\u{1F49B}\u{1F642}\u{1F493}\u{1F929}\u{1F604}\u{1F600}\u{1F5A4}\u{1F603}\u{1F4AF}\u{1F648}\u{1F447}\u{1F3B6}\u{1F612}\u{1F92D}\u2763\u{1F61C}\u{1F48B}\u{1F440}\u{1F62A}\u{1F611}\u{1F4A5}\u{1F64B}\u{1F61E}\u{1F629}\u{1F621}\u{1F92A}\u{1F44A}\u{1F973}\u{1F625}\u{1F924}\u{1F449}\u{1F483}\u{1F633}\u270B\u{1F61A}\u{1F61D}\u{1F634}\u{1F31F}\u{1F62C}\u{1F643}\u{1F340}\u{1F337}\u{1F63B}\u{1F613}\u2B50\u2705\u{1F97A}\u{1F308}\u{1F608}\u{1F918}\u{1F4A6}\u2714\u{1F623}\u{1F3C3}\u{1F490}\u2639\u{1F38A}\u{1F498}\u{1F620}\u261D\u{1F615}\u{1F33A}\u{1F382}\u{1F33B}\u{1F610}\u{1F595}\u{1F49D}\u{1F64A}\u{1F639}\u{1F5E3}\u{1F4AB}\u{1F480}\u{1F451}\u{1F3B5}\u{1F91E}\u{1F61B}\u{1F534}\u{1F624}\u{1F33C}\u{1F62B}\u26BD\u{1F919}\u2615\u{1F3C6}\u{1F92B}\u{1F448}\u{1F62E}\u{1F646}\u{1F37B}\u{1F343}\u{1F436}\u{1F481}\u{1F632}\u{1F33F}\u{1F9E1}\u{1F381}\u26A1\u{1F31E}\u{1F388}\u274C\u270A\u{1F44B}\u{1F630}\u{1F928}\u{1F636}\u{1F91D}\u{1F6B6}\u{1F4B0}\u{1F353}\u{1F4A2}\u{1F91F}\u{1F641}\u{1F6A8}\u{1F4A8}\u{1F92C}\u2708\u{1F380}\u{1F37A}\u{1F913}\u{1F619}\u{1F49F}\u{1F331}\u{1F616}\u{1F476}\u{1F974}\u25B6\u27A1\u2753\u{1F48E}\u{1F4B8}\u2B07\u{1F628}\u{1F31A}\u{1F98B}\u{1F637}\u{1F57A}\u26A0\u{1F645}\u{1F61F}\u{1F635}\u{1F44E}\u{1F932}\u{1F920}\u{1F927}\u{1F4CC}\u{1F535}\u{1F485}\u{1F9D0}\u{1F43E}\u{1F352}\u{1F617}\u{1F911}\u{1F30A}\u{1F92F}\u{1F437}\u260E\u{1F4A7}\u{1F62F}\u{1F486}\u{1F446}\u{1F3A4}\u{1F647}\u{1F351}\u2744\u{1F334}\u{1F4A3}\u{1F438}\u{1F48C}\u{1F4CD}\u{1F940}\u{1F922}\u{1F445}\u{1F4A1}\u{1F4A9}\u{1F450}\u{1F4F8}\u{1F47B}\u{1F910}\u{1F92E}\u{1F3BC}\u{1F975}\u{1F6A9}\u{1F34E}\u{1F34A}\u{1F47C}\u{1F48D}\u{1F4E3}\u{1F942}"),li=lr.reduce((n,t,r)=>(n[r]=t,n),[]),pi=lr.reduce((n,t,r)=>(n[t.codePointAt(0)]=r,n),[]);yi=ge({prefix:"\u{1F680}",name:"base256emoji",encode:Ei,decode:wi})});function yr(n,t,r){t=t||[],r=r||0;for(var e=r;n>=_i;)t[r++]=n&255|Er,n/=128;for(;n&gi;)t[r++]=n&255|Er,n>>>=7;return t[r]=n|0,yr.bytes=r-e+1,t}function _t(n,e){var r=0,e=e||0,i=0,o=e,u,a=n.length;do{if(o>=a)throw _t.bytes=0,new RangeError("Could not decode varint");u=n[o++],r+=i<28?(u&wr)<<i:(u&wr)*Math.pow(2,i),i+=7}while(u>=Ai);return _t.bytes=o-e,r}var mi,Er,vi,gi,_i,Ci,Ai,wr,Ui,Si,Bi,Li,Fi,Ii,Mi,Ti,Hi,Ni,Oi,Pi,Ie,mr=P(()=>{d();h();mi=yr,Er=128,vi=127,gi=~vi,_i=Math.pow(2,31);Ci=_t,Ai=128,wr=127;Ui=Math.pow(2,7),Si=Math.pow(2,14),Bi=Math.pow(2,21),Li=Math.pow(2,28),Fi=Math.pow(2,35),Ii=Math.pow(2,42),Mi=Math.pow(2,49),Ti=Math.pow(2,56),Hi=Math.pow(2,63),Ni=function(n){return n<Ui?1:n<Si?2:n<Bi?3:n<Li?4:n<Fi?5:n<Ii?6:n<Mi?7:n<Ti?8:n<Hi?9:10},Oi={encode:mi,decode:Ci,encodingLength:Ni},Pi=Oi,Ie=Pi});var Me,Ce,Ae,Je=P(()=>{d();h();mr();Me=(n,t=0)=>[Ie.decode(n,t),Ie.decode.bytes],Ce=(n,t,r=0)=>(Ie.encode(n,t,r),t),Ae=n=>Ie.encodingLength(n)});var pe,vr,gr,Ue,He=P(()=>{d();h();xe();Je();pe=(n,t)=>{let r=t.byteLength,e=Ae(n),i=e+Ae(r),o=new Uint8Array(i+r);return Ce(n,o,0),Ce(r,o,e),o.set(t,i),new Ue(n,r,t,o)},vr=n=>{let t=De(n),[r,e]=Me(t),[i,o]=Me(t.subarray(e)),u=t.subarray(e+o);if(u.byteLength!==i)throw new Error("Incorrect length");return new Ue(r,i,u,t)},gr=(n,t)=>n===t?!0:n.code===t.code&&n.size===t.size&&ir(n.bytes,t.bytes),Ue=class{constructor(t,r,e,i){this.code=t,this.size=r,this.digest=e,this.bytes=i}}});var At,Ct,Ut=P(()=>{d();h();He();At=({name:n,code:t,encode:r})=>new Ct(n,t,r),Ct=class{constructor(t,r,e){this.name=t,this.code=r,this.encode=e}digest(t){if(t instanceof Uint8Array){let r=this.encode(t);return r instanceof Uint8Array?pe(this.code,r):r.then(e=>pe(this.code,e))}else throw Error("Unknown type, must be binary type")}}});var St={};fe(St,{sha256:()=>zi,sha512:()=>Ri});var Cr,zi,Ri,Ar=P(()=>{d();h();Ut();Cr=n=>async t=>new Uint8Array(await crypto.subtle.digest(n,t)),zi=At({name:"sha2-256",code:18,encode:Cr("SHA-256")}),Ri=At({name:"sha2-512",code:19,encode:Cr("SHA-512")})});var Bt={};fe(Bt,{identity:()=>Gi});var Ur,ki,Sr,Ki,Gi,Br=P(()=>{d();h();xe();He();Ur=0,ki="identity",Sr=De,Ki=n=>pe(Ur,Sr(n)),Gi={code:Ur,name:ki,encode:Sr,digest:Ki}});var Lr=P(()=>{d();h();xe()});var Wf,e0,Fr=P(()=>{d();h();Wf=new TextEncoder,e0=new TextDecoder});var q,qi,Xi,$i,Ne,Ji,Ir,Mr,Ye,Ze,Yi,Zi,Qi,Tr=P(()=>{d();h();Je();He();mt();Et();xe();q=class{constructor(t,r,e,i){this.code=r,this.version=t,this.multihash=e,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:Ze,byteLength:Ze,code:Ye,version:Ye,multihash:Ye,bytes:Ye,_baseCache:Ze,asCID:Ze})}toV0(){switch(this.version){case 0:return this;default:{let{code:t,multihash:r}=this;if(t!==Ne)throw new Error("Cannot convert a non dag-pb CID to CIDv0");if(r.code!==Ji)throw new Error("Cannot convert non sha2-256 multihash CID to CIDv0");return q.createV0(r)}}}toV1(){switch(this.version){case 0:{let{code:t,digest:r}=this.multihash,e=pe(t,r);return q.createV1(this.code,e)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(t){return t&&this.code===t.code&&this.version===t.version&&gr(this.multihash,t.multihash)}toString(t){let{bytes:r,version:e,_baseCache:i}=this;switch(e){case 0:return Xi(r,i,t||ce.encoder);default:return $i(r,i,t||_e.encoder)}}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(t){return Zi(/^0\.0/,Qi),!!(t&&(t[Mr]||t.asCID===t))}get toBaseEncodedString(){throw new Error("Deprecated, use .toString()")}get codec(){throw new Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw new Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw new Error('"multibaseName" property is deprecated')}get prefix(){throw new Error('"prefix" property is deprecated')}static asCID(t){if(t instanceof q)return t;if(t!=null&&t.asCID===t){let{version:r,code:e,multihash:i,bytes:o}=t;return new q(r,e,i,o||Ir(r,e,i.bytes))}else if(t!=null&&t[Mr]===!0){let{version:r,multihash:e,code:i}=t,o=vr(e);return q.create(r,i,o)}else return null}static create(t,r,e){if(typeof r!="number")throw new Error("String codecs are no longer supported");switch(t){case 0:{if(r!==Ne)throw new Error(`Version 0 CID must use dag-pb (code: ${Ne}) block encoding`);return new q(t,r,e,e.bytes)}case 1:{let i=Ir(t,r,e.bytes);return new q(t,r,e,i)}default:throw new Error("Invalid version")}}static createV0(t){return q.create(0,Ne,t)}static createV1(t,r){return q.create(1,t,r)}static decode(t){let[r,e]=q.decodeFirst(t);if(e.length)throw new Error("Incorrect length");return r}static decodeFirst(t){let r=q.inspectBytes(t),e=r.size-r.multihashSize,i=De(t.subarray(e,e+r.multihashSize));if(i.byteLength!==r.multihashSize)throw new Error("Incorrect length");let o=i.subarray(r.multihashSize-r.digestSize),u=new Ue(r.multihashCode,r.digestSize,o,i);return[r.version===0?q.createV0(u):q.createV1(r.codec,u),t.subarray(r.size)]}static inspectBytes(t){let r=0,e=()=>{let[A,H]=Me(t.subarray(r));return r+=H,A},i=e(),o=Ne;if(i===18?(i=0,r=0):i===1&&(o=e()),i!==0&&i!==1)throw new RangeError(`Invalid CID version ${i}`);let u=r,a=e(),y=e(),E=r+y,m=E-u;return{version:i,codec:o,multihashCode:a,digestSize:y,multihashSize:m,size:E}}static parse(t,r){let[e,i]=qi(t,r),o=q.decode(i);return o._baseCache.set(e,t),o}},qi=(n,t)=>{switch(n[0]){case"Q":{let r=t||ce;return[ce.prefix,r.decode(`${ce.prefix}${n}`)]}case ce.prefix:{let r=t||ce;return[ce.prefix,r.decode(n)]}case _e.prefix:{let r=t||_e;return[_e.prefix,r.decode(n)]}default:{if(t==null)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[n[0],t.decode(n)]}}},Xi=(n,t,r)=>{let{prefix:e}=r;if(e!==ce.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let i=t.get(e);if(i==null){let o=r.encode(n).slice(1);return t.set(e,o),o}else return i},$i=(n,t,r)=>{let{prefix:e}=r,i=t.get(e);if(i==null){let o=r.encode(n);return t.set(e,o),o}else return i},Ne=112,Ji=18,Ir=(n,t,r)=>{let e=Ae(n),i=e+Ae(t),o=new Uint8Array(i+r.byteLength);return Ce(n,o,0),Ce(t,o,e),o.set(r,i),o},Mr=Symbol.for("@ipld/js-cid/CID"),Ye={writable:!1,configurable:!1,enumerable:!0},Ze={writable:!1,enumerable:!1,configurable:!1},Yi="0.0.0-dev",Zi=(n,t)=>{if(n.test(Yi))console.warn(t);else throw new Error(t)},Qi=`CID.isCID(v) is deprecated and will be removed in the next major release.
|
|
Following code pattern:
|
|
|
|
if (CID.isCID(value)) {
|
|
doSomethingWithCID(value)
|
|
}
|
|
|
|
Is replaced with:
|
|
|
|
const cid = CID.asCID(value)
|
|
if (cid) {
|
|
// Make sure to use cid instead of value
|
|
doSomethingWithCID(cid)
|
|
}
|
|
`});var Hr=P(()=>{d();h();Tr();Je();xe();Ut();He()});var Lt,x0,Nr=P(()=>{d();h();ur();cr();Dr();dr();hr();Et();xr();mt();br();pr();Ar();Br();Lr();Fr();Hr();Lt={...dt,...ht,...xt,...bt,...lt,...pt,...wt,...yt,...vt,...gt},x0={...St,...Bt}});function Or(n=0){return globalThis.Buffer!=null&&globalThis.Buffer.allocUnsafe!=null?globalThis.Buffer.allocUnsafe(n):new Uint8Array(n)}var Pr=P(()=>{d();h()});function Rr(n,t,r,e){return{name:n,prefix:t,encoder:{name:n,prefix:t,encode:r},decoder:{decode:e}}}var zr,Ft,Wi,kr,Kr=P(()=>{d();h();Nr();Pr();zr=Rr("utf8","u",n=>"u"+new TextDecoder("utf8").decode(n),n=>new TextEncoder().encode(n.substring(1))),Ft=Rr("ascii","a",n=>{let t="a";for(let r=0;r<n.length;r++)t+=String.fromCharCode(n[r]);return t},n=>{n=n.substring(1);let t=Or(n.length);for(let r=0;r<n.length;r++)t[r]=n.charCodeAt(r);return t}),Wi={utf8:zr,"utf-8":zr,hex:Lt.base16,latin1:Ft,ascii:Ft,binary:Ft,...Lt},kr=Wi});var to={};fe(to,{toString:()=>eo});function eo(n,t="utf8"){let r=kr[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return(t==="utf8"||t==="utf-8")&&globalThis.Buffer!=null&&globalThis.Buffer.from!=null?globalThis.Buffer.from(n.buffer,n.byteOffset,n.byteLength).toString("utf8"):r.encoder.encode(n).substring(1)}var ro=P(()=>{d();h();Kr()});var jr=ue(de=>{"use strict";d();h();Object.defineProperty(de,"__esModule",{value:!0});var Be=je(),Se=ve();de.DIGEST_LENGTH=64;de.BLOCK_SIZE=128;var Vr=function(){function n(){this.digestLength=de.DIGEST_LENGTH,this.blockSize=de.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 n.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},n.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},n.prototype.clean=function(){Se.wipe(this._buffer),Se.wipe(this._tempHi),Se.wipe(this._tempLo),this.reset()},n.prototype.update=function(t,r){if(r===void 0&&(r=t.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var e=0;if(this._bytesHashed+=r,this._bufferLength>0){for(;this._bufferLength<de.BLOCK_SIZE&&r>0;)this._buffer[this._bufferLength++]=t[e++],r--;this._bufferLength===this.blockSize&&(It(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(r>=this.blockSize&&(e=It(this._tempHi,this._tempLo,this._stateHi,this._stateLo,t,e,r),r%=this.blockSize);r>0;)this._buffer[this._bufferLength++]=t[e++],r--;return this},n.prototype.finish=function(t){if(!this._finished){var r=this._bytesHashed,e=this._bufferLength,i=r/536870912|0,o=r<<3,u=r%128<112?128:256;this._buffer[e]=128;for(var a=e+1;a<u-8;a++)this._buffer[a]=0;Be.writeUint32BE(i,this._buffer,u-8),Be.writeUint32BE(o,this._buffer,u-4),It(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,u),this._finished=!0}for(var a=0;a<this.digestLength/8;a++)Be.writeUint32BE(this._stateHi[a],t,a*8),Be.writeUint32BE(this._stateLo[a],t,a*8+4);return this},n.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},n.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}},n.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},n.prototype.cleanSavedState=function(t){Se.wipe(t.stateHi),Se.wipe(t.stateLo),t.buffer&&Se.wipe(t.buffer),t.bufferLength=0,t.bytesHashed=0},n}();de.SHA512=Vr;var Gr=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 It(n,t,r,e,i,o,u){for(var a=r[0],y=r[1],E=r[2],m=r[3],A=r[4],H=r[5],_=r[6],w=r[7],l=e[0],U=e[1],g=e[2],B=e[3],v=e[4],C=e[5],I=e[6],M=e[7],f,s,F,O,x,c,D,b;u>=128;){for(var k=0;k<16;k++){var R=8*k+o;n[k]=Be.readUint32BE(i,R),t[k]=Be.readUint32BE(i,R+4)}for(var k=0;k<80;k++){var me=a,Fe=y,ze=E,K=m,X=A,$=H,J=_,V=w,Y=l,Z=U,Q=g,G=B,W=v,ee=C,te=I,j=M;if(f=w,s=M,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=(A>>>14|v<<32-14)^(A>>>18|v<<32-18)^(v>>>41-32|A<<32-(41-32)),s=(v>>>14|A<<32-14)^(v>>>18|A<<32-18)^(A>>>41-32|v<<32-(41-32)),x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,f=A&H^~A&_,s=v&C^~v&I,x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,f=Gr[k*2],s=Gr[k*2+1],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,f=n[k%16],s=t[k%16],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,F=D&65535|b<<16,O=x&65535|c<<16,f=F,s=O,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=(a>>>28|l<<32-28)^(l>>>34-32|a<<32-(34-32))^(l>>>39-32|a<<32-(39-32)),s=(l>>>28|a<<32-28)^(a>>>34-32|l<<32-(34-32))^(a>>>39-32|l<<32-(39-32)),x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,f=a&y^a&E^y&E,s=l&U^l&g^U&g,x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,V=D&65535|b<<16,j=x&65535|c<<16,f=K,s=G,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=F,s=O,x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,K=D&65535|b<<16,G=x&65535|c<<16,y=me,E=Fe,m=ze,A=K,H=X,_=$,w=J,a=V,U=Y,g=Z,B=Q,v=G,C=W,I=ee,M=te,l=j,k%16===15)for(var R=0;R<16;R++)f=n[R],s=t[R],x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=n[(R+9)%16],s=t[(R+9)%16],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,F=n[(R+1)%16],O=t[(R+1)%16],f=(F>>>1|O<<32-1)^(F>>>8|O<<32-8)^F>>>7,s=(O>>>1|F<<32-1)^(O>>>8|F<<32-8)^(O>>>7|F<<32-7),x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,F=n[(R+14)%16],O=t[(R+14)%16],f=(F>>>19|O<<32-19)^(O>>>61-32|F<<32-(61-32))^F>>>6,s=(O>>>19|F<<32-19)^(F>>>61-32|O<<32-(61-32))^(O>>>6|F<<32-6),x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,n[R]=D&65535|b<<16,t[R]=x&65535|c<<16}f=a,s=l,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=r[0],s=e[0],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,r[0]=a=D&65535|b<<16,e[0]=l=x&65535|c<<16,f=y,s=U,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=r[1],s=e[1],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,r[1]=y=D&65535|b<<16,e[1]=U=x&65535|c<<16,f=E,s=g,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=r[2],s=e[2],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,r[2]=E=D&65535|b<<16,e[2]=g=x&65535|c<<16,f=m,s=B,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=r[3],s=e[3],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,r[3]=m=D&65535|b<<16,e[3]=B=x&65535|c<<16,f=A,s=v,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=r[4],s=e[4],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,r[4]=A=D&65535|b<<16,e[4]=v=x&65535|c<<16,f=H,s=C,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=r[5],s=e[5],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,r[5]=H=D&65535|b<<16,e[5]=C=x&65535|c<<16,f=_,s=I,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=r[6],s=e[6],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,r[6]=_=D&65535|b<<16,e[6]=I=x&65535|c<<16,f=w,s=M,x=s&65535,c=s>>>16,D=f&65535,b=f>>>16,f=r[7],s=e[7],x+=s&65535,c+=s>>>16,D+=f&65535,b+=f>>>16,c+=x>>>16,D+=c>>>16,b+=D>>>16,r[7]=w=D&65535|b<<16,e[7]=M=x&65535|c<<16,o+=128,u-=128}return o}function no(n){var t=new Vr;t.update(n);var r=t.digest();return t.clean(),r}de.hash=no});var Eo=ue(T=>{"use strict";d();h();Object.defineProperty(T,"__esModule",{value:!0});T.convertSecretKeyToX25519=T.convertPublicKeyToX25519=T.verify=T.sign=T.extractPublicKeyFromSecretKey=T.generateKeyPair=T.generateKeyPairFromSeed=T.SEED_LENGTH=T.SECRET_KEY_LENGTH=T.PUBLIC_KEY_LENGTH=T.SIGNATURE_LENGTH=void 0;var io=er(),Oe=jr(),Yr=ve();T.SIGNATURE_LENGTH=64;T.PUBLIC_KEY_LENGTH=32;T.SECRET_KEY_LENGTH=64;T.SEED_LENGTH=32;function p(n){let t=new Float64Array(16);if(n)for(let r=0;r<n.length;r++)t[r]=n[r];return t}var oo=new Uint8Array(32);oo[0]=9;var Ht=p(),Le=p([1]),fo=p([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),so=p([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),qr=p([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),Xr=p([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),ao=p([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function le(n,t){for(let r=0;r<16;r++)n[r]=t[r]|0}function Mt(n){let t=1;for(let r=0;r<16;r++){let e=n[r]+t+65535;t=Math.floor(e/65536),n[r]=e-t*65536}n[0]+=t-1+37*(t-1)}function Zr(n,t,r){let e=~(r-1);for(let i=0;i<16;i++){let o=e&(n[i]^t[i]);n[i]^=o,t[i]^=o}}function Pe(n,t){let r=p(),e=p();for(let i=0;i<16;i++)e[i]=t[i];Mt(e),Mt(e),Mt(e);for(let i=0;i<2;i++){r[0]=e[0]-65517;for(let u=1;u<15;u++)r[u]=e[u]-65535-(r[u-1]>>16&1),r[u-1]&=65535;r[15]=e[15]-32767-(r[14]>>16&1);let o=r[15]>>16&1;r[14]&=65535,Zr(e,r,1-o)}for(let i=0;i<16;i++)n[2*i]=e[i]&255,n[2*i+1]=e[i]>>8}function Qr(n,t){let r=0;for(let e=0;e<32;e++)r|=n[e]^t[e];return(1&r-1>>>8)-1}function $r(n,t){let r=new Uint8Array(32),e=new Uint8Array(32);return Pe(r,n),Pe(e,t),Qr(r,e)}function Wr(n){let t=new Uint8Array(32);return Pe(t,n),t[0]&1}function uo(n,t){for(let r=0;r<16;r++)n[r]=t[2*r]+(t[2*r+1]<<8);n[15]&=32767}function Ee(n,t,r){for(let e=0;e<16;e++)n[e]=t[e]+r[e]}function ye(n,t,r){for(let e=0;e<16;e++)n[e]=t[e]-r[e]}function N(n,t,r){let e,i,o=0,u=0,a=0,y=0,E=0,m=0,A=0,H=0,_=0,w=0,l=0,U=0,g=0,B=0,v=0,C=0,I=0,M=0,f=0,s=0,F=0,O=0,x=0,c=0,D=0,b=0,k=0,R=0,me=0,Fe=0,ze=0,K=r[0],X=r[1],$=r[2],J=r[3],V=r[4],Y=r[5],Z=r[6],Q=r[7],G=r[8],W=r[9],ee=r[10],te=r[11],j=r[12],re=r[13],ne=r[14],ie=r[15];e=t[0],o+=e*K,u+=e*X,a+=e*$,y+=e*J,E+=e*V,m+=e*Y,A+=e*Z,H+=e*Q,_+=e*G,w+=e*W,l+=e*ee,U+=e*te,g+=e*j,B+=e*re,v+=e*ne,C+=e*ie,e=t[1],u+=e*K,a+=e*X,y+=e*$,E+=e*J,m+=e*V,A+=e*Y,H+=e*Z,_+=e*Q,w+=e*G,l+=e*W,U+=e*ee,g+=e*te,B+=e*j,v+=e*re,C+=e*ne,I+=e*ie,e=t[2],a+=e*K,y+=e*X,E+=e*$,m+=e*J,A+=e*V,H+=e*Y,_+=e*Z,w+=e*Q,l+=e*G,U+=e*W,g+=e*ee,B+=e*te,v+=e*j,C+=e*re,I+=e*ne,M+=e*ie,e=t[3],y+=e*K,E+=e*X,m+=e*$,A+=e*J,H+=e*V,_+=e*Y,w+=e*Z,l+=e*Q,U+=e*G,g+=e*W,B+=e*ee,v+=e*te,C+=e*j,I+=e*re,M+=e*ne,f+=e*ie,e=t[4],E+=e*K,m+=e*X,A+=e*$,H+=e*J,_+=e*V,w+=e*Y,l+=e*Z,U+=e*Q,g+=e*G,B+=e*W,v+=e*ee,C+=e*te,I+=e*j,M+=e*re,f+=e*ne,s+=e*ie,e=t[5],m+=e*K,A+=e*X,H+=e*$,_+=e*J,w+=e*V,l+=e*Y,U+=e*Z,g+=e*Q,B+=e*G,v+=e*W,C+=e*ee,I+=e*te,M+=e*j,f+=e*re,s+=e*ne,F+=e*ie,e=t[6],A+=e*K,H+=e*X,_+=e*$,w+=e*J,l+=e*V,U+=e*Y,g+=e*Z,B+=e*Q,v+=e*G,C+=e*W,I+=e*ee,M+=e*te,f+=e*j,s+=e*re,F+=e*ne,O+=e*ie,e=t[7],H+=e*K,_+=e*X,w+=e*$,l+=e*J,U+=e*V,g+=e*Y,B+=e*Z,v+=e*Q,C+=e*G,I+=e*W,M+=e*ee,f+=e*te,s+=e*j,F+=e*re,O+=e*ne,x+=e*ie,e=t[8],_+=e*K,w+=e*X,l+=e*$,U+=e*J,g+=e*V,B+=e*Y,v+=e*Z,C+=e*Q,I+=e*G,M+=e*W,f+=e*ee,s+=e*te,F+=e*j,O+=e*re,x+=e*ne,c+=e*ie,e=t[9],w+=e*K,l+=e*X,U+=e*$,g+=e*J,B+=e*V,v+=e*Y,C+=e*Z,I+=e*Q,M+=e*G,f+=e*W,s+=e*ee,F+=e*te,O+=e*j,x+=e*re,c+=e*ne,D+=e*ie,e=t[10],l+=e*K,U+=e*X,g+=e*$,B+=e*J,v+=e*V,C+=e*Y,I+=e*Z,M+=e*Q,f+=e*G,s+=e*W,F+=e*ee,O+=e*te,x+=e*j,c+=e*re,D+=e*ne,b+=e*ie,e=t[11],U+=e*K,g+=e*X,B+=e*$,v+=e*J,C+=e*V,I+=e*Y,M+=e*Z,f+=e*Q,s+=e*G,F+=e*W,O+=e*ee,x+=e*te,c+=e*j,D+=e*re,b+=e*ne,k+=e*ie,e=t[12],g+=e*K,B+=e*X,v+=e*$,C+=e*J,I+=e*V,M+=e*Y,f+=e*Z,s+=e*Q,F+=e*G,O+=e*W,x+=e*ee,c+=e*te,D+=e*j,b+=e*re,k+=e*ne,R+=e*ie,e=t[13],B+=e*K,v+=e*X,C+=e*$,I+=e*J,M+=e*V,f+=e*Y,s+=e*Z,F+=e*Q,O+=e*G,x+=e*W,c+=e*ee,D+=e*te,b+=e*j,k+=e*re,R+=e*ne,me+=e*ie,e=t[14],v+=e*K,C+=e*X,I+=e*$,M+=e*J,f+=e*V,s+=e*Y,F+=e*Z,O+=e*Q,x+=e*G,c+=e*W,D+=e*ee,b+=e*te,k+=e*j,R+=e*re,me+=e*ne,Fe+=e*ie,e=t[15],C+=e*K,I+=e*X,M+=e*$,f+=e*J,s+=e*V,F+=e*Y,O+=e*Z,x+=e*Q,c+=e*G,D+=e*W,b+=e*ee,k+=e*te,R+=e*j,me+=e*re,Fe+=e*ne,ze+=e*ie,o+=38*I,u+=38*M,a+=38*f,y+=38*s,E+=38*F,m+=38*O,A+=38*x,H+=38*c,_+=38*D,w+=38*b,l+=38*k,U+=38*R,g+=38*me,B+=38*Fe,v+=38*ze,i=1,e=o+i+65535,i=Math.floor(e/65536),o=e-i*65536,e=u+i+65535,i=Math.floor(e/65536),u=e-i*65536,e=a+i+65535,i=Math.floor(e/65536),a=e-i*65536,e=y+i+65535,i=Math.floor(e/65536),y=e-i*65536,e=E+i+65535,i=Math.floor(e/65536),E=e-i*65536,e=m+i+65535,i=Math.floor(e/65536),m=e-i*65536,e=A+i+65535,i=Math.floor(e/65536),A=e-i*65536,e=H+i+65535,i=Math.floor(e/65536),H=e-i*65536,e=_+i+65535,i=Math.floor(e/65536),_=e-i*65536,e=w+i+65535,i=Math.floor(e/65536),w=e-i*65536,e=l+i+65535,i=Math.floor(e/65536),l=e-i*65536,e=U+i+65535,i=Math.floor(e/65536),U=e-i*65536,e=g+i+65535,i=Math.floor(e/65536),g=e-i*65536,e=B+i+65535,i=Math.floor(e/65536),B=e-i*65536,e=v+i+65535,i=Math.floor(e/65536),v=e-i*65536,e=C+i+65535,i=Math.floor(e/65536),C=e-i*65536,o+=i-1+37*(i-1),i=1,e=o+i+65535,i=Math.floor(e/65536),o=e-i*65536,e=u+i+65535,i=Math.floor(e/65536),u=e-i*65536,e=a+i+65535,i=Math.floor(e/65536),a=e-i*65536,e=y+i+65535,i=Math.floor(e/65536),y=e-i*65536,e=E+i+65535,i=Math.floor(e/65536),E=e-i*65536,e=m+i+65535,i=Math.floor(e/65536),m=e-i*65536,e=A+i+65535,i=Math.floor(e/65536),A=e-i*65536,e=H+i+65535,i=Math.floor(e/65536),H=e-i*65536,e=_+i+65535,i=Math.floor(e/65536),_=e-i*65536,e=w+i+65535,i=Math.floor(e/65536),w=e-i*65536,e=l+i+65535,i=Math.floor(e/65536),l=e-i*65536,e=U+i+65535,i=Math.floor(e/65536),U=e-i*65536,e=g+i+65535,i=Math.floor(e/65536),g=e-i*65536,e=B+i+65535,i=Math.floor(e/65536),B=e-i*65536,e=v+i+65535,i=Math.floor(e/65536),v=e-i*65536,e=C+i+65535,i=Math.floor(e/65536),C=e-i*65536,o+=i-1+37*(i-1),n[0]=o,n[1]=u,n[2]=a,n[3]=y,n[4]=E,n[5]=m,n[6]=A,n[7]=H,n[8]=_,n[9]=w,n[10]=l,n[11]=U,n[12]=g,n[13]=B,n[14]=v,n[15]=C}function we(n,t){N(n,t,t)}function en(n,t){let r=p(),e;for(e=0;e<16;e++)r[e]=t[e];for(e=253;e>=0;e--)we(r,r),e!==2&&e!==4&&N(r,r,t);for(e=0;e<16;e++)n[e]=r[e]}function co(n,t){let r=p(),e;for(e=0;e<16;e++)r[e]=t[e];for(e=250;e>=0;e--)we(r,r),e!==1&&N(r,r,t);for(e=0;e<16;e++)n[e]=r[e]}function Nt(n,t){let r=p(),e=p(),i=p(),o=p(),u=p(),a=p(),y=p(),E=p(),m=p();ye(r,n[1],n[0]),ye(m,t[1],t[0]),N(r,r,m),Ee(e,n[0],n[1]),Ee(m,t[0],t[1]),N(e,e,m),N(i,n[3],t[3]),N(i,i,so),N(o,n[2],t[2]),Ee(o,o,o),ye(u,e,r),ye(a,o,i),Ee(y,o,i),Ee(E,e,r),N(n[0],u,a),N(n[1],E,y),N(n[2],y,a),N(n[3],u,E)}function Jr(n,t,r){for(let e=0;e<4;e++)Zr(n[e],t[e],r)}function Pt(n,t){let r=p(),e=p(),i=p();en(i,t[2]),N(r,t[0],i),N(e,t[1],i),Pe(n,e),n[31]^=Wr(r)<<7}function tn(n,t,r){le(n[0],Ht),le(n[1],Le),le(n[2],Le),le(n[3],Ht);for(let e=255;e>=0;--e){let i=r[e/8|0]>>(e&7)&1;Jr(n,t,i),Nt(t,n),Nt(n,n),Jr(n,t,i)}}function zt(n,t){let r=[p(),p(),p(),p()];le(r[0],qr),le(r[1],Xr),le(r[2],Le),N(r[3],qr,Xr),tn(n,r,t)}function rn(n){if(n.length!==T.SEED_LENGTH)throw new Error(`ed25519: seed must be ${T.SEED_LENGTH} bytes`);let t=(0,Oe.hash)(n);t[0]&=248,t[31]&=127,t[31]|=64;let r=new Uint8Array(32),e=[p(),p(),p(),p()];zt(e,t),Pt(r,e);let i=new Uint8Array(64);return i.set(n),i.set(r,32),{publicKey:r,secretKey:i}}T.generateKeyPairFromSeed=rn;function Do(n){let t=(0,io.randomBytes)(32,n),r=rn(t);return(0,Yr.wipe)(t),r}T.generateKeyPair=Do;function ho(n){if(n.length!==T.SECRET_KEY_LENGTH)throw new Error(`ed25519: secret key must be ${T.SECRET_KEY_LENGTH} bytes`);return new Uint8Array(n.subarray(32))}T.extractPublicKeyFromSecretKey=ho;var Tt=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 nn(n,t){let r,e,i,o;for(e=63;e>=32;--e){for(r=0,i=e-32,o=e-12;i<o;++i)t[i]+=r-16*t[e]*Tt[i-(e-32)],r=Math.floor((t[i]+128)/256),t[i]-=r*256;t[i]+=r,t[e]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*Tt[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*Tt[i];for(e=0;e<32;e++)t[e+1]+=t[e]>>8,n[e]=t[e]&255}function Ot(n){let t=new Float64Array(64);for(let r=0;r<64;r++)t[r]=n[r];for(let r=0;r<64;r++)n[r]=0;nn(n,t)}function xo(n,t){let r=new Float64Array(64),e=[p(),p(),p(),p()],i=(0,Oe.hash)(n.subarray(0,32));i[0]&=248,i[31]&=127,i[31]|=64;let o=new Uint8Array(64);o.set(i.subarray(32),32);let u=new Oe.SHA512;u.update(o.subarray(32)),u.update(t);let a=u.digest();u.clean(),Ot(a),zt(e,a),Pt(o,e),u.reset(),u.update(o.subarray(0,32)),u.update(n.subarray(32)),u.update(t);let y=u.digest();Ot(y);for(let E=0;E<32;E++)r[E]=a[E];for(let E=0;E<32;E++)for(let m=0;m<32;m++)r[E+m]+=y[E]*i[m];return nn(o.subarray(32),r),o}T.sign=xo;function on(n,t){let r=p(),e=p(),i=p(),o=p(),u=p(),a=p(),y=p();return le(n[2],Le),uo(n[1],t),we(i,n[1]),N(o,i,fo),ye(i,i,n[2]),Ee(o,n[2],o),we(u,o),we(a,u),N(y,a,u),N(r,y,i),N(r,r,o),co(r,r),N(r,r,i),N(r,r,o),N(r,r,o),N(n[0],r,o),we(e,n[0]),N(e,e,o),$r(e,i)&&N(n[0],n[0],ao),we(e,n[0]),N(e,e,o),$r(e,i)?-1:(Wr(n[0])===t[31]>>7&&ye(n[0],Ht,n[0]),N(n[3],n[0],n[1]),0)}function bo(n,t,r){let e=new Uint8Array(32),i=[p(),p(),p(),p()],o=[p(),p(),p(),p()];if(r.length!==T.SIGNATURE_LENGTH)throw new Error(`ed25519: signature must be ${T.SIGNATURE_LENGTH} bytes`);if(on(o,n))return!1;let u=new Oe.SHA512;u.update(r.subarray(0,32)),u.update(n),u.update(t);let a=u.digest();return Ot(a),tn(i,o,a),zt(o,r.subarray(32)),Nt(i,o),Pt(e,i),!Qr(r,e)}T.verify=bo;function lo(n){let t=[p(),p(),p(),p()];if(on(t,n))throw new Error("Ed25519: invalid public key");let r=p(),e=p(),i=t[1];Ee(r,Le,i),ye(e,Le,i),en(e,e),N(r,r,e);let o=new Uint8Array(32);return Pe(o,r),o}T.convertPublicKeyToX25519=lo;function po(n){let t=(0,Oe.hash)(n.subarray(0,32));t[0]&=248,t[31]&=127,t[31]|=64;let r=new Uint8Array(t.subarray(0,32));return(0,Yr.wipe)(t),r}T.convertSecretKeyToX25519=po});export{ve as a,je as b,er as c,Eo as d,Gn as e,Or as f,Pr as g,kr as h,Kr as i,eo as j,to as k,ro as l};
|
|
|
|
window.inOKXExtension = true;
|
|
window.inMiniApp = false;
|
|
window.ASSETS_BUILD_TYPE = "publish";
|
|
|
|
//# sourceMappingURL=chunk-SB4SBKCP.js.map
|