@permaweb/libs 0.0.90 → 0.0.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,17 +1,17 @@
1
- var _8=Object.create;var uu=Object.defineProperty;var B8=Object.getOwnPropertyDescriptor;var C8=Object.getOwnPropertyNames;var P8=Object.getPrototypeOf,L8=Object.prototype.hasOwnProperty;var it=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var V=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),yp=(t,e)=>{for(var r in e)uu(t,r,{get:e[r],enumerable:!0})},R8=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of C8(e))!L8.call(t,i)&&i!==r&&uu(t,i,{get:()=>e[i],enumerable:!(n=B8(e,i))||n.enumerable});return t};var A=(t,e,r)=>(r=t!=null?_8(P8(t)):{},R8(e||!t||!t.__esModule?uu(r,"default",{value:t,enumerable:!0}):r,t));var S=V((U_,Mp)=>{var xt=Mp.exports={},Bn,Cn;function lu(){throw new Error("setTimeout has not been defined")}function du(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Bn=setTimeout:Bn=lu}catch{Bn=lu}try{typeof clearTimeout=="function"?Cn=clearTimeout:Cn=du}catch{Cn=du}})();function wp(t){if(Bn===setTimeout)return setTimeout(t,0);if((Bn===lu||!Bn)&&setTimeout)return Bn=setTimeout,setTimeout(t,0);try{return Bn(t,0)}catch{try{return Bn.call(null,t,0)}catch{return Bn.call(this,t,0)}}}function F8(t){if(Cn===clearTimeout)return clearTimeout(t);if((Cn===du||!Cn)&&clearTimeout)return Cn=clearTimeout,clearTimeout(t);try{return Cn(t)}catch{try{return Cn.call(null,t)}catch{return Cn.call(this,t)}}}var fi=[],Qa=!1,sa,Cf=-1;function D8(){!Qa||!sa||(Qa=!1,sa.length?fi=sa.concat(fi):Cf=-1,fi.length&&Ap())}function Ap(){if(!Qa){var t=wp(D8);Qa=!0;for(var e=fi.length;e;){for(sa=fi,fi=[];++Cf<e;)sa&&sa[Cf].run();Cf=-1,e=fi.length}sa=null,Qa=!1,F8(t)}}xt.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];fi.push(new Sp(t,e)),fi.length===1&&!Qa&&wp(Ap)};function Sp(t,e){this.fun=t,this.array=e}Sp.prototype.run=function(){this.fun.apply(null,this.array)};xt.title="browser";xt.browser=!0;xt.env={};xt.argv=[];xt.version="";xt.versions={};function ci(){}xt.on=ci;xt.addListener=ci;xt.once=ci;xt.off=ci;xt.removeListener=ci;xt.removeAllListeners=ci;xt.emit=ci;xt.prependListener=ci;xt.prependOnceListener=ci;xt.listeners=function(t){return[]};xt.binding=function(t){throw new Error("process.binding is not supported")};xt.cwd=function(){return"/"};xt.chdir=function(t){throw new Error("process.chdir is not supported")};xt.umask=function(){return 0}});var Ip=V(xu=>{"use strict";var sB=A(S());Object.defineProperty(xu,"__esModule",{value:!0});function G8(t){var e=4,r=t.length,n=r%e;if(!n)return t;var i=r,a=e-n,l=r+a,b=Buffer.alloc(l);for(b.write(t);a--;)b.write("=",i++);return b.toString()}xu.default=G8});var kp=V(Au=>{"use strict";var cB=A(S());Object.defineProperty(Au,"__esModule",{value:!0});var X8=Ip();function Op(t,e){return e===void 0&&(e="utf8"),Buffer.isBuffer(t)?yu(t.toString("base64")):yu(Buffer.from(t,e).toString("base64"))}function z8(t,e){return e===void 0&&(e="utf8"),Buffer.from(wu(t),"base64").toString(e)}function wu(t){return t=t.toString(),X8.default(t).replace(/\-/g,"+").replace(/_/g,"/")}function yu(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function K8(t){return Buffer.from(wu(t),"base64")}var $a=Op;$a.encode=Op;$a.decode=z8;$a.toBase64=wu;$a.fromBase64=yu;$a.toBuffer=K8;Au.default=$a});var Hr=V((uB,Df)=>{var lB=A(S());Df.exports=kp().default;Df.exports.default=Df.exports});var Wp=V(Nf=>{"use strict";var AB=A(S());Nf.byteLength=u6;Nf.toByteArray=d6;Nf.fromByteArray=b6;var Dn=[],qr=[],c6=typeof Uint8Array<"u"?Uint8Array:Array,Ru="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ca=0,jp=Ru.length;ca<jp;++ca)Dn[ca]=Ru[ca],qr[Ru.charCodeAt(ca)]=ca;var ca,jp;qr[45]=62;qr[95]=63;function Qp(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("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function u6(t){var e=Qp(t),r=e[0],n=e[1];return(r+n)*3/4-n}function l6(t,e,r){return(e+r)*3/4-r}function d6(t){var e,r=Qp(t),n=r[0],i=r[1],a=new c6(l6(t,n,i)),l=0,b=i>0?n-4:n,y;for(y=0;y<b;y+=4)e=qr[t.charCodeAt(y)]<<18|qr[t.charCodeAt(y+1)]<<12|qr[t.charCodeAt(y+2)]<<6|qr[t.charCodeAt(y+3)],a[l++]=e>>16&255,a[l++]=e>>8&255,a[l++]=e&255;return i===2&&(e=qr[t.charCodeAt(y)]<<2|qr[t.charCodeAt(y+1)]>>4,a[l++]=e&255),i===1&&(e=qr[t.charCodeAt(y)]<<10|qr[t.charCodeAt(y+1)]<<4|qr[t.charCodeAt(y+2)]>>2,a[l++]=e>>8&255,a[l++]=e&255),a}function h6(t){return Dn[t>>18&63]+Dn[t>>12&63]+Dn[t>>6&63]+Dn[t&63]}function p6(t,e,r){for(var n,i=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),i.push(h6(n));return i.join("")}function b6(t){for(var e,r=t.length,n=r%3,i=[],a=16383,l=0,b=r-n;l<b;l+=a)i.push(p6(t,l,l+a>b?b:l+a));return n===1?(e=t[r-1],i.push(Dn[e>>2]+Dn[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Dn[e>>10]+Dn[e>>4&63]+Dn[e<<2&63]+"=")),i.join("")}});var gn=V(Gr=>{"use strict";var MB=A(S());Object.defineProperty(Gr,"__esModule",{value:!0});Gr.concatBuffers=g6;Gr.b64UrlToString=v6;Gr.bufferToString=$p;Gr.stringToBuffer=e1;Gr.stringToB64Url=m6;Gr.b64UrlToBuffer=t1;Gr.bufferTob64=r1;Gr.bufferTob64Url=n1;Gr.b64UrlEncode=i1;Gr.b64UrlDecode=a1;var Yp=Wp();function g6(t){let e=0;for(let i=0;i<t.length;i++)e+=t[i].byteLength;let r=new Uint8Array(e),n=0;r.set(new Uint8Array(t[0]),n),n+=t[0].byteLength;for(let i=1;i<t.length;i++)r.set(new Uint8Array(t[i]),n),n+=t[i].byteLength;return r}function v6(t){let e=t1(t);return $p(e)}function $p(t){return new TextDecoder("utf-8",{fatal:!0}).decode(t)}function e1(t){return new TextEncoder().encode(t)}function m6(t){return n1(e1(t))}function t1(t){return new Uint8Array(Yp.toByteArray(a1(t)))}function r1(t){return Yp.fromByteArray(new Uint8Array(t))}function n1(t){return i1(r1(t))}function i1(t){try{return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}catch(e){throw new Error("Failed to encode string",{cause:e})}}function a1(t){try{t=t.replace(/\-/g,"+").replace(/\_/g,"/");let e;return t.length%4==0?e=0:e=4-t.length%4,t.concat("=".repeat(e))}catch(e){throw new Error("Failed to decode string",{cause:e})}}});var Iu=V(Du=>{"use strict";var PB=A(S());Object.defineProperty(Du,"__esModule",{value:!0});var Fi=gn(),Fu=class{keyLength=4096;publicExponent=65537;hashAlgorithm="sha256";driver;constructor(){if(!this.detectWebCrypto())throw new Error("SubtleCrypto not available!");this.driver=crypto.subtle}async generateJWK(){let e=await this.driver.generateKey({name:"RSA-PSS",modulusLength:4096,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign"]),r=await this.driver.exportKey("jwk",e.privateKey);return{kty:r.kty,e:r.e,n:r.n,d:r.d,p:r.p,q:r.q,dp:r.dp,dq:r.dq,qi:r.qi}}async sign(e,r,{saltLength:n}={}){let i=await this.driver.sign({name:"RSA-PSS",saltLength:n??32},await this.jwkToCryptoKey(e),r);return new Uint8Array(i)}async hash(e,r="SHA-256"){let n=await this.driver.digest(r,e);return new Uint8Array(n)}async verify(e,r,n){let i={kty:"RSA",e:"AQAB",n:e},a=await this.jwkToPublicCryptoKey(i),l=await this.driver.digest("SHA-256",r),b=await this.driver.verify({name:"RSA-PSS",saltLength:0},a,n,r),y=await this.driver.verify({name:"RSA-PSS",saltLength:32},a,n,r),x=Math.ceil((a.algorithm.modulusLength-1)/8)-l.byteLength-2,_=await this.driver.verify({name:"RSA-PSS",saltLength:x},a,n,r),C=b||y||_;if(!C){let D={algorithm:a.algorithm.name,modulusLength:a.algorithm.modulusLength,keyUsages:a.usages,saltLengthsAttempted:`0, 32, ${x}`};console.warn(`Transaction Verification Failed!
1
+ var B8=Object.create;var uu=Object.defineProperty;var C8=Object.getOwnPropertyDescriptor;var P8=Object.getOwnPropertyNames;var L8=Object.getPrototypeOf,R8=Object.prototype.hasOwnProperty;var it=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var V=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),yp=(t,e)=>{for(var r in e)uu(t,r,{get:e[r],enumerable:!0})},F8=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of P8(e))!R8.call(t,i)&&i!==r&&uu(t,i,{get:()=>e[i],enumerable:!(n=C8(e,i))||n.enumerable});return t};var A=(t,e,r)=>(r=t!=null?B8(L8(t)):{},F8(e||!t||!t.__esModule?uu(r,"default",{value:t,enumerable:!0}):r,t));var S=V((H_,Mp)=>{var yt=Mp.exports={},Bn,Cn;function lu(){throw new Error("setTimeout has not been defined")}function du(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Bn=setTimeout:Bn=lu}catch{Bn=lu}try{typeof clearTimeout=="function"?Cn=clearTimeout:Cn=du}catch{Cn=du}})();function wp(t){if(Bn===setTimeout)return setTimeout(t,0);if((Bn===lu||!Bn)&&setTimeout)return Bn=setTimeout,setTimeout(t,0);try{return Bn(t,0)}catch{try{return Bn.call(null,t,0)}catch{return Bn.call(this,t,0)}}}function D8(t){if(Cn===clearTimeout)return clearTimeout(t);if((Cn===du||!Cn)&&clearTimeout)return Cn=clearTimeout,clearTimeout(t);try{return Cn(t)}catch{try{return Cn.call(null,t)}catch{return Cn.call(this,t)}}}var fi=[],Wa=!1,sa,Pf=-1;function I8(){!Wa||!sa||(Wa=!1,sa.length?fi=sa.concat(fi):Pf=-1,fi.length&&Ap())}function Ap(){if(!Wa){var t=wp(I8);Wa=!0;for(var e=fi.length;e;){for(sa=fi,fi=[];++Pf<e;)sa&&sa[Pf].run();Pf=-1,e=fi.length}sa=null,Wa=!1,D8(t)}}yt.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];fi.push(new Sp(t,e)),fi.length===1&&!Wa&&wp(Ap)};function Sp(t,e){this.fun=t,this.array=e}Sp.prototype.run=function(){this.fun.apply(null,this.array)};yt.title="browser";yt.browser=!0;yt.env={};yt.argv=[];yt.version="";yt.versions={};function ci(){}yt.on=ci;yt.addListener=ci;yt.once=ci;yt.off=ci;yt.removeListener=ci;yt.removeAllListeners=ci;yt.emit=ci;yt.prependListener=ci;yt.prependOnceListener=ci;yt.listeners=function(t){return[]};yt.binding=function(t){throw new Error("process.binding is not supported")};yt.cwd=function(){return"/"};yt.chdir=function(t){throw new Error("process.chdir is not supported")};yt.umask=function(){return 0}});var Op=V(xu=>{"use strict";var fB=A(S());Object.defineProperty(xu,"__esModule",{value:!0});function X8(t){var e=4,r=t.length,n=r%e;if(!n)return t;var i=r,a=e-n,l=r+a,b=Buffer.alloc(l);for(b.write(t);a--;)b.write("=",i++);return b.toString()}xu.default=X8});var Np=V(Au=>{"use strict";var uB=A(S());Object.defineProperty(Au,"__esModule",{value:!0});var z8=Op();function kp(t,e){return e===void 0&&(e="utf8"),Buffer.isBuffer(t)?yu(t.toString("base64")):yu(Buffer.from(t,e).toString("base64"))}function K8(t,e){return e===void 0&&(e="utf8"),Buffer.from(wu(t),"base64").toString(e)}function wu(t){return t=t.toString(),z8.default(t).replace(/\-/g,"+").replace(/_/g,"/")}function yu(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function Z8(t){return Buffer.from(wu(t),"base64")}var $a=kp;$a.encode=kp;$a.decode=K8;$a.toBase64=wu;$a.fromBase64=yu;$a.toBuffer=Z8;Au.default=$a});var Hr=V((lB,Df)=>{var dB=A(S());Df.exports=Np().default;Df.exports.default=Df.exports});var Yp=V(Nf=>{"use strict";var SB=A(S());Nf.byteLength=l6;Nf.toByteArray=h6;Nf.fromByteArray=g6;var Dn=[],qr=[],u6=typeof Uint8Array<"u"?Uint8Array:Array,Ru="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ua=0,Qp=Ru.length;ua<Qp;++ua)Dn[ua]=Ru[ua],qr[Ru.charCodeAt(ua)]=ua;var ua,Qp;qr[45]=62;qr[95]=63;function Wp(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("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function l6(t){var e=Wp(t),r=e[0],n=e[1];return(r+n)*3/4-n}function d6(t,e,r){return(e+r)*3/4-r}function h6(t){var e,r=Wp(t),n=r[0],i=r[1],a=new u6(d6(t,n,i)),l=0,b=i>0?n-4:n,y;for(y=0;y<b;y+=4)e=qr[t.charCodeAt(y)]<<18|qr[t.charCodeAt(y+1)]<<12|qr[t.charCodeAt(y+2)]<<6|qr[t.charCodeAt(y+3)],a[l++]=e>>16&255,a[l++]=e>>8&255,a[l++]=e&255;return i===2&&(e=qr[t.charCodeAt(y)]<<2|qr[t.charCodeAt(y+1)]>>4,a[l++]=e&255),i===1&&(e=qr[t.charCodeAt(y)]<<10|qr[t.charCodeAt(y+1)]<<4|qr[t.charCodeAt(y+2)]>>2,a[l++]=e>>8&255,a[l++]=e&255),a}function p6(t){return Dn[t>>18&63]+Dn[t>>12&63]+Dn[t>>6&63]+Dn[t&63]}function b6(t,e,r){for(var n,i=[],a=e;a<r;a+=3)n=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),i.push(p6(n));return i.join("")}function g6(t){for(var e,r=t.length,n=r%3,i=[],a=16383,l=0,b=r-n;l<b;l+=a)i.push(b6(t,l,l+a>b?b:l+a));return n===1?(e=t[r-1],i.push(Dn[e>>2]+Dn[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Dn[e>>10]+Dn[e>>4&63]+Dn[e<<2&63]+"=")),i.join("")}});var gn=V(Gr=>{"use strict";var TB=A(S());Object.defineProperty(Gr,"__esModule",{value:!0});Gr.concatBuffers=v6;Gr.b64UrlToString=m6;Gr.bufferToString=e1;Gr.stringToBuffer=t1;Gr.stringToB64Url=x6;Gr.b64UrlToBuffer=r1;Gr.bufferTob64=n1;Gr.bufferTob64Url=i1;Gr.b64UrlEncode=a1;Gr.b64UrlDecode=o1;var $p=Yp();function v6(t){let e=0;for(let i=0;i<t.length;i++)e+=t[i].byteLength;let r=new Uint8Array(e),n=0;r.set(new Uint8Array(t[0]),n),n+=t[0].byteLength;for(let i=1;i<t.length;i++)r.set(new Uint8Array(t[i]),n),n+=t[i].byteLength;return r}function m6(t){let e=r1(t);return e1(e)}function e1(t){return new TextDecoder("utf-8",{fatal:!0}).decode(t)}function t1(t){return new TextEncoder().encode(t)}function x6(t){return i1(t1(t))}function r1(t){return new Uint8Array($p.toByteArray(o1(t)))}function n1(t){return $p.fromByteArray(new Uint8Array(t))}function i1(t){return a1(n1(t))}function a1(t){try{return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}catch(e){throw new Error("Failed to encode string",{cause:e})}}function o1(t){try{t=t.replace(/\-/g,"+").replace(/\_/g,"/");let e;return t.length%4==0?e=0:e=4-t.length%4,t.concat("=".repeat(e))}catch(e){throw new Error("Failed to decode string",{cause:e})}}});var Iu=V(Du=>{"use strict";var LB=A(S());Object.defineProperty(Du,"__esModule",{value:!0});var Fi=gn(),Fu=class{keyLength=4096;publicExponent=65537;hashAlgorithm="sha256";driver;constructor(){if(!this.detectWebCrypto())throw new Error("SubtleCrypto not available!");this.driver=crypto.subtle}async generateJWK(){let e=await this.driver.generateKey({name:"RSA-PSS",modulusLength:4096,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign"]),r=await this.driver.exportKey("jwk",e.privateKey);return{kty:r.kty,e:r.e,n:r.n,d:r.d,p:r.p,q:r.q,dp:r.dp,dq:r.dq,qi:r.qi}}async sign(e,r,{saltLength:n}={}){let i=await this.driver.sign({name:"RSA-PSS",saltLength:n??32},await this.jwkToCryptoKey(e),r);return new Uint8Array(i)}async hash(e,r="SHA-256"){let n=await this.driver.digest(r,e);return new Uint8Array(n)}async verify(e,r,n){let i={kty:"RSA",e:"AQAB",n:e},a=await this.jwkToPublicCryptoKey(i),l=await this.driver.digest("SHA-256",r),b=await this.driver.verify({name:"RSA-PSS",saltLength:0},a,n,r),y=await this.driver.verify({name:"RSA-PSS",saltLength:32},a,n,r),x=Math.ceil((a.algorithm.modulusLength-1)/8)-l.byteLength-2,_=await this.driver.verify({name:"RSA-PSS",saltLength:x},a,n,r),C=b||y||_;if(!C){let D={algorithm:a.algorithm.name,modulusLength:a.algorithm.modulusLength,keyUsages:a.usages,saltLengthsAttempted:`0, 32, ${x}`};console.warn(`Transaction Verification Failed!
2
2
  `,`Details: ${JSON.stringify(D,null,2)}
3
- `,"N.B. ArweaveJS is only guaranteed to verify txs created using ArweaveJS.")}return C}async jwkToCryptoKey(e){return this.driver.importKey("jwk",e,{name:"RSA-PSS",hash:{name:"SHA-256"}},!1,["sign"])}async jwkToPublicCryptoKey(e){return this.driver.importKey("jwk",e,{name:"RSA-PSS",hash:{name:"SHA-256"}},!1,["verify"])}detectWebCrypto(){if(typeof crypto>"u")return!1;let e=crypto?.subtle;return e===void 0?!1:["generateKey","importKey","exportKey","digest","sign"].every(n=>typeof e[n]=="function")}async encrypt(e,r,n){let i=await this.driver.importKey("raw",typeof r=="string"?Fi.stringToBuffer(r):r,{name:"PBKDF2",length:32},!1,["deriveKey"]),a=await this.driver.deriveKey({name:"PBKDF2",salt:n?Fi.stringToBuffer(n):Fi.stringToBuffer("salt"),iterations:1e5,hash:"SHA-256"},i,{name:"AES-CBC",length:256},!1,["encrypt","decrypt"]),l=new Uint8Array(16);crypto.getRandomValues(l);let b=await this.driver.encrypt({name:"AES-CBC",iv:l},a,e);return Fi.concatBuffers([l,b])}async decrypt(e,r,n){let i=await this.driver.importKey("raw",typeof r=="string"?Fi.stringToBuffer(r):r,{name:"PBKDF2",length:32},!1,["deriveKey"]),a=await this.driver.deriveKey({name:"PBKDF2",salt:n?Fi.stringToBuffer(n):Fi.stringToBuffer("salt"),iterations:1e5,hash:"SHA-256"},i,{name:"AES-CBC",length:256},!1,["encrypt","decrypt"]),l=e.slice(0,16),b=await this.driver.decrypt({name:"AES-CBC",iv:l},a,e.slice(16));return Fi.concatBuffers([b])}};Du.default=Fu});var f1=V((s1,Jf)=>{var LB=A(S());(function(t){"use strict";var e,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,i=Math.floor,a="[BigNumber Error] ",l=a+"Number primitive has more than 15 significant digits: ",b=1e14,y=14,x=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],C=1e7,D=1e9;function F(ie){var ee,ce,te,Y=w.prototype={constructor:w,toString:null,valueOf:null},T=new w(1),s=20,u=4,d=-7,f=21,c=-1e7,v=1e7,m=!1,h=1,o=0,p={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",g=!0;function w(B,R){var L,I,q,O,J,K,N,H,Q=this;if(!(Q instanceof w))return new w(B,R);if(R==null){if(B&&B._isBigNumber===!0){Q.s=B.s,!B.c||B.e>v?Q.c=Q.e=null:B.e<c?Q.c=[Q.e=0]:(Q.e=B.e,Q.c=B.c.slice());return}if((K=typeof B=="number")&&B*0==0){if(Q.s=1/B<0?(B=-B,-1):1,B===~~B){for(O=0,J=B;J>=10;J/=10,O++);O>v?Q.c=Q.e=null:(Q.e=O,Q.c=[B]);return}H=String(B)}else{if(!r.test(H=String(B)))return te(Q,H,K);Q.s=H.charCodeAt(0)==45?(H=H.slice(1),-1):1}(O=H.indexOf("."))>-1&&(H=H.replace(".","")),(J=H.search(/e/i))>0?(O<0&&(O=J),O+=+H.slice(J+1),H=H.substring(0,J)):O<0&&(O=H.length)}else{if(X(R,2,E.length,"Base"),R==10&&g)return Q=new w(B),G(Q,s+Q.e+1,u);if(H=String(B),K=typeof B=="number"){if(B*0!=0)return te(Q,H,K,R);if(Q.s=1/B<0?(H=H.slice(1),-1):1,w.DEBUG&&H.replace(/^0\.0*|\./,"").length>15)throw Error(l+B)}else Q.s=H.charCodeAt(0)===45?(H=H.slice(1),-1):1;for(L=E.slice(0,R),O=J=0,N=H.length;J<N;J++)if(L.indexOf(I=H.charAt(J))<0){if(I=="."){if(J>O){O=N;continue}}else if(!q&&(H==H.toUpperCase()&&(H=H.toLowerCase())||H==H.toLowerCase()&&(H=H.toUpperCase()))){q=!0,J=-1,O=0;continue}return te(Q,String(B),K,R)}K=!1,H=ce(H,R,10,Q.s),(O=H.indexOf("."))>-1?H=H.replace(".",""):O=H.length}for(J=0;H.charCodeAt(J)===48;J++);for(N=H.length;H.charCodeAt(--N)===48;);if(H=H.slice(J,++N)){if(N-=J,K&&w.DEBUG&&N>15&&(B>x||B!==i(B)))throw Error(l+Q.s*B);if((O=O-J-1)>v)Q.c=Q.e=null;else if(O<c)Q.c=[Q.e=0];else{if(Q.e=O,Q.c=[],J=(O+1)%y,O<0&&(J+=y),J<N){for(J&&Q.c.push(+H.slice(0,J)),N-=y;J<N;)Q.c.push(+H.slice(J,J+=y));J=y-(H=H.slice(J)).length}else J-=N;for(;J--;H+="0");Q.c.push(+H)}}else Q.c=[Q.e=0]}w.clone=F,w.ROUND_UP=0,w.ROUND_DOWN=1,w.ROUND_CEIL=2,w.ROUND_FLOOR=3,w.ROUND_HALF_UP=4,w.ROUND_HALF_DOWN=5,w.ROUND_HALF_EVEN=6,w.ROUND_HALF_CEIL=7,w.ROUND_HALF_FLOOR=8,w.EUCLID=9,w.config=w.set=function(B){var R,L;if(B!=null)if(typeof B=="object"){if(B.hasOwnProperty(R="DECIMAL_PLACES")&&(L=B[R],X(L,0,D,R),s=L),B.hasOwnProperty(R="ROUNDING_MODE")&&(L=B[R],X(L,0,8,R),u=L),B.hasOwnProperty(R="EXPONENTIAL_AT")&&(L=B[R],L&&L.pop?(X(L[0],-D,0,R),X(L[1],0,D,R),d=L[0],f=L[1]):(X(L,-D,D,R),d=-(f=L<0?-L:L))),B.hasOwnProperty(R="RANGE"))if(L=B[R],L&&L.pop)X(L[0],-D,-1,R),X(L[1],1,D,R),c=L[0],v=L[1];else if(X(L,-D,D,R),L)c=-(v=L<0?-L:L);else throw Error(a+R+" cannot be zero: "+L);if(B.hasOwnProperty(R="CRYPTO"))if(L=B[R],L===!!L)if(L)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))m=L;else throw m=!L,Error(a+"crypto unavailable");else m=L;else throw Error(a+R+" not true or false: "+L);if(B.hasOwnProperty(R="MODULO_MODE")&&(L=B[R],X(L,0,9,R),h=L),B.hasOwnProperty(R="POW_PRECISION")&&(L=B[R],X(L,0,D,R),o=L),B.hasOwnProperty(R="FORMAT"))if(L=B[R],typeof L=="object")p=L;else throw Error(a+R+" not an object: "+L);if(B.hasOwnProperty(R="ALPHABET"))if(L=B[R],typeof L=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(L))g=L.slice(0,10)=="0123456789",E=L;else throw Error(a+R+" invalid: "+L)}else throw Error(a+"Object expected: "+B);return{DECIMAL_PLACES:s,ROUNDING_MODE:u,EXPONENTIAL_AT:[d,f],RANGE:[c,v],CRYPTO:m,MODULO_MODE:h,POW_PRECISION:o,FORMAT:p,ALPHABET:E}},w.isBigNumber=function(B){if(!B||B._isBigNumber!==!0)return!1;if(!w.DEBUG)return!0;var R,L,I=B.c,q=B.e,O=B.s;e:if({}.toString.call(I)=="[object Array]"){if((O===1||O===-1)&&q>=-D&&q<=D&&q===i(q)){if(I[0]===0){if(q===0&&I.length===1)return!0;break e}if(R=(q+1)%y,R<1&&(R+=y),String(I[0]).length==R){for(R=0;R<I.length;R++)if(L=I[R],L<0||L>=b||L!==i(L))break e;if(L!==0)return!0}}}else if(I===null&&q===null&&(O===null||O===1||O===-1))return!0;throw Error(a+"Invalid BigNumber: "+B)},w.maximum=w.max=function(){return M(arguments,-1)},w.minimum=w.min=function(){return M(arguments,1)},w.random=function(){var B=9007199254740992,R=Math.random()*B&2097151?function(){return i(Math.random()*B)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(L){var I,q,O,J,K,N=0,H=[],Q=new w(T);if(L==null?L=s:X(L,0,D),J=n(L/y),m)if(crypto.getRandomValues){for(I=crypto.getRandomValues(new Uint32Array(J*=2));N<J;)K=I[N]*131072+(I[N+1]>>>11),K>=9e15?(q=crypto.getRandomValues(new Uint32Array(2)),I[N]=q[0],I[N+1]=q[1]):(H.push(K%1e14),N+=2);N=J/2}else if(crypto.randomBytes){for(I=crypto.randomBytes(J*=7);N<J;)K=(I[N]&31)*281474976710656+I[N+1]*1099511627776+I[N+2]*4294967296+I[N+3]*16777216+(I[N+4]<<16)+(I[N+5]<<8)+I[N+6],K>=9e15?crypto.randomBytes(7).copy(I,N):(H.push(K%1e14),N+=7);N=J/7}else throw m=!1,Error(a+"crypto unavailable");if(!m)for(;N<J;)K=R(),K<9e15&&(H[N++]=K%1e14);for(J=H[--N],L%=y,J&&L&&(K=_[y-L],H[N]=i(J/K)*K);H[N]===0;H.pop(),N--);if(N<0)H=[O=0];else{for(O=-1;H[0]===0;H.splice(0,1),O-=y);for(N=1,K=H[0];K>=10;K/=10,N++);N<y&&(O-=y-N)}return Q.e=O,Q.c=H,Q}}(),w.sum=function(){for(var B=1,R=arguments,L=new w(R[0]);B<R.length;)L=L.plus(R[B++]);return L},ce=function(){var B="0123456789";function R(L,I,q,O){for(var J,K=[0],N,H=0,Q=L.length;H<Q;){for(N=K.length;N--;K[N]*=I);for(K[0]+=O.indexOf(L.charAt(H++)),J=0;J<K.length;J++)K[J]>q-1&&(K[J+1]==null&&(K[J+1]=0),K[J+1]+=K[J]/q|0,K[J]%=q)}return K.reverse()}return function(L,I,q,O,J){var K,N,H,Q,j,re,De,se,le=L.indexOf("."),Ue=s,oe=u;for(le>=0&&(Q=o,o=0,L=L.replace(".",""),se=new w(I),re=se.pow(L.length-le),o=Q,se.c=R(ae(z(re.c),re.e,"0"),10,q,B),se.e=se.c.length),De=R(L,I,q,J?(K=E,B):(K=B,E)),H=Q=De.length;De[--Q]==0;De.pop());if(!De[0])return K.charAt(0);if(le<0?--H:(re.c=De,re.e=H,re.s=O,re=ee(re,se,Ue,oe,q),De=re.c,j=re.r,H=re.e),N=H+Ue+1,le=De[N],Q=q/2,j=j||N<0||De[N+1]!=null,j=oe<4?(le!=null||j)&&(oe==0||oe==(re.s<0?3:2)):le>Q||le==Q&&(oe==4||j||oe==6&&De[N-1]&1||oe==(re.s<0?8:7)),N<1||!De[0])L=j?ae(K.charAt(1),-Ue,K.charAt(0)):K.charAt(0);else{if(De.length=N,j)for(--q;++De[--N]>q;)De[N]=0,N||(++H,De=[1].concat(De));for(Q=De.length;!De[--Q];);for(le=0,L="";le<=Q;L+=K.charAt(De[le++]));L=ae(L,H,K.charAt(0))}return L}}(),ee=function(){function B(I,q,O){var J,K,N,H,Q=0,j=I.length,re=q%C,De=q/C|0;for(I=I.slice();j--;)N=I[j]%C,H=I[j]/C|0,J=De*N+H*re,K=re*N+J%C*C+Q,Q=(K/O|0)+(J/C|0)+De*H,I[j]=K%O;return Q&&(I=[Q].concat(I)),I}function R(I,q,O,J){var K,N;if(O!=J)N=O>J?1:-1;else for(K=N=0;K<O;K++)if(I[K]!=q[K]){N=I[K]>q[K]?1:-1;break}return N}function L(I,q,O,J){for(var K=0;O--;)I[O]-=K,K=I[O]<q[O]?1:0,I[O]=K*J+I[O]-q[O];for(;!I[0]&&I.length>1;I.splice(0,1));}return function(I,q,O,J,K){var N,H,Q,j,re,De,se,le,Ue,oe,fe,Xe,ge,ve,mt,pe,be,Ye=I.s==q.s?1:-1,de=I.c,ue=q.c;if(!de||!de[0]||!ue||!ue[0])return new w(!I.s||!q.s||(de?ue&&de[0]==ue[0]:!ue)?NaN:de&&de[0]==0||!ue?Ye*0:Ye/0);for(le=new w(Ye),Ue=le.c=[],H=I.e-q.e,Ye=O+H+1,K||(K=b,H=P(I.e/y)-P(q.e/y),Ye=Ye/y|0),Q=0;ue[Q]==(de[Q]||0);Q++);if(ue[Q]>(de[Q]||0)&&H--,Ye<0)Ue.push(1),j=!0;else{for(ve=de.length,pe=ue.length,Q=0,Ye+=2,re=i(K/(ue[0]+1)),re>1&&(ue=B(ue,re,K),de=B(de,re,K),pe=ue.length,ve=de.length),ge=pe,oe=de.slice(0,pe),fe=oe.length;fe<pe;oe[fe++]=0);be=ue.slice(),be=[0].concat(be),mt=ue[0],ue[1]>=K/2&&mt++;do{if(re=0,N=R(ue,oe,pe,fe),N<0){if(Xe=oe[0],pe!=fe&&(Xe=Xe*K+(oe[1]||0)),re=i(Xe/mt),re>1)for(re>=K&&(re=K-1),De=B(ue,re,K),se=De.length,fe=oe.length;R(De,oe,se,fe)==1;)re--,L(De,pe<se?be:ue,se,K),se=De.length,N=1;else re==0&&(N=re=1),De=ue.slice(),se=De.length;if(se<fe&&(De=[0].concat(De)),L(oe,De,fe,K),fe=oe.length,N==-1)for(;R(ue,oe,pe,fe)<1;)re++,L(oe,pe<fe?be:ue,fe,K),fe=oe.length}else N===0&&(re++,oe=[0]);Ue[Q++]=re,oe[0]?oe[fe++]=de[ge]||0:(oe=[de[ge]],fe=1)}while((ge++<ve||oe[0]!=null)&&Ye--);j=oe[0]!=null,Ue[0]||Ue.splice(0,1)}if(K==b){for(Q=1,Ye=Ue[0];Ye>=10;Ye/=10,Q++);G(le,O+(le.e=Q+H*y-1)+1,J,j)}else le.e=H,le.r=+j;return le}}();function U(B,R,L,I){var q,O,J,K,N;if(L==null?L=u:X(L,0,8),!B.c)return B.toString();if(q=B.c[0],J=B.e,R==null)N=z(B.c),N=I==1||I==2&&(J<=d||J>=f)?$(N,J):ae(N,J,"0");else if(B=G(new w(B),R,L),O=B.e,N=z(B.c),K=N.length,I==1||I==2&&(R<=O||O<=d)){for(;K<R;N+="0",K++);N=$(N,O)}else if(R-=J,N=ae(N,O,"0"),O+1>K){if(--R>0)for(N+=".";R--;N+="0");}else if(R+=O-K,R>0)for(O+1==K&&(N+=".");R--;N+="0");return B.s<0&&q?"-"+N:N}function M(B,R){for(var L,I,q=1,O=new w(B[0]);q<B.length;q++)I=new w(B[q]),(!I.s||(L=W(O,I))===R||L===0&&O.s===R)&&(O=I);return O}function k(B,R,L){for(var I=1,q=R.length;!R[--q];R.pop());for(q=R[0];q>=10;q/=10,I++);return(L=I+L*y-1)>v?B.c=B.e=null:L<c?B.c=[B.e=0]:(B.e=L,B.c=R),B}te=function(){var B=/^(-?)0([xbo])(?=\w[\w.]*$)/i,R=/^([^.]+)\.$/,L=/^\.([^.]+)$/,I=/^-?(Infinity|NaN)$/,q=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(O,J,K,N){var H,Q=K?J:J.replace(q,"");if(I.test(Q))O.s=isNaN(Q)?null:Q<0?-1:1;else{if(!K&&(Q=Q.replace(B,function(j,re,De){return H=(De=De.toLowerCase())=="x"?16:De=="b"?2:8,!N||N==H?re:j}),N&&(H=N,Q=Q.replace(R,"$1").replace(L,"0.$1")),J!=Q))return new w(Q,H);if(w.DEBUG)throw Error(a+"Not a"+(N?" base "+N:"")+" number: "+J);O.s=null}O.c=O.e=null}}();function G(B,R,L,I){var q,O,J,K,N,H,Q,j=B.c,re=_;if(j){e:{for(q=1,K=j[0];K>=10;K/=10,q++);if(O=R-q,O<0)O+=y,J=R,N=j[H=0],Q=i(N/re[q-J-1]%10);else if(H=n((O+1)/y),H>=j.length)if(I){for(;j.length<=H;j.push(0));N=Q=0,q=1,O%=y,J=O-y+1}else break e;else{for(N=K=j[H],q=1;K>=10;K/=10,q++);O%=y,J=O-y+q,Q=J<0?0:i(N/re[q-J-1]%10)}if(I=I||R<0||j[H+1]!=null||(J<0?N:N%re[q-J-1]),I=L<4?(Q||I)&&(L==0||L==(B.s<0?3:2)):Q>5||Q==5&&(L==4||I||L==6&&(O>0?J>0?N/re[q-J]:0:j[H-1])%10&1||L==(B.s<0?8:7)),R<1||!j[0])return j.length=0,I?(R-=B.e+1,j[0]=re[(y-R%y)%y],B.e=-R||0):j[0]=B.e=0,B;if(O==0?(j.length=H,K=1,H--):(j.length=H+1,K=re[y-O],j[H]=J>0?i(N/re[q-J]%re[J])*K:0),I)for(;;)if(H==0){for(O=1,J=j[0];J>=10;J/=10,O++);for(J=j[0]+=K,K=1;J>=10;J/=10,K++);O!=K&&(B.e++,j[0]==b&&(j[0]=1));break}else{if(j[H]+=K,j[H]!=b)break;j[H--]=0,K=1}for(O=j.length;j[--O]===0;j.pop());}B.e>v?B.c=B.e=null:B.e<c&&(B.c=[B.e=0])}return B}function Z(B){var R,L=B.e;return L===null?B.toString():(R=z(B.c),R=L<=d||L>=f?$(R,L):ae(R,L,"0"),B.s<0?"-"+R:R)}return Y.absoluteValue=Y.abs=function(){var B=new w(this);return B.s<0&&(B.s=1),B},Y.comparedTo=function(B,R){return W(this,new w(B,R))},Y.decimalPlaces=Y.dp=function(B,R){var L,I,q,O=this;if(B!=null)return X(B,0,D),R==null?R=u:X(R,0,8),G(new w(O),B+O.e+1,R);if(!(L=O.c))return null;if(I=((q=L.length-1)-P(this.e/y))*y,q=L[q])for(;q%10==0;q/=10,I--);return I<0&&(I=0),I},Y.dividedBy=Y.div=function(B,R){return ee(this,new w(B,R),s,u)},Y.dividedToIntegerBy=Y.idiv=function(B,R){return ee(this,new w(B,R),0,1)},Y.exponentiatedBy=Y.pow=function(B,R){var L,I,q,O,J,K,N,H,Q,j=this;if(B=new w(B),B.c&&!B.isInteger())throw Error(a+"Exponent not an integer: "+Z(B));if(R!=null&&(R=new w(R)),K=B.e>14,!j.c||!j.c[0]||j.c[0]==1&&!j.e&&j.c.length==1||!B.c||!B.c[0])return Q=new w(Math.pow(+Z(j),K?B.s*(2-ne(B)):+Z(B))),R?Q.mod(R):Q;if(N=B.s<0,R){if(R.c?!R.c[0]:!R.s)return new w(NaN);I=!N&&j.isInteger()&&R.isInteger(),I&&(j=j.mod(R))}else{if(B.e>9&&(j.e>0||j.e<-1||(j.e==0?j.c[0]>1||K&&j.c[1]>=24e7:j.c[0]<8e13||K&&j.c[0]<=9999975e7)))return O=j.s<0&&ne(B)?-0:0,j.e>-1&&(O=1/O),new w(N?1/O:O);o&&(O=n(o/y+2))}for(K?(L=new w(.5),N&&(B.s=1),H=ne(B)):(q=Math.abs(+Z(B)),H=q%2),Q=new w(T);;){if(H){if(Q=Q.times(j),!Q.c)break;O?Q.c.length>O&&(Q.c.length=O):I&&(Q=Q.mod(R))}if(q){if(q=i(q/2),q===0)break;H=q%2}else if(B=B.times(L),G(B,B.e+1,1),B.e>14)H=ne(B);else{if(q=+Z(B),q===0)break;H=q%2}j=j.times(j),O?j.c&&j.c.length>O&&(j.c.length=O):I&&(j=j.mod(R))}return I?Q:(N&&(Q=T.div(Q)),R?Q.mod(R):O?G(Q,o,u,J):Q)},Y.integerValue=function(B){var R=new w(this);return B==null?B=u:X(B,0,8),G(R,R.e+1,B)},Y.isEqualTo=Y.eq=function(B,R){return W(this,new w(B,R))===0},Y.isFinite=function(){return!!this.c},Y.isGreaterThan=Y.gt=function(B,R){return W(this,new w(B,R))>0},Y.isGreaterThanOrEqualTo=Y.gte=function(B,R){return(R=W(this,new w(B,R)))===1||R===0},Y.isInteger=function(){return!!this.c&&P(this.e/y)>this.c.length-2},Y.isLessThan=Y.lt=function(B,R){return W(this,new w(B,R))<0},Y.isLessThanOrEqualTo=Y.lte=function(B,R){return(R=W(this,new w(B,R)))===-1||R===0},Y.isNaN=function(){return!this.s},Y.isNegative=function(){return this.s<0},Y.isPositive=function(){return this.s>0},Y.isZero=function(){return!!this.c&&this.c[0]==0},Y.minus=function(B,R){var L,I,q,O,J=this,K=J.s;if(B=new w(B,R),R=B.s,!K||!R)return new w(NaN);if(K!=R)return B.s=-R,J.plus(B);var N=J.e/y,H=B.e/y,Q=J.c,j=B.c;if(!N||!H){if(!Q||!j)return Q?(B.s=-R,B):new w(j?J:NaN);if(!Q[0]||!j[0])return j[0]?(B.s=-R,B):new w(Q[0]?J:u==3?-0:0)}if(N=P(N),H=P(H),Q=Q.slice(),K=N-H){for((O=K<0)?(K=-K,q=Q):(H=N,q=j),q.reverse(),R=K;R--;q.push(0));q.reverse()}else for(I=(O=(K=Q.length)<(R=j.length))?K:R,K=R=0;R<I;R++)if(Q[R]!=j[R]){O=Q[R]<j[R];break}if(O&&(q=Q,Q=j,j=q,B.s=-B.s),R=(I=j.length)-(L=Q.length),R>0)for(;R--;Q[L++]=0);for(R=b-1;I>K;){if(Q[--I]<j[I]){for(L=I;L&&!Q[--L];Q[L]=R);--Q[L],Q[I]+=b}Q[I]-=j[I]}for(;Q[0]==0;Q.splice(0,1),--H);return Q[0]?k(B,Q,H):(B.s=u==3?-1:1,B.c=[B.e=0],B)},Y.modulo=Y.mod=function(B,R){var L,I,q=this;return B=new w(B,R),!q.c||!B.s||B.c&&!B.c[0]?new w(NaN):!B.c||q.c&&!q.c[0]?new w(q):(h==9?(I=B.s,B.s=1,L=ee(q,B,0,3),B.s=I,L.s*=I):L=ee(q,B,0,h),B=q.minus(L.times(B)),!B.c[0]&&h==1&&(B.s=q.s),B)},Y.multipliedBy=Y.times=function(B,R){var L,I,q,O,J,K,N,H,Q,j,re,De,se,le,Ue,oe=this,fe=oe.c,Xe=(B=new w(B,R)).c;if(!fe||!Xe||!fe[0]||!Xe[0])return!oe.s||!B.s||fe&&!fe[0]&&!Xe||Xe&&!Xe[0]&&!fe?B.c=B.e=B.s=null:(B.s*=oe.s,!fe||!Xe?B.c=B.e=null:(B.c=[0],B.e=0)),B;for(I=P(oe.e/y)+P(B.e/y),B.s*=oe.s,N=fe.length,j=Xe.length,N<j&&(se=fe,fe=Xe,Xe=se,q=N,N=j,j=q),q=N+j,se=[];q--;se.push(0));for(le=b,Ue=C,q=j;--q>=0;){for(L=0,re=Xe[q]%Ue,De=Xe[q]/Ue|0,J=N,O=q+J;O>q;)H=fe[--J]%Ue,Q=fe[J]/Ue|0,K=De*H+Q*re,H=re*H+K%Ue*Ue+se[O]+L,L=(H/le|0)+(K/Ue|0)+De*Q,se[O--]=H%le;se[O]=L}return L?++I:se.splice(0,1),k(B,se,I)},Y.negated=function(){var B=new w(this);return B.s=-B.s||null,B},Y.plus=function(B,R){var L,I=this,q=I.s;if(B=new w(B,R),R=B.s,!q||!R)return new w(NaN);if(q!=R)return B.s=-R,I.minus(B);var O=I.e/y,J=B.e/y,K=I.c,N=B.c;if(!O||!J){if(!K||!N)return new w(q/0);if(!K[0]||!N[0])return N[0]?B:new w(K[0]?I:q*0)}if(O=P(O),J=P(J),K=K.slice(),q=O-J){for(q>0?(J=O,L=N):(q=-q,L=K),L.reverse();q--;L.push(0));L.reverse()}for(q=K.length,R=N.length,q-R<0&&(L=N,N=K,K=L,R=q),q=0;R;)q=(K[--R]=K[R]+N[R]+q)/b|0,K[R]=b===K[R]?0:K[R]%b;return q&&(K=[q].concat(K),++J),k(B,K,J)},Y.precision=Y.sd=function(B,R){var L,I,q,O=this;if(B!=null&&B!==!!B)return X(B,1,D),R==null?R=u:X(R,0,8),G(new w(O),B,R);if(!(L=O.c))return null;if(q=L.length-1,I=q*y+1,q=L[q]){for(;q%10==0;q/=10,I--);for(q=L[0];q>=10;q/=10,I++);}return B&&O.e+1>I&&(I=O.e+1),I},Y.shiftedBy=function(B){return X(B,-x,x),this.times("1e"+B)},Y.squareRoot=Y.sqrt=function(){var B,R,L,I,q,O=this,J=O.c,K=O.s,N=O.e,H=s+4,Q=new w("0.5");if(K!==1||!J||!J[0])return new w(!K||K<0&&(!J||J[0])?NaN:J?O:1/0);if(K=Math.sqrt(+Z(O)),K==0||K==1/0?(R=z(J),(R.length+N)%2==0&&(R+="0"),K=Math.sqrt(+R),N=P((N+1)/2)-(N<0||N%2),K==1/0?R="5e"+N:(R=K.toExponential(),R=R.slice(0,R.indexOf("e")+1)+N),L=new w(R)):L=new w(K+""),L.c[0]){for(N=L.e,K=N+H,K<3&&(K=0);;)if(q=L,L=Q.times(q.plus(ee(O,q,H,1))),z(q.c).slice(0,K)===(R=z(L.c)).slice(0,K))if(L.e<N&&--K,R=R.slice(K-3,K+1),R=="9999"||!I&&R=="4999"){if(!I&&(G(q,q.e+s+2,0),q.times(q).eq(O))){L=q;break}H+=4,K+=4,I=1}else{(!+R||!+R.slice(1)&&R.charAt(0)=="5")&&(G(L,L.e+s+2,1),B=!L.times(L).eq(O));break}}return G(L,L.e+s+1,u,B)},Y.toExponential=function(B,R){return B!=null&&(X(B,0,D),B++),U(this,B,R,1)},Y.toFixed=function(B,R){return B!=null&&(X(B,0,D),B=B+this.e+1),U(this,B,R)},Y.toFormat=function(B,R,L){var I,q=this;if(L==null)B!=null&&R&&typeof R=="object"?(L=R,R=null):B&&typeof B=="object"?(L=B,B=R=null):L=p;else if(typeof L!="object")throw Error(a+"Argument not an object: "+L);if(I=q.toFixed(B,R),q.c){var O,J=I.split("."),K=+L.groupSize,N=+L.secondaryGroupSize,H=L.groupSeparator||"",Q=J[0],j=J[1],re=q.s<0,De=re?Q.slice(1):Q,se=De.length;if(N&&(O=K,K=N,N=O,se-=O),K>0&&se>0){for(O=se%K||K,Q=De.substr(0,O);O<se;O+=K)Q+=H+De.substr(O,K);N>0&&(Q+=H+De.slice(O)),re&&(Q="-"+Q)}I=j?Q+(L.decimalSeparator||"")+((N=+L.fractionGroupSize)?j.replace(new RegExp("\\d{"+N+"}\\B","g"),"$&"+(L.fractionGroupSeparator||"")):j):Q}return(L.prefix||"")+I+(L.suffix||"")},Y.toFraction=function(B){var R,L,I,q,O,J,K,N,H,Q,j,re,De=this,se=De.c;if(B!=null&&(K=new w(B),!K.isInteger()&&(K.c||K.s!==1)||K.lt(T)))throw Error(a+"Argument "+(K.isInteger()?"out of range: ":"not an integer: ")+Z(K));if(!se)return new w(De);for(R=new w(T),H=L=new w(T),I=N=new w(T),re=z(se),O=R.e=re.length-De.e-1,R.c[0]=_[(J=O%y)<0?y+J:J],B=!B||K.comparedTo(R)>0?O>0?R:H:K,J=v,v=1/0,K=new w(re),N.c[0]=0;Q=ee(K,R,0,1),q=L.plus(Q.times(I)),q.comparedTo(B)!=1;)L=I,I=q,H=N.plus(Q.times(q=H)),N=q,R=K.minus(Q.times(q=R)),K=q;return q=ee(B.minus(L),I,0,1),N=N.plus(q.times(H)),L=L.plus(q.times(I)),N.s=H.s=De.s,O=O*2,j=ee(H,I,O,u).minus(De).abs().comparedTo(ee(N,L,O,u).minus(De).abs())<1?[H,I]:[N,L],v=J,j},Y.toNumber=function(){return+Z(this)},Y.toPrecision=function(B,R){return B!=null&&X(B,1,D),U(this,B,R,2)},Y.toString=function(B){var R,L=this,I=L.s,q=L.e;return q===null?I?(R="Infinity",I<0&&(R="-"+R)):R="NaN":(B==null?R=q<=d||q>=f?$(z(L.c),q):ae(z(L.c),q,"0"):B===10&&g?(L=G(new w(L),s+q+1,u),R=ae(z(L.c),L.e,"0")):(X(B,2,E.length,"Base"),R=ce(ae(z(L.c),q,"0"),10,B,I,!0)),I<0&&L.c[0]&&(R="-"+R)),R},Y.valueOf=Y.toJSON=function(){return Z(this)},Y._isBigNumber=!0,ie!=null&&w.set(ie),w}function P(ie){var ee=ie|0;return ie>0||ie===ee?ee:ee-1}function z(ie){for(var ee,ce,te=1,Y=ie.length,T=ie[0]+"";te<Y;){for(ee=ie[te++]+"",ce=y-ee.length;ce--;ee="0"+ee);T+=ee}for(Y=T.length;T.charCodeAt(--Y)===48;);return T.slice(0,Y+1||1)}function W(ie,ee){var ce,te,Y=ie.c,T=ee.c,s=ie.s,u=ee.s,d=ie.e,f=ee.e;if(!s||!u)return null;if(ce=Y&&!Y[0],te=T&&!T[0],ce||te)return ce?te?0:-u:s;if(s!=u)return s;if(ce=s<0,te=d==f,!Y||!T)return te?0:!Y^ce?1:-1;if(!te)return d>f^ce?1:-1;for(u=(d=Y.length)<(f=T.length)?d:f,s=0;s<u;s++)if(Y[s]!=T[s])return Y[s]>T[s]^ce?1:-1;return d==f?0:d>f^ce?1:-1}function X(ie,ee,ce,te){if(ie<ee||ie>ce||ie!==i(ie))throw Error(a+(te||"Argument")+(typeof ie=="number"?ie<ee||ie>ce?" out of range: ":" not an integer: ":" not a primitive number: ")+String(ie))}function ne(ie){var ee=ie.c.length-1;return P(ie.e/y)==ee&&ie.c[ee]%2!=0}function $(ie,ee){return(ie.length>1?ie.charAt(0)+"."+ie.slice(1):ie)+(ee<0?"e":"e+")+ee}function ae(ie,ee,ce){var te,Y;if(ee<0){for(Y=ce+".";++ee;Y+=ce);ie=Y+ie}else if(te=ie.length,++ee>te){for(Y=ce,ee-=te;--ee;Y+=ce);ie+=Y}else ee<te&&(ie=ie.slice(0,ee)+"."+ie.slice(ee));return ie}e=F(),e.default=e.BigNumber=e,typeof define=="function"&&define.amd?define(function(){return e}):typeof Jf<"u"&&Jf.exports?Jf.exports=e:(t||(t=typeof self<"u"&&self?self:window),t.BigNumber=e)})(s1)});var c1=V(ku=>{"use strict";var FB=A(S());Object.defineProperty(ku,"__esModule",{value:!0});var y6=f1(),Ou=class{BigNum;constructor(){this.BigNum=(e,r)=>{let n=y6.BigNumber.clone({DECIMAL_PLACES:r});return new n(e)}}winstonToAr(e,{formatted:r=!1,decimals:n=12,trim:i=!0}={}){let a=this.stringToBigNum(e,n).shiftedBy(-12);return r?a.toFormat(n):a.toFixed(n)}arToWinston(e,{formatted:r=!1}={}){let n=this.stringToBigNum(e).shiftedBy(12);return r?n.toFormat():n.toFixed(0)}compare(e,r){let n=this.stringToBigNum(e),i=this.stringToBigNum(r);return n.comparedTo(i)}isEqual(e,r){return this.compare(e,r)===0}isLessThan(e,r){let n=this.stringToBigNum(e),i=this.stringToBigNum(r);return n.isLessThan(i)}isGreaterThan(e,r){let n=this.stringToBigNum(e),i=this.stringToBigNum(r);return n.isGreaterThan(i)}add(e,r){let n=this.stringToBigNum(e),i=this.stringToBigNum(r);return n.plus(r).toFixed(0)}sub(e,r){let n=this.stringToBigNum(e),i=this.stringToBigNum(r);return n.minus(r).toFixed(0)}stringToBigNum(e,r=12){return this.BigNum(e,r)}};ku.default=Ou});var u1=V(Ju=>{"use strict";var IB=A(S());Object.defineProperty(Ju,"__esModule",{value:!0});var Nu=class{METHOD_GET="GET";METHOD_POST="POST";config;constructor(e){this.applyConfig(e)}applyConfig(e){this.config=this.mergeDefaults(e)}getConfig(){return this.config}mergeDefaults(e){let r=e.protocol||"http",n=e.port||(r==="https"?443:80);return{host:e.host||"127.0.0.1",protocol:r,port:n,timeout:e.timeout||2e4,logging:e.logging||!1,logger:e.logger||console.log,network:e.network}}async get(e,r){return await this.request(e,{...r,method:this.METHOD_GET})}async post(e,r,n){let i=new Headers(n?.headers||{});return i.get("content-type")?.includes("application/json")||i.append("content-type","application/json"),i.append("accept","application/json, text/plain, */*"),await this.request(e,{...n,method:this.METHOD_POST,body:typeof r!="string"?JSON.stringify(r):r,headers:i})}async request(e,r){let n=new Headers(r?.headers||{}),i=`${this.config.protocol}://${this.config.host}:${this.config.port}`,a=r?.responseType;delete r?.responseType,e.startsWith("/")&&(e=e.slice(1)),this.config.network&&n.append("x-network",this.config.network),this.config.logging&&this.config.logger(`Requesting: ${i}/${e}`);let l=await fetch(`${i}/${e}`,{...r||{},headers:n});this.config.logging&&this.config.logger(`Response: ${l.url} - ${l.status}`);let y=l.headers.get("content-type")?.match(/charset=([^()<>@,;:\"/[\]?.=\s]*)/i)?.[1],x=l,_=async()=>{if(y)try{x.data=new TextDecoder(y).decode(await l.arrayBuffer())}catch{x.data=await l.text()}else x.data=await l.text()};if(a==="arraybuffer")x.data=await l.arrayBuffer();else if(a==="text")await _();else if(a==="webstream")x.data=w6(l.body);else try{let C=await l.clone().json();typeof C!="object"?await _():x.data=await l.json(),C=null}catch{await _()}return x}};Ju.default=Nu;var w6=t=>{let e=t;return typeof e[Symbol.asyncIterator]>"u"&&(e[Symbol.asyncIterator]=A6(t)),e},A6=function(t){return async function*(){let r=t.getReader();try{for(;;){let{done:n,value:i}=await r.read();if(n)return;yield i}}finally{r.releaseLock()}}}});var l1=V(Hu=>{"use strict";var kB=A(S());Object.defineProperty(Hu,"__esModule",{value:!0});var Uu=class{api;constructor(e){this.api=e}getInfo(){return this.api.get("info").then(e=>e.data)}getPeers(){return this.api.get("peers").then(e=>e.data)}};Hu.default=Uu});var ds=V(Uf=>{"use strict";var JB=A(S());Object.defineProperty(Uf,"__esModule",{value:!0});Uf.getError=S6;var qu=class extends Error{type;response;constructor(e,r={}){r.message?super(r.message):super(),this.type=e,this.response=r.response}getType(){return this.type}};Uf.default=qu;function S6(t){let e=t.data;if(typeof t.data=="string")try{e=JSON.parse(t.data)}catch{}if(t.data instanceof ArrayBuffer||t.data instanceof Uint8Array)try{e=JSON.parse(e.toString())}catch{}return e?e.error||e:t.statusText||"unknown"}});var Vu=V(ct=>{"use strict";var HB=A(S());Object.defineProperty(ct,"__esModule",{value:!0});ct.arrayCompare=ct.MIN_CHUNK_SIZE=ct.MAX_CHUNK_SIZE=void 0;ct.chunkData=Xu;ct.generateLeaves=zu;ct.computeRootHash=M6;ct.generateTree=h1;ct.generateTransactionChunks=T6;ct.buildLayers=qf;ct.generateProofs=p1;ct.arrayFlatten=Ku;ct.intToBuffer=bs;ct.bufferToInt=Zu;ct.validatePath=hs;ct.debug=b1;var Hf=gs(),d1=gn();ct.MAX_CHUNK_SIZE=256*1024;ct.MIN_CHUNK_SIZE=32*1024;var ps=32,ro=32;async function Xu(t){let e=[],r=t,n=0;for(;r.byteLength>=ct.MAX_CHUNK_SIZE;){let i=ct.MAX_CHUNK_SIZE,a=r.byteLength-ct.MAX_CHUNK_SIZE;a>0&&a<ct.MIN_CHUNK_SIZE&&(i=Math.ceil(r.byteLength/2));let l=r.slice(0,i),b=await Hf.default.crypto.hash(l);n+=l.byteLength,e.push({dataHash:b,minByteRange:n-l.byteLength,maxByteRange:n}),r=r.slice(i)}return e.push({dataHash:await Hf.default.crypto.hash(r),minByteRange:n,maxByteRange:n+r.byteLength}),e}async function zu(t){return Promise.all(t.map(async({dataHash:e,minByteRange:r,maxByteRange:n})=>({type:"leaf",id:await Nt(await Promise.all([Nt(e),Nt(bs(n))])),dataHash:e,minByteRange:r,maxByteRange:n})))}async function M6(t){return(await h1(t)).id}async function h1(t){return await qf(await zu(await Xu(t)))}async function T6(t){let e=await Xu(t),r=await zu(e),n=await qf(r),i=await p1(n),a=e.slice(-1)[0];return a.maxByteRange-a.minByteRange===0&&(e.splice(e.length-1,1),i.splice(i.length-1,1)),{data_root:n.id,chunks:e,proofs:i}}async function qf(t,e=0){if(t.length<2)return t[0];let r=[];for(let n=0;n<t.length;n+=2)r.push(await E6(t[n],t[n+1]));return qf(r,e+1)}function p1(t){let e=Gu(t);return Array.isArray(e)?Ku(e):[e]}function Gu(t,e=new Uint8Array,r=0){if(t.type=="leaf")return{offset:t.maxByteRange-1,proof:(0,d1.concatBuffers)([e,t.dataHash,bs(t.maxByteRange)])};if(t.type=="branch"){let n=(0,d1.concatBuffers)([e,t.leftChild.id,t.rightChild.id,bs(t.byteRange)]);return[Gu(t.leftChild,n,r+1),Gu(t.rightChild,n,r+1)]}throw new Error("Unexpected node type")}function Ku(t){let e=[];return t.forEach(r=>{Array.isArray(r)?e.push(...Ku(r)):e.push(r)}),e}async function E6(t,e){return e?{type:"branch",id:await Nt([await Nt(t.id),await Nt(e.id),await Nt(bs(t.maxByteRange))]),byteRange:t.maxByteRange,maxByteRange:e.maxByteRange,leftChild:t,rightChild:e}:t}async function Nt(t){return Array.isArray(t)&&(t=Hf.default.utils.concatBuffers(t)),new Uint8Array(await Hf.default.crypto.hash(t))}function bs(t){let e=new Uint8Array(ps);for(var r=e.length-1;r>=0;r--){var n=t%256;e[r]=n,t=(t-n)/256}return e}function Zu(t){let e=0;for(var r=0;r<t.length;r++)e*=256,e+=t[r];return e}var _6=(t,e)=>t.every((r,n)=>e[n]===r);ct.arrayCompare=_6;async function hs(t,e,r,n,i){if(n<=0)return!1;if(e>=n)return hs(t,0,n-1,n,i);if(e<0)return hs(t,0,0,n,i);if(i.length==ro+ps){let C=i.slice(0,ro),D=i.slice(C.length,C.length+ps),F=await Nt([await Nt(C),await Nt(D)]);return(0,ct.arrayCompare)(t,F)?{offset:n-1,leftBound:r,rightBound:n,chunkSize:n-r}:!1}let a=i.slice(0,ro),l=i.slice(a.length,a.length+ro),b=i.slice(a.length+l.length,a.length+l.length+ps),y=Zu(b),x=i.slice(a.length+l.length+b.length),_=await Nt([await Nt(a),await Nt(l),await Nt(b)]);return(0,ct.arrayCompare)(t,_)?e<y?await hs(a,e,r,Math.min(n,y),x):await hs(l,e,Math.max(r,y),n,x):!1}async function b1(t,e=""){if(t.byteLength<1)return e;let r=t.slice(0,ro),n=t.slice(r.length,r.length+ro),i=t.slice(r.length+n.length,r.length+n.length+ps),a=Zu(i),l=t.slice(r.length+n.length+i.length),b=await Nt([await Nt(r),await Nt(n),await Nt(i)]),y=`${e}
4
- ${JSON.stringify(Buffer.from(r))},${JSON.stringify(Buffer.from(n))},${a} => ${JSON.stringify(b)}`;return b1(l,y)}});var x1=V(Gf=>{"use strict";var GB=A(S());Object.defineProperty(Gf,"__esModule",{value:!0});Gf.TransactionUploader=void 0;var g1=vs(),B6=gn(),ju=ds(),C6=Vu(),v1=1,P6=["invalid_json","chunk_too_big","data_path_too_big","offset_too_big","data_size_too_big","chunk_proof_ratio_not_attractive","invalid_proof"],m1=1e3*40,Qu=class t{api;chunkIndex=0;txPosted=!1;transaction;lastRequestTimeEnd=0;totalErrors=0;data;lastResponseStatus=0;lastResponseError="";get isComplete(){return this.txPosted&&this.chunkIndex===this.transaction.chunks.chunks.length}get totalChunks(){return this.transaction.chunks.chunks.length}get uploadedChunks(){return this.chunkIndex}get pctComplete(){return Math.trunc(this.uploadedChunks/this.totalChunks*100)}constructor(e,r){if(this.api=e,!r.id)throw new Error("Transaction is not signed");if(!r.chunks)throw new Error("Transaction chunks not prepared");this.data=r.data,this.transaction=new g1.default(Object.assign({},r,{data:new Uint8Array(0)}))}async uploadChunk(e){if(this.isComplete)throw new Error("Upload is already complete");if(this.lastResponseError!==""?this.totalErrors++:this.totalErrors=0,this.totalErrors===100)throw new Error(`Unable to complete upload: ${this.lastResponseStatus}: ${this.lastResponseError}`);let r=this.lastResponseError===""?0:Math.max(this.lastRequestTimeEnd+m1-Date.now(),m1);if(r>0&&(r=r-r*Math.random()*.3,await new Promise(l=>setTimeout(l,r))),this.lastResponseError="",!this.txPosted){await this.postTransaction();return}e&&(this.chunkIndex=e);let n=this.transaction.getChunk(e||this.chunkIndex,this.data);if(!await(0,C6.validatePath)(this.transaction.chunks.data_root,parseInt(n.offset),0,parseInt(n.data_size),B6.b64UrlToBuffer(n.data_path)))throw new Error(`Unable to validate chunk ${this.chunkIndex}`);let a=await this.api.post("chunk",this.transaction.getChunk(this.chunkIndex,this.data)).catch(l=>(console.error(l.message),{status:-1,data:{error:l.message}}));if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=a.status,this.lastResponseStatus==200)this.chunkIndex++;else if(this.lastResponseError=(0,ju.getError)(a),P6.includes(this.lastResponseError))throw new Error(`Fatal error uploading chunk ${this.chunkIndex}: ${this.lastResponseError}`)}static async fromSerialized(e,r,n){if(!r||typeof r.chunkIndex!="number"||typeof r.transaction!="object")throw new Error("Serialized object does not match expected format.");var i=new g1.default(r.transaction);i.chunks||await i.prepareChunks(n);let a=new t(e,i);if(a.chunkIndex=r.chunkIndex,a.lastRequestTimeEnd=r.lastRequestTimeEnd,a.lastResponseError=r.lastResponseError,a.lastResponseStatus=r.lastResponseStatus,a.txPosted=r.txPosted,a.data=n,a.transaction.data_root!==r.transaction.data_root)throw new Error("Data mismatch: Uploader doesn't match provided data.");return a}static async fromTransactionId(e,r){let n=await e.get(`tx/${r}`);if(n.status!==200)throw new Error(`Tx ${r} not found: ${n.status}`);let i=n.data;return i.data=new Uint8Array(0),{txPosted:!0,chunkIndex:0,lastResponseError:"",lastRequestTimeEnd:0,lastResponseStatus:0,transaction:i}}toJSON(){return{chunkIndex:this.chunkIndex,transaction:this.transaction,lastRequestTimeEnd:this.lastRequestTimeEnd,lastResponseStatus:this.lastResponseStatus,lastResponseError:this.lastResponseError,txPosted:this.txPosted}}async postTransaction(){if(this.totalChunks<=v1){this.transaction.data=this.data;let n=await this.api.post("tx",this.transaction).catch(i=>(console.error(i),{status:-1,data:{error:i.message}}));if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=n.status,this.transaction.data=new Uint8Array(0),n.status>=200&&n.status<300){this.txPosted=!0,this.chunkIndex=v1;return}throw this.lastResponseError=(0,ju.getError)(n),new Error(`Unable to upload transaction: ${n.status}, ${this.lastResponseError}`)}let r=await this.api.post("tx",this.transaction);if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=r.status,!(r.status>=200&&r.status<300))throw this.lastResponseError=(0,ju.getError)(r),new Error(`Unable to upload transaction: ${r.status}, ${this.lastResponseError}`);this.txPosted=!0}};Gf.TransactionUploader=Qu});var Xf=V((XB,y1)=>{var zB=A(S());y1.exports={}});var w1=V(el=>{"use strict";var ZB=A(S());Object.defineProperty(el,"__esModule",{value:!0});var Wu=ds(),li=vs(),ms=gn(),Yu=x1();Xf();var $u=class{api;crypto;chunks;constructor(e,r,n){this.api=e,this.crypto=r,this.chunks=n}async getTransactionAnchor(){let e=await this.api.get("tx_anchor");if(!e.data.match(/^[a-z0-9_-]{43,}/i)||!e.ok)throw new Error(`Could not getTransactionAnchor. Received: ${e.data}. Status: ${e.status}, ${e.statusText}`);return e.data}async getPrice(e,r){let n=r?`price/${e}/${r}`:`price/${e}`,i=await this.api.get(n);if(!/^\d+$/.test(i.data)||!i.ok)throw new Error(`Could not getPrice. Received: ${i.data}. Status: ${i.status}, ${i.statusText}`);return i.data}async get(e){let r=await this.api.get(`tx/${e}`);if(r.status==200){let n=parseInt(r.data.data_size);if(r.data.format>=2&&n>0&&n<=1024*1024*12){let i=await this.getData(e);return new li.default({...r.data,data:i})}return new li.default({...r.data,format:r.data.format||1})}throw r.status==404?new Wu.default("TX_NOT_FOUND"):r.status==410?new Wu.default("TX_FAILED"):new Wu.default("TX_INVALID")}fromRaw(e){return new li.default(e)}async search(e,r){return this.api.post("arql",{op:"equals",expr1:e,expr2:r}).then(n=>n.data?n.data:[])}getStatus(e){return this.api.get(`tx/${e}/status`).then(r=>r.status==200?{status:200,confirmed:r.data}:{status:r.status,confirmed:null})}async getData(e,r){let n;try{n=await this.chunks.downloadChunkedData(e)}catch(i){console.error(`Error while trying to download chunked data for ${e}`),console.error(i)}if(!n){console.warn(`Falling back to gateway cache for ${e}`);try{let{data:i,ok:a,status:l,statusText:b}=await this.api.get(`/${e}`,{responseType:"arraybuffer"});if(!a)throw new Error("Bad http status code",{cause:{status:l,statusText:b}});n=i}catch(i){console.error(`Error while trying to download contiguous data from gateway cache for ${e}`),console.error(i)}}if(!n)throw new Error(`${e} data was not found!`);return r&&r.decode&&!r.string?n:r&&r.decode&&r.string?ms.bufferToString(n):ms.bufferTob64Url(n)}async sign(e,r,n){let a=typeof r=="object"&&(b=>{let y=!0;return["n","e","d","p","q","dp","dq","qi"].map(x=>!(x in b)&&(y=!1)),y})(r),l=typeof arweaveWallet=="object";if(!a&&!l)throw new Error("No valid JWK or external wallet found to sign transaction.");if(a){e.setOwner(r.n);let b=await e.getSignatureData(),y=await this.crypto.sign(r,b,n),x=await this.crypto.hash(y);e.setSignature({id:ms.bufferTob64Url(x),owner:r.n,signature:ms.bufferTob64Url(y)})}else if(l){try{(await arweaveWallet.getPermissions()).includes("SIGN_TRANSACTION")||await arweaveWallet.connect(["SIGN_TRANSACTION"])}catch{}let b=await arweaveWallet.sign(e,n);e.setSignature({id:b.id,owner:b.owner,reward:b.reward,tags:b.tags,signature:b.signature})}else throw new Error("An error occurred while signing. Check wallet is valid")}async verify(e){let r=await e.getSignatureData(),n=e.get("signature",{decode:!0,string:!1}),i=ms.bufferTob64Url(await this.crypto.hash(n));if(e.id!==i)throw new Error("Invalid transaction signature or ID! The transaction ID doesn't match the expected SHA-256 hash of the signature.");return this.crypto.verify(e.owner,r,n)}async post(e){if(typeof e=="string"?e=new li.default(JSON.parse(e)):typeof e.readInt32BE=="function"?e=new li.default(JSON.parse(e.toString())):typeof e=="object"&&!(e instanceof li.default)&&(e=new li.default(e)),!(e instanceof li.default))throw new Error("Must be Transaction object");e.chunks||await e.prepareChunks(e.data);let r=await this.getUploader(e,e.data);try{for(;!r.isComplete;)await r.uploadChunk()}catch(n){if(r.lastResponseStatus>0)return{status:r.lastResponseStatus,statusText:r.lastResponseError,data:{error:r.lastResponseError}};throw n}return{status:200,statusText:"OK",data:{}}}async getUploader(e,r){let n;if(r instanceof ArrayBuffer&&(r=new Uint8Array(r)),e instanceof li.default){if(r||(r=e.data),!(r instanceof Uint8Array))throw new Error("Data format is invalid");e.chunks||await e.prepareChunks(r),n=new Yu.TransactionUploader(this.api,e),(!n.data||n.data.length===0)&&(n.data=r)}else{if(typeof e=="string"&&(e=await Yu.TransactionUploader.fromTransactionId(this.api,e)),!r||!(r instanceof Uint8Array))throw new Error("Must provide data when resuming upload");n=await Yu.TransactionUploader.fromSerialized(this.api,e,r)}return n}async*upload(e,r){let n=await this.getUploader(e,r);for(;!n.isComplete;)await n.uploadChunk(),yield n;return n}};el.default=$u});var S1=V(rl=>{"use strict";var jB=A(S());Object.defineProperty(rl,"__esModule",{value:!0});var A1=gn();Xf();var tl=class{api;crypto;constructor(e,r){this.api=e,this.crypto=r}getBalance(e){return this.api.get(`wallet/${e}/balance`).then(r=>r.data)}getLastTransactionID(e){return this.api.get(`wallet/${e}/last_tx`).then(r=>r.data)}generate(){return this.crypto.generateJWK()}async jwkToAddress(e){return!e||e==="use_wallet"?this.getAddress():this.getAddress(e)}async getAddress(e){if(!e||e==="use_wallet"){try{await arweaveWallet.connect(["ACCESS_ADDRESS"])}catch{}return arweaveWallet.getActiveAddress()}else return this.ownerToAddress(e.n)}async ownerToAddress(e){return A1.bufferTob64Url(await this.crypto.hash(A1.b64UrlToBuffer(e)))}};rl.default=tl});var T1=V(xs=>{"use strict";var WB=A(S());Object.defineProperty(xs,"__esModule",{value:!0});xs.SiloResource=void 0;var M1=gn(),nl=class{api;crypto;transactions;constructor(e,r,n){this.api=e,this.crypto=r,this.transactions=n}async get(e){if(!e)throw new Error("No Silo URI specified");let r=await this.parseUri(e),n=await this.transactions.search("Silo-Name",r.getAccessKey());if(n.length==0)throw new Error(`No data could be found for the Silo URI: ${e}`);let i=await this.transactions.get(n[0]);if(!i)throw new Error(`No data could be found for the Silo URI: ${e}`);let a=i.get("data",{decode:!0,string:!1});return this.crypto.decrypt(a,r.getEncryptionKey())}async readTransactionData(e,r){if(!r)throw new Error("No Silo URI specified");let n=await this.parseUri(r),i=e.get("data",{decode:!0,string:!1});return this.crypto.decrypt(i,n.getEncryptionKey())}async parseUri(e){let r=e.match(/^([a-z0-9-_]+)\.([0-9]+)/i);if(!r)throw new Error("Invalid Silo name, must be a name in the format of [a-z0-9]+.[0-9]+, e.g. 'bubble.7'");let n=r[1],i=Math.pow(2,parseInt(r[2])),a=await this.hash(M1.stringToBuffer(n),i),l=M1.bufferTob64(a.slice(0,15)),b=await this.hash(a.slice(16,31),1);return new zf(e,l,b)}async hash(e,r){let n=await this.crypto.hash(e);for(let i=0;i<r-1;i++)n=await this.crypto.hash(n);return n}};xs.default=nl;var zf=class{uri;accessKey;encryptionKey;constructor(e,r,n){this.uri=e,this.accessKey=r,this.encryptionKey=n}getUri(){return this.uri}getAccessKey(){return this.accessKey}getEncryptionKey(){return this.encryptionKey}};xs.SiloResource=zf});var _1=V(al=>{"use strict";var $B=A(S());Object.defineProperty(al,"__esModule",{value:!0});var E1=ds(),L6=gn(),il=class{api;constructor(e){this.api=e}async getTransactionOffset(e){let r=await this.api.get(`tx/${e}/offset`);if(r.status===200)return r.data;throw new Error(`Unable to get transaction offset: ${(0,E1.getError)(r)}`)}async getChunk(e){let r=await this.api.get(`chunk/${e}`);if(r.status===200)return r.data;throw new Error(`Unable to get chunk: ${(0,E1.getError)(r)}`)}async getChunkData(e){let r=await this.getChunk(e);return L6.b64UrlToBuffer(r.chunk)}firstChunkOffset(e){return parseInt(e.offset)-parseInt(e.size)+1}async downloadChunkedData(e){let r=await this.getTransactionOffset(e),n=parseInt(r.size),a=parseInt(r.offset)-n+1,l=new Uint8Array(n),b=0;for(;b<n;){this.api.config.logging&&console.log(`[chunk] ${b}/${n}`);let y;try{y=await this.getChunkData(a+b)}catch{console.error(`[chunk] Failed to fetch chunk at offset ${a+b}`),console.error("[chunk] This could indicate that the chunk wasn't uploaded or hasn't yet seeded properly to a particular gateway/node")}if(y)l.set(y,b),b+=y.length;else throw new Error(`Couldn't complete data download at ${b}/${n}`)}return l}};al.default=il});var C1=V(sl=>{"use strict";var tC=A(S());Object.defineProperty(sl,"__esModule",{value:!0});var B1=ds();Xf();var ol=class t{api;network;static HASH_ENDPOINT="block/hash/";static HEIGHT_ENDPOINT="block/height/";constructor(e,r){this.api=e,this.network=r}async get(e){let r=await this.api.get(`${t.HASH_ENDPOINT}${e}`);if(r.status===200)return r.data;throw r.status===404?new B1.default("BLOCK_NOT_FOUND"):new Error(`Error while loading block data: ${r}`)}async getByHeight(e){let r=await this.api.get(`${t.HEIGHT_ENDPOINT}${e}`);if(r.status===200)return r.data;throw r.status===404?new B1.default("BLOCK_NOT_FOUND"):new Error(`Error while loading block data: ${r}`)}async getCurrent(){let{current:e}=await this.network.getInfo();return await this.get(e)}};sl.default=ol});var gs=V(cl=>{"use strict";var nC=A(S());Object.defineProperty(cl,"__esModule",{value:!0});var R6=c1(),F6=u1(),D6=Iu(),I6=l1(),O6=w1(),k6=S1(),P1=vs(),ys=gn(),N6=T1(),J6=_1(),U6=C1(),fl=class t{api;wallets;transactions;network;blocks;ar;silo;chunks;static init;static crypto=new D6.default;static utils=ys;constructor(e){this.api=new F6.default(e),this.wallets=new k6.default(this.api,t.crypto),this.chunks=new J6.default(this.api),this.transactions=new O6.default(this.api,t.crypto,this.chunks),this.silo=new N6.default(this.api,this.crypto,this.transactions),this.network=new I6.default(this.api),this.blocks=new U6.default(this.api,this.network),this.ar=new R6.default}get crypto(){return t.crypto}get utils(){return t.utils}getConfig(){return{api:this.api.getConfig(),crypto:null}}async createTransaction(e,r){let n={};if(Object.assign(n,e),!e.data&&!(e.target&&e.quantity))throw new Error("A new Arweave transaction must have a 'data' value, or 'target' and 'quantity' values.");if(e.owner==null&&r&&r!=="use_wallet"&&(n.owner=r.n),e.last_tx==null&&(n.last_tx=await this.transactions.getTransactionAnchor()),typeof e.data=="string"&&(e.data=ys.stringToBuffer(e.data)),e.data instanceof ArrayBuffer&&(e.data=new Uint8Array(e.data)),e.data&&!(e.data instanceof Uint8Array))throw new Error("Expected data to be a string, Uint8Array or ArrayBuffer");if(e.reward==null){let a=e.data?e.data.byteLength:0;n.reward=await this.transactions.getPrice(a,n.target)}n.data_root="",n.data_size=e.data?e.data.byteLength.toString():"0",n.data=e.data||new Uint8Array(0);let i=new P1.default(n);return await i.getSignatureData(),i}async createSiloTransaction(e,r,n){let i={};if(Object.assign(i,e),!e.data)throw new Error("Silo transactions must have a 'data' value");if(!n)throw new Error("No Silo URI specified.");if(e.target||e.quantity)throw new Error("Silo transactions can only be used for storing data, sending AR to other wallets isn't supported.");if(e.owner==null){if(!r||!r.n)throw new Error("A new Arweave transaction must either have an 'owner' attribute, or you must provide the jwk parameter.");i.owner=r.n}e.last_tx==null&&(i.last_tx=await this.transactions.getTransactionAnchor());let a=await this.silo.parseUri(n);if(typeof e.data=="string"){let b=await this.crypto.encrypt(ys.stringToBuffer(e.data),a.getEncryptionKey());i.reward=await this.transactions.getPrice(b.byteLength),i.data=ys.bufferTob64Url(b)}if(e.data instanceof Uint8Array){let b=await this.crypto.encrypt(e.data,a.getEncryptionKey());i.reward=await this.transactions.getPrice(b.byteLength),i.data=ys.bufferTob64Url(b)}let l=new P1.default(i);return l.addTag("Silo-Name",a.getAccessKey()),l.addTag("Silo-Version","0.1.0"),l}arql(e){return this.api.post("/arql",e).then(r=>r.data||[])}};cl.default=fl});var F1=V(ul=>{"use strict";var aC=A(S());Object.defineProperty(ul,"__esModule",{value:!0});ul.default=L1;var Dr=gs();async function L1(t){if(Array.isArray(t)){let n=Dr.default.utils.concatBuffers([Dr.default.utils.stringToBuffer("list"),Dr.default.utils.stringToBuffer(t.length.toString())]);return await R1(t,await Dr.default.crypto.hash(n,"SHA-384"))}let e=Dr.default.utils.concatBuffers([Dr.default.utils.stringToBuffer("blob"),Dr.default.utils.stringToBuffer(t.byteLength.toString())]),r=Dr.default.utils.concatBuffers([await Dr.default.crypto.hash(e,"SHA-384"),await Dr.default.crypto.hash(t,"SHA-384")]);return await Dr.default.crypto.hash(r,"SHA-384")}async function R1(t,e){if(t.length<1)return e;let r=Dr.default.utils.concatBuffers([e,await L1(t[0])]),n=await Dr.default.crypto.hash(r,"SHA-384");return await R1(t.slice(1),n)}});var vs=V(As=>{"use strict";var sC=A(S());Object.defineProperty(As,"__esModule",{value:!0});As.Tag=void 0;var kt=gn(),H6=F1(),q6=Vu(),Kf=class{get(e,r){if(!Object.getOwnPropertyNames(this).includes(e))throw new Error(`Field "${e}" is not a property of the Arweave Transaction class.`);if(this[e]instanceof Uint8Array)return r&&r.decode&&r.string?kt.bufferToString(this[e]):r&&r.decode&&!r.string?this[e]:kt.bufferTob64Url(this[e]);if(this[e]instanceof Array){if(r?.decode!==void 0||r?.string!==void 0)throw e==="tags"&&console.warn(`Did you mean to use 'transaction["tags"]' ?`),new Error("Cannot decode or stringify an array.");return this[e]}return r&&r.decode==!0?r&&r.string?kt.b64UrlToString(this[e]):kt.b64UrlToBuffer(this[e]):this[e]}},ws=class extends Kf{name;value;constructor(e,r,n=!1){super(),this.name=e,this.value=r}};As.Tag=ws;var ll=class extends Kf{format=2;id="";last_tx="";owner="";tags=[];target="";quantity="0";data_size="0";data=new Uint8Array;data_root="";reward="0";signature="";chunks;constructor(e={}){super(),Object.assign(this,e),typeof this.data=="string"&&(this.data=kt.b64UrlToBuffer(this.data)),e.tags&&(this.tags=e.tags.map(r=>new ws(r.name,r.value)))}addTag(e,r){this.tags.push(new ws(kt.stringToB64Url(e),kt.stringToB64Url(r)))}toJSON(){return{format:this.format,id:this.id,last_tx:this.last_tx,owner:this.owner,tags:this.tags,target:this.target,quantity:this.quantity,data:kt.bufferTob64Url(this.data),data_size:this.data_size,data_root:this.data_root,data_tree:this.data_tree,reward:this.reward,signature:this.signature}}setOwner(e){this.owner=e}setSignature({id:e,owner:r,reward:n,tags:i,signature:a}){this.id=e,this.owner=r,n&&(this.reward=n),i&&(this.tags=i),this.signature=a}async prepareChunks(e){!this.chunks&&e.byteLength>0&&(this.chunks=await(0,q6.generateTransactionChunks)(e),this.data_root=kt.bufferTob64Url(this.chunks.data_root)),!this.chunks&&e.byteLength===0&&(this.chunks={chunks:[],data_root:new Uint8Array,proofs:[]},this.data_root="")}getChunk(e,r){if(!this.chunks)throw new Error("Chunks have not been prepared");let n=this.chunks.proofs[e],i=this.chunks.chunks[e];return{data_root:this.data_root,data_size:this.data_size,data_path:kt.bufferTob64Url(n.proof),offset:n.offset.toString(),chunk:kt.bufferTob64Url(r.slice(i.minByteRange,i.maxByteRange))}}async getSignatureData(){switch(this.format){case 1:let e=this.tags.reduce((n,i)=>kt.concatBuffers([n,i.get("name",{decode:!0,string:!1}),i.get("value",{decode:!0,string:!1})]),new Uint8Array);return kt.concatBuffers([this.get("owner",{decode:!0,string:!1}),this.get("target",{decode:!0,string:!1}),this.get("data",{decode:!0,string:!1}),kt.stringToBuffer(this.quantity),kt.stringToBuffer(this.reward),this.get("last_tx",{decode:!0,string:!1}),e]);case 2:this.data_root||await this.prepareChunks(this.data);let r=this.tags.map(n=>[n.get("name",{decode:!0,string:!1}),n.get("value",{decode:!0,string:!1})]);return await(0,H6.default)([kt.stringToBuffer(this.format.toString()),this.get("owner",{decode:!0,string:!1}),this.get("target",{decode:!0,string:!1}),kt.stringToBuffer(this.quantity),kt.stringToBuffer(this.reward),this.get("last_tx",{decode:!0,string:!1}),r,kt.stringToBuffer(this.data_size),this.get("data_root",{decode:!0,string:!1})]);default:throw new Error(`Unexpected transaction format: ${this.format}`)}}};As.default=ll});var D1=V(Zf=>{"use strict";var cC=A(S());Object.defineProperty(Zf,"__esModule",{value:!0});Zf.getDefaultConfig=void 0;var G6=(t,e)=>{let r=/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,n=e.split("."),i=n[n.length-1],a=["localhost","[::1]"];return a.includes(e)||t=="file"||a.includes(i)||!!e.match(r)||!!i.match(r)},X6=t=>{let e=t.charAt(0)==="[",r=/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;return!!t.match(r)||e},z6=(t,e)=>{if(G6(t,e))return{protocol:"https",host:"arweave.net",port:443};if(!X6(e)){let r=e.split(".");if(r.length>=3){r.shift();let n=r.join(".");return{protocol:t,host:n}}}return{protocol:t,host:e}};Zf.getDefaultConfig=z6});var I1=V(Di=>{"use strict";var lC=A(S()),K6=Di&&Di.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Z6=Di&&Di.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&K6(e,t,r)};Object.defineProperty(Di,"__esModule",{value:!0});var no=gs(),V6=D1();no.default.init=function(t={}){let e={host:"arweave.net",port:443,protocol:"https"};if(typeof location!="object"||!location.protocol||!location.hostname)return new no.default({...t,...e});let r=location.protocol.replace(":",""),n=location.hostname,i=location.port?parseInt(location.port):r=="https"?443:80,a=(0,V6.getDefaultConfig)(r,n),l=t.protocol||a.protocol,b=t.host||a.host,y=t.port||a.port||i;return new no.default({...t,host:b,protocol:l,port:y})};typeof globalThis=="object"?globalThis.Arweave=no.default:typeof self=="object"&&(self.Arweave=no.default);Z6(gs(),Di);Di.default=no.default});var hl=V((J1,dl)=>{var yC=A(S());(function(t,e){"use strict";function r(T,s){if(!T)throw new Error(s||"Assertion failed")}function n(T,s){T.super_=s;var u=function(){};u.prototype=s.prototype,T.prototype=new u,T.prototype.constructor=T}function i(T,s,u){if(i.isBN(T))return T;this.negative=0,this.words=null,this.length=0,this.red=null,T!==null&&((s==="le"||s==="be")&&(u=s,s=10),this._init(T||0,s||10,u||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=it("buffer").Buffer}catch{}i.isBN=function(s){return s instanceof i?!0:s!==null&&typeof s=="object"&&s.constructor.wordSize===i.wordSize&&Array.isArray(s.words)},i.max=function(s,u){return s.cmp(u)>0?s:u},i.min=function(s,u){return s.cmp(u)<0?s:u},i.prototype._init=function(s,u,d){if(typeof s=="number")return this._initNumber(s,u,d);if(typeof s=="object")return this._initArray(s,u,d);u==="hex"&&(u=16),r(u===(u|0)&&u>=2&&u<=36),s=s.toString().replace(/\s+/g,"");var f=0;s[0]==="-"&&(f++,this.negative=1),f<s.length&&(u===16?this._parseHex(s,f,d):(this._parseBase(s,u,f),d==="le"&&this._initArray(this.toArray(),u,d)))},i.prototype._initNumber=function(s,u,d){s<0&&(this.negative=1,s=-s),s<67108864?(this.words=[s&67108863],this.length=1):s<4503599627370496?(this.words=[s&67108863,s/67108864&67108863],this.length=2):(r(s<9007199254740992),this.words=[s&67108863,s/67108864&67108863,1],this.length=3),d==="le"&&this._initArray(this.toArray(),u,d)},i.prototype._initArray=function(s,u,d){if(r(typeof s.length=="number"),s.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(s.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var c,v,m=0;if(d==="be")for(f=s.length-1,c=0;f>=0;f-=3)v=s[f]|s[f-1]<<8|s[f-2]<<16,this.words[c]|=v<<m&67108863,this.words[c+1]=v>>>26-m&67108863,m+=24,m>=26&&(m-=26,c++);else if(d==="le")for(f=0,c=0;f<s.length;f+=3)v=s[f]|s[f+1]<<8|s[f+2]<<16,this.words[c]|=v<<m&67108863,this.words[c+1]=v>>>26-m&67108863,m+=24,m>=26&&(m-=26,c++);return this.strip()};function l(T,s){var u=T.charCodeAt(s);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function b(T,s,u){var d=l(T,u);return u-1>=s&&(d|=l(T,u-1)<<4),d}i.prototype._parseHex=function(s,u,d){this.length=Math.ceil((s.length-u)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var c=0,v=0,m;if(d==="be")for(f=s.length-1;f>=u;f-=2)m=b(s,u,f)<<c,this.words[v]|=m&67108863,c>=18?(c-=18,v+=1,this.words[v]|=m>>>26):c+=8;else{var h=s.length-u;for(f=h%2===0?u+1:u;f<s.length;f+=2)m=b(s,u,f)<<c,this.words[v]|=m&67108863,c>=18?(c-=18,v+=1,this.words[v]|=m>>>26):c+=8}this.strip()};function y(T,s,u,d){for(var f=0,c=Math.min(T.length,u),v=s;v<c;v++){var m=T.charCodeAt(v)-48;f*=d,m>=49?f+=m-49+10:m>=17?f+=m-17+10:f+=m}return f}i.prototype._parseBase=function(s,u,d){this.words=[0],this.length=1;for(var f=0,c=1;c<=67108863;c*=u)f++;f--,c=c/u|0;for(var v=s.length-d,m=v%f,h=Math.min(v,v-m)+d,o=0,p=d;p<h;p+=f)o=y(s,p,p+f,u),this.imuln(c),this.words[0]+o<67108864?this.words[0]+=o:this._iaddn(o);if(m!==0){var E=1;for(o=y(s,p,s.length,u),p=0;p<m;p++)E*=u;this.imuln(E),this.words[0]+o<67108864?this.words[0]+=o:this._iaddn(o)}this.strip()},i.prototype.copy=function(s){s.words=new Array(this.length);for(var u=0;u<this.length;u++)s.words[u]=this.words[u];s.length=this.length,s.negative=this.negative,s.red=this.red},i.prototype.clone=function(){var s=new i(null);return this.copy(s),s},i.prototype._expand=function(s){for(;this.length<s;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],_=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(s,u){s=s||10,u=u|0||1;var d;if(s===16||s==="hex"){d="";for(var f=0,c=0,v=0;v<this.length;v++){var m=this.words[v],h=((m<<f|c)&16777215).toString(16);c=m>>>24-f&16777215,f+=2,f>=26&&(f-=26,v--),c!==0||v!==this.length-1?d=x[6-h.length]+h+d:d=h+d}for(c!==0&&(d=c.toString(16)+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(s===(s|0)&&s>=2&&s<=36){var o=_[s],p=C[s];d="";var E=this.clone();for(E.negative=0;!E.isZero();){var g=E.modn(p).toString(s);E=E.idivn(p),E.isZero()?d=g+d:d=x[o-g.length]+g+d}for(this.isZero()&&(d="0"+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var s=this.words[0];return this.length===2?s+=this.words[1]*67108864:this.length===3&&this.words[2]===1?s+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-s:s},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(s,u){return r(typeof a<"u"),this.toArrayLike(a,s,u)},i.prototype.toArray=function(s,u){return this.toArrayLike(Array,s,u)},i.prototype.toArrayLike=function(s,u,d){var f=this.byteLength(),c=d||Math.max(1,f);r(f<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0"),this.strip();var v=u==="le",m=new s(c),h,o,p=this.clone();if(v){for(o=0;!p.isZero();o++)h=p.andln(255),p.iushrn(8),m[o]=h;for(;o<c;o++)m[o]=0}else{for(o=0;o<c-f;o++)m[o]=0;for(o=0;!p.isZero();o++)h=p.andln(255),p.iushrn(8),m[c-o-1]=h}return m},Math.clz32?i.prototype._countBits=function(s){return 32-Math.clz32(s)}:i.prototype._countBits=function(s){var u=s,d=0;return u>=4096&&(d+=13,u>>>=13),u>=64&&(d+=7,u>>>=7),u>=8&&(d+=4,u>>>=4),u>=2&&(d+=2,u>>>=2),d+u},i.prototype._zeroBits=function(s){if(s===0)return 26;var u=s,d=0;return u&8191||(d+=13,u>>>=13),u&127||(d+=7,u>>>=7),u&15||(d+=4,u>>>=4),u&3||(d+=2,u>>>=2),u&1||d++,d},i.prototype.bitLength=function(){var s=this.words[this.length-1],u=this._countBits(s);return(this.length-1)*26+u};function D(T){for(var s=new Array(T.bitLength()),u=0;u<s.length;u++){var d=u/26|0,f=u%26;s[u]=(T.words[d]&1<<f)>>>f}return s}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var s=0,u=0;u<this.length;u++){var d=this._zeroBits(this.words[u]);if(s+=d,d!==26)break}return s},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(s){return this.negative!==0?this.abs().inotn(s).iaddn(1):this.clone()},i.prototype.fromTwos=function(s){return this.testn(s-1)?this.notn(s).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(s){for(;this.length<s.length;)this.words[this.length++]=0;for(var u=0;u<s.length;u++)this.words[u]=this.words[u]|s.words[u];return this.strip()},i.prototype.ior=function(s){return r((this.negative|s.negative)===0),this.iuor(s)},i.prototype.or=function(s){return this.length>s.length?this.clone().ior(s):s.clone().ior(this)},i.prototype.uor=function(s){return this.length>s.length?this.clone().iuor(s):s.clone().iuor(this)},i.prototype.iuand=function(s){var u;this.length>s.length?u=s:u=this;for(var d=0;d<u.length;d++)this.words[d]=this.words[d]&s.words[d];return this.length=u.length,this.strip()},i.prototype.iand=function(s){return r((this.negative|s.negative)===0),this.iuand(s)},i.prototype.and=function(s){return this.length>s.length?this.clone().iand(s):s.clone().iand(this)},i.prototype.uand=function(s){return this.length>s.length?this.clone().iuand(s):s.clone().iuand(this)},i.prototype.iuxor=function(s){var u,d;this.length>s.length?(u=this,d=s):(u=s,d=this);for(var f=0;f<d.length;f++)this.words[f]=u.words[f]^d.words[f];if(this!==u)for(;f<u.length;f++)this.words[f]=u.words[f];return this.length=u.length,this.strip()},i.prototype.ixor=function(s){return r((this.negative|s.negative)===0),this.iuxor(s)},i.prototype.xor=function(s){return this.length>s.length?this.clone().ixor(s):s.clone().ixor(this)},i.prototype.uxor=function(s){return this.length>s.length?this.clone().iuxor(s):s.clone().iuxor(this)},i.prototype.inotn=function(s){r(typeof s=="number"&&s>=0);var u=Math.ceil(s/26)|0,d=s%26;this._expand(u),d>0&&u--;for(var f=0;f<u;f++)this.words[f]=~this.words[f]&67108863;return d>0&&(this.words[f]=~this.words[f]&67108863>>26-d),this.strip()},i.prototype.notn=function(s){return this.clone().inotn(s)},i.prototype.setn=function(s,u){r(typeof s=="number"&&s>=0);var d=s/26|0,f=s%26;return this._expand(d+1),u?this.words[d]=this.words[d]|1<<f:this.words[d]=this.words[d]&~(1<<f),this.strip()},i.prototype.iadd=function(s){var u;if(this.negative!==0&&s.negative===0)return this.negative=0,u=this.isub(s),this.negative^=1,this._normSign();if(this.negative===0&&s.negative!==0)return s.negative=0,u=this.isub(s),s.negative=1,u._normSign();var d,f;this.length>s.length?(d=this,f=s):(d=s,f=this);for(var c=0,v=0;v<f.length;v++)u=(d.words[v]|0)+(f.words[v]|0)+c,this.words[v]=u&67108863,c=u>>>26;for(;c!==0&&v<d.length;v++)u=(d.words[v]|0)+c,this.words[v]=u&67108863,c=u>>>26;if(this.length=d.length,c!==0)this.words[this.length]=c,this.length++;else if(d!==this)for(;v<d.length;v++)this.words[v]=d.words[v];return this},i.prototype.add=function(s){var u;return s.negative!==0&&this.negative===0?(s.negative=0,u=this.sub(s),s.negative^=1,u):s.negative===0&&this.negative!==0?(this.negative=0,u=s.sub(this),this.negative=1,u):this.length>s.length?this.clone().iadd(s):s.clone().iadd(this)},i.prototype.isub=function(s){if(s.negative!==0){s.negative=0;var u=this.iadd(s);return s.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(s),this.negative=1,this._normSign();var d=this.cmp(s);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,c;d>0?(f=this,c=s):(f=s,c=this);for(var v=0,m=0;m<c.length;m++)u=(f.words[m]|0)-(c.words[m]|0)+v,v=u>>26,this.words[m]=u&67108863;for(;v!==0&&m<f.length;m++)u=(f.words[m]|0)+v,v=u>>26,this.words[m]=u&67108863;if(v===0&&m<f.length&&f!==this)for(;m<f.length;m++)this.words[m]=f.words[m];return this.length=Math.max(this.length,m),f!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(s){return this.clone().isub(s)};function F(T,s,u){u.negative=s.negative^T.negative;var d=T.length+s.length|0;u.length=d,d=d-1|0;var f=T.words[0]|0,c=s.words[0]|0,v=f*c,m=v&67108863,h=v/67108864|0;u.words[0]=m;for(var o=1;o<d;o++){for(var p=h>>>26,E=h&67108863,g=Math.min(o,s.length-1),w=Math.max(0,o-T.length+1);w<=g;w++){var U=o-w|0;f=T.words[U]|0,c=s.words[w]|0,v=f*c+E,p+=v/67108864|0,E=v&67108863}u.words[o]=E|0,h=p|0}return h!==0?u.words[o]=h|0:u.length--,u.strip()}var P=function(s,u,d){var f=s.words,c=u.words,v=d.words,m=0,h,o,p,E=f[0]|0,g=E&8191,w=E>>>13,U=f[1]|0,M=U&8191,k=U>>>13,G=f[2]|0,Z=G&8191,B=G>>>13,R=f[3]|0,L=R&8191,I=R>>>13,q=f[4]|0,O=q&8191,J=q>>>13,K=f[5]|0,N=K&8191,H=K>>>13,Q=f[6]|0,j=Q&8191,re=Q>>>13,De=f[7]|0,se=De&8191,le=De>>>13,Ue=f[8]|0,oe=Ue&8191,fe=Ue>>>13,Xe=f[9]|0,ge=Xe&8191,ve=Xe>>>13,mt=c[0]|0,pe=mt&8191,be=mt>>>13,Ye=c[1]|0,de=Ye&8191,ue=Ye>>>13,Zt=c[2]|0,me=Zt&8191,xe=Zt>>>13,Vt=c[3]|0,ye=Vt&8191,we=Vt>>>13,jt=c[4]|0,Ae=jt&8191,Se=jt>>>13,Qt=c[5]|0,Me=Qt&8191,Te=Qt>>>13,Wt=c[6]|0,Ee=Wt&8191,_e=Wt>>>13,Yt=c[7]|0,Be=Yt&8191,Ce=Yt>>>13,$t=c[8]|0,Pe=$t&8191,Le=$t>>>13,er=c[9]|0,Re=er&8191,Fe=er>>>13;d.negative=s.negative^u.negative,d.length=19,h=Math.imul(g,pe),o=Math.imul(g,be),o=o+Math.imul(w,pe)|0,p=Math.imul(w,be);var It=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(It>>>26)|0,It&=67108863,h=Math.imul(M,pe),o=Math.imul(M,be),o=o+Math.imul(k,pe)|0,p=Math.imul(k,be),h=h+Math.imul(g,de)|0,o=o+Math.imul(g,ue)|0,o=o+Math.imul(w,de)|0,p=p+Math.imul(w,ue)|0;var ke=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,h=Math.imul(Z,pe),o=Math.imul(Z,be),o=o+Math.imul(B,pe)|0,p=Math.imul(B,be),h=h+Math.imul(M,de)|0,o=o+Math.imul(M,ue)|0,o=o+Math.imul(k,de)|0,p=p+Math.imul(k,ue)|0,h=h+Math.imul(g,me)|0,o=o+Math.imul(g,xe)|0,o=o+Math.imul(w,me)|0,p=p+Math.imul(w,xe)|0;var Ne=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,h=Math.imul(L,pe),o=Math.imul(L,be),o=o+Math.imul(I,pe)|0,p=Math.imul(I,be),h=h+Math.imul(Z,de)|0,o=o+Math.imul(Z,ue)|0,o=o+Math.imul(B,de)|0,p=p+Math.imul(B,ue)|0,h=h+Math.imul(M,me)|0,o=o+Math.imul(M,xe)|0,o=o+Math.imul(k,me)|0,p=p+Math.imul(k,xe)|0,h=h+Math.imul(g,ye)|0,o=o+Math.imul(g,we)|0,o=o+Math.imul(w,ye)|0,p=p+Math.imul(w,we)|0;var Tt=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,h=Math.imul(O,pe),o=Math.imul(O,be),o=o+Math.imul(J,pe)|0,p=Math.imul(J,be),h=h+Math.imul(L,de)|0,o=o+Math.imul(L,ue)|0,o=o+Math.imul(I,de)|0,p=p+Math.imul(I,ue)|0,h=h+Math.imul(Z,me)|0,o=o+Math.imul(Z,xe)|0,o=o+Math.imul(B,me)|0,p=p+Math.imul(B,xe)|0,h=h+Math.imul(M,ye)|0,o=o+Math.imul(M,we)|0,o=o+Math.imul(k,ye)|0,p=p+Math.imul(k,we)|0,h=h+Math.imul(g,Ae)|0,o=o+Math.imul(g,Se)|0,o=o+Math.imul(w,Ae)|0,p=p+Math.imul(w,Se)|0;var Et=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,h=Math.imul(N,pe),o=Math.imul(N,be),o=o+Math.imul(H,pe)|0,p=Math.imul(H,be),h=h+Math.imul(O,de)|0,o=o+Math.imul(O,ue)|0,o=o+Math.imul(J,de)|0,p=p+Math.imul(J,ue)|0,h=h+Math.imul(L,me)|0,o=o+Math.imul(L,xe)|0,o=o+Math.imul(I,me)|0,p=p+Math.imul(I,xe)|0,h=h+Math.imul(Z,ye)|0,o=o+Math.imul(Z,we)|0,o=o+Math.imul(B,ye)|0,p=p+Math.imul(B,we)|0,h=h+Math.imul(M,Ae)|0,o=o+Math.imul(M,Se)|0,o=o+Math.imul(k,Ae)|0,p=p+Math.imul(k,Se)|0,h=h+Math.imul(g,Me)|0,o=o+Math.imul(g,Te)|0,o=o+Math.imul(w,Me)|0,p=p+Math.imul(w,Te)|0;var _t=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,h=Math.imul(j,pe),o=Math.imul(j,be),o=o+Math.imul(re,pe)|0,p=Math.imul(re,be),h=h+Math.imul(N,de)|0,o=o+Math.imul(N,ue)|0,o=o+Math.imul(H,de)|0,p=p+Math.imul(H,ue)|0,h=h+Math.imul(O,me)|0,o=o+Math.imul(O,xe)|0,o=o+Math.imul(J,me)|0,p=p+Math.imul(J,xe)|0,h=h+Math.imul(L,ye)|0,o=o+Math.imul(L,we)|0,o=o+Math.imul(I,ye)|0,p=p+Math.imul(I,we)|0,h=h+Math.imul(Z,Ae)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(B,Ae)|0,p=p+Math.imul(B,Se)|0,h=h+Math.imul(M,Me)|0,o=o+Math.imul(M,Te)|0,o=o+Math.imul(k,Me)|0,p=p+Math.imul(k,Te)|0,h=h+Math.imul(g,Ee)|0,o=o+Math.imul(g,_e)|0,o=o+Math.imul(w,Ee)|0,p=p+Math.imul(w,_e)|0;var Bt=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,h=Math.imul(se,pe),o=Math.imul(se,be),o=o+Math.imul(le,pe)|0,p=Math.imul(le,be),h=h+Math.imul(j,de)|0,o=o+Math.imul(j,ue)|0,o=o+Math.imul(re,de)|0,p=p+Math.imul(re,ue)|0,h=h+Math.imul(N,me)|0,o=o+Math.imul(N,xe)|0,o=o+Math.imul(H,me)|0,p=p+Math.imul(H,xe)|0,h=h+Math.imul(O,ye)|0,o=o+Math.imul(O,we)|0,o=o+Math.imul(J,ye)|0,p=p+Math.imul(J,we)|0,h=h+Math.imul(L,Ae)|0,o=o+Math.imul(L,Se)|0,o=o+Math.imul(I,Ae)|0,p=p+Math.imul(I,Se)|0,h=h+Math.imul(Z,Me)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(B,Me)|0,p=p+Math.imul(B,Te)|0,h=h+Math.imul(M,Ee)|0,o=o+Math.imul(M,_e)|0,o=o+Math.imul(k,Ee)|0,p=p+Math.imul(k,_e)|0,h=h+Math.imul(g,Be)|0,o=o+Math.imul(g,Ce)|0,o=o+Math.imul(w,Be)|0,p=p+Math.imul(w,Ce)|0;var Ct=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,h=Math.imul(oe,pe),o=Math.imul(oe,be),o=o+Math.imul(fe,pe)|0,p=Math.imul(fe,be),h=h+Math.imul(se,de)|0,o=o+Math.imul(se,ue)|0,o=o+Math.imul(le,de)|0,p=p+Math.imul(le,ue)|0,h=h+Math.imul(j,me)|0,o=o+Math.imul(j,xe)|0,o=o+Math.imul(re,me)|0,p=p+Math.imul(re,xe)|0,h=h+Math.imul(N,ye)|0,o=o+Math.imul(N,we)|0,o=o+Math.imul(H,ye)|0,p=p+Math.imul(H,we)|0,h=h+Math.imul(O,Ae)|0,o=o+Math.imul(O,Se)|0,o=o+Math.imul(J,Ae)|0,p=p+Math.imul(J,Se)|0,h=h+Math.imul(L,Me)|0,o=o+Math.imul(L,Te)|0,o=o+Math.imul(I,Me)|0,p=p+Math.imul(I,Te)|0,h=h+Math.imul(Z,Ee)|0,o=o+Math.imul(Z,_e)|0,o=o+Math.imul(B,Ee)|0,p=p+Math.imul(B,_e)|0,h=h+Math.imul(M,Be)|0,o=o+Math.imul(M,Ce)|0,o=o+Math.imul(k,Be)|0,p=p+Math.imul(k,Ce)|0,h=h+Math.imul(g,Pe)|0,o=o+Math.imul(g,Le)|0,o=o+Math.imul(w,Pe)|0,p=p+Math.imul(w,Le)|0;var gr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(gr>>>26)|0,gr&=67108863,h=Math.imul(ge,pe),o=Math.imul(ge,be),o=o+Math.imul(ve,pe)|0,p=Math.imul(ve,be),h=h+Math.imul(oe,de)|0,o=o+Math.imul(oe,ue)|0,o=o+Math.imul(fe,de)|0,p=p+Math.imul(fe,ue)|0,h=h+Math.imul(se,me)|0,o=o+Math.imul(se,xe)|0,o=o+Math.imul(le,me)|0,p=p+Math.imul(le,xe)|0,h=h+Math.imul(j,ye)|0,o=o+Math.imul(j,we)|0,o=o+Math.imul(re,ye)|0,p=p+Math.imul(re,we)|0,h=h+Math.imul(N,Ae)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul(H,Ae)|0,p=p+Math.imul(H,Se)|0,h=h+Math.imul(O,Me)|0,o=o+Math.imul(O,Te)|0,o=o+Math.imul(J,Me)|0,p=p+Math.imul(J,Te)|0,h=h+Math.imul(L,Ee)|0,o=o+Math.imul(L,_e)|0,o=o+Math.imul(I,Ee)|0,p=p+Math.imul(I,_e)|0,h=h+Math.imul(Z,Be)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(B,Be)|0,p=p+Math.imul(B,Ce)|0,h=h+Math.imul(M,Pe)|0,o=o+Math.imul(M,Le)|0,o=o+Math.imul(k,Pe)|0,p=p+Math.imul(k,Le)|0,h=h+Math.imul(g,Re)|0,o=o+Math.imul(g,Fe)|0,o=o+Math.imul(w,Re)|0,p=p+Math.imul(w,Fe)|0;var vr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(vr>>>26)|0,vr&=67108863,h=Math.imul(ge,de),o=Math.imul(ge,ue),o=o+Math.imul(ve,de)|0,p=Math.imul(ve,ue),h=h+Math.imul(oe,me)|0,o=o+Math.imul(oe,xe)|0,o=o+Math.imul(fe,me)|0,p=p+Math.imul(fe,xe)|0,h=h+Math.imul(se,ye)|0,o=o+Math.imul(se,we)|0,o=o+Math.imul(le,ye)|0,p=p+Math.imul(le,we)|0,h=h+Math.imul(j,Ae)|0,o=o+Math.imul(j,Se)|0,o=o+Math.imul(re,Ae)|0,p=p+Math.imul(re,Se)|0,h=h+Math.imul(N,Me)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul(H,Me)|0,p=p+Math.imul(H,Te)|0,h=h+Math.imul(O,Ee)|0,o=o+Math.imul(O,_e)|0,o=o+Math.imul(J,Ee)|0,p=p+Math.imul(J,_e)|0,h=h+Math.imul(L,Be)|0,o=o+Math.imul(L,Ce)|0,o=o+Math.imul(I,Be)|0,p=p+Math.imul(I,Ce)|0,h=h+Math.imul(Z,Pe)|0,o=o+Math.imul(Z,Le)|0,o=o+Math.imul(B,Pe)|0,p=p+Math.imul(B,Le)|0,h=h+Math.imul(M,Re)|0,o=o+Math.imul(M,Fe)|0,o=o+Math.imul(k,Re)|0,p=p+Math.imul(k,Fe)|0;var mr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(mr>>>26)|0,mr&=67108863,h=Math.imul(ge,me),o=Math.imul(ge,xe),o=o+Math.imul(ve,me)|0,p=Math.imul(ve,xe),h=h+Math.imul(oe,ye)|0,o=o+Math.imul(oe,we)|0,o=o+Math.imul(fe,ye)|0,p=p+Math.imul(fe,we)|0,h=h+Math.imul(se,Ae)|0,o=o+Math.imul(se,Se)|0,o=o+Math.imul(le,Ae)|0,p=p+Math.imul(le,Se)|0,h=h+Math.imul(j,Me)|0,o=o+Math.imul(j,Te)|0,o=o+Math.imul(re,Me)|0,p=p+Math.imul(re,Te)|0,h=h+Math.imul(N,Ee)|0,o=o+Math.imul(N,_e)|0,o=o+Math.imul(H,Ee)|0,p=p+Math.imul(H,_e)|0,h=h+Math.imul(O,Be)|0,o=o+Math.imul(O,Ce)|0,o=o+Math.imul(J,Be)|0,p=p+Math.imul(J,Ce)|0,h=h+Math.imul(L,Pe)|0,o=o+Math.imul(L,Le)|0,o=o+Math.imul(I,Pe)|0,p=p+Math.imul(I,Le)|0,h=h+Math.imul(Z,Re)|0,o=o+Math.imul(Z,Fe)|0,o=o+Math.imul(B,Re)|0,p=p+Math.imul(B,Fe)|0;var xr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(xr>>>26)|0,xr&=67108863,h=Math.imul(ge,ye),o=Math.imul(ge,we),o=o+Math.imul(ve,ye)|0,p=Math.imul(ve,we),h=h+Math.imul(oe,Ae)|0,o=o+Math.imul(oe,Se)|0,o=o+Math.imul(fe,Ae)|0,p=p+Math.imul(fe,Se)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(se,Te)|0,o=o+Math.imul(le,Me)|0,p=p+Math.imul(le,Te)|0,h=h+Math.imul(j,Ee)|0,o=o+Math.imul(j,_e)|0,o=o+Math.imul(re,Ee)|0,p=p+Math.imul(re,_e)|0,h=h+Math.imul(N,Be)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul(H,Be)|0,p=p+Math.imul(H,Ce)|0,h=h+Math.imul(O,Pe)|0,o=o+Math.imul(O,Le)|0,o=o+Math.imul(J,Pe)|0,p=p+Math.imul(J,Le)|0,h=h+Math.imul(L,Re)|0,o=o+Math.imul(L,Fe)|0,o=o+Math.imul(I,Re)|0,p=p+Math.imul(I,Fe)|0;var yr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(yr>>>26)|0,yr&=67108863,h=Math.imul(ge,Ae),o=Math.imul(ge,Se),o=o+Math.imul(ve,Ae)|0,p=Math.imul(ve,Se),h=h+Math.imul(oe,Me)|0,o=o+Math.imul(oe,Te)|0,o=o+Math.imul(fe,Me)|0,p=p+Math.imul(fe,Te)|0,h=h+Math.imul(se,Ee)|0,o=o+Math.imul(se,_e)|0,o=o+Math.imul(le,Ee)|0,p=p+Math.imul(le,_e)|0,h=h+Math.imul(j,Be)|0,o=o+Math.imul(j,Ce)|0,o=o+Math.imul(re,Be)|0,p=p+Math.imul(re,Ce)|0,h=h+Math.imul(N,Pe)|0,o=o+Math.imul(N,Le)|0,o=o+Math.imul(H,Pe)|0,p=p+Math.imul(H,Le)|0,h=h+Math.imul(O,Re)|0,o=o+Math.imul(O,Fe)|0,o=o+Math.imul(J,Re)|0,p=p+Math.imul(J,Fe)|0;var wr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(wr>>>26)|0,wr&=67108863,h=Math.imul(ge,Me),o=Math.imul(ge,Te),o=o+Math.imul(ve,Me)|0,p=Math.imul(ve,Te),h=h+Math.imul(oe,Ee)|0,o=o+Math.imul(oe,_e)|0,o=o+Math.imul(fe,Ee)|0,p=p+Math.imul(fe,_e)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(se,Ce)|0,o=o+Math.imul(le,Be)|0,p=p+Math.imul(le,Ce)|0,h=h+Math.imul(j,Pe)|0,o=o+Math.imul(j,Le)|0,o=o+Math.imul(re,Pe)|0,p=p+Math.imul(re,Le)|0,h=h+Math.imul(N,Re)|0,o=o+Math.imul(N,Fe)|0,o=o+Math.imul(H,Re)|0,p=p+Math.imul(H,Fe)|0;var Ar=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,h=Math.imul(ge,Ee),o=Math.imul(ge,_e),o=o+Math.imul(ve,Ee)|0,p=Math.imul(ve,_e),h=h+Math.imul(oe,Be)|0,o=o+Math.imul(oe,Ce)|0,o=o+Math.imul(fe,Be)|0,p=p+Math.imul(fe,Ce)|0,h=h+Math.imul(se,Pe)|0,o=o+Math.imul(se,Le)|0,o=o+Math.imul(le,Pe)|0,p=p+Math.imul(le,Le)|0,h=h+Math.imul(j,Re)|0,o=o+Math.imul(j,Fe)|0,o=o+Math.imul(re,Re)|0,p=p+Math.imul(re,Fe)|0;var Sr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,h=Math.imul(ge,Be),o=Math.imul(ge,Ce),o=o+Math.imul(ve,Be)|0,p=Math.imul(ve,Ce),h=h+Math.imul(oe,Pe)|0,o=o+Math.imul(oe,Le)|0,o=o+Math.imul(fe,Pe)|0,p=p+Math.imul(fe,Le)|0,h=h+Math.imul(se,Re)|0,o=o+Math.imul(se,Fe)|0,o=o+Math.imul(le,Re)|0,p=p+Math.imul(le,Fe)|0;var Mr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,h=Math.imul(ge,Pe),o=Math.imul(ge,Le),o=o+Math.imul(ve,Pe)|0,p=Math.imul(ve,Le),h=h+Math.imul(oe,Re)|0,o=o+Math.imul(oe,Fe)|0,o=o+Math.imul(fe,Re)|0,p=p+Math.imul(fe,Fe)|0;var pn=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(pn>>>26)|0,pn&=67108863,h=Math.imul(ge,Re),o=Math.imul(ge,Fe),o=o+Math.imul(ve,Re)|0,p=Math.imul(ve,Fe);var bn=(m+h|0)+((o&8191)<<13)|0;return m=(p+(o>>>13)|0)+(bn>>>26)|0,bn&=67108863,v[0]=It,v[1]=ke,v[2]=Ne,v[3]=Tt,v[4]=Et,v[5]=_t,v[6]=Bt,v[7]=Ct,v[8]=gr,v[9]=vr,v[10]=mr,v[11]=xr,v[12]=yr,v[13]=wr,v[14]=Ar,v[15]=Sr,v[16]=Mr,v[17]=pn,v[18]=bn,m!==0&&(v[19]=m,d.length++),d};Math.imul||(P=F);function z(T,s,u){u.negative=s.negative^T.negative,u.length=T.length+s.length;for(var d=0,f=0,c=0;c<u.length-1;c++){var v=f;f=0;for(var m=d&67108863,h=Math.min(c,s.length-1),o=Math.max(0,c-T.length+1);o<=h;o++){var p=c-o,E=T.words[p]|0,g=s.words[o]|0,w=E*g,U=w&67108863;v=v+(w/67108864|0)|0,U=U+m|0,m=U&67108863,v=v+(U>>>26)|0,f+=v>>>26,v&=67108863}u.words[c]=m,d=v,v=f}return d!==0?u.words[c]=d:u.length--,u.strip()}function W(T,s,u){var d=new X;return d.mulp(T,s,u)}i.prototype.mulTo=function(s,u){var d,f=this.length+s.length;return this.length===10&&s.length===10?d=P(this,s,u):f<63?d=F(this,s,u):f<1024?d=z(this,s,u):d=W(this,s,u),d};function X(T,s){this.x=T,this.y=s}X.prototype.makeRBT=function(s){for(var u=new Array(s),d=i.prototype._countBits(s)-1,f=0;f<s;f++)u[f]=this.revBin(f,d,s);return u},X.prototype.revBin=function(s,u,d){if(s===0||s===d-1)return s;for(var f=0,c=0;c<u;c++)f|=(s&1)<<u-c-1,s>>=1;return f},X.prototype.permute=function(s,u,d,f,c,v){for(var m=0;m<v;m++)f[m]=u[s[m]],c[m]=d[s[m]]},X.prototype.transform=function(s,u,d,f,c,v){this.permute(v,s,u,d,f,c);for(var m=1;m<c;m<<=1)for(var h=m<<1,o=Math.cos(2*Math.PI/h),p=Math.sin(2*Math.PI/h),E=0;E<c;E+=h)for(var g=o,w=p,U=0;U<m;U++){var M=d[E+U],k=f[E+U],G=d[E+U+m],Z=f[E+U+m],B=g*G-w*Z;Z=g*Z+w*G,G=B,d[E+U]=M+G,f[E+U]=k+Z,d[E+U+m]=M-G,f[E+U+m]=k-Z,U!==h&&(B=o*g-p*w,w=o*w+p*g,g=B)}},X.prototype.guessLen13b=function(s,u){var d=Math.max(u,s)|1,f=d&1,c=0;for(d=d/2|0;d;d=d>>>1)c++;return 1<<c+1+f},X.prototype.conjugate=function(s,u,d){if(!(d<=1))for(var f=0;f<d/2;f++){var c=s[f];s[f]=s[d-f-1],s[d-f-1]=c,c=u[f],u[f]=-u[d-f-1],u[d-f-1]=-c}},X.prototype.normalize13b=function(s,u){for(var d=0,f=0;f<u/2;f++){var c=Math.round(s[2*f+1]/u)*8192+Math.round(s[2*f]/u)+d;s[f]=c&67108863,c<67108864?d=0:d=c/67108864|0}return s},X.prototype.convert13b=function(s,u,d,f){for(var c=0,v=0;v<u;v++)c=c+(s[v]|0),d[2*v]=c&8191,c=c>>>13,d[2*v+1]=c&8191,c=c>>>13;for(v=2*u;v<f;++v)d[v]=0;r(c===0),r((c&-8192)===0)},X.prototype.stub=function(s){for(var u=new Array(s),d=0;d<s;d++)u[d]=0;return u},X.prototype.mulp=function(s,u,d){var f=2*this.guessLen13b(s.length,u.length),c=this.makeRBT(f),v=this.stub(f),m=new Array(f),h=new Array(f),o=new Array(f),p=new Array(f),E=new Array(f),g=new Array(f),w=d.words;w.length=f,this.convert13b(s.words,s.length,m,f),this.convert13b(u.words,u.length,p,f),this.transform(m,v,h,o,f,c),this.transform(p,v,E,g,f,c);for(var U=0;U<f;U++){var M=h[U]*E[U]-o[U]*g[U];o[U]=h[U]*g[U]+o[U]*E[U],h[U]=M}return this.conjugate(h,o,f),this.transform(h,o,w,v,f,c),this.conjugate(w,v,f),this.normalize13b(w,f),d.negative=s.negative^u.negative,d.length=s.length+u.length,d.strip()},i.prototype.mul=function(s){var u=new i(null);return u.words=new Array(this.length+s.length),this.mulTo(s,u)},i.prototype.mulf=function(s){var u=new i(null);return u.words=new Array(this.length+s.length),W(this,s,u)},i.prototype.imul=function(s){return this.clone().mulTo(s,this)},i.prototype.imuln=function(s){r(typeof s=="number"),r(s<67108864);for(var u=0,d=0;d<this.length;d++){var f=(this.words[d]|0)*s,c=(f&67108863)+(u&67108863);u>>=26,u+=f/67108864|0,u+=c>>>26,this.words[d]=c&67108863}return u!==0&&(this.words[d]=u,this.length++),this.length=s===0?1:this.length,this},i.prototype.muln=function(s){return this.clone().imuln(s)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(s){var u=D(s);if(u.length===0)return new i(1);for(var d=this,f=0;f<u.length&&u[f]===0;f++,d=d.sqr());if(++f<u.length)for(var c=d.sqr();f<u.length;f++,c=c.sqr())u[f]!==0&&(d=d.mul(c));return d},i.prototype.iushln=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26,f=67108863>>>26-u<<26-u,c;if(u!==0){var v=0;for(c=0;c<this.length;c++){var m=this.words[c]&f,h=(this.words[c]|0)-m<<u;this.words[c]=h|v,v=m>>>26-u}v&&(this.words[c]=v,this.length++)}if(d!==0){for(c=this.length-1;c>=0;c--)this.words[c+d]=this.words[c];for(c=0;c<d;c++)this.words[c]=0;this.length+=d}return this.strip()},i.prototype.ishln=function(s){return r(this.negative===0),this.iushln(s)},i.prototype.iushrn=function(s,u,d){r(typeof s=="number"&&s>=0);var f;u?f=(u-u%26)/26:f=0;var c=s%26,v=Math.min((s-c)/26,this.length),m=67108863^67108863>>>c<<c,h=d;if(f-=v,f=Math.max(0,f),h){for(var o=0;o<v;o++)h.words[o]=this.words[o];h.length=v}if(v!==0)if(this.length>v)for(this.length-=v,o=0;o<this.length;o++)this.words[o]=this.words[o+v];else this.words[0]=0,this.length=1;var p=0;for(o=this.length-1;o>=0&&(p!==0||o>=f);o--){var E=this.words[o]|0;this.words[o]=p<<26-c|E>>>c,p=E&m}return h&&p!==0&&(h.words[h.length++]=p),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(s,u,d){return r(this.negative===0),this.iushrn(s,u,d)},i.prototype.shln=function(s){return this.clone().ishln(s)},i.prototype.ushln=function(s){return this.clone().iushln(s)},i.prototype.shrn=function(s){return this.clone().ishrn(s)},i.prototype.ushrn=function(s){return this.clone().iushrn(s)},i.prototype.testn=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26,f=1<<u;if(this.length<=d)return!1;var c=this.words[d];return!!(c&f)},i.prototype.imaskn=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(u!==0&&d++,this.length=Math.min(d,this.length),u!==0){var f=67108863^67108863>>>u<<u;this.words[this.length-1]&=f}return this.strip()},i.prototype.maskn=function(s){return this.clone().imaskn(s)},i.prototype.iaddn=function(s){return r(typeof s=="number"),r(s<67108864),s<0?this.isubn(-s):this.negative!==0?this.length===1&&(this.words[0]|0)<s?(this.words[0]=s-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(s),this.negative=1,this):this._iaddn(s)},i.prototype._iaddn=function(s){this.words[0]+=s;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},i.prototype.isubn=function(s){if(r(typeof s=="number"),r(s<67108864),s<0)return this.iaddn(-s);if(this.negative!==0)return this.negative=0,this.iaddn(s),this.negative=1,this;if(this.words[0]-=s,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this.strip()},i.prototype.addn=function(s){return this.clone().iaddn(s)},i.prototype.subn=function(s){return this.clone().isubn(s)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(s,u,d){var f=s.length+d,c;this._expand(f);var v,m=0;for(c=0;c<s.length;c++){v=(this.words[c+d]|0)+m;var h=(s.words[c]|0)*u;v-=h&67108863,m=(v>>26)-(h/67108864|0),this.words[c+d]=v&67108863}for(;c<this.length-d;c++)v=(this.words[c+d]|0)+m,m=v>>26,this.words[c+d]=v&67108863;if(m===0)return this.strip();for(r(m===-1),m=0,c=0;c<this.length;c++)v=-(this.words[c]|0)+m,m=v>>26,this.words[c]=v&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(s,u){var d=this.length-s.length,f=this.clone(),c=s,v=c.words[c.length-1]|0,m=this._countBits(v);d=26-m,d!==0&&(c=c.ushln(d),f.iushln(d),v=c.words[c.length-1]|0);var h=f.length-c.length,o;if(u!=="mod"){o=new i(null),o.length=h+1,o.words=new Array(o.length);for(var p=0;p<o.length;p++)o.words[p]=0}var E=f.clone()._ishlnsubmul(c,1,h);E.negative===0&&(f=E,o&&(o.words[h]=1));for(var g=h-1;g>=0;g--){var w=(f.words[c.length+g]|0)*67108864+(f.words[c.length+g-1]|0);for(w=Math.min(w/v|0,67108863),f._ishlnsubmul(c,w,g);f.negative!==0;)w--,f.negative=0,f._ishlnsubmul(c,1,g),f.isZero()||(f.negative^=1);o&&(o.words[g]=w)}return o&&o.strip(),f.strip(),u!=="div"&&d!==0&&f.iushrn(d),{div:o||null,mod:f}},i.prototype.divmod=function(s,u,d){if(r(!s.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var f,c,v;return this.negative!==0&&s.negative===0?(v=this.neg().divmod(s,u),u!=="mod"&&(f=v.div.neg()),u!=="div"&&(c=v.mod.neg(),d&&c.negative!==0&&c.iadd(s)),{div:f,mod:c}):this.negative===0&&s.negative!==0?(v=this.divmod(s.neg(),u),u!=="mod"&&(f=v.div.neg()),{div:f,mod:v.mod}):this.negative&s.negative?(v=this.neg().divmod(s.neg(),u),u!=="div"&&(c=v.mod.neg(),d&&c.negative!==0&&c.isub(s)),{div:v.div,mod:c}):s.length>this.length||this.cmp(s)<0?{div:new i(0),mod:this}:s.length===1?u==="div"?{div:this.divn(s.words[0]),mod:null}:u==="mod"?{div:null,mod:new i(this.modn(s.words[0]))}:{div:this.divn(s.words[0]),mod:new i(this.modn(s.words[0]))}:this._wordDiv(s,u)},i.prototype.div=function(s){return this.divmod(s,"div",!1).div},i.prototype.mod=function(s){return this.divmod(s,"mod",!1).mod},i.prototype.umod=function(s){return this.divmod(s,"mod",!0).mod},i.prototype.divRound=function(s){var u=this.divmod(s);if(u.mod.isZero())return u.div;var d=u.div.negative!==0?u.mod.isub(s):u.mod,f=s.ushrn(1),c=s.andln(1),v=d.cmp(f);return v<0||c===1&&v===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},i.prototype.modn=function(s){r(s<=67108863);for(var u=(1<<26)%s,d=0,f=this.length-1;f>=0;f--)d=(u*d+(this.words[f]|0))%s;return d},i.prototype.idivn=function(s){r(s<=67108863);for(var u=0,d=this.length-1;d>=0;d--){var f=(this.words[d]|0)+u*67108864;this.words[d]=f/s|0,u=f%s}return this.strip()},i.prototype.divn=function(s){return this.clone().idivn(s)},i.prototype.egcd=function(s){r(s.negative===0),r(!s.isZero());var u=this,d=s.clone();u.negative!==0?u=u.umod(s):u=u.clone();for(var f=new i(1),c=new i(0),v=new i(0),m=new i(1),h=0;u.isEven()&&d.isEven();)u.iushrn(1),d.iushrn(1),++h;for(var o=d.clone(),p=u.clone();!u.isZero();){for(var E=0,g=1;!(u.words[0]&g)&&E<26;++E,g<<=1);if(E>0)for(u.iushrn(E);E-- >0;)(f.isOdd()||c.isOdd())&&(f.iadd(o),c.isub(p)),f.iushrn(1),c.iushrn(1);for(var w=0,U=1;!(d.words[0]&U)&&w<26;++w,U<<=1);if(w>0)for(d.iushrn(w);w-- >0;)(v.isOdd()||m.isOdd())&&(v.iadd(o),m.isub(p)),v.iushrn(1),m.iushrn(1);u.cmp(d)>=0?(u.isub(d),f.isub(v),c.isub(m)):(d.isub(u),v.isub(f),m.isub(c))}return{a:v,b:m,gcd:d.iushln(h)}},i.prototype._invmp=function(s){r(s.negative===0),r(!s.isZero());var u=this,d=s.clone();u.negative!==0?u=u.umod(s):u=u.clone();for(var f=new i(1),c=new i(0),v=d.clone();u.cmpn(1)>0&&d.cmpn(1)>0;){for(var m=0,h=1;!(u.words[0]&h)&&m<26;++m,h<<=1);if(m>0)for(u.iushrn(m);m-- >0;)f.isOdd()&&f.iadd(v),f.iushrn(1);for(var o=0,p=1;!(d.words[0]&p)&&o<26;++o,p<<=1);if(o>0)for(d.iushrn(o);o-- >0;)c.isOdd()&&c.iadd(v),c.iushrn(1);u.cmp(d)>=0?(u.isub(d),f.isub(c)):(d.isub(u),c.isub(f))}var E;return u.cmpn(1)===0?E=f:E=c,E.cmpn(0)<0&&E.iadd(s),E},i.prototype.gcd=function(s){if(this.isZero())return s.abs();if(s.isZero())return this.abs();var u=this.clone(),d=s.clone();u.negative=0,d.negative=0;for(var f=0;u.isEven()&&d.isEven();f++)u.iushrn(1),d.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;d.isEven();)d.iushrn(1);var c=u.cmp(d);if(c<0){var v=u;u=d,d=v}else if(c===0||d.cmpn(1)===0)break;u.isub(d)}while(!0);return d.iushln(f)},i.prototype.invm=function(s){return this.egcd(s).a.umod(s)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(s){return this.words[0]&s},i.prototype.bincn=function(s){r(typeof s=="number");var u=s%26,d=(s-u)/26,f=1<<u;if(this.length<=d)return this._expand(d+1),this.words[d]|=f,this;for(var c=f,v=d;c!==0&&v<this.length;v++){var m=this.words[v]|0;m+=c,c=m>>>26,m&=67108863,this.words[v]=m}return c!==0&&(this.words[v]=c,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(s){var u=s<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var d;if(this.length>1)d=1;else{u&&(s=-s),r(s<=67108863,"Number is too big");var f=this.words[0]|0;d=f===s?0:f<s?-1:1}return this.negative!==0?-d|0:d},i.prototype.cmp=function(s){if(this.negative!==0&&s.negative===0)return-1;if(this.negative===0&&s.negative!==0)return 1;var u=this.ucmp(s);return this.negative!==0?-u|0:u},i.prototype.ucmp=function(s){if(this.length>s.length)return 1;if(this.length<s.length)return-1;for(var u=0,d=this.length-1;d>=0;d--){var f=this.words[d]|0,c=s.words[d]|0;if(f!==c){f<c?u=-1:f>c&&(u=1);break}}return u},i.prototype.gtn=function(s){return this.cmpn(s)===1},i.prototype.gt=function(s){return this.cmp(s)===1},i.prototype.gten=function(s){return this.cmpn(s)>=0},i.prototype.gte=function(s){return this.cmp(s)>=0},i.prototype.ltn=function(s){return this.cmpn(s)===-1},i.prototype.lt=function(s){return this.cmp(s)===-1},i.prototype.lten=function(s){return this.cmpn(s)<=0},i.prototype.lte=function(s){return this.cmp(s)<=0},i.prototype.eqn=function(s){return this.cmpn(s)===0},i.prototype.eq=function(s){return this.cmp(s)===0},i.red=function(s){return new te(s)},i.prototype.toRed=function(s){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),s.convertTo(this)._forceRed(s)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(s){return this.red=s,this},i.prototype.forceRed=function(s){return r(!this.red,"Already a number in reduction context"),this._forceRed(s)},i.prototype.redAdd=function(s){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,s)},i.prototype.redIAdd=function(s){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,s)},i.prototype.redSub=function(s){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,s)},i.prototype.redISub=function(s){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,s)},i.prototype.redShl=function(s){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,s)},i.prototype.redMul=function(s){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.mul(this,s)},i.prototype.redIMul=function(s){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.imul(this,s)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(s){return r(this.red&&!s.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,s)};var ne={k256:null,p224:null,p192:null,p25519:null};function $(T,s){this.name=T,this.p=new i(s,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var s=new i(null);return s.words=new Array(Math.ceil(this.n/13)),s},$.prototype.ireduce=function(s){var u=s,d;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),d=u.bitLength();while(d>this.n);var f=d<this.n?-1:u.ucmp(this.p);return f===0?(u.words[0]=0,u.length=1):f>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},$.prototype.split=function(s,u){s.iushrn(this.n,0,u)},$.prototype.imulK=function(s){return s.imul(this.k)};function ae(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(ae,$),ae.prototype.split=function(s,u){for(var d=4194303,f=Math.min(s.length,9),c=0;c<f;c++)u.words[c]=s.words[c];if(u.length=f,s.length<=9){s.words[0]=0,s.length=1;return}var v=s.words[9];for(u.words[u.length++]=v&d,c=10;c<s.length;c++){var m=s.words[c]|0;s.words[c-10]=(m&d)<<4|v>>>22,v=m}v>>>=22,s.words[c-10]=v,v===0&&s.length>10?s.length-=10:s.length-=9},ae.prototype.imulK=function(s){s.words[s.length]=0,s.words[s.length+1]=0,s.length+=2;for(var u=0,d=0;d<s.length;d++){var f=s.words[d]|0;u+=f*977,s.words[d]=u&67108863,u=f*64+(u/67108864|0)}return s.words[s.length-1]===0&&(s.length--,s.words[s.length-1]===0&&s.length--),s};function ie(){$.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(ie,$);function ee(){$.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(ee,$);function ce(){$.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(ce,$),ce.prototype.imulK=function(s){for(var u=0,d=0;d<s.length;d++){var f=(s.words[d]|0)*19+u,c=f&67108863;f>>>=26,s.words[d]=c,u=f}return u!==0&&(s.words[s.length++]=u),s},i._prime=function(s){if(ne[s])return ne[s];var u;if(s==="k256")u=new ae;else if(s==="p224")u=new ie;else if(s==="p192")u=new ee;else if(s==="p25519")u=new ce;else throw new Error("Unknown prime "+s);return ne[s]=u,u};function te(T){if(typeof T=="string"){var s=i._prime(T);this.m=s.p,this.prime=s}else r(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}te.prototype._verify1=function(s){r(s.negative===0,"red works only with positives"),r(s.red,"red works only with red numbers")},te.prototype._verify2=function(s,u){r((s.negative|u.negative)===0,"red works only with positives"),r(s.red&&s.red===u.red,"red works only with red numbers")},te.prototype.imod=function(s){return this.prime?this.prime.ireduce(s)._forceRed(this):s.umod(this.m)._forceRed(this)},te.prototype.neg=function(s){return s.isZero()?s.clone():this.m.sub(s)._forceRed(this)},te.prototype.add=function(s,u){this._verify2(s,u);var d=s.add(u);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},te.prototype.iadd=function(s,u){this._verify2(s,u);var d=s.iadd(u);return d.cmp(this.m)>=0&&d.isub(this.m),d},te.prototype.sub=function(s,u){this._verify2(s,u);var d=s.sub(u);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},te.prototype.isub=function(s,u){this._verify2(s,u);var d=s.isub(u);return d.cmpn(0)<0&&d.iadd(this.m),d},te.prototype.shl=function(s,u){return this._verify1(s),this.imod(s.ushln(u))},te.prototype.imul=function(s,u){return this._verify2(s,u),this.imod(s.imul(u))},te.prototype.mul=function(s,u){return this._verify2(s,u),this.imod(s.mul(u))},te.prototype.isqr=function(s){return this.imul(s,s.clone())},te.prototype.sqr=function(s){return this.mul(s,s)},te.prototype.sqrt=function(s){if(s.isZero())return s.clone();var u=this.m.andln(3);if(r(u%2===1),u===3){var d=this.m.add(new i(1)).iushrn(2);return this.pow(s,d)}for(var f=this.m.subn(1),c=0;!f.isZero()&&f.andln(1)===0;)c++,f.iushrn(1);r(!f.isZero());var v=new i(1).toRed(this),m=v.redNeg(),h=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,h).cmp(m)!==0;)o.redIAdd(m);for(var p=this.pow(o,f),E=this.pow(s,f.addn(1).iushrn(1)),g=this.pow(s,f),w=c;g.cmp(v)!==0;){for(var U=g,M=0;U.cmp(v)!==0;M++)U=U.redSqr();r(M<w);var k=this.pow(p,new i(1).iushln(w-M-1));E=E.redMul(k),p=k.redSqr(),g=g.redMul(p),w=M}return E},te.prototype.invm=function(s){var u=s._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},te.prototype.pow=function(s,u){if(u.isZero())return new i(1).toRed(this);if(u.cmpn(1)===0)return s.clone();var d=4,f=new Array(1<<d);f[0]=new i(1).toRed(this),f[1]=s;for(var c=2;c<f.length;c++)f[c]=this.mul(f[c-1],s);var v=f[0],m=0,h=0,o=u.bitLength()%26;for(o===0&&(o=26),c=u.length-1;c>=0;c--){for(var p=u.words[c],E=o-1;E>=0;E--){var g=p>>E&1;if(v!==f[0]&&(v=this.sqr(v)),g===0&&m===0){h=0;continue}m<<=1,m|=g,h++,!(h!==d&&(c!==0||E!==0))&&(v=this.mul(v,f[m]),h=0,m=0)}o=26}return v},te.prototype.convertTo=function(s){var u=s.umod(this.m);return u===s?u.clone():u},te.prototype.convertFrom=function(s){var u=s.clone();return u.red=null,u},i.mont=function(s){return new Y(s)};function Y(T){te.call(this,T),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(Y,te),Y.prototype.convertTo=function(s){return this.imod(s.ushln(this.shift))},Y.prototype.convertFrom=function(s){var u=this.imod(s.mul(this.rinv));return u.red=null,u},Y.prototype.imul=function(s,u){if(s.isZero()||u.isZero())return s.words[0]=0,s.length=1,s;var d=s.imul(u),f=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=d.isub(f).iushrn(this.shift),v=c;return c.cmp(this.m)>=0?v=c.isub(this.m):c.cmpn(0)<0&&(v=c.iadd(this.m)),v._forceRed(this)},Y.prototype.mul=function(s,u){if(s.isZero()||u.isZero())return new i(0)._forceRed(this);var d=s.mul(u),f=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=d.isub(f).iushrn(this.shift),v=c;return c.cmp(this.m)>=0?v=c.isub(this.m):c.cmpn(0)<0&&(v=c.iadd(this.m)),v._forceRed(this)},Y.prototype.invm=function(s){var u=this.imod(s._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(typeof dl>"u"||dl,J1)});var U1=V((wC,pl)=>{var AC=A(S());typeof Object.create=="function"?pl.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:pl.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var nr=V((SC,gl)=>{var MC=A(S());try{if(bl=it("util"),typeof bl.inherits!="function")throw"";gl.exports=bl.inherits}catch{gl.exports=U1()}var bl});var Wf=V((TC,H1)=>{"use strict";var EC=A(S()),Qf=it("buffer"),io=Qf.Buffer,Xr={},zr;for(zr in Qf)Qf.hasOwnProperty(zr)&&(zr==="SlowBuffer"||zr==="Buffer"||(Xr[zr]=Qf[zr]));var ao=Xr.Buffer={};for(zr in io)io.hasOwnProperty(zr)&&(zr==="allocUnsafe"||zr==="allocUnsafeSlow"||(ao[zr]=io[zr]));Xr.Buffer.prototype=io.prototype;(!ao.from||ao.from===Uint8Array.from)&&(ao.from=function(t,e,r){if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&typeof t.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return io(t,e,r)});ao.alloc||(ao.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=io(t);return!e||e.length===0?n.fill(0):typeof r=="string"?n.fill(e,r):n.fill(e),n});if(!Xr.kStringMaxLength)try{Xr.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}Xr.constants||(Xr.constants={MAX_LENGTH:Xr.kMaxLength},Xr.kStringMaxLength&&(Xr.constants.MAX_STRING_LENGTH=Xr.kStringMaxLength));H1.exports=Xr});var Yf=V(q1=>{"use strict";var BC=A(S()),$6=nr();function Kr(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}q1.Reporter=Kr;Kr.prototype.isError=function(e){return e instanceof oo};Kr.prototype.save=function(){let e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Kr.prototype.restore=function(e){let r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};Kr.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Kr.prototype.exitKey=function(e){let r=this._reporterState;r.path=r.path.slice(0,e-1)};Kr.prototype.leaveKey=function(e,r,n){let i=this._reporterState;this.exitKey(e),i.obj!==null&&(i.obj[r]=n)};Kr.prototype.path=function(){return this._reporterState.path.join("/")};Kr.prototype.enterObject=function(){let e=this._reporterState,r=e.obj;return e.obj={},r};Kr.prototype.leaveObject=function(e){let r=this._reporterState,n=r.obj;return r.obj=e,n};Kr.prototype.error=function(e){let r,n=this._reporterState,i=e instanceof oo;if(i?r=e:r=new oo(n.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw r;return i||n.errors.push(r),r};Kr.prototype.wrapResult=function(e){let r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function oo(t,e){this.path=t,this.rethrow(e)}$6(oo,Error);oo.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,oo),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var co=V(vl=>{"use strict";var PC=A(S()),e4=nr(),$f=Yf().Reporter,so=Wf().Buffer;function Zr(t,e){if($f.call(this,e),!so.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}e4(Zr,$f);vl.DecoderBuffer=Zr;Zr.isDecoderBuffer=function(e){return e instanceof Zr?!0:typeof e=="object"&&so.isBuffer(e.base)&&e.constructor.name==="DecoderBuffer"&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.save=="function"&&typeof e.restore=="function"&&typeof e.isEmpty=="function"&&typeof e.readUInt8=="function"&&typeof e.skip=="function"&&typeof e.raw=="function"};Zr.prototype.save=function(){return{offset:this.offset,reporter:$f.prototype.save.call(this)}};Zr.prototype.restore=function(e){let r=new Zr(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,$f.prototype.restore.call(this,e.reporter),r};Zr.prototype.isEmpty=function(){return this.offset===this.length};Zr.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Zr.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");let n=new Zr(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n};Zr.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function fo(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return fo.isEncoderBuffer(r)||(r=new fo(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=so.byteLength(t);else if(so.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}vl.EncoderBuffer=fo;fo.isEncoderBuffer=function(e){return e instanceof fo?!0:typeof e=="object"&&e.constructor.name==="EncoderBuffer"&&typeof e.length=="number"&&typeof e.join=="function"};fo.prototype.join=function(e,r){return e||(e=so.alloc(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,r),r+=n.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):so.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var di=V((LC,X1)=>{var RC=A(S());X1.exports=G1;function G1(t,e){if(!t)throw new Error(e||"Assertion failed")}G1.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)}});var e0=V((FC,K1)=>{"use strict";var DC=A(S()),t4=Yf().Reporter,r4=co().EncoderBuffer,n4=co().DecoderBuffer,Tr=di(),z1=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],i4=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(z1),a4=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function rt(t,e,r){let n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}K1.exports=rt;var o4=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];rt.prototype.clone=function(){let e=this._baseState,r={};o4.forEach(function(i){r[i]=e[i]});let n=new this.constructor(r.parent);return n._baseState=r,n};rt.prototype._wrap=function(){let e=this._baseState;i4.forEach(function(r){this[r]=function(){let i=new this.constructor(this);return e.children.push(i),i[r].apply(i,arguments)}},this)};rt.prototype._init=function(e){let r=this._baseState;Tr(r.parent===null),e.call(this),r.children=r.children.filter(function(n){return n._baseState.parent===this},this),Tr.equal(r.children.length,1,"Root node can have only one child")};rt.prototype._useArgs=function(e){let r=this._baseState,n=e.filter(function(i){return i instanceof this.constructor},this);e=e.filter(function(i){return!(i instanceof this.constructor)},this),n.length!==0&&(Tr(r.children===null),r.children=n,n.forEach(function(i){i._baseState.parent=this},this)),e.length!==0&&(Tr(r.args===null),r.args=e,r.reverseArgs=e.map(function(i){if(typeof i!="object"||i.constructor!==Object)return i;let a={};return Object.keys(i).forEach(function(l){l==(l|0)&&(l|=0);let b=i[l];a[b]=l}),a}))};a4.forEach(function(t){rt.prototype[t]=function(){let r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});z1.forEach(function(t){rt.prototype[t]=function(){let r=this._baseState,n=Array.prototype.slice.call(arguments);return Tr(r.tag===null),r.tag=t,this._useArgs(n),this}});rt.prototype.use=function(e){Tr(e);let r=this._baseState;return Tr(r.use===null),r.use=e,this};rt.prototype.optional=function(){let e=this._baseState;return e.optional=!0,this};rt.prototype.def=function(e){let r=this._baseState;return Tr(r.default===null),r.default=e,r.optional=!0,this};rt.prototype.explicit=function(e){let r=this._baseState;return Tr(r.explicit===null&&r.implicit===null),r.explicit=e,this};rt.prototype.implicit=function(e){let r=this._baseState;return Tr(r.explicit===null&&r.implicit===null),r.implicit=e,this};rt.prototype.obj=function(){let e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};rt.prototype.key=function(e){let r=this._baseState;return Tr(r.key===null),r.key=e,this};rt.prototype.any=function(){let e=this._baseState;return e.any=!0,this};rt.prototype.choice=function(e){let r=this._baseState;return Tr(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(n){return e[n]})),this};rt.prototype.contains=function(e){let r=this._baseState;return Tr(r.use===null),r.contains=e,this};rt.prototype._decode=function(e,r){let n=this._baseState;if(n.parent===null)return e.wrapResult(n.children[0]._decode(e,r));let i=n.default,a=!0,l=null;if(n.key!==null&&(l=e.enterKey(n.key)),n.optional){let y=null;if(n.explicit!==null?y=n.explicit:n.implicit!==null?y=n.implicit:n.tag!==null&&(y=n.tag),y===null&&!n.any){let x=e.save();try{n.choice===null?this._decodeGeneric(n.tag,e,r):this._decodeChoice(e,r),a=!0}catch{a=!1}e.restore(x)}else if(a=this._peekTag(e,y,n.any),e.isError(a))return a}let b;if(n.obj&&a&&(b=e.enterObject()),a){if(n.explicit!==null){let x=this._decodeTag(e,n.explicit);if(e.isError(x))return x;e=x}let y=e.offset;if(n.use===null&&n.choice===null){let x;n.any&&(x=e.save());let _=this._decodeTag(e,n.implicit!==null?n.implicit:n.tag,n.any);if(e.isError(_))return _;n.any?i=e.raw(x):e=_}if(r&&r.track&&n.tag!==null&&r.track(e.path(),y,e.length,"tagged"),r&&r.track&&n.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),n.any||(n.choice===null?i=this._decodeGeneric(n.tag,e,r):i=this._decodeChoice(e,r)),e.isError(i))return i;if(!n.any&&n.choice===null&&n.children!==null&&n.children.forEach(function(_){_._decode(e,r)}),n.contains&&(n.tag==="octstr"||n.tag==="bitstr")){let x=new n4(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(x,r)}}return n.obj&&a&&(i=e.leaveObject(b)),n.key!==null&&(i!==null||a===!0)?e.leaveKey(l,n.key,i):l!==null&&e.exitKey(l),i};rt.prototype._decodeGeneric=function(e,r,n){let i=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,i.args[0],n):/str$/.test(e)?this._decodeStr(r,e,n):e==="objid"&&i.args?this._decodeObjid(r,i.args[0],i.args[1],n):e==="objid"?this._decodeObjid(r,null,null,n):e==="gentime"||e==="utctime"?this._decodeTime(r,e,n):e==="null_"?this._decodeNull(r,n):e==="bool"?this._decodeBool(r,n):e==="objDesc"?this._decodeStr(r,e,n):e==="int"||e==="enum"?this._decodeInt(r,i.args&&i.args[0],n):i.use!==null?this._getUse(i.use,r._reporterState.obj)._decode(r,n):r.error("unknown tag: "+e)};rt.prototype._getUse=function(e,r){let n=this._baseState;return n.useDecoder=this._use(e,r),Tr(n.useDecoder._baseState.parent===null),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder};rt.prototype._decodeChoice=function(e,r){let n=this._baseState,i=null,a=!1;return Object.keys(n.choice).some(function(l){let b=e.save(),y=n.choice[l];try{let x=y._decode(e,r);if(e.isError(x))return!1;i={type:l,value:x},a=!0}catch{return e.restore(b),!1}return!0},this),a?i:e.error("Choice not matched")};rt.prototype._createEncoderBuffer=function(e){return new r4(e,this.reporter)};rt.prototype._encode=function(e,r,n){let i=this._baseState;if(i.default!==null&&i.default===e)return;let a=this._encodeValue(e,r,n);if(a!==void 0&&!this._skipDefault(a,r,n))return a};rt.prototype._encodeValue=function(e,r,n){let i=this._baseState;if(i.parent===null)return i.children[0]._encode(e,r||new t4);let a=null;if(this.reporter=r,i.optional&&e===void 0)if(i.default!==null)e=i.default;else return;let l=null,b=!1;if(i.any)a=this._createEncoderBuffer(e);else if(i.choice)a=this._encodeChoice(e,r);else if(i.contains)l=this._getUse(i.contains,n)._encode(e,r),b=!0;else if(i.children)l=i.children.map(function(y){if(y._baseState.tag==="null_")return y._encode(null,r,e);if(y._baseState.key===null)return r.error("Child should have a key");let x=r.enterKey(y._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");let _=y._encode(e[y._baseState.key],r,e);return r.leaveKey(x),_},this).filter(function(y){return y}),l=this._createEncoderBuffer(l);else if(i.tag==="seqof"||i.tag==="setof"){if(!(i.args&&i.args.length===1))return r.error("Too many args for : "+i.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");let y=this.clone();y._baseState.implicit=null,l=this._createEncoderBuffer(e.map(function(x){let _=this._baseState;return this._getUse(_.args[0],e)._encode(x,r)},y))}else i.use!==null?a=this._getUse(i.use,n)._encode(e,r):(l=this._encodePrimitive(i.tag,e),b=!0);if(!i.any&&i.choice===null){let y=i.implicit!==null?i.implicit:i.tag,x=i.implicit===null?"universal":"context";y===null?i.use===null&&r.error("Tag could be omitted only for .use()"):i.use===null&&(a=this._encodeComposite(y,b,x,l))}return i.explicit!==null&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a};rt.prototype._encodeChoice=function(e,r){let n=this._baseState,i=n.choice[e.type];return i||Tr(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(e.value,r)};rt.prototype._encodePrimitive=function(e,r){let n=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&n.args)return this._encodeObjid(r,n.reverseArgs[0],n.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,n.args&&n.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};rt.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};rt.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}});var t0=V(la=>{"use strict";var OC=A(S());function Z1(t){let e={};return Object.keys(t).forEach(function(r){(r|0)==r&&(r=r|0);let n=t[r];e[n]=r}),e}la.tagClass={0:"universal",1:"application",2:"context",3:"private"};la.tagClassByName=Z1(la.tagClass);la.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};la.tagByName=Z1(la.tag)});var xl=V((kC,Q1)=>{"use strict";var NC=A(S()),s4=nr(),hi=Wf().Buffer,V1=e0(),ml=t0();function j1(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new vn,this.tree._init(t.body)}Q1.exports=j1;j1.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function vn(t){V1.call(this,"der",t)}s4(vn,V1);vn.prototype._encodeComposite=function(e,r,n,i){let a=f4(e,r,n,this.reporter);if(i.length<128){let y=hi.alloc(2);return y[0]=a,y[1]=i.length,this._createEncoderBuffer([y,i])}let l=1;for(let y=i.length;y>=256;y>>=8)l++;let b=hi.alloc(2+l);b[0]=a,b[1]=128|l;for(let y=1+l,x=i.length;x>0;y--,x>>=8)b[y]=x&255;return this._createEncoderBuffer([b,i])};vn.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){let n=hi.alloc(e.length*2);for(let i=0;i<e.length;i++)n.writeUInt16BE(e.charCodeAt(i),i*2);return this._createEncoderBuffer(n)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};vn.prototype._encodeObjid=function(e,r,n){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s.]+/g);for(let b=0;b<e.length;b++)e[b]|=0}else if(Array.isArray(e)){e=e.slice();for(let b=0;b<e.length;b++)e[b]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}let i=0;for(let b=0;b<e.length;b++){let y=e[b];for(i++;y>=128;y>>=7)i++}let a=hi.alloc(i),l=a.length-1;for(let b=e.length-1;b>=0;b--){let y=e[b];for(a[l--]=y&127;(y>>=7)>0;)a[l--]=128|y&127}return this._createEncoderBuffer(a)};function Vr(t){return t<10?"0"+t:t}vn.prototype._encodeTime=function(e,r){let n,i=new Date(e);return r==="gentime"?n=[Vr(i.getUTCFullYear()),Vr(i.getUTCMonth()+1),Vr(i.getUTCDate()),Vr(i.getUTCHours()),Vr(i.getUTCMinutes()),Vr(i.getUTCSeconds()),"Z"].join(""):r==="utctime"?n=[Vr(i.getUTCFullYear()%100),Vr(i.getUTCMonth()+1),Vr(i.getUTCDate()),Vr(i.getUTCHours()),Vr(i.getUTCMinutes()),Vr(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(n,"octstr")};vn.prototype._encodeNull=function(){return this._createEncoderBuffer("")};vn.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!hi.isBuffer(e)){let a=e.toArray();!e.sign&&a[0]&128&&a.unshift(0),e=hi.from(a)}if(hi.isBuffer(e)){let a=e.length;e.length===0&&a++;let l=hi.alloc(a);return e.copy(l),e.length===0&&(l[0]=0),this._createEncoderBuffer(l)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let a=e;a>=256;a>>=8)n++;let i=new Array(n);for(let a=i.length-1;a>=0;a--)i[a]=e&255,e>>=8;return i[0]&128&&i.unshift(0),this._createEncoderBuffer(hi.from(i))};vn.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};vn.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};vn.prototype._skipDefault=function(e,r,n){let i=this._baseState,a;if(i.default===null)return!1;let l=e.join();if(i.defaultBuffer===void 0&&(i.defaultBuffer=this._encodeValue(i.default,r,n).join()),l.length!==i.defaultBuffer.length)return!1;for(a=0;a<l.length;a++)if(l[a]!==i.defaultBuffer[a])return!1;return!0};function f4(t,e,r,n){let i;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),ml.tagByName.hasOwnProperty(t))i=ml.tagByName[t];else if(typeof t=="number"&&(t|0)===t)i=t;else return n.error("Unknown tag: "+t);return i>=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=ml.tagClassByName[r||"universal"]<<6,i)}});var Y1=V((JC,W1)=>{"use strict";var UC=A(S()),c4=nr(),yl=xl();function wl(t){yl.call(this,t),this.enc="pem"}c4(wl,yl);W1.exports=wl;wl.prototype.encode=function(e,r){let i=yl.prototype.encode.call(this,e).toString("base64"),a=["-----BEGIN "+r.label+"-----"];for(let l=0;l<i.length;l+=64)a.push(i.slice(l,l+64));return a.push("-----END "+r.label+"-----"),a.join(`
5
- `)}});var Al=V(eb=>{"use strict";var qC=A(S()),$1=eb;$1.der=xl();$1.pem=Y1()});var Ml=V((GC,ob)=>{"use strict";var XC=A(S()),u4=nr(),l4=hl(),tb=co().DecoderBuffer,nb=e0(),rb=t0();function ib(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Ir,this.tree._init(t.body)}ob.exports=ib;ib.prototype.decode=function(e,r){return tb.isDecoderBuffer(e)||(e=new tb(e,r)),this.tree._decode(e,r)};function Ir(t){nb.call(this,"der",t)}u4(Ir,nb);Ir.prototype._peekTag=function(e,r,n){if(e.isEmpty())return!1;let i=e.save(),a=Sl(e,'Failed to peek tag: "'+r+'"');return e.isError(a)?a:(e.restore(i),a.tag===r||a.tagStr===r||a.tagStr+"of"===r||n)};Ir.prototype._decodeTag=function(e,r,n){let i=Sl(e,'Failed to decode tag of "'+r+'"');if(e.isError(i))return i;let a=ab(e,i.primitive,'Failed to get length of "'+r+'"');if(e.isError(a))return a;if(!n&&i.tag!==r&&i.tagStr!==r&&i.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(i.primitive||a!==null)return e.skip(a,'Failed to match body of: "'+r+'"');let l=e.save(),b=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(b)?b:(a=e.offset-l.offset,e.restore(l),e.skip(a,'Failed to match body of: "'+r+'"'))};Ir.prototype._skipUntilEnd=function(e,r){for(;;){let n=Sl(e,r);if(e.isError(n))return n;let i=ab(e,n.primitive,r);if(e.isError(i))return i;let a;if(n.primitive||i!==null?a=e.skip(i):a=this._skipUntilEnd(e,r),e.isError(a))return a;if(n.tagStr==="end")break}};Ir.prototype._decodeList=function(e,r,n,i){let a=[];for(;!e.isEmpty();){let l=this._peekTag(e,"end");if(e.isError(l))return l;let b=n.decode(e,"der",i);if(e.isError(b)&&l)break;a.push(b)}return a};Ir.prototype._decodeStr=function(e,r){if(r==="bitstr"){let n=e.readUInt8();return e.isError(n)?n:{unused:n,data:e.raw()}}else if(r==="bmpstr"){let n=e.raw();if(n.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");let i="";for(let a=0;a<n.length/2;a++)i+=String.fromCharCode(n.readUInt16BE(a*2));return i}else if(r==="numstr"){let n=e.raw().toString("ascii");return this._isNumstr(n)?n:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){let n=e.raw().toString("ascii");return this._isPrintstr(n)?n:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};Ir.prototype._decodeObjid=function(e,r,n){let i,a=[],l=0,b=0;for(;!e.isEmpty();)b=e.readUInt8(),l<<=7,l|=b&127,b&128||(a.push(l),l=0);b&128&&a.push(l);let y=a[0]/40|0,x=a[0]%40;if(n?i=a:i=[y,x].concat(a.slice(1)),r){let _=r[i.join(" ")];_===void 0&&(_=r[i.join(".")]),_!==void 0&&(i=_)}return i};Ir.prototype._decodeTime=function(e,r){let n=e.raw().toString(),i,a,l,b,y,x;if(r==="gentime")i=n.slice(0,4)|0,a=n.slice(4,6)|0,l=n.slice(6,8)|0,b=n.slice(8,10)|0,y=n.slice(10,12)|0,x=n.slice(12,14)|0;else if(r==="utctime")i=n.slice(0,2)|0,a=n.slice(2,4)|0,l=n.slice(4,6)|0,b=n.slice(6,8)|0,y=n.slice(8,10)|0,x=n.slice(10,12)|0,i<70?i=2e3+i:i=1900+i;else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(i,a-1,l,b,y,x,0)};Ir.prototype._decodeNull=function(){return null};Ir.prototype._decodeBool=function(e){let r=e.readUInt8();return e.isError(r)?r:r!==0};Ir.prototype._decodeInt=function(e,r){let n=e.raw(),i=new l4(n);return r&&(i=r[i.toString(10)]||i),i};Ir.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function Sl(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;let n=rb.tagClass[r>>6],i=(r&32)===0;if((r&31)===31){let l=r;for(r=0;(l&128)===128;){if(l=t.readUInt8(e),t.isError(l))return l;r<<=7,r|=l&127}}else r&=31;let a=rb.tag[r];return{cls:n,primitive:i,tag:r,tagStr:a}}function ab(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&n===128)return null;if(!(n&128))return n;let i=n&127;if(i>4)return t.error("length octect is too long");n=0;for(let a=0;a<i;a++){n<<=8;let l=t.readUInt8(r);if(t.isError(l))return l;n|=l}return n}});var fb=V((zC,sb)=>{"use strict";var KC=A(S()),d4=nr(),h4=Wf().Buffer,Tl=Ml();function El(t){Tl.call(this,t),this.enc="pem"}d4(El,Tl);sb.exports=El;El.prototype.decode=function(e,r){let n=e.toString().split(/[\r\n]+/g),i=r.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,l=-1,b=-1;for(let _=0;_<n.length;_++){let C=n[_].match(a);if(C!==null&&C[2]===i)if(l===-1){if(C[1]!=="BEGIN")break;l=_}else{if(C[1]!=="END")break;b=_;break}}if(l===-1||b===-1)throw new Error("PEM section not found for: "+i);let y=n.slice(l+1,b).join("");y.replace(/[^a-z0-9+/=]+/gi,"");let x=h4.from(y,"base64");return Tl.prototype.decode.call(this,x,r)}});var _l=V(ub=>{"use strict";var VC=A(S()),cb=ub;cb.der=Ml();cb.pem=fb()});var db=V(lb=>{"use strict";var QC=A(S()),p4=Al(),b4=_l(),g4=nr(),v4=lb;v4.define=function(e,r){return new uo(e,r)};function uo(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}uo.prototype._createNamed=function(e){let r=this.name;function n(i){this._initNamed(i,r)}return g4(n,e),n.prototype._initNamed=function(a,l){e.call(this,a,l)},new n(this)};uo.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(b4[e])),this.decoders[e]};uo.prototype.decode=function(e,r,n){return this._getDecoder(r).decode(e,n)};uo.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(p4[e])),this.encoders[e]};uo.prototype.encode=function(e,r,n){return this._getEncoder(r).encode(e,n)}});var pb=V(hb=>{"use strict";var YC=A(S()),r0=hb;r0.Reporter=Yf().Reporter;r0.DecoderBuffer=co().DecoderBuffer;r0.EncoderBuffer=co().EncoderBuffer;r0.Node=e0()});var vb=V(gb=>{"use strict";var eP=A(S()),bb=gb;bb._reverse=function(e){let r={};return Object.keys(e).forEach(function(n){(n|0)==n&&(n=n|0);let i=e[n];r[i]=n}),r};bb.der=t0()});var xb=V(mb=>{"use strict";var rP=A(S()),lo=mb;lo.bignum=hl();lo.define=db().define;lo.base=pb();lo.constants=vb();lo.decoders=_l();lo.encoders=Al()});var _b=V(In=>{"use strict";var iP=A(S()),m4=In&&In.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),x4=In&&In.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),y4=In&&In.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&m4(e,t,r);return x4(e,t),e};Object.defineProperty(In,"__esModule",{value:!0});In.pemTojwk=P4;In.jwkTopem=L4;var pi=y4(xb());function w4(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Bl(t){return w4(Buffer.from(t,"hex").toString("base64"))}var yb=pi.define("RSAPublicKey",function(){this.seq().obj(this.key("n").int(),this.key("e").int())}),wb=pi.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}),A4=pi.define("PublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(wb),this.key("publicKey").bitstr())}),Ab=pi.define("Version",function(){this.int({0:"two-prime",1:"multi"})}),S4=pi.define("OtherPrimeInfos",function(){this.seq().obj(this.key("ri").int(),this.key("di").int(),this.key("ti").int())}),Sb=pi.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").use(Ab),this.key("n").int(),this.key("e").int(),this.key("d").int(),this.key("p").int(),this.key("q").int(),this.key("dp").int(),this.key("dq").int(),this.key("qi").int(),this.key("other").optional().use(S4))}),M4=pi.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").use(Ab),this.key("algorithm").use(wb),this.key("privateKey").bitstr())});function Mb(t,e){return e=e||{},Object.keys(e).forEach(function(r){t[r]=e[r]}),t}function Cl(t){return t.length%2===1?"0"+t:t}function Tb(t,e){var r=yb.decode(t,"der"),n=Cl(r.e.toString(16)),i={kty:"RSA",n:Oi(r.n),e:Bl(n)};return Mb(i,e)}function Eb(t,e){var r=Sb.decode(t,"der"),n=Cl(r.e.toString(16)),i={kty:"RSA",n:Oi(r.n),e:Bl(n),d:Oi(r.d),p:Oi(r.p),q:Oi(r.q),dp:Oi(r.dp),dq:Oi(r.dq),qi:Oi(r.qi)};return Mb(i,e)}function T4(t,e){var r=A4.decode(t,"der");return Tb(r.publicKey.data,e)}function E4(t,e){var r=M4.decode(t,"der");return Eb(r.privateKey.data,e)}function _4(t){var e=/^-----BEGIN (RSA )?(PUBLIC|PRIVATE) KEY-----$/.exec(t);if(!e)return null;var r=!!e[1],n=e[2]==="PRIVATE";return n?r?Eb:E4:r?Tb:T4}function B4(t){return{n:Ii(t.n),e:Ii(t.e),d:t.d&&Ii(t.d),p:t.p&&Ii(t.p),q:t.q&&Ii(t.q),dp:t.dp&&Ii(t.dp),dq:t.dq&&Ii(t.dq),qi:t.qi&&Ii(t.qi)}}function Oi(t){return Bl(Cl(t.toString(16)))}function C4(t){return new pi.bignum(Buffer.from(t,"base64"))}function Ii(t){return/^[0-9]+$/.test(t)?new pi.bignum(t,10):C4(t)}function P4(t,e){var r=t.toString().split(/(\r\n|\r|\n)+/g);r=r.filter(function(i){return i.trim().length!==0});var n=_4(r[0]);return r=r.slice(1,-1).join(""),n(Buffer.from(r.replace(/[^\w\d\+\/=]+/g,""),"base64"),e)}function L4(t){var e=B4(t),r=!!e.d,n=r?"PRIVATE":"PUBLIC",i="-----BEGIN RSA "+n+` KEY-----
3
+ `,"N.B. ArweaveJS is only guaranteed to verify txs created using ArweaveJS.")}return C}async jwkToCryptoKey(e){return this.driver.importKey("jwk",e,{name:"RSA-PSS",hash:{name:"SHA-256"}},!1,["sign"])}async jwkToPublicCryptoKey(e){return this.driver.importKey("jwk",e,{name:"RSA-PSS",hash:{name:"SHA-256"}},!1,["verify"])}detectWebCrypto(){if(typeof crypto>"u")return!1;let e=crypto?.subtle;return e===void 0?!1:["generateKey","importKey","exportKey","digest","sign"].every(n=>typeof e[n]=="function")}async encrypt(e,r,n){let i=await this.driver.importKey("raw",typeof r=="string"?Fi.stringToBuffer(r):r,{name:"PBKDF2",length:32},!1,["deriveKey"]),a=await this.driver.deriveKey({name:"PBKDF2",salt:n?Fi.stringToBuffer(n):Fi.stringToBuffer("salt"),iterations:1e5,hash:"SHA-256"},i,{name:"AES-CBC",length:256},!1,["encrypt","decrypt"]),l=new Uint8Array(16);crypto.getRandomValues(l);let b=await this.driver.encrypt({name:"AES-CBC",iv:l},a,e);return Fi.concatBuffers([l,b])}async decrypt(e,r,n){let i=await this.driver.importKey("raw",typeof r=="string"?Fi.stringToBuffer(r):r,{name:"PBKDF2",length:32},!1,["deriveKey"]),a=await this.driver.deriveKey({name:"PBKDF2",salt:n?Fi.stringToBuffer(n):Fi.stringToBuffer("salt"),iterations:1e5,hash:"SHA-256"},i,{name:"AES-CBC",length:256},!1,["encrypt","decrypt"]),l=e.slice(0,16),b=await this.driver.decrypt({name:"AES-CBC",iv:l},a,e.slice(16));return Fi.concatBuffers([b])}};Du.default=Fu});var c1=V((f1,Jf)=>{var RB=A(S());(function(t){"use strict";var e,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,n=Math.ceil,i=Math.floor,a="[BigNumber Error] ",l=a+"Number primitive has more than 15 significant digits: ",b=1e14,y=14,x=9007199254740991,_=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],C=1e7,D=1e9;function F(ie){var ee,ce,te,Y=w.prototype={constructor:w,toString:null,valueOf:null},T=new w(1),s=20,u=4,d=-7,f=21,c=-1e7,v=1e7,m=!1,h=1,o=0,p={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xA0",suffix:""},E="0123456789abcdefghijklmnopqrstuvwxyz",g=!0;function w(B,R){var L,I,q,O,J,K,N,H,Q=this;if(!(Q instanceof w))return new w(B,R);if(R==null){if(B&&B._isBigNumber===!0){Q.s=B.s,!B.c||B.e>v?Q.c=Q.e=null:B.e<c?Q.c=[Q.e=0]:(Q.e=B.e,Q.c=B.c.slice());return}if((K=typeof B=="number")&&B*0==0){if(Q.s=1/B<0?(B=-B,-1):1,B===~~B){for(O=0,J=B;J>=10;J/=10,O++);O>v?Q.c=Q.e=null:(Q.e=O,Q.c=[B]);return}H=String(B)}else{if(!r.test(H=String(B)))return te(Q,H,K);Q.s=H.charCodeAt(0)==45?(H=H.slice(1),-1):1}(O=H.indexOf("."))>-1&&(H=H.replace(".","")),(J=H.search(/e/i))>0?(O<0&&(O=J),O+=+H.slice(J+1),H=H.substring(0,J)):O<0&&(O=H.length)}else{if(X(R,2,E.length,"Base"),R==10&&g)return Q=new w(B),G(Q,s+Q.e+1,u);if(H=String(B),K=typeof B=="number"){if(B*0!=0)return te(Q,H,K,R);if(Q.s=1/B<0?(H=H.slice(1),-1):1,w.DEBUG&&H.replace(/^0\.0*|\./,"").length>15)throw Error(l+B)}else Q.s=H.charCodeAt(0)===45?(H=H.slice(1),-1):1;for(L=E.slice(0,R),O=J=0,N=H.length;J<N;J++)if(L.indexOf(I=H.charAt(J))<0){if(I=="."){if(J>O){O=N;continue}}else if(!q&&(H==H.toUpperCase()&&(H=H.toLowerCase())||H==H.toLowerCase()&&(H=H.toUpperCase()))){q=!0,J=-1,O=0;continue}return te(Q,String(B),K,R)}K=!1,H=ce(H,R,10,Q.s),(O=H.indexOf("."))>-1?H=H.replace(".",""):O=H.length}for(J=0;H.charCodeAt(J)===48;J++);for(N=H.length;H.charCodeAt(--N)===48;);if(H=H.slice(J,++N)){if(N-=J,K&&w.DEBUG&&N>15&&(B>x||B!==i(B)))throw Error(l+Q.s*B);if((O=O-J-1)>v)Q.c=Q.e=null;else if(O<c)Q.c=[Q.e=0];else{if(Q.e=O,Q.c=[],J=(O+1)%y,O<0&&(J+=y),J<N){for(J&&Q.c.push(+H.slice(0,J)),N-=y;J<N;)Q.c.push(+H.slice(J,J+=y));J=y-(H=H.slice(J)).length}else J-=N;for(;J--;H+="0");Q.c.push(+H)}}else Q.c=[Q.e=0]}w.clone=F,w.ROUND_UP=0,w.ROUND_DOWN=1,w.ROUND_CEIL=2,w.ROUND_FLOOR=3,w.ROUND_HALF_UP=4,w.ROUND_HALF_DOWN=5,w.ROUND_HALF_EVEN=6,w.ROUND_HALF_CEIL=7,w.ROUND_HALF_FLOOR=8,w.EUCLID=9,w.config=w.set=function(B){var R,L;if(B!=null)if(typeof B=="object"){if(B.hasOwnProperty(R="DECIMAL_PLACES")&&(L=B[R],X(L,0,D,R),s=L),B.hasOwnProperty(R="ROUNDING_MODE")&&(L=B[R],X(L,0,8,R),u=L),B.hasOwnProperty(R="EXPONENTIAL_AT")&&(L=B[R],L&&L.pop?(X(L[0],-D,0,R),X(L[1],0,D,R),d=L[0],f=L[1]):(X(L,-D,D,R),d=-(f=L<0?-L:L))),B.hasOwnProperty(R="RANGE"))if(L=B[R],L&&L.pop)X(L[0],-D,-1,R),X(L[1],1,D,R),c=L[0],v=L[1];else if(X(L,-D,D,R),L)c=-(v=L<0?-L:L);else throw Error(a+R+" cannot be zero: "+L);if(B.hasOwnProperty(R="CRYPTO"))if(L=B[R],L===!!L)if(L)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))m=L;else throw m=!L,Error(a+"crypto unavailable");else m=L;else throw Error(a+R+" not true or false: "+L);if(B.hasOwnProperty(R="MODULO_MODE")&&(L=B[R],X(L,0,9,R),h=L),B.hasOwnProperty(R="POW_PRECISION")&&(L=B[R],X(L,0,D,R),o=L),B.hasOwnProperty(R="FORMAT"))if(L=B[R],typeof L=="object")p=L;else throw Error(a+R+" not an object: "+L);if(B.hasOwnProperty(R="ALPHABET"))if(L=B[R],typeof L=="string"&&!/^.?$|[+\-.\s]|(.).*\1/.test(L))g=L.slice(0,10)=="0123456789",E=L;else throw Error(a+R+" invalid: "+L)}else throw Error(a+"Object expected: "+B);return{DECIMAL_PLACES:s,ROUNDING_MODE:u,EXPONENTIAL_AT:[d,f],RANGE:[c,v],CRYPTO:m,MODULO_MODE:h,POW_PRECISION:o,FORMAT:p,ALPHABET:E}},w.isBigNumber=function(B){if(!B||B._isBigNumber!==!0)return!1;if(!w.DEBUG)return!0;var R,L,I=B.c,q=B.e,O=B.s;e:if({}.toString.call(I)=="[object Array]"){if((O===1||O===-1)&&q>=-D&&q<=D&&q===i(q)){if(I[0]===0){if(q===0&&I.length===1)return!0;break e}if(R=(q+1)%y,R<1&&(R+=y),String(I[0]).length==R){for(R=0;R<I.length;R++)if(L=I[R],L<0||L>=b||L!==i(L))break e;if(L!==0)return!0}}}else if(I===null&&q===null&&(O===null||O===1||O===-1))return!0;throw Error(a+"Invalid BigNumber: "+B)},w.maximum=w.max=function(){return M(arguments,-1)},w.minimum=w.min=function(){return M(arguments,1)},w.random=function(){var B=9007199254740992,R=Math.random()*B&2097151?function(){return i(Math.random()*B)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(L){var I,q,O,J,K,N=0,H=[],Q=new w(T);if(L==null?L=s:X(L,0,D),J=n(L/y),m)if(crypto.getRandomValues){for(I=crypto.getRandomValues(new Uint32Array(J*=2));N<J;)K=I[N]*131072+(I[N+1]>>>11),K>=9e15?(q=crypto.getRandomValues(new Uint32Array(2)),I[N]=q[0],I[N+1]=q[1]):(H.push(K%1e14),N+=2);N=J/2}else if(crypto.randomBytes){for(I=crypto.randomBytes(J*=7);N<J;)K=(I[N]&31)*281474976710656+I[N+1]*1099511627776+I[N+2]*4294967296+I[N+3]*16777216+(I[N+4]<<16)+(I[N+5]<<8)+I[N+6],K>=9e15?crypto.randomBytes(7).copy(I,N):(H.push(K%1e14),N+=7);N=J/7}else throw m=!1,Error(a+"crypto unavailable");if(!m)for(;N<J;)K=R(),K<9e15&&(H[N++]=K%1e14);for(J=H[--N],L%=y,J&&L&&(K=_[y-L],H[N]=i(J/K)*K);H[N]===0;H.pop(),N--);if(N<0)H=[O=0];else{for(O=-1;H[0]===0;H.splice(0,1),O-=y);for(N=1,K=H[0];K>=10;K/=10,N++);N<y&&(O-=y-N)}return Q.e=O,Q.c=H,Q}}(),w.sum=function(){for(var B=1,R=arguments,L=new w(R[0]);B<R.length;)L=L.plus(R[B++]);return L},ce=function(){var B="0123456789";function R(L,I,q,O){for(var J,K=[0],N,H=0,Q=L.length;H<Q;){for(N=K.length;N--;K[N]*=I);for(K[0]+=O.indexOf(L.charAt(H++)),J=0;J<K.length;J++)K[J]>q-1&&(K[J+1]==null&&(K[J+1]=0),K[J+1]+=K[J]/q|0,K[J]%=q)}return K.reverse()}return function(L,I,q,O,J){var K,N,H,Q,j,re,De,se,le=L.indexOf("."),He=s,oe=u;for(le>=0&&(Q=o,o=0,L=L.replace(".",""),se=new w(I),re=se.pow(L.length-le),o=Q,se.c=R(ae(z(re.c),re.e,"0"),10,q,B),se.e=se.c.length),De=R(L,I,q,J?(K=E,B):(K=B,E)),H=Q=De.length;De[--Q]==0;De.pop());if(!De[0])return K.charAt(0);if(le<0?--H:(re.c=De,re.e=H,re.s=O,re=ee(re,se,He,oe,q),De=re.c,j=re.r,H=re.e),N=H+He+1,le=De[N],Q=q/2,j=j||N<0||De[N+1]!=null,j=oe<4?(le!=null||j)&&(oe==0||oe==(re.s<0?3:2)):le>Q||le==Q&&(oe==4||j||oe==6&&De[N-1]&1||oe==(re.s<0?8:7)),N<1||!De[0])L=j?ae(K.charAt(1),-He,K.charAt(0)):K.charAt(0);else{if(De.length=N,j)for(--q;++De[--N]>q;)De[N]=0,N||(++H,De=[1].concat(De));for(Q=De.length;!De[--Q];);for(le=0,L="";le<=Q;L+=K.charAt(De[le++]));L=ae(L,H,K.charAt(0))}return L}}(),ee=function(){function B(I,q,O){var J,K,N,H,Q=0,j=I.length,re=q%C,De=q/C|0;for(I=I.slice();j--;)N=I[j]%C,H=I[j]/C|0,J=De*N+H*re,K=re*N+J%C*C+Q,Q=(K/O|0)+(J/C|0)+De*H,I[j]=K%O;return Q&&(I=[Q].concat(I)),I}function R(I,q,O,J){var K,N;if(O!=J)N=O>J?1:-1;else for(K=N=0;K<O;K++)if(I[K]!=q[K]){N=I[K]>q[K]?1:-1;break}return N}function L(I,q,O,J){for(var K=0;O--;)I[O]-=K,K=I[O]<q[O]?1:0,I[O]=K*J+I[O]-q[O];for(;!I[0]&&I.length>1;I.splice(0,1));}return function(I,q,O,J,K){var N,H,Q,j,re,De,se,le,He,oe,fe,ze,ge,ve,xt,pe,be,$e=I.s==q.s?1:-1,de=I.c,ue=q.c;if(!de||!de[0]||!ue||!ue[0])return new w(!I.s||!q.s||(de?ue&&de[0]==ue[0]:!ue)?NaN:de&&de[0]==0||!ue?$e*0:$e/0);for(le=new w($e),He=le.c=[],H=I.e-q.e,$e=O+H+1,K||(K=b,H=P(I.e/y)-P(q.e/y),$e=$e/y|0),Q=0;ue[Q]==(de[Q]||0);Q++);if(ue[Q]>(de[Q]||0)&&H--,$e<0)He.push(1),j=!0;else{for(ve=de.length,pe=ue.length,Q=0,$e+=2,re=i(K/(ue[0]+1)),re>1&&(ue=B(ue,re,K),de=B(de,re,K),pe=ue.length,ve=de.length),ge=pe,oe=de.slice(0,pe),fe=oe.length;fe<pe;oe[fe++]=0);be=ue.slice(),be=[0].concat(be),xt=ue[0],ue[1]>=K/2&&xt++;do{if(re=0,N=R(ue,oe,pe,fe),N<0){if(ze=oe[0],pe!=fe&&(ze=ze*K+(oe[1]||0)),re=i(ze/xt),re>1)for(re>=K&&(re=K-1),De=B(ue,re,K),se=De.length,fe=oe.length;R(De,oe,se,fe)==1;)re--,L(De,pe<se?be:ue,se,K),se=De.length,N=1;else re==0&&(N=re=1),De=ue.slice(),se=De.length;if(se<fe&&(De=[0].concat(De)),L(oe,De,fe,K),fe=oe.length,N==-1)for(;R(ue,oe,pe,fe)<1;)re++,L(oe,pe<fe?be:ue,fe,K),fe=oe.length}else N===0&&(re++,oe=[0]);He[Q++]=re,oe[0]?oe[fe++]=de[ge]||0:(oe=[de[ge]],fe=1)}while((ge++<ve||oe[0]!=null)&&$e--);j=oe[0]!=null,He[0]||He.splice(0,1)}if(K==b){for(Q=1,$e=He[0];$e>=10;$e/=10,Q++);G(le,O+(le.e=Q+H*y-1)+1,J,j)}else le.e=H,le.r=+j;return le}}();function U(B,R,L,I){var q,O,J,K,N;if(L==null?L=u:X(L,0,8),!B.c)return B.toString();if(q=B.c[0],J=B.e,R==null)N=z(B.c),N=I==1||I==2&&(J<=d||J>=f)?$(N,J):ae(N,J,"0");else if(B=G(new w(B),R,L),O=B.e,N=z(B.c),K=N.length,I==1||I==2&&(R<=O||O<=d)){for(;K<R;N+="0",K++);N=$(N,O)}else if(R-=J,N=ae(N,O,"0"),O+1>K){if(--R>0)for(N+=".";R--;N+="0");}else if(R+=O-K,R>0)for(O+1==K&&(N+=".");R--;N+="0");return B.s<0&&q?"-"+N:N}function M(B,R){for(var L,I,q=1,O=new w(B[0]);q<B.length;q++)I=new w(B[q]),(!I.s||(L=W(O,I))===R||L===0&&O.s===R)&&(O=I);return O}function k(B,R,L){for(var I=1,q=R.length;!R[--q];R.pop());for(q=R[0];q>=10;q/=10,I++);return(L=I+L*y-1)>v?B.c=B.e=null:L<c?B.c=[B.e=0]:(B.e=L,B.c=R),B}te=function(){var B=/^(-?)0([xbo])(?=\w[\w.]*$)/i,R=/^([^.]+)\.$/,L=/^\.([^.]+)$/,I=/^-?(Infinity|NaN)$/,q=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(O,J,K,N){var H,Q=K?J:J.replace(q,"");if(I.test(Q))O.s=isNaN(Q)?null:Q<0?-1:1;else{if(!K&&(Q=Q.replace(B,function(j,re,De){return H=(De=De.toLowerCase())=="x"?16:De=="b"?2:8,!N||N==H?re:j}),N&&(H=N,Q=Q.replace(R,"$1").replace(L,"0.$1")),J!=Q))return new w(Q,H);if(w.DEBUG)throw Error(a+"Not a"+(N?" base "+N:"")+" number: "+J);O.s=null}O.c=O.e=null}}();function G(B,R,L,I){var q,O,J,K,N,H,Q,j=B.c,re=_;if(j){e:{for(q=1,K=j[0];K>=10;K/=10,q++);if(O=R-q,O<0)O+=y,J=R,N=j[H=0],Q=i(N/re[q-J-1]%10);else if(H=n((O+1)/y),H>=j.length)if(I){for(;j.length<=H;j.push(0));N=Q=0,q=1,O%=y,J=O-y+1}else break e;else{for(N=K=j[H],q=1;K>=10;K/=10,q++);O%=y,J=O-y+q,Q=J<0?0:i(N/re[q-J-1]%10)}if(I=I||R<0||j[H+1]!=null||(J<0?N:N%re[q-J-1]),I=L<4?(Q||I)&&(L==0||L==(B.s<0?3:2)):Q>5||Q==5&&(L==4||I||L==6&&(O>0?J>0?N/re[q-J]:0:j[H-1])%10&1||L==(B.s<0?8:7)),R<1||!j[0])return j.length=0,I?(R-=B.e+1,j[0]=re[(y-R%y)%y],B.e=-R||0):j[0]=B.e=0,B;if(O==0?(j.length=H,K=1,H--):(j.length=H+1,K=re[y-O],j[H]=J>0?i(N/re[q-J]%re[J])*K:0),I)for(;;)if(H==0){for(O=1,J=j[0];J>=10;J/=10,O++);for(J=j[0]+=K,K=1;J>=10;J/=10,K++);O!=K&&(B.e++,j[0]==b&&(j[0]=1));break}else{if(j[H]+=K,j[H]!=b)break;j[H--]=0,K=1}for(O=j.length;j[--O]===0;j.pop());}B.e>v?B.c=B.e=null:B.e<c&&(B.c=[B.e=0])}return B}function Z(B){var R,L=B.e;return L===null?B.toString():(R=z(B.c),R=L<=d||L>=f?$(R,L):ae(R,L,"0"),B.s<0?"-"+R:R)}return Y.absoluteValue=Y.abs=function(){var B=new w(this);return B.s<0&&(B.s=1),B},Y.comparedTo=function(B,R){return W(this,new w(B,R))},Y.decimalPlaces=Y.dp=function(B,R){var L,I,q,O=this;if(B!=null)return X(B,0,D),R==null?R=u:X(R,0,8),G(new w(O),B+O.e+1,R);if(!(L=O.c))return null;if(I=((q=L.length-1)-P(this.e/y))*y,q=L[q])for(;q%10==0;q/=10,I--);return I<0&&(I=0),I},Y.dividedBy=Y.div=function(B,R){return ee(this,new w(B,R),s,u)},Y.dividedToIntegerBy=Y.idiv=function(B,R){return ee(this,new w(B,R),0,1)},Y.exponentiatedBy=Y.pow=function(B,R){var L,I,q,O,J,K,N,H,Q,j=this;if(B=new w(B),B.c&&!B.isInteger())throw Error(a+"Exponent not an integer: "+Z(B));if(R!=null&&(R=new w(R)),K=B.e>14,!j.c||!j.c[0]||j.c[0]==1&&!j.e&&j.c.length==1||!B.c||!B.c[0])return Q=new w(Math.pow(+Z(j),K?B.s*(2-ne(B)):+Z(B))),R?Q.mod(R):Q;if(N=B.s<0,R){if(R.c?!R.c[0]:!R.s)return new w(NaN);I=!N&&j.isInteger()&&R.isInteger(),I&&(j=j.mod(R))}else{if(B.e>9&&(j.e>0||j.e<-1||(j.e==0?j.c[0]>1||K&&j.c[1]>=24e7:j.c[0]<8e13||K&&j.c[0]<=9999975e7)))return O=j.s<0&&ne(B)?-0:0,j.e>-1&&(O=1/O),new w(N?1/O:O);o&&(O=n(o/y+2))}for(K?(L=new w(.5),N&&(B.s=1),H=ne(B)):(q=Math.abs(+Z(B)),H=q%2),Q=new w(T);;){if(H){if(Q=Q.times(j),!Q.c)break;O?Q.c.length>O&&(Q.c.length=O):I&&(Q=Q.mod(R))}if(q){if(q=i(q/2),q===0)break;H=q%2}else if(B=B.times(L),G(B,B.e+1,1),B.e>14)H=ne(B);else{if(q=+Z(B),q===0)break;H=q%2}j=j.times(j),O?j.c&&j.c.length>O&&(j.c.length=O):I&&(j=j.mod(R))}return I?Q:(N&&(Q=T.div(Q)),R?Q.mod(R):O?G(Q,o,u,J):Q)},Y.integerValue=function(B){var R=new w(this);return B==null?B=u:X(B,0,8),G(R,R.e+1,B)},Y.isEqualTo=Y.eq=function(B,R){return W(this,new w(B,R))===0},Y.isFinite=function(){return!!this.c},Y.isGreaterThan=Y.gt=function(B,R){return W(this,new w(B,R))>0},Y.isGreaterThanOrEqualTo=Y.gte=function(B,R){return(R=W(this,new w(B,R)))===1||R===0},Y.isInteger=function(){return!!this.c&&P(this.e/y)>this.c.length-2},Y.isLessThan=Y.lt=function(B,R){return W(this,new w(B,R))<0},Y.isLessThanOrEqualTo=Y.lte=function(B,R){return(R=W(this,new w(B,R)))===-1||R===0},Y.isNaN=function(){return!this.s},Y.isNegative=function(){return this.s<0},Y.isPositive=function(){return this.s>0},Y.isZero=function(){return!!this.c&&this.c[0]==0},Y.minus=function(B,R){var L,I,q,O,J=this,K=J.s;if(B=new w(B,R),R=B.s,!K||!R)return new w(NaN);if(K!=R)return B.s=-R,J.plus(B);var N=J.e/y,H=B.e/y,Q=J.c,j=B.c;if(!N||!H){if(!Q||!j)return Q?(B.s=-R,B):new w(j?J:NaN);if(!Q[0]||!j[0])return j[0]?(B.s=-R,B):new w(Q[0]?J:u==3?-0:0)}if(N=P(N),H=P(H),Q=Q.slice(),K=N-H){for((O=K<0)?(K=-K,q=Q):(H=N,q=j),q.reverse(),R=K;R--;q.push(0));q.reverse()}else for(I=(O=(K=Q.length)<(R=j.length))?K:R,K=R=0;R<I;R++)if(Q[R]!=j[R]){O=Q[R]<j[R];break}if(O&&(q=Q,Q=j,j=q,B.s=-B.s),R=(I=j.length)-(L=Q.length),R>0)for(;R--;Q[L++]=0);for(R=b-1;I>K;){if(Q[--I]<j[I]){for(L=I;L&&!Q[--L];Q[L]=R);--Q[L],Q[I]+=b}Q[I]-=j[I]}for(;Q[0]==0;Q.splice(0,1),--H);return Q[0]?k(B,Q,H):(B.s=u==3?-1:1,B.c=[B.e=0],B)},Y.modulo=Y.mod=function(B,R){var L,I,q=this;return B=new w(B,R),!q.c||!B.s||B.c&&!B.c[0]?new w(NaN):!B.c||q.c&&!q.c[0]?new w(q):(h==9?(I=B.s,B.s=1,L=ee(q,B,0,3),B.s=I,L.s*=I):L=ee(q,B,0,h),B=q.minus(L.times(B)),!B.c[0]&&h==1&&(B.s=q.s),B)},Y.multipliedBy=Y.times=function(B,R){var L,I,q,O,J,K,N,H,Q,j,re,De,se,le,He,oe=this,fe=oe.c,ze=(B=new w(B,R)).c;if(!fe||!ze||!fe[0]||!ze[0])return!oe.s||!B.s||fe&&!fe[0]&&!ze||ze&&!ze[0]&&!fe?B.c=B.e=B.s=null:(B.s*=oe.s,!fe||!ze?B.c=B.e=null:(B.c=[0],B.e=0)),B;for(I=P(oe.e/y)+P(B.e/y),B.s*=oe.s,N=fe.length,j=ze.length,N<j&&(se=fe,fe=ze,ze=se,q=N,N=j,j=q),q=N+j,se=[];q--;se.push(0));for(le=b,He=C,q=j;--q>=0;){for(L=0,re=ze[q]%He,De=ze[q]/He|0,J=N,O=q+J;O>q;)H=fe[--J]%He,Q=fe[J]/He|0,K=De*H+Q*re,H=re*H+K%He*He+se[O]+L,L=(H/le|0)+(K/He|0)+De*Q,se[O--]=H%le;se[O]=L}return L?++I:se.splice(0,1),k(B,se,I)},Y.negated=function(){var B=new w(this);return B.s=-B.s||null,B},Y.plus=function(B,R){var L,I=this,q=I.s;if(B=new w(B,R),R=B.s,!q||!R)return new w(NaN);if(q!=R)return B.s=-R,I.minus(B);var O=I.e/y,J=B.e/y,K=I.c,N=B.c;if(!O||!J){if(!K||!N)return new w(q/0);if(!K[0]||!N[0])return N[0]?B:new w(K[0]?I:q*0)}if(O=P(O),J=P(J),K=K.slice(),q=O-J){for(q>0?(J=O,L=N):(q=-q,L=K),L.reverse();q--;L.push(0));L.reverse()}for(q=K.length,R=N.length,q-R<0&&(L=N,N=K,K=L,R=q),q=0;R;)q=(K[--R]=K[R]+N[R]+q)/b|0,K[R]=b===K[R]?0:K[R]%b;return q&&(K=[q].concat(K),++J),k(B,K,J)},Y.precision=Y.sd=function(B,R){var L,I,q,O=this;if(B!=null&&B!==!!B)return X(B,1,D),R==null?R=u:X(R,0,8),G(new w(O),B,R);if(!(L=O.c))return null;if(q=L.length-1,I=q*y+1,q=L[q]){for(;q%10==0;q/=10,I--);for(q=L[0];q>=10;q/=10,I++);}return B&&O.e+1>I&&(I=O.e+1),I},Y.shiftedBy=function(B){return X(B,-x,x),this.times("1e"+B)},Y.squareRoot=Y.sqrt=function(){var B,R,L,I,q,O=this,J=O.c,K=O.s,N=O.e,H=s+4,Q=new w("0.5");if(K!==1||!J||!J[0])return new w(!K||K<0&&(!J||J[0])?NaN:J?O:1/0);if(K=Math.sqrt(+Z(O)),K==0||K==1/0?(R=z(J),(R.length+N)%2==0&&(R+="0"),K=Math.sqrt(+R),N=P((N+1)/2)-(N<0||N%2),K==1/0?R="5e"+N:(R=K.toExponential(),R=R.slice(0,R.indexOf("e")+1)+N),L=new w(R)):L=new w(K+""),L.c[0]){for(N=L.e,K=N+H,K<3&&(K=0);;)if(q=L,L=Q.times(q.plus(ee(O,q,H,1))),z(q.c).slice(0,K)===(R=z(L.c)).slice(0,K))if(L.e<N&&--K,R=R.slice(K-3,K+1),R=="9999"||!I&&R=="4999"){if(!I&&(G(q,q.e+s+2,0),q.times(q).eq(O))){L=q;break}H+=4,K+=4,I=1}else{(!+R||!+R.slice(1)&&R.charAt(0)=="5")&&(G(L,L.e+s+2,1),B=!L.times(L).eq(O));break}}return G(L,L.e+s+1,u,B)},Y.toExponential=function(B,R){return B!=null&&(X(B,0,D),B++),U(this,B,R,1)},Y.toFixed=function(B,R){return B!=null&&(X(B,0,D),B=B+this.e+1),U(this,B,R)},Y.toFormat=function(B,R,L){var I,q=this;if(L==null)B!=null&&R&&typeof R=="object"?(L=R,R=null):B&&typeof B=="object"?(L=B,B=R=null):L=p;else if(typeof L!="object")throw Error(a+"Argument not an object: "+L);if(I=q.toFixed(B,R),q.c){var O,J=I.split("."),K=+L.groupSize,N=+L.secondaryGroupSize,H=L.groupSeparator||"",Q=J[0],j=J[1],re=q.s<0,De=re?Q.slice(1):Q,se=De.length;if(N&&(O=K,K=N,N=O,se-=O),K>0&&se>0){for(O=se%K||K,Q=De.substr(0,O);O<se;O+=K)Q+=H+De.substr(O,K);N>0&&(Q+=H+De.slice(O)),re&&(Q="-"+Q)}I=j?Q+(L.decimalSeparator||"")+((N=+L.fractionGroupSize)?j.replace(new RegExp("\\d{"+N+"}\\B","g"),"$&"+(L.fractionGroupSeparator||"")):j):Q}return(L.prefix||"")+I+(L.suffix||"")},Y.toFraction=function(B){var R,L,I,q,O,J,K,N,H,Q,j,re,De=this,se=De.c;if(B!=null&&(K=new w(B),!K.isInteger()&&(K.c||K.s!==1)||K.lt(T)))throw Error(a+"Argument "+(K.isInteger()?"out of range: ":"not an integer: ")+Z(K));if(!se)return new w(De);for(R=new w(T),H=L=new w(T),I=N=new w(T),re=z(se),O=R.e=re.length-De.e-1,R.c[0]=_[(J=O%y)<0?y+J:J],B=!B||K.comparedTo(R)>0?O>0?R:H:K,J=v,v=1/0,K=new w(re),N.c[0]=0;Q=ee(K,R,0,1),q=L.plus(Q.times(I)),q.comparedTo(B)!=1;)L=I,I=q,H=N.plus(Q.times(q=H)),N=q,R=K.minus(Q.times(q=R)),K=q;return q=ee(B.minus(L),I,0,1),N=N.plus(q.times(H)),L=L.plus(q.times(I)),N.s=H.s=De.s,O=O*2,j=ee(H,I,O,u).minus(De).abs().comparedTo(ee(N,L,O,u).minus(De).abs())<1?[H,I]:[N,L],v=J,j},Y.toNumber=function(){return+Z(this)},Y.toPrecision=function(B,R){return B!=null&&X(B,1,D),U(this,B,R,2)},Y.toString=function(B){var R,L=this,I=L.s,q=L.e;return q===null?I?(R="Infinity",I<0&&(R="-"+R)):R="NaN":(B==null?R=q<=d||q>=f?$(z(L.c),q):ae(z(L.c),q,"0"):B===10&&g?(L=G(new w(L),s+q+1,u),R=ae(z(L.c),L.e,"0")):(X(B,2,E.length,"Base"),R=ce(ae(z(L.c),q,"0"),10,B,I,!0)),I<0&&L.c[0]&&(R="-"+R)),R},Y.valueOf=Y.toJSON=function(){return Z(this)},Y._isBigNumber=!0,ie!=null&&w.set(ie),w}function P(ie){var ee=ie|0;return ie>0||ie===ee?ee:ee-1}function z(ie){for(var ee,ce,te=1,Y=ie.length,T=ie[0]+"";te<Y;){for(ee=ie[te++]+"",ce=y-ee.length;ce--;ee="0"+ee);T+=ee}for(Y=T.length;T.charCodeAt(--Y)===48;);return T.slice(0,Y+1||1)}function W(ie,ee){var ce,te,Y=ie.c,T=ee.c,s=ie.s,u=ee.s,d=ie.e,f=ee.e;if(!s||!u)return null;if(ce=Y&&!Y[0],te=T&&!T[0],ce||te)return ce?te?0:-u:s;if(s!=u)return s;if(ce=s<0,te=d==f,!Y||!T)return te?0:!Y^ce?1:-1;if(!te)return d>f^ce?1:-1;for(u=(d=Y.length)<(f=T.length)?d:f,s=0;s<u;s++)if(Y[s]!=T[s])return Y[s]>T[s]^ce?1:-1;return d==f?0:d>f^ce?1:-1}function X(ie,ee,ce,te){if(ie<ee||ie>ce||ie!==i(ie))throw Error(a+(te||"Argument")+(typeof ie=="number"?ie<ee||ie>ce?" out of range: ":" not an integer: ":" not a primitive number: ")+String(ie))}function ne(ie){var ee=ie.c.length-1;return P(ie.e/y)==ee&&ie.c[ee]%2!=0}function $(ie,ee){return(ie.length>1?ie.charAt(0)+"."+ie.slice(1):ie)+(ee<0?"e":"e+")+ee}function ae(ie,ee,ce){var te,Y;if(ee<0){for(Y=ce+".";++ee;Y+=ce);ie=Y+ie}else if(te=ie.length,++ee>te){for(Y=ce,ee-=te;--ee;Y+=ce);ie+=Y}else ee<te&&(ie=ie.slice(0,ee)+"."+ie.slice(ee));return ie}e=F(),e.default=e.BigNumber=e,typeof define=="function"&&define.amd?define(function(){return e}):typeof Jf<"u"&&Jf.exports?Jf.exports=e:(t||(t=typeof self<"u"&&self?self:window),t.BigNumber=e)})(f1)});var u1=V(ku=>{"use strict";var DB=A(S());Object.defineProperty(ku,"__esModule",{value:!0});var w6=c1(),Ou=class{BigNum;constructor(){this.BigNum=(e,r)=>{let n=w6.BigNumber.clone({DECIMAL_PLACES:r});return new n(e)}}winstonToAr(e,{formatted:r=!1,decimals:n=12,trim:i=!0}={}){let a=this.stringToBigNum(e,n).shiftedBy(-12);return r?a.toFormat(n):a.toFixed(n)}arToWinston(e,{formatted:r=!1}={}){let n=this.stringToBigNum(e).shiftedBy(12);return r?n.toFormat():n.toFixed(0)}compare(e,r){let n=this.stringToBigNum(e),i=this.stringToBigNum(r);return n.comparedTo(i)}isEqual(e,r){return this.compare(e,r)===0}isLessThan(e,r){let n=this.stringToBigNum(e),i=this.stringToBigNum(r);return n.isLessThan(i)}isGreaterThan(e,r){let n=this.stringToBigNum(e),i=this.stringToBigNum(r);return n.isGreaterThan(i)}add(e,r){let n=this.stringToBigNum(e),i=this.stringToBigNum(r);return n.plus(r).toFixed(0)}sub(e,r){let n=this.stringToBigNum(e),i=this.stringToBigNum(r);return n.minus(r).toFixed(0)}stringToBigNum(e,r=12){return this.BigNum(e,r)}};ku.default=Ou});var l1=V(Ju=>{"use strict";var OB=A(S());Object.defineProperty(Ju,"__esModule",{value:!0});var Nu=class{METHOD_GET="GET";METHOD_POST="POST";config;constructor(e){this.applyConfig(e)}applyConfig(e){this.config=this.mergeDefaults(e)}getConfig(){return this.config}mergeDefaults(e){let r=e.protocol||"http",n=e.port||(r==="https"?443:80);return{host:e.host||"127.0.0.1",protocol:r,port:n,timeout:e.timeout||2e4,logging:e.logging||!1,logger:e.logger||console.log,network:e.network}}async get(e,r){return await this.request(e,{...r,method:this.METHOD_GET})}async post(e,r,n){let i=new Headers(n?.headers||{});return i.get("content-type")?.includes("application/json")||i.append("content-type","application/json"),i.append("accept","application/json, text/plain, */*"),await this.request(e,{...n,method:this.METHOD_POST,body:typeof r!="string"?JSON.stringify(r):r,headers:i})}async request(e,r){let n=new Headers(r?.headers||{}),i=`${this.config.protocol}://${this.config.host}:${this.config.port}`,a=r?.responseType;delete r?.responseType,e.startsWith("/")&&(e=e.slice(1)),this.config.network&&n.append("x-network",this.config.network),this.config.logging&&this.config.logger(`Requesting: ${i}/${e}`);let l=await fetch(`${i}/${e}`,{...r||{},headers:n});this.config.logging&&this.config.logger(`Response: ${l.url} - ${l.status}`);let y=l.headers.get("content-type")?.match(/charset=([^()<>@,;:\"/[\]?.=\s]*)/i)?.[1],x=l,_=async()=>{if(y)try{x.data=new TextDecoder(y).decode(await l.arrayBuffer())}catch{x.data=await l.text()}else x.data=await l.text()};if(a==="arraybuffer")x.data=await l.arrayBuffer();else if(a==="text")await _();else if(a==="webstream")x.data=A6(l.body);else try{let C=await l.clone().json();typeof C!="object"?await _():x.data=await l.json(),C=null}catch{await _()}return x}};Ju.default=Nu;var A6=t=>{let e=t;return typeof e[Symbol.asyncIterator]>"u"&&(e[Symbol.asyncIterator]=S6(t)),e},S6=function(t){return async function*(){let r=t.getReader();try{for(;;){let{done:n,value:i}=await r.read();if(n)return;yield i}}finally{r.releaseLock()}}}});var d1=V(Hu=>{"use strict";var NB=A(S());Object.defineProperty(Hu,"__esModule",{value:!0});var Uu=class{api;constructor(e){this.api=e}getInfo(){return this.api.get("info").then(e=>e.data)}getPeers(){return this.api.get("peers").then(e=>e.data)}};Hu.default=Uu});var hs=V(Uf=>{"use strict";var UB=A(S());Object.defineProperty(Uf,"__esModule",{value:!0});Uf.getError=M6;var qu=class extends Error{type;response;constructor(e,r={}){r.message?super(r.message):super(),this.type=e,this.response=r.response}getType(){return this.type}};Uf.default=qu;function M6(t){let e=t.data;if(typeof t.data=="string")try{e=JSON.parse(t.data)}catch{}if(t.data instanceof ArrayBuffer||t.data instanceof Uint8Array)try{e=JSON.parse(e.toString())}catch{}return e?e.error||e:t.statusText||"unknown"}});var Vu=V(ct=>{"use strict";var qB=A(S());Object.defineProperty(ct,"__esModule",{value:!0});ct.arrayCompare=ct.MIN_CHUNK_SIZE=ct.MAX_CHUNK_SIZE=void 0;ct.chunkData=Xu;ct.generateLeaves=zu;ct.computeRootHash=T6;ct.generateTree=p1;ct.generateTransactionChunks=E6;ct.buildLayers=qf;ct.generateProofs=b1;ct.arrayFlatten=Ku;ct.intToBuffer=gs;ct.bufferToInt=Zu;ct.validatePath=ps;ct.debug=g1;var Hf=vs(),h1=gn();ct.MAX_CHUNK_SIZE=256*1024;ct.MIN_CHUNK_SIZE=32*1024;var bs=32,ro=32;async function Xu(t){let e=[],r=t,n=0;for(;r.byteLength>=ct.MAX_CHUNK_SIZE;){let i=ct.MAX_CHUNK_SIZE,a=r.byteLength-ct.MAX_CHUNK_SIZE;a>0&&a<ct.MIN_CHUNK_SIZE&&(i=Math.ceil(r.byteLength/2));let l=r.slice(0,i),b=await Hf.default.crypto.hash(l);n+=l.byteLength,e.push({dataHash:b,minByteRange:n-l.byteLength,maxByteRange:n}),r=r.slice(i)}return e.push({dataHash:await Hf.default.crypto.hash(r),minByteRange:n,maxByteRange:n+r.byteLength}),e}async function zu(t){return Promise.all(t.map(async({dataHash:e,minByteRange:r,maxByteRange:n})=>({type:"leaf",id:await Nt(await Promise.all([Nt(e),Nt(gs(n))])),dataHash:e,minByteRange:r,maxByteRange:n})))}async function T6(t){return(await p1(t)).id}async function p1(t){return await qf(await zu(await Xu(t)))}async function E6(t){let e=await Xu(t),r=await zu(e),n=await qf(r),i=await b1(n),a=e.slice(-1)[0];return a.maxByteRange-a.minByteRange===0&&(e.splice(e.length-1,1),i.splice(i.length-1,1)),{data_root:n.id,chunks:e,proofs:i}}async function qf(t,e=0){if(t.length<2)return t[0];let r=[];for(let n=0;n<t.length;n+=2)r.push(await _6(t[n],t[n+1]));return qf(r,e+1)}function b1(t){let e=Gu(t);return Array.isArray(e)?Ku(e):[e]}function Gu(t,e=new Uint8Array,r=0){if(t.type=="leaf")return{offset:t.maxByteRange-1,proof:(0,h1.concatBuffers)([e,t.dataHash,gs(t.maxByteRange)])};if(t.type=="branch"){let n=(0,h1.concatBuffers)([e,t.leftChild.id,t.rightChild.id,gs(t.byteRange)]);return[Gu(t.leftChild,n,r+1),Gu(t.rightChild,n,r+1)]}throw new Error("Unexpected node type")}function Ku(t){let e=[];return t.forEach(r=>{Array.isArray(r)?e.push(...Ku(r)):e.push(r)}),e}async function _6(t,e){return e?{type:"branch",id:await Nt([await Nt(t.id),await Nt(e.id),await Nt(gs(t.maxByteRange))]),byteRange:t.maxByteRange,maxByteRange:e.maxByteRange,leftChild:t,rightChild:e}:t}async function Nt(t){return Array.isArray(t)&&(t=Hf.default.utils.concatBuffers(t)),new Uint8Array(await Hf.default.crypto.hash(t))}function gs(t){let e=new Uint8Array(bs);for(var r=e.length-1;r>=0;r--){var n=t%256;e[r]=n,t=(t-n)/256}return e}function Zu(t){let e=0;for(var r=0;r<t.length;r++)e*=256,e+=t[r];return e}var B6=(t,e)=>t.every((r,n)=>e[n]===r);ct.arrayCompare=B6;async function ps(t,e,r,n,i){if(n<=0)return!1;if(e>=n)return ps(t,0,n-1,n,i);if(e<0)return ps(t,0,0,n,i);if(i.length==ro+bs){let C=i.slice(0,ro),D=i.slice(C.length,C.length+bs),F=await Nt([await Nt(C),await Nt(D)]);return(0,ct.arrayCompare)(t,F)?{offset:n-1,leftBound:r,rightBound:n,chunkSize:n-r}:!1}let a=i.slice(0,ro),l=i.slice(a.length,a.length+ro),b=i.slice(a.length+l.length,a.length+l.length+bs),y=Zu(b),x=i.slice(a.length+l.length+b.length),_=await Nt([await Nt(a),await Nt(l),await Nt(b)]);return(0,ct.arrayCompare)(t,_)?e<y?await ps(a,e,r,Math.min(n,y),x):await ps(l,e,Math.max(r,y),n,x):!1}async function g1(t,e=""){if(t.byteLength<1)return e;let r=t.slice(0,ro),n=t.slice(r.length,r.length+ro),i=t.slice(r.length+n.length,r.length+n.length+bs),a=Zu(i),l=t.slice(r.length+n.length+i.length),b=await Nt([await Nt(r),await Nt(n),await Nt(i)]),y=`${e}
4
+ ${JSON.stringify(Buffer.from(r))},${JSON.stringify(Buffer.from(n))},${a} => ${JSON.stringify(b)}`;return g1(l,y)}});var y1=V(Gf=>{"use strict";var XB=A(S());Object.defineProperty(Gf,"__esModule",{value:!0});Gf.TransactionUploader=void 0;var v1=ms(),C6=gn(),ju=hs(),P6=Vu(),m1=1,L6=["invalid_json","chunk_too_big","data_path_too_big","offset_too_big","data_size_too_big","chunk_proof_ratio_not_attractive","invalid_proof"],x1=1e3*40,Qu=class t{api;chunkIndex=0;txPosted=!1;transaction;lastRequestTimeEnd=0;totalErrors=0;data;lastResponseStatus=0;lastResponseError="";get isComplete(){return this.txPosted&&this.chunkIndex===this.transaction.chunks.chunks.length}get totalChunks(){return this.transaction.chunks.chunks.length}get uploadedChunks(){return this.chunkIndex}get pctComplete(){return Math.trunc(this.uploadedChunks/this.totalChunks*100)}constructor(e,r){if(this.api=e,!r.id)throw new Error("Transaction is not signed");if(!r.chunks)throw new Error("Transaction chunks not prepared");this.data=r.data,this.transaction=new v1.default(Object.assign({},r,{data:new Uint8Array(0)}))}async uploadChunk(e){if(this.isComplete)throw new Error("Upload is already complete");if(this.lastResponseError!==""?this.totalErrors++:this.totalErrors=0,this.totalErrors===100)throw new Error(`Unable to complete upload: ${this.lastResponseStatus}: ${this.lastResponseError}`);let r=this.lastResponseError===""?0:Math.max(this.lastRequestTimeEnd+x1-Date.now(),x1);if(r>0&&(r=r-r*Math.random()*.3,await new Promise(l=>setTimeout(l,r))),this.lastResponseError="",!this.txPosted){await this.postTransaction();return}e&&(this.chunkIndex=e);let n=this.transaction.getChunk(e||this.chunkIndex,this.data);if(!await(0,P6.validatePath)(this.transaction.chunks.data_root,parseInt(n.offset),0,parseInt(n.data_size),C6.b64UrlToBuffer(n.data_path)))throw new Error(`Unable to validate chunk ${this.chunkIndex}`);let a=await this.api.post("chunk",this.transaction.getChunk(this.chunkIndex,this.data)).catch(l=>(console.error(l.message),{status:-1,data:{error:l.message}}));if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=a.status,this.lastResponseStatus==200)this.chunkIndex++;else if(this.lastResponseError=(0,ju.getError)(a),L6.includes(this.lastResponseError))throw new Error(`Fatal error uploading chunk ${this.chunkIndex}: ${this.lastResponseError}`)}static async fromSerialized(e,r,n){if(!r||typeof r.chunkIndex!="number"||typeof r.transaction!="object")throw new Error("Serialized object does not match expected format.");var i=new v1.default(r.transaction);i.chunks||await i.prepareChunks(n);let a=new t(e,i);if(a.chunkIndex=r.chunkIndex,a.lastRequestTimeEnd=r.lastRequestTimeEnd,a.lastResponseError=r.lastResponseError,a.lastResponseStatus=r.lastResponseStatus,a.txPosted=r.txPosted,a.data=n,a.transaction.data_root!==r.transaction.data_root)throw new Error("Data mismatch: Uploader doesn't match provided data.");return a}static async fromTransactionId(e,r){let n=await e.get(`tx/${r}`);if(n.status!==200)throw new Error(`Tx ${r} not found: ${n.status}`);let i=n.data;return i.data=new Uint8Array(0),{txPosted:!0,chunkIndex:0,lastResponseError:"",lastRequestTimeEnd:0,lastResponseStatus:0,transaction:i}}toJSON(){return{chunkIndex:this.chunkIndex,transaction:this.transaction,lastRequestTimeEnd:this.lastRequestTimeEnd,lastResponseStatus:this.lastResponseStatus,lastResponseError:this.lastResponseError,txPosted:this.txPosted}}async postTransaction(){if(this.totalChunks<=m1){this.transaction.data=this.data;let n=await this.api.post("tx",this.transaction).catch(i=>(console.error(i),{status:-1,data:{error:i.message}}));if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=n.status,this.transaction.data=new Uint8Array(0),n.status>=200&&n.status<300){this.txPosted=!0,this.chunkIndex=m1;return}throw this.lastResponseError=(0,ju.getError)(n),new Error(`Unable to upload transaction: ${n.status}, ${this.lastResponseError}`)}let r=await this.api.post("tx",this.transaction);if(this.lastRequestTimeEnd=Date.now(),this.lastResponseStatus=r.status,!(r.status>=200&&r.status<300))throw this.lastResponseError=(0,ju.getError)(r),new Error(`Unable to upload transaction: ${r.status}, ${this.lastResponseError}`);this.txPosted=!0}};Gf.TransactionUploader=Qu});var Xf=V((zB,w1)=>{var KB=A(S());w1.exports={}});var A1=V(el=>{"use strict";var VB=A(S());Object.defineProperty(el,"__esModule",{value:!0});var Wu=hs(),li=ms(),xs=gn(),Yu=y1();Xf();var $u=class{api;crypto;chunks;constructor(e,r,n){this.api=e,this.crypto=r,this.chunks=n}async getTransactionAnchor(){let e=await this.api.get("tx_anchor");if(!e.data.match(/^[a-z0-9_-]{43,}/i)||!e.ok)throw new Error(`Could not getTransactionAnchor. Received: ${e.data}. Status: ${e.status}, ${e.statusText}`);return e.data}async getPrice(e,r){let n=r?`price/${e}/${r}`:`price/${e}`,i=await this.api.get(n);if(!/^\d+$/.test(i.data)||!i.ok)throw new Error(`Could not getPrice. Received: ${i.data}. Status: ${i.status}, ${i.statusText}`);return i.data}async get(e){let r=await this.api.get(`tx/${e}`);if(r.status==200){let n=parseInt(r.data.data_size);if(r.data.format>=2&&n>0&&n<=1024*1024*12){let i=await this.getData(e);return new li.default({...r.data,data:i})}return new li.default({...r.data,format:r.data.format||1})}throw r.status==404?new Wu.default("TX_NOT_FOUND"):r.status==410?new Wu.default("TX_FAILED"):new Wu.default("TX_INVALID")}fromRaw(e){return new li.default(e)}async search(e,r){return this.api.post("arql",{op:"equals",expr1:e,expr2:r}).then(n=>n.data?n.data:[])}getStatus(e){return this.api.get(`tx/${e}/status`).then(r=>r.status==200?{status:200,confirmed:r.data}:{status:r.status,confirmed:null})}async getData(e,r){let n;try{n=await this.chunks.downloadChunkedData(e)}catch(i){console.error(`Error while trying to download chunked data for ${e}`),console.error(i)}if(!n){console.warn(`Falling back to gateway cache for ${e}`);try{let{data:i,ok:a,status:l,statusText:b}=await this.api.get(`/${e}`,{responseType:"arraybuffer"});if(!a)throw new Error("Bad http status code",{cause:{status:l,statusText:b}});n=i}catch(i){console.error(`Error while trying to download contiguous data from gateway cache for ${e}`),console.error(i)}}if(!n)throw new Error(`${e} data was not found!`);return r&&r.decode&&!r.string?n:r&&r.decode&&r.string?xs.bufferToString(n):xs.bufferTob64Url(n)}async sign(e,r,n){let a=typeof r=="object"&&(b=>{let y=!0;return["n","e","d","p","q","dp","dq","qi"].map(x=>!(x in b)&&(y=!1)),y})(r),l=typeof arweaveWallet=="object";if(!a&&!l)throw new Error("No valid JWK or external wallet found to sign transaction.");if(a){e.setOwner(r.n);let b=await e.getSignatureData(),y=await this.crypto.sign(r,b,n),x=await this.crypto.hash(y);e.setSignature({id:xs.bufferTob64Url(x),owner:r.n,signature:xs.bufferTob64Url(y)})}else if(l){try{(await arweaveWallet.getPermissions()).includes("SIGN_TRANSACTION")||await arweaveWallet.connect(["SIGN_TRANSACTION"])}catch{}let b=await arweaveWallet.sign(e,n);e.setSignature({id:b.id,owner:b.owner,reward:b.reward,tags:b.tags,signature:b.signature})}else throw new Error("An error occurred while signing. Check wallet is valid")}async verify(e){let r=await e.getSignatureData(),n=e.get("signature",{decode:!0,string:!1}),i=xs.bufferTob64Url(await this.crypto.hash(n));if(e.id!==i)throw new Error("Invalid transaction signature or ID! The transaction ID doesn't match the expected SHA-256 hash of the signature.");return this.crypto.verify(e.owner,r,n)}async post(e){if(typeof e=="string"?e=new li.default(JSON.parse(e)):typeof e.readInt32BE=="function"?e=new li.default(JSON.parse(e.toString())):typeof e=="object"&&!(e instanceof li.default)&&(e=new li.default(e)),!(e instanceof li.default))throw new Error("Must be Transaction object");e.chunks||await e.prepareChunks(e.data);let r=await this.getUploader(e,e.data);try{for(;!r.isComplete;)await r.uploadChunk()}catch(n){if(r.lastResponseStatus>0)return{status:r.lastResponseStatus,statusText:r.lastResponseError,data:{error:r.lastResponseError}};throw n}return{status:200,statusText:"OK",data:{}}}async getUploader(e,r){let n;if(r instanceof ArrayBuffer&&(r=new Uint8Array(r)),e instanceof li.default){if(r||(r=e.data),!(r instanceof Uint8Array))throw new Error("Data format is invalid");e.chunks||await e.prepareChunks(r),n=new Yu.TransactionUploader(this.api,e),(!n.data||n.data.length===0)&&(n.data=r)}else{if(typeof e=="string"&&(e=await Yu.TransactionUploader.fromTransactionId(this.api,e)),!r||!(r instanceof Uint8Array))throw new Error("Must provide data when resuming upload");n=await Yu.TransactionUploader.fromSerialized(this.api,e,r)}return n}async*upload(e,r){let n=await this.getUploader(e,r);for(;!n.isComplete;)await n.uploadChunk(),yield n;return n}};el.default=$u});var M1=V(rl=>{"use strict";var QB=A(S());Object.defineProperty(rl,"__esModule",{value:!0});var S1=gn();Xf();var tl=class{api;crypto;constructor(e,r){this.api=e,this.crypto=r}getBalance(e){return this.api.get(`wallet/${e}/balance`).then(r=>r.data)}getLastTransactionID(e){return this.api.get(`wallet/${e}/last_tx`).then(r=>r.data)}generate(){return this.crypto.generateJWK()}async jwkToAddress(e){return!e||e==="use_wallet"?this.getAddress():this.getAddress(e)}async getAddress(e){if(!e||e==="use_wallet"){try{await arweaveWallet.connect(["ACCESS_ADDRESS"])}catch{}return arweaveWallet.getActiveAddress()}else return this.ownerToAddress(e.n)}async ownerToAddress(e){return S1.bufferTob64Url(await this.crypto.hash(S1.b64UrlToBuffer(e)))}};rl.default=tl});var E1=V(ys=>{"use strict";var YB=A(S());Object.defineProperty(ys,"__esModule",{value:!0});ys.SiloResource=void 0;var T1=gn(),nl=class{api;crypto;transactions;constructor(e,r,n){this.api=e,this.crypto=r,this.transactions=n}async get(e){if(!e)throw new Error("No Silo URI specified");let r=await this.parseUri(e),n=await this.transactions.search("Silo-Name",r.getAccessKey());if(n.length==0)throw new Error(`No data could be found for the Silo URI: ${e}`);let i=await this.transactions.get(n[0]);if(!i)throw new Error(`No data could be found for the Silo URI: ${e}`);let a=i.get("data",{decode:!0,string:!1});return this.crypto.decrypt(a,r.getEncryptionKey())}async readTransactionData(e,r){if(!r)throw new Error("No Silo URI specified");let n=await this.parseUri(r),i=e.get("data",{decode:!0,string:!1});return this.crypto.decrypt(i,n.getEncryptionKey())}async parseUri(e){let r=e.match(/^([a-z0-9-_]+)\.([0-9]+)/i);if(!r)throw new Error("Invalid Silo name, must be a name in the format of [a-z0-9]+.[0-9]+, e.g. 'bubble.7'");let n=r[1],i=Math.pow(2,parseInt(r[2])),a=await this.hash(T1.stringToBuffer(n),i),l=T1.bufferTob64(a.slice(0,15)),b=await this.hash(a.slice(16,31),1);return new zf(e,l,b)}async hash(e,r){let n=await this.crypto.hash(e);for(let i=0;i<r-1;i++)n=await this.crypto.hash(n);return n}};ys.default=nl;var zf=class{uri;accessKey;encryptionKey;constructor(e,r,n){this.uri=e,this.accessKey=r,this.encryptionKey=n}getUri(){return this.uri}getAccessKey(){return this.accessKey}getEncryptionKey(){return this.encryptionKey}};ys.SiloResource=zf});var B1=V(al=>{"use strict";var eC=A(S());Object.defineProperty(al,"__esModule",{value:!0});var _1=hs(),R6=gn(),il=class{api;constructor(e){this.api=e}async getTransactionOffset(e){let r=await this.api.get(`tx/${e}/offset`);if(r.status===200)return r.data;throw new Error(`Unable to get transaction offset: ${(0,_1.getError)(r)}`)}async getChunk(e){let r=await this.api.get(`chunk/${e}`);if(r.status===200)return r.data;throw new Error(`Unable to get chunk: ${(0,_1.getError)(r)}`)}async getChunkData(e){let r=await this.getChunk(e);return R6.b64UrlToBuffer(r.chunk)}firstChunkOffset(e){return parseInt(e.offset)-parseInt(e.size)+1}async downloadChunkedData(e){let r=await this.getTransactionOffset(e),n=parseInt(r.size),a=parseInt(r.offset)-n+1,l=new Uint8Array(n),b=0;for(;b<n;){this.api.config.logging&&console.log(`[chunk] ${b}/${n}`);let y;try{y=await this.getChunkData(a+b)}catch{console.error(`[chunk] Failed to fetch chunk at offset ${a+b}`),console.error("[chunk] This could indicate that the chunk wasn't uploaded or hasn't yet seeded properly to a particular gateway/node")}if(y)l.set(y,b),b+=y.length;else throw new Error(`Couldn't complete data download at ${b}/${n}`)}return l}};al.default=il});var P1=V(sl=>{"use strict";var rC=A(S());Object.defineProperty(sl,"__esModule",{value:!0});var C1=hs();Xf();var ol=class t{api;network;static HASH_ENDPOINT="block/hash/";static HEIGHT_ENDPOINT="block/height/";constructor(e,r){this.api=e,this.network=r}async get(e){let r=await this.api.get(`${t.HASH_ENDPOINT}${e}`);if(r.status===200)return r.data;throw r.status===404?new C1.default("BLOCK_NOT_FOUND"):new Error(`Error while loading block data: ${r}`)}async getByHeight(e){let r=await this.api.get(`${t.HEIGHT_ENDPOINT}${e}`);if(r.status===200)return r.data;throw r.status===404?new C1.default("BLOCK_NOT_FOUND"):new Error(`Error while loading block data: ${r}`)}async getCurrent(){let{current:e}=await this.network.getInfo();return await this.get(e)}};sl.default=ol});var vs=V(cl=>{"use strict";var iC=A(S());Object.defineProperty(cl,"__esModule",{value:!0});var F6=u1(),D6=l1(),I6=Iu(),O6=d1(),k6=A1(),N6=M1(),L1=ms(),ws=gn(),J6=E1(),U6=B1(),H6=P1(),fl=class t{api;wallets;transactions;network;blocks;ar;silo;chunks;static init;static crypto=new I6.default;static utils=ws;constructor(e){this.api=new D6.default(e),this.wallets=new N6.default(this.api,t.crypto),this.chunks=new U6.default(this.api),this.transactions=new k6.default(this.api,t.crypto,this.chunks),this.silo=new J6.default(this.api,this.crypto,this.transactions),this.network=new O6.default(this.api),this.blocks=new H6.default(this.api,this.network),this.ar=new F6.default}get crypto(){return t.crypto}get utils(){return t.utils}getConfig(){return{api:this.api.getConfig(),crypto:null}}async createTransaction(e,r){let n={};if(Object.assign(n,e),!e.data&&!(e.target&&e.quantity))throw new Error("A new Arweave transaction must have a 'data' value, or 'target' and 'quantity' values.");if(e.owner==null&&r&&r!=="use_wallet"&&(n.owner=r.n),e.last_tx==null&&(n.last_tx=await this.transactions.getTransactionAnchor()),typeof e.data=="string"&&(e.data=ws.stringToBuffer(e.data)),e.data instanceof ArrayBuffer&&(e.data=new Uint8Array(e.data)),e.data&&!(e.data instanceof Uint8Array))throw new Error("Expected data to be a string, Uint8Array or ArrayBuffer");if(e.reward==null){let a=e.data?e.data.byteLength:0;n.reward=await this.transactions.getPrice(a,n.target)}n.data_root="",n.data_size=e.data?e.data.byteLength.toString():"0",n.data=e.data||new Uint8Array(0);let i=new L1.default(n);return await i.getSignatureData(),i}async createSiloTransaction(e,r,n){let i={};if(Object.assign(i,e),!e.data)throw new Error("Silo transactions must have a 'data' value");if(!n)throw new Error("No Silo URI specified.");if(e.target||e.quantity)throw new Error("Silo transactions can only be used for storing data, sending AR to other wallets isn't supported.");if(e.owner==null){if(!r||!r.n)throw new Error("A new Arweave transaction must either have an 'owner' attribute, or you must provide the jwk parameter.");i.owner=r.n}e.last_tx==null&&(i.last_tx=await this.transactions.getTransactionAnchor());let a=await this.silo.parseUri(n);if(typeof e.data=="string"){let b=await this.crypto.encrypt(ws.stringToBuffer(e.data),a.getEncryptionKey());i.reward=await this.transactions.getPrice(b.byteLength),i.data=ws.bufferTob64Url(b)}if(e.data instanceof Uint8Array){let b=await this.crypto.encrypt(e.data,a.getEncryptionKey());i.reward=await this.transactions.getPrice(b.byteLength),i.data=ws.bufferTob64Url(b)}let l=new L1.default(i);return l.addTag("Silo-Name",a.getAccessKey()),l.addTag("Silo-Version","0.1.0"),l}arql(e){return this.api.post("/arql",e).then(r=>r.data||[])}};cl.default=fl});var D1=V(ul=>{"use strict";var oC=A(S());Object.defineProperty(ul,"__esModule",{value:!0});ul.default=R1;var Dr=vs();async function R1(t){if(Array.isArray(t)){let n=Dr.default.utils.concatBuffers([Dr.default.utils.stringToBuffer("list"),Dr.default.utils.stringToBuffer(t.length.toString())]);return await F1(t,await Dr.default.crypto.hash(n,"SHA-384"))}let e=Dr.default.utils.concatBuffers([Dr.default.utils.stringToBuffer("blob"),Dr.default.utils.stringToBuffer(t.byteLength.toString())]),r=Dr.default.utils.concatBuffers([await Dr.default.crypto.hash(e,"SHA-384"),await Dr.default.crypto.hash(t,"SHA-384")]);return await Dr.default.crypto.hash(r,"SHA-384")}async function F1(t,e){if(t.length<1)return e;let r=Dr.default.utils.concatBuffers([e,await R1(t[0])]),n=await Dr.default.crypto.hash(r,"SHA-384");return await F1(t.slice(1),n)}});var ms=V(Ss=>{"use strict";var fC=A(S());Object.defineProperty(Ss,"__esModule",{value:!0});Ss.Tag=void 0;var kt=gn(),q6=D1(),G6=Vu(),Kf=class{get(e,r){if(!Object.getOwnPropertyNames(this).includes(e))throw new Error(`Field "${e}" is not a property of the Arweave Transaction class.`);if(this[e]instanceof Uint8Array)return r&&r.decode&&r.string?kt.bufferToString(this[e]):r&&r.decode&&!r.string?this[e]:kt.bufferTob64Url(this[e]);if(this[e]instanceof Array){if(r?.decode!==void 0||r?.string!==void 0)throw e==="tags"&&console.warn(`Did you mean to use 'transaction["tags"]' ?`),new Error("Cannot decode or stringify an array.");return this[e]}return r&&r.decode==!0?r&&r.string?kt.b64UrlToString(this[e]):kt.b64UrlToBuffer(this[e]):this[e]}},As=class extends Kf{name;value;constructor(e,r,n=!1){super(),this.name=e,this.value=r}};Ss.Tag=As;var ll=class extends Kf{format=2;id="";last_tx="";owner="";tags=[];target="";quantity="0";data_size="0";data=new Uint8Array;data_root="";reward="0";signature="";chunks;constructor(e={}){super(),Object.assign(this,e),typeof this.data=="string"&&(this.data=kt.b64UrlToBuffer(this.data)),e.tags&&(this.tags=e.tags.map(r=>new As(r.name,r.value)))}addTag(e,r){this.tags.push(new As(kt.stringToB64Url(e),kt.stringToB64Url(r)))}toJSON(){return{format:this.format,id:this.id,last_tx:this.last_tx,owner:this.owner,tags:this.tags,target:this.target,quantity:this.quantity,data:kt.bufferTob64Url(this.data),data_size:this.data_size,data_root:this.data_root,data_tree:this.data_tree,reward:this.reward,signature:this.signature}}setOwner(e){this.owner=e}setSignature({id:e,owner:r,reward:n,tags:i,signature:a}){this.id=e,this.owner=r,n&&(this.reward=n),i&&(this.tags=i),this.signature=a}async prepareChunks(e){!this.chunks&&e.byteLength>0&&(this.chunks=await(0,G6.generateTransactionChunks)(e),this.data_root=kt.bufferTob64Url(this.chunks.data_root)),!this.chunks&&e.byteLength===0&&(this.chunks={chunks:[],data_root:new Uint8Array,proofs:[]},this.data_root="")}getChunk(e,r){if(!this.chunks)throw new Error("Chunks have not been prepared");let n=this.chunks.proofs[e],i=this.chunks.chunks[e];return{data_root:this.data_root,data_size:this.data_size,data_path:kt.bufferTob64Url(n.proof),offset:n.offset.toString(),chunk:kt.bufferTob64Url(r.slice(i.minByteRange,i.maxByteRange))}}async getSignatureData(){switch(this.format){case 1:let e=this.tags.reduce((n,i)=>kt.concatBuffers([n,i.get("name",{decode:!0,string:!1}),i.get("value",{decode:!0,string:!1})]),new Uint8Array);return kt.concatBuffers([this.get("owner",{decode:!0,string:!1}),this.get("target",{decode:!0,string:!1}),this.get("data",{decode:!0,string:!1}),kt.stringToBuffer(this.quantity),kt.stringToBuffer(this.reward),this.get("last_tx",{decode:!0,string:!1}),e]);case 2:this.data_root||await this.prepareChunks(this.data);let r=this.tags.map(n=>[n.get("name",{decode:!0,string:!1}),n.get("value",{decode:!0,string:!1})]);return await(0,q6.default)([kt.stringToBuffer(this.format.toString()),this.get("owner",{decode:!0,string:!1}),this.get("target",{decode:!0,string:!1}),kt.stringToBuffer(this.quantity),kt.stringToBuffer(this.reward),this.get("last_tx",{decode:!0,string:!1}),r,kt.stringToBuffer(this.data_size),this.get("data_root",{decode:!0,string:!1})]);default:throw new Error(`Unexpected transaction format: ${this.format}`)}}};Ss.default=ll});var I1=V(Zf=>{"use strict";var uC=A(S());Object.defineProperty(Zf,"__esModule",{value:!0});Zf.getDefaultConfig=void 0;var X6=(t,e)=>{let r=/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/,n=e.split("."),i=n[n.length-1],a=["localhost","[::1]"];return a.includes(e)||t=="file"||a.includes(i)||!!e.match(r)||!!i.match(r)},z6=t=>{let e=t.charAt(0)==="[",r=/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;return!!t.match(r)||e},K6=(t,e)=>{if(X6(t,e))return{protocol:"https",host:"arweave.net",port:443};if(!z6(e)){let r=e.split(".");if(r.length>=3){r.shift();let n=r.join(".");return{protocol:t,host:n}}}return{protocol:t,host:e}};Zf.getDefaultConfig=K6});var O1=V(Di=>{"use strict";var dC=A(S()),Z6=Di&&Di.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),V6=Di&&Di.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Z6(e,t,r)};Object.defineProperty(Di,"__esModule",{value:!0});var no=vs(),j6=I1();no.default.init=function(t={}){let e={host:"arweave.net",port:443,protocol:"https"};if(typeof location!="object"||!location.protocol||!location.hostname)return new no.default({...t,...e});let r=location.protocol.replace(":",""),n=location.hostname,i=location.port?parseInt(location.port):r=="https"?443:80,a=(0,j6.getDefaultConfig)(r,n),l=t.protocol||a.protocol,b=t.host||a.host,y=t.port||a.port||i;return new no.default({...t,host:b,protocol:l,port:y})};typeof globalThis=="object"?globalThis.Arweave=no.default:typeof self=="object"&&(self.Arweave=no.default);V6(vs(),Di);Di.default=no.default});var hl=V((U1,dl)=>{var wC=A(S());(function(t,e){"use strict";function r(T,s){if(!T)throw new Error(s||"Assertion failed")}function n(T,s){T.super_=s;var u=function(){};u.prototype=s.prototype,T.prototype=new u,T.prototype.constructor=T}function i(T,s,u){if(i.isBN(T))return T;this.negative=0,this.words=null,this.length=0,this.red=null,T!==null&&((s==="le"||s==="be")&&(u=s,s=10),this._init(T||0,s||10,u||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=it("buffer").Buffer}catch{}i.isBN=function(s){return s instanceof i?!0:s!==null&&typeof s=="object"&&s.constructor.wordSize===i.wordSize&&Array.isArray(s.words)},i.max=function(s,u){return s.cmp(u)>0?s:u},i.min=function(s,u){return s.cmp(u)<0?s:u},i.prototype._init=function(s,u,d){if(typeof s=="number")return this._initNumber(s,u,d);if(typeof s=="object")return this._initArray(s,u,d);u==="hex"&&(u=16),r(u===(u|0)&&u>=2&&u<=36),s=s.toString().replace(/\s+/g,"");var f=0;s[0]==="-"&&(f++,this.negative=1),f<s.length&&(u===16?this._parseHex(s,f,d):(this._parseBase(s,u,f),d==="le"&&this._initArray(this.toArray(),u,d)))},i.prototype._initNumber=function(s,u,d){s<0&&(this.negative=1,s=-s),s<67108864?(this.words=[s&67108863],this.length=1):s<4503599627370496?(this.words=[s&67108863,s/67108864&67108863],this.length=2):(r(s<9007199254740992),this.words=[s&67108863,s/67108864&67108863,1],this.length=3),d==="le"&&this._initArray(this.toArray(),u,d)},i.prototype._initArray=function(s,u,d){if(r(typeof s.length=="number"),s.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(s.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var c,v,m=0;if(d==="be")for(f=s.length-1,c=0;f>=0;f-=3)v=s[f]|s[f-1]<<8|s[f-2]<<16,this.words[c]|=v<<m&67108863,this.words[c+1]=v>>>26-m&67108863,m+=24,m>=26&&(m-=26,c++);else if(d==="le")for(f=0,c=0;f<s.length;f+=3)v=s[f]|s[f+1]<<8|s[f+2]<<16,this.words[c]|=v<<m&67108863,this.words[c+1]=v>>>26-m&67108863,m+=24,m>=26&&(m-=26,c++);return this.strip()};function l(T,s){var u=T.charCodeAt(s);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function b(T,s,u){var d=l(T,u);return u-1>=s&&(d|=l(T,u-1)<<4),d}i.prototype._parseHex=function(s,u,d){this.length=Math.ceil((s.length-u)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var c=0,v=0,m;if(d==="be")for(f=s.length-1;f>=u;f-=2)m=b(s,u,f)<<c,this.words[v]|=m&67108863,c>=18?(c-=18,v+=1,this.words[v]|=m>>>26):c+=8;else{var h=s.length-u;for(f=h%2===0?u+1:u;f<s.length;f+=2)m=b(s,u,f)<<c,this.words[v]|=m&67108863,c>=18?(c-=18,v+=1,this.words[v]|=m>>>26):c+=8}this.strip()};function y(T,s,u,d){for(var f=0,c=Math.min(T.length,u),v=s;v<c;v++){var m=T.charCodeAt(v)-48;f*=d,m>=49?f+=m-49+10:m>=17?f+=m-17+10:f+=m}return f}i.prototype._parseBase=function(s,u,d){this.words=[0],this.length=1;for(var f=0,c=1;c<=67108863;c*=u)f++;f--,c=c/u|0;for(var v=s.length-d,m=v%f,h=Math.min(v,v-m)+d,o=0,p=d;p<h;p+=f)o=y(s,p,p+f,u),this.imuln(c),this.words[0]+o<67108864?this.words[0]+=o:this._iaddn(o);if(m!==0){var E=1;for(o=y(s,p,s.length,u),p=0;p<m;p++)E*=u;this.imuln(E),this.words[0]+o<67108864?this.words[0]+=o:this._iaddn(o)}this.strip()},i.prototype.copy=function(s){s.words=new Array(this.length);for(var u=0;u<this.length;u++)s.words[u]=this.words[u];s.length=this.length,s.negative=this.negative,s.red=this.red},i.prototype.clone=function(){var s=new i(null);return this.copy(s),s},i.prototype._expand=function(s){for(;this.length<s;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],_=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(s,u){s=s||10,u=u|0||1;var d;if(s===16||s==="hex"){d="";for(var f=0,c=0,v=0;v<this.length;v++){var m=this.words[v],h=((m<<f|c)&16777215).toString(16);c=m>>>24-f&16777215,f+=2,f>=26&&(f-=26,v--),c!==0||v!==this.length-1?d=x[6-h.length]+h+d:d=h+d}for(c!==0&&(d=c.toString(16)+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(s===(s|0)&&s>=2&&s<=36){var o=_[s],p=C[s];d="";var E=this.clone();for(E.negative=0;!E.isZero();){var g=E.modn(p).toString(s);E=E.idivn(p),E.isZero()?d=g+d:d=x[o-g.length]+g+d}for(this.isZero()&&(d="0"+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var s=this.words[0];return this.length===2?s+=this.words[1]*67108864:this.length===3&&this.words[2]===1?s+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-s:s},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(s,u){return r(typeof a<"u"),this.toArrayLike(a,s,u)},i.prototype.toArray=function(s,u){return this.toArrayLike(Array,s,u)},i.prototype.toArrayLike=function(s,u,d){var f=this.byteLength(),c=d||Math.max(1,f);r(f<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0"),this.strip();var v=u==="le",m=new s(c),h,o,p=this.clone();if(v){for(o=0;!p.isZero();o++)h=p.andln(255),p.iushrn(8),m[o]=h;for(;o<c;o++)m[o]=0}else{for(o=0;o<c-f;o++)m[o]=0;for(o=0;!p.isZero();o++)h=p.andln(255),p.iushrn(8),m[c-o-1]=h}return m},Math.clz32?i.prototype._countBits=function(s){return 32-Math.clz32(s)}:i.prototype._countBits=function(s){var u=s,d=0;return u>=4096&&(d+=13,u>>>=13),u>=64&&(d+=7,u>>>=7),u>=8&&(d+=4,u>>>=4),u>=2&&(d+=2,u>>>=2),d+u},i.prototype._zeroBits=function(s){if(s===0)return 26;var u=s,d=0;return u&8191||(d+=13,u>>>=13),u&127||(d+=7,u>>>=7),u&15||(d+=4,u>>>=4),u&3||(d+=2,u>>>=2),u&1||d++,d},i.prototype.bitLength=function(){var s=this.words[this.length-1],u=this._countBits(s);return(this.length-1)*26+u};function D(T){for(var s=new Array(T.bitLength()),u=0;u<s.length;u++){var d=u/26|0,f=u%26;s[u]=(T.words[d]&1<<f)>>>f}return s}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var s=0,u=0;u<this.length;u++){var d=this._zeroBits(this.words[u]);if(s+=d,d!==26)break}return s},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(s){return this.negative!==0?this.abs().inotn(s).iaddn(1):this.clone()},i.prototype.fromTwos=function(s){return this.testn(s-1)?this.notn(s).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(s){for(;this.length<s.length;)this.words[this.length++]=0;for(var u=0;u<s.length;u++)this.words[u]=this.words[u]|s.words[u];return this.strip()},i.prototype.ior=function(s){return r((this.negative|s.negative)===0),this.iuor(s)},i.prototype.or=function(s){return this.length>s.length?this.clone().ior(s):s.clone().ior(this)},i.prototype.uor=function(s){return this.length>s.length?this.clone().iuor(s):s.clone().iuor(this)},i.prototype.iuand=function(s){var u;this.length>s.length?u=s:u=this;for(var d=0;d<u.length;d++)this.words[d]=this.words[d]&s.words[d];return this.length=u.length,this.strip()},i.prototype.iand=function(s){return r((this.negative|s.negative)===0),this.iuand(s)},i.prototype.and=function(s){return this.length>s.length?this.clone().iand(s):s.clone().iand(this)},i.prototype.uand=function(s){return this.length>s.length?this.clone().iuand(s):s.clone().iuand(this)},i.prototype.iuxor=function(s){var u,d;this.length>s.length?(u=this,d=s):(u=s,d=this);for(var f=0;f<d.length;f++)this.words[f]=u.words[f]^d.words[f];if(this!==u)for(;f<u.length;f++)this.words[f]=u.words[f];return this.length=u.length,this.strip()},i.prototype.ixor=function(s){return r((this.negative|s.negative)===0),this.iuxor(s)},i.prototype.xor=function(s){return this.length>s.length?this.clone().ixor(s):s.clone().ixor(this)},i.prototype.uxor=function(s){return this.length>s.length?this.clone().iuxor(s):s.clone().iuxor(this)},i.prototype.inotn=function(s){r(typeof s=="number"&&s>=0);var u=Math.ceil(s/26)|0,d=s%26;this._expand(u),d>0&&u--;for(var f=0;f<u;f++)this.words[f]=~this.words[f]&67108863;return d>0&&(this.words[f]=~this.words[f]&67108863>>26-d),this.strip()},i.prototype.notn=function(s){return this.clone().inotn(s)},i.prototype.setn=function(s,u){r(typeof s=="number"&&s>=0);var d=s/26|0,f=s%26;return this._expand(d+1),u?this.words[d]=this.words[d]|1<<f:this.words[d]=this.words[d]&~(1<<f),this.strip()},i.prototype.iadd=function(s){var u;if(this.negative!==0&&s.negative===0)return this.negative=0,u=this.isub(s),this.negative^=1,this._normSign();if(this.negative===0&&s.negative!==0)return s.negative=0,u=this.isub(s),s.negative=1,u._normSign();var d,f;this.length>s.length?(d=this,f=s):(d=s,f=this);for(var c=0,v=0;v<f.length;v++)u=(d.words[v]|0)+(f.words[v]|0)+c,this.words[v]=u&67108863,c=u>>>26;for(;c!==0&&v<d.length;v++)u=(d.words[v]|0)+c,this.words[v]=u&67108863,c=u>>>26;if(this.length=d.length,c!==0)this.words[this.length]=c,this.length++;else if(d!==this)for(;v<d.length;v++)this.words[v]=d.words[v];return this},i.prototype.add=function(s){var u;return s.negative!==0&&this.negative===0?(s.negative=0,u=this.sub(s),s.negative^=1,u):s.negative===0&&this.negative!==0?(this.negative=0,u=s.sub(this),this.negative=1,u):this.length>s.length?this.clone().iadd(s):s.clone().iadd(this)},i.prototype.isub=function(s){if(s.negative!==0){s.negative=0;var u=this.iadd(s);return s.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(s),this.negative=1,this._normSign();var d=this.cmp(s);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,c;d>0?(f=this,c=s):(f=s,c=this);for(var v=0,m=0;m<c.length;m++)u=(f.words[m]|0)-(c.words[m]|0)+v,v=u>>26,this.words[m]=u&67108863;for(;v!==0&&m<f.length;m++)u=(f.words[m]|0)+v,v=u>>26,this.words[m]=u&67108863;if(v===0&&m<f.length&&f!==this)for(;m<f.length;m++)this.words[m]=f.words[m];return this.length=Math.max(this.length,m),f!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(s){return this.clone().isub(s)};function F(T,s,u){u.negative=s.negative^T.negative;var d=T.length+s.length|0;u.length=d,d=d-1|0;var f=T.words[0]|0,c=s.words[0]|0,v=f*c,m=v&67108863,h=v/67108864|0;u.words[0]=m;for(var o=1;o<d;o++){for(var p=h>>>26,E=h&67108863,g=Math.min(o,s.length-1),w=Math.max(0,o-T.length+1);w<=g;w++){var U=o-w|0;f=T.words[U]|0,c=s.words[w]|0,v=f*c+E,p+=v/67108864|0,E=v&67108863}u.words[o]=E|0,h=p|0}return h!==0?u.words[o]=h|0:u.length--,u.strip()}var P=function(s,u,d){var f=s.words,c=u.words,v=d.words,m=0,h,o,p,E=f[0]|0,g=E&8191,w=E>>>13,U=f[1]|0,M=U&8191,k=U>>>13,G=f[2]|0,Z=G&8191,B=G>>>13,R=f[3]|0,L=R&8191,I=R>>>13,q=f[4]|0,O=q&8191,J=q>>>13,K=f[5]|0,N=K&8191,H=K>>>13,Q=f[6]|0,j=Q&8191,re=Q>>>13,De=f[7]|0,se=De&8191,le=De>>>13,He=f[8]|0,oe=He&8191,fe=He>>>13,ze=f[9]|0,ge=ze&8191,ve=ze>>>13,xt=c[0]|0,pe=xt&8191,be=xt>>>13,$e=c[1]|0,de=$e&8191,ue=$e>>>13,Zt=c[2]|0,me=Zt&8191,xe=Zt>>>13,Vt=c[3]|0,ye=Vt&8191,we=Vt>>>13,jt=c[4]|0,Ae=jt&8191,Se=jt>>>13,Qt=c[5]|0,Me=Qt&8191,Te=Qt>>>13,Wt=c[6]|0,Ee=Wt&8191,_e=Wt>>>13,Yt=c[7]|0,Be=Yt&8191,Ce=Yt>>>13,$t=c[8]|0,Pe=$t&8191,Le=$t>>>13,er=c[9]|0,Re=er&8191,Fe=er>>>13;d.negative=s.negative^u.negative,d.length=19,h=Math.imul(g,pe),o=Math.imul(g,be),o=o+Math.imul(w,pe)|0,p=Math.imul(w,be);var It=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(It>>>26)|0,It&=67108863,h=Math.imul(M,pe),o=Math.imul(M,be),o=o+Math.imul(k,pe)|0,p=Math.imul(k,be),h=h+Math.imul(g,de)|0,o=o+Math.imul(g,ue)|0,o=o+Math.imul(w,de)|0,p=p+Math.imul(w,ue)|0;var ke=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,h=Math.imul(Z,pe),o=Math.imul(Z,be),o=o+Math.imul(B,pe)|0,p=Math.imul(B,be),h=h+Math.imul(M,de)|0,o=o+Math.imul(M,ue)|0,o=o+Math.imul(k,de)|0,p=p+Math.imul(k,ue)|0,h=h+Math.imul(g,me)|0,o=o+Math.imul(g,xe)|0,o=o+Math.imul(w,me)|0,p=p+Math.imul(w,xe)|0;var Ne=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,h=Math.imul(L,pe),o=Math.imul(L,be),o=o+Math.imul(I,pe)|0,p=Math.imul(I,be),h=h+Math.imul(Z,de)|0,o=o+Math.imul(Z,ue)|0,o=o+Math.imul(B,de)|0,p=p+Math.imul(B,ue)|0,h=h+Math.imul(M,me)|0,o=o+Math.imul(M,xe)|0,o=o+Math.imul(k,me)|0,p=p+Math.imul(k,xe)|0,h=h+Math.imul(g,ye)|0,o=o+Math.imul(g,we)|0,o=o+Math.imul(w,ye)|0,p=p+Math.imul(w,we)|0;var Tt=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,h=Math.imul(O,pe),o=Math.imul(O,be),o=o+Math.imul(J,pe)|0,p=Math.imul(J,be),h=h+Math.imul(L,de)|0,o=o+Math.imul(L,ue)|0,o=o+Math.imul(I,de)|0,p=p+Math.imul(I,ue)|0,h=h+Math.imul(Z,me)|0,o=o+Math.imul(Z,xe)|0,o=o+Math.imul(B,me)|0,p=p+Math.imul(B,xe)|0,h=h+Math.imul(M,ye)|0,o=o+Math.imul(M,we)|0,o=o+Math.imul(k,ye)|0,p=p+Math.imul(k,we)|0,h=h+Math.imul(g,Ae)|0,o=o+Math.imul(g,Se)|0,o=o+Math.imul(w,Ae)|0,p=p+Math.imul(w,Se)|0;var Et=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,h=Math.imul(N,pe),o=Math.imul(N,be),o=o+Math.imul(H,pe)|0,p=Math.imul(H,be),h=h+Math.imul(O,de)|0,o=o+Math.imul(O,ue)|0,o=o+Math.imul(J,de)|0,p=p+Math.imul(J,ue)|0,h=h+Math.imul(L,me)|0,o=o+Math.imul(L,xe)|0,o=o+Math.imul(I,me)|0,p=p+Math.imul(I,xe)|0,h=h+Math.imul(Z,ye)|0,o=o+Math.imul(Z,we)|0,o=o+Math.imul(B,ye)|0,p=p+Math.imul(B,we)|0,h=h+Math.imul(M,Ae)|0,o=o+Math.imul(M,Se)|0,o=o+Math.imul(k,Ae)|0,p=p+Math.imul(k,Se)|0,h=h+Math.imul(g,Me)|0,o=o+Math.imul(g,Te)|0,o=o+Math.imul(w,Me)|0,p=p+Math.imul(w,Te)|0;var _t=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,h=Math.imul(j,pe),o=Math.imul(j,be),o=o+Math.imul(re,pe)|0,p=Math.imul(re,be),h=h+Math.imul(N,de)|0,o=o+Math.imul(N,ue)|0,o=o+Math.imul(H,de)|0,p=p+Math.imul(H,ue)|0,h=h+Math.imul(O,me)|0,o=o+Math.imul(O,xe)|0,o=o+Math.imul(J,me)|0,p=p+Math.imul(J,xe)|0,h=h+Math.imul(L,ye)|0,o=o+Math.imul(L,we)|0,o=o+Math.imul(I,ye)|0,p=p+Math.imul(I,we)|0,h=h+Math.imul(Z,Ae)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(B,Ae)|0,p=p+Math.imul(B,Se)|0,h=h+Math.imul(M,Me)|0,o=o+Math.imul(M,Te)|0,o=o+Math.imul(k,Me)|0,p=p+Math.imul(k,Te)|0,h=h+Math.imul(g,Ee)|0,o=o+Math.imul(g,_e)|0,o=o+Math.imul(w,Ee)|0,p=p+Math.imul(w,_e)|0;var Bt=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,h=Math.imul(se,pe),o=Math.imul(se,be),o=o+Math.imul(le,pe)|0,p=Math.imul(le,be),h=h+Math.imul(j,de)|0,o=o+Math.imul(j,ue)|0,o=o+Math.imul(re,de)|0,p=p+Math.imul(re,ue)|0,h=h+Math.imul(N,me)|0,o=o+Math.imul(N,xe)|0,o=o+Math.imul(H,me)|0,p=p+Math.imul(H,xe)|0,h=h+Math.imul(O,ye)|0,o=o+Math.imul(O,we)|0,o=o+Math.imul(J,ye)|0,p=p+Math.imul(J,we)|0,h=h+Math.imul(L,Ae)|0,o=o+Math.imul(L,Se)|0,o=o+Math.imul(I,Ae)|0,p=p+Math.imul(I,Se)|0,h=h+Math.imul(Z,Me)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(B,Me)|0,p=p+Math.imul(B,Te)|0,h=h+Math.imul(M,Ee)|0,o=o+Math.imul(M,_e)|0,o=o+Math.imul(k,Ee)|0,p=p+Math.imul(k,_e)|0,h=h+Math.imul(g,Be)|0,o=o+Math.imul(g,Ce)|0,o=o+Math.imul(w,Be)|0,p=p+Math.imul(w,Ce)|0;var Ct=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,h=Math.imul(oe,pe),o=Math.imul(oe,be),o=o+Math.imul(fe,pe)|0,p=Math.imul(fe,be),h=h+Math.imul(se,de)|0,o=o+Math.imul(se,ue)|0,o=o+Math.imul(le,de)|0,p=p+Math.imul(le,ue)|0,h=h+Math.imul(j,me)|0,o=o+Math.imul(j,xe)|0,o=o+Math.imul(re,me)|0,p=p+Math.imul(re,xe)|0,h=h+Math.imul(N,ye)|0,o=o+Math.imul(N,we)|0,o=o+Math.imul(H,ye)|0,p=p+Math.imul(H,we)|0,h=h+Math.imul(O,Ae)|0,o=o+Math.imul(O,Se)|0,o=o+Math.imul(J,Ae)|0,p=p+Math.imul(J,Se)|0,h=h+Math.imul(L,Me)|0,o=o+Math.imul(L,Te)|0,o=o+Math.imul(I,Me)|0,p=p+Math.imul(I,Te)|0,h=h+Math.imul(Z,Ee)|0,o=o+Math.imul(Z,_e)|0,o=o+Math.imul(B,Ee)|0,p=p+Math.imul(B,_e)|0,h=h+Math.imul(M,Be)|0,o=o+Math.imul(M,Ce)|0,o=o+Math.imul(k,Be)|0,p=p+Math.imul(k,Ce)|0,h=h+Math.imul(g,Pe)|0,o=o+Math.imul(g,Le)|0,o=o+Math.imul(w,Pe)|0,p=p+Math.imul(w,Le)|0;var gr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(gr>>>26)|0,gr&=67108863,h=Math.imul(ge,pe),o=Math.imul(ge,be),o=o+Math.imul(ve,pe)|0,p=Math.imul(ve,be),h=h+Math.imul(oe,de)|0,o=o+Math.imul(oe,ue)|0,o=o+Math.imul(fe,de)|0,p=p+Math.imul(fe,ue)|0,h=h+Math.imul(se,me)|0,o=o+Math.imul(se,xe)|0,o=o+Math.imul(le,me)|0,p=p+Math.imul(le,xe)|0,h=h+Math.imul(j,ye)|0,o=o+Math.imul(j,we)|0,o=o+Math.imul(re,ye)|0,p=p+Math.imul(re,we)|0,h=h+Math.imul(N,Ae)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul(H,Ae)|0,p=p+Math.imul(H,Se)|0,h=h+Math.imul(O,Me)|0,o=o+Math.imul(O,Te)|0,o=o+Math.imul(J,Me)|0,p=p+Math.imul(J,Te)|0,h=h+Math.imul(L,Ee)|0,o=o+Math.imul(L,_e)|0,o=o+Math.imul(I,Ee)|0,p=p+Math.imul(I,_e)|0,h=h+Math.imul(Z,Be)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(B,Be)|0,p=p+Math.imul(B,Ce)|0,h=h+Math.imul(M,Pe)|0,o=o+Math.imul(M,Le)|0,o=o+Math.imul(k,Pe)|0,p=p+Math.imul(k,Le)|0,h=h+Math.imul(g,Re)|0,o=o+Math.imul(g,Fe)|0,o=o+Math.imul(w,Re)|0,p=p+Math.imul(w,Fe)|0;var vr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(vr>>>26)|0,vr&=67108863,h=Math.imul(ge,de),o=Math.imul(ge,ue),o=o+Math.imul(ve,de)|0,p=Math.imul(ve,ue),h=h+Math.imul(oe,me)|0,o=o+Math.imul(oe,xe)|0,o=o+Math.imul(fe,me)|0,p=p+Math.imul(fe,xe)|0,h=h+Math.imul(se,ye)|0,o=o+Math.imul(se,we)|0,o=o+Math.imul(le,ye)|0,p=p+Math.imul(le,we)|0,h=h+Math.imul(j,Ae)|0,o=o+Math.imul(j,Se)|0,o=o+Math.imul(re,Ae)|0,p=p+Math.imul(re,Se)|0,h=h+Math.imul(N,Me)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul(H,Me)|0,p=p+Math.imul(H,Te)|0,h=h+Math.imul(O,Ee)|0,o=o+Math.imul(O,_e)|0,o=o+Math.imul(J,Ee)|0,p=p+Math.imul(J,_e)|0,h=h+Math.imul(L,Be)|0,o=o+Math.imul(L,Ce)|0,o=o+Math.imul(I,Be)|0,p=p+Math.imul(I,Ce)|0,h=h+Math.imul(Z,Pe)|0,o=o+Math.imul(Z,Le)|0,o=o+Math.imul(B,Pe)|0,p=p+Math.imul(B,Le)|0,h=h+Math.imul(M,Re)|0,o=o+Math.imul(M,Fe)|0,o=o+Math.imul(k,Re)|0,p=p+Math.imul(k,Fe)|0;var mr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(mr>>>26)|0,mr&=67108863,h=Math.imul(ge,me),o=Math.imul(ge,xe),o=o+Math.imul(ve,me)|0,p=Math.imul(ve,xe),h=h+Math.imul(oe,ye)|0,o=o+Math.imul(oe,we)|0,o=o+Math.imul(fe,ye)|0,p=p+Math.imul(fe,we)|0,h=h+Math.imul(se,Ae)|0,o=o+Math.imul(se,Se)|0,o=o+Math.imul(le,Ae)|0,p=p+Math.imul(le,Se)|0,h=h+Math.imul(j,Me)|0,o=o+Math.imul(j,Te)|0,o=o+Math.imul(re,Me)|0,p=p+Math.imul(re,Te)|0,h=h+Math.imul(N,Ee)|0,o=o+Math.imul(N,_e)|0,o=o+Math.imul(H,Ee)|0,p=p+Math.imul(H,_e)|0,h=h+Math.imul(O,Be)|0,o=o+Math.imul(O,Ce)|0,o=o+Math.imul(J,Be)|0,p=p+Math.imul(J,Ce)|0,h=h+Math.imul(L,Pe)|0,o=o+Math.imul(L,Le)|0,o=o+Math.imul(I,Pe)|0,p=p+Math.imul(I,Le)|0,h=h+Math.imul(Z,Re)|0,o=o+Math.imul(Z,Fe)|0,o=o+Math.imul(B,Re)|0,p=p+Math.imul(B,Fe)|0;var xr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(xr>>>26)|0,xr&=67108863,h=Math.imul(ge,ye),o=Math.imul(ge,we),o=o+Math.imul(ve,ye)|0,p=Math.imul(ve,we),h=h+Math.imul(oe,Ae)|0,o=o+Math.imul(oe,Se)|0,o=o+Math.imul(fe,Ae)|0,p=p+Math.imul(fe,Se)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(se,Te)|0,o=o+Math.imul(le,Me)|0,p=p+Math.imul(le,Te)|0,h=h+Math.imul(j,Ee)|0,o=o+Math.imul(j,_e)|0,o=o+Math.imul(re,Ee)|0,p=p+Math.imul(re,_e)|0,h=h+Math.imul(N,Be)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul(H,Be)|0,p=p+Math.imul(H,Ce)|0,h=h+Math.imul(O,Pe)|0,o=o+Math.imul(O,Le)|0,o=o+Math.imul(J,Pe)|0,p=p+Math.imul(J,Le)|0,h=h+Math.imul(L,Re)|0,o=o+Math.imul(L,Fe)|0,o=o+Math.imul(I,Re)|0,p=p+Math.imul(I,Fe)|0;var yr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(yr>>>26)|0,yr&=67108863,h=Math.imul(ge,Ae),o=Math.imul(ge,Se),o=o+Math.imul(ve,Ae)|0,p=Math.imul(ve,Se),h=h+Math.imul(oe,Me)|0,o=o+Math.imul(oe,Te)|0,o=o+Math.imul(fe,Me)|0,p=p+Math.imul(fe,Te)|0,h=h+Math.imul(se,Ee)|0,o=o+Math.imul(se,_e)|0,o=o+Math.imul(le,Ee)|0,p=p+Math.imul(le,_e)|0,h=h+Math.imul(j,Be)|0,o=o+Math.imul(j,Ce)|0,o=o+Math.imul(re,Be)|0,p=p+Math.imul(re,Ce)|0,h=h+Math.imul(N,Pe)|0,o=o+Math.imul(N,Le)|0,o=o+Math.imul(H,Pe)|0,p=p+Math.imul(H,Le)|0,h=h+Math.imul(O,Re)|0,o=o+Math.imul(O,Fe)|0,o=o+Math.imul(J,Re)|0,p=p+Math.imul(J,Fe)|0;var wr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(wr>>>26)|0,wr&=67108863,h=Math.imul(ge,Me),o=Math.imul(ge,Te),o=o+Math.imul(ve,Me)|0,p=Math.imul(ve,Te),h=h+Math.imul(oe,Ee)|0,o=o+Math.imul(oe,_e)|0,o=o+Math.imul(fe,Ee)|0,p=p+Math.imul(fe,_e)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(se,Ce)|0,o=o+Math.imul(le,Be)|0,p=p+Math.imul(le,Ce)|0,h=h+Math.imul(j,Pe)|0,o=o+Math.imul(j,Le)|0,o=o+Math.imul(re,Pe)|0,p=p+Math.imul(re,Le)|0,h=h+Math.imul(N,Re)|0,o=o+Math.imul(N,Fe)|0,o=o+Math.imul(H,Re)|0,p=p+Math.imul(H,Fe)|0;var Ar=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,h=Math.imul(ge,Ee),o=Math.imul(ge,_e),o=o+Math.imul(ve,Ee)|0,p=Math.imul(ve,_e),h=h+Math.imul(oe,Be)|0,o=o+Math.imul(oe,Ce)|0,o=o+Math.imul(fe,Be)|0,p=p+Math.imul(fe,Ce)|0,h=h+Math.imul(se,Pe)|0,o=o+Math.imul(se,Le)|0,o=o+Math.imul(le,Pe)|0,p=p+Math.imul(le,Le)|0,h=h+Math.imul(j,Re)|0,o=o+Math.imul(j,Fe)|0,o=o+Math.imul(re,Re)|0,p=p+Math.imul(re,Fe)|0;var Sr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,h=Math.imul(ge,Be),o=Math.imul(ge,Ce),o=o+Math.imul(ve,Be)|0,p=Math.imul(ve,Ce),h=h+Math.imul(oe,Pe)|0,o=o+Math.imul(oe,Le)|0,o=o+Math.imul(fe,Pe)|0,p=p+Math.imul(fe,Le)|0,h=h+Math.imul(se,Re)|0,o=o+Math.imul(se,Fe)|0,o=o+Math.imul(le,Re)|0,p=p+Math.imul(le,Fe)|0;var Mr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,h=Math.imul(ge,Pe),o=Math.imul(ge,Le),o=o+Math.imul(ve,Pe)|0,p=Math.imul(ve,Le),h=h+Math.imul(oe,Re)|0,o=o+Math.imul(oe,Fe)|0,o=o+Math.imul(fe,Re)|0,p=p+Math.imul(fe,Fe)|0;var pn=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(pn>>>26)|0,pn&=67108863,h=Math.imul(ge,Re),o=Math.imul(ge,Fe),o=o+Math.imul(ve,Re)|0,p=Math.imul(ve,Fe);var bn=(m+h|0)+((o&8191)<<13)|0;return m=(p+(o>>>13)|0)+(bn>>>26)|0,bn&=67108863,v[0]=It,v[1]=ke,v[2]=Ne,v[3]=Tt,v[4]=Et,v[5]=_t,v[6]=Bt,v[7]=Ct,v[8]=gr,v[9]=vr,v[10]=mr,v[11]=xr,v[12]=yr,v[13]=wr,v[14]=Ar,v[15]=Sr,v[16]=Mr,v[17]=pn,v[18]=bn,m!==0&&(v[19]=m,d.length++),d};Math.imul||(P=F);function z(T,s,u){u.negative=s.negative^T.negative,u.length=T.length+s.length;for(var d=0,f=0,c=0;c<u.length-1;c++){var v=f;f=0;for(var m=d&67108863,h=Math.min(c,s.length-1),o=Math.max(0,c-T.length+1);o<=h;o++){var p=c-o,E=T.words[p]|0,g=s.words[o]|0,w=E*g,U=w&67108863;v=v+(w/67108864|0)|0,U=U+m|0,m=U&67108863,v=v+(U>>>26)|0,f+=v>>>26,v&=67108863}u.words[c]=m,d=v,v=f}return d!==0?u.words[c]=d:u.length--,u.strip()}function W(T,s,u){var d=new X;return d.mulp(T,s,u)}i.prototype.mulTo=function(s,u){var d,f=this.length+s.length;return this.length===10&&s.length===10?d=P(this,s,u):f<63?d=F(this,s,u):f<1024?d=z(this,s,u):d=W(this,s,u),d};function X(T,s){this.x=T,this.y=s}X.prototype.makeRBT=function(s){for(var u=new Array(s),d=i.prototype._countBits(s)-1,f=0;f<s;f++)u[f]=this.revBin(f,d,s);return u},X.prototype.revBin=function(s,u,d){if(s===0||s===d-1)return s;for(var f=0,c=0;c<u;c++)f|=(s&1)<<u-c-1,s>>=1;return f},X.prototype.permute=function(s,u,d,f,c,v){for(var m=0;m<v;m++)f[m]=u[s[m]],c[m]=d[s[m]]},X.prototype.transform=function(s,u,d,f,c,v){this.permute(v,s,u,d,f,c);for(var m=1;m<c;m<<=1)for(var h=m<<1,o=Math.cos(2*Math.PI/h),p=Math.sin(2*Math.PI/h),E=0;E<c;E+=h)for(var g=o,w=p,U=0;U<m;U++){var M=d[E+U],k=f[E+U],G=d[E+U+m],Z=f[E+U+m],B=g*G-w*Z;Z=g*Z+w*G,G=B,d[E+U]=M+G,f[E+U]=k+Z,d[E+U+m]=M-G,f[E+U+m]=k-Z,U!==h&&(B=o*g-p*w,w=o*w+p*g,g=B)}},X.prototype.guessLen13b=function(s,u){var d=Math.max(u,s)|1,f=d&1,c=0;for(d=d/2|0;d;d=d>>>1)c++;return 1<<c+1+f},X.prototype.conjugate=function(s,u,d){if(!(d<=1))for(var f=0;f<d/2;f++){var c=s[f];s[f]=s[d-f-1],s[d-f-1]=c,c=u[f],u[f]=-u[d-f-1],u[d-f-1]=-c}},X.prototype.normalize13b=function(s,u){for(var d=0,f=0;f<u/2;f++){var c=Math.round(s[2*f+1]/u)*8192+Math.round(s[2*f]/u)+d;s[f]=c&67108863,c<67108864?d=0:d=c/67108864|0}return s},X.prototype.convert13b=function(s,u,d,f){for(var c=0,v=0;v<u;v++)c=c+(s[v]|0),d[2*v]=c&8191,c=c>>>13,d[2*v+1]=c&8191,c=c>>>13;for(v=2*u;v<f;++v)d[v]=0;r(c===0),r((c&-8192)===0)},X.prototype.stub=function(s){for(var u=new Array(s),d=0;d<s;d++)u[d]=0;return u},X.prototype.mulp=function(s,u,d){var f=2*this.guessLen13b(s.length,u.length),c=this.makeRBT(f),v=this.stub(f),m=new Array(f),h=new Array(f),o=new Array(f),p=new Array(f),E=new Array(f),g=new Array(f),w=d.words;w.length=f,this.convert13b(s.words,s.length,m,f),this.convert13b(u.words,u.length,p,f),this.transform(m,v,h,o,f,c),this.transform(p,v,E,g,f,c);for(var U=0;U<f;U++){var M=h[U]*E[U]-o[U]*g[U];o[U]=h[U]*g[U]+o[U]*E[U],h[U]=M}return this.conjugate(h,o,f),this.transform(h,o,w,v,f,c),this.conjugate(w,v,f),this.normalize13b(w,f),d.negative=s.negative^u.negative,d.length=s.length+u.length,d.strip()},i.prototype.mul=function(s){var u=new i(null);return u.words=new Array(this.length+s.length),this.mulTo(s,u)},i.prototype.mulf=function(s){var u=new i(null);return u.words=new Array(this.length+s.length),W(this,s,u)},i.prototype.imul=function(s){return this.clone().mulTo(s,this)},i.prototype.imuln=function(s){r(typeof s=="number"),r(s<67108864);for(var u=0,d=0;d<this.length;d++){var f=(this.words[d]|0)*s,c=(f&67108863)+(u&67108863);u>>=26,u+=f/67108864|0,u+=c>>>26,this.words[d]=c&67108863}return u!==0&&(this.words[d]=u,this.length++),this.length=s===0?1:this.length,this},i.prototype.muln=function(s){return this.clone().imuln(s)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(s){var u=D(s);if(u.length===0)return new i(1);for(var d=this,f=0;f<u.length&&u[f]===0;f++,d=d.sqr());if(++f<u.length)for(var c=d.sqr();f<u.length;f++,c=c.sqr())u[f]!==0&&(d=d.mul(c));return d},i.prototype.iushln=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26,f=67108863>>>26-u<<26-u,c;if(u!==0){var v=0;for(c=0;c<this.length;c++){var m=this.words[c]&f,h=(this.words[c]|0)-m<<u;this.words[c]=h|v,v=m>>>26-u}v&&(this.words[c]=v,this.length++)}if(d!==0){for(c=this.length-1;c>=0;c--)this.words[c+d]=this.words[c];for(c=0;c<d;c++)this.words[c]=0;this.length+=d}return this.strip()},i.prototype.ishln=function(s){return r(this.negative===0),this.iushln(s)},i.prototype.iushrn=function(s,u,d){r(typeof s=="number"&&s>=0);var f;u?f=(u-u%26)/26:f=0;var c=s%26,v=Math.min((s-c)/26,this.length),m=67108863^67108863>>>c<<c,h=d;if(f-=v,f=Math.max(0,f),h){for(var o=0;o<v;o++)h.words[o]=this.words[o];h.length=v}if(v!==0)if(this.length>v)for(this.length-=v,o=0;o<this.length;o++)this.words[o]=this.words[o+v];else this.words[0]=0,this.length=1;var p=0;for(o=this.length-1;o>=0&&(p!==0||o>=f);o--){var E=this.words[o]|0;this.words[o]=p<<26-c|E>>>c,p=E&m}return h&&p!==0&&(h.words[h.length++]=p),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(s,u,d){return r(this.negative===0),this.iushrn(s,u,d)},i.prototype.shln=function(s){return this.clone().ishln(s)},i.prototype.ushln=function(s){return this.clone().iushln(s)},i.prototype.shrn=function(s){return this.clone().ishrn(s)},i.prototype.ushrn=function(s){return this.clone().iushrn(s)},i.prototype.testn=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26,f=1<<u;if(this.length<=d)return!1;var c=this.words[d];return!!(c&f)},i.prototype.imaskn=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(u!==0&&d++,this.length=Math.min(d,this.length),u!==0){var f=67108863^67108863>>>u<<u;this.words[this.length-1]&=f}return this.strip()},i.prototype.maskn=function(s){return this.clone().imaskn(s)},i.prototype.iaddn=function(s){return r(typeof s=="number"),r(s<67108864),s<0?this.isubn(-s):this.negative!==0?this.length===1&&(this.words[0]|0)<s?(this.words[0]=s-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(s),this.negative=1,this):this._iaddn(s)},i.prototype._iaddn=function(s){this.words[0]+=s;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},i.prototype.isubn=function(s){if(r(typeof s=="number"),r(s<67108864),s<0)return this.iaddn(-s);if(this.negative!==0)return this.negative=0,this.iaddn(s),this.negative=1,this;if(this.words[0]-=s,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this.strip()},i.prototype.addn=function(s){return this.clone().iaddn(s)},i.prototype.subn=function(s){return this.clone().isubn(s)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(s,u,d){var f=s.length+d,c;this._expand(f);var v,m=0;for(c=0;c<s.length;c++){v=(this.words[c+d]|0)+m;var h=(s.words[c]|0)*u;v-=h&67108863,m=(v>>26)-(h/67108864|0),this.words[c+d]=v&67108863}for(;c<this.length-d;c++)v=(this.words[c+d]|0)+m,m=v>>26,this.words[c+d]=v&67108863;if(m===0)return this.strip();for(r(m===-1),m=0,c=0;c<this.length;c++)v=-(this.words[c]|0)+m,m=v>>26,this.words[c]=v&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(s,u){var d=this.length-s.length,f=this.clone(),c=s,v=c.words[c.length-1]|0,m=this._countBits(v);d=26-m,d!==0&&(c=c.ushln(d),f.iushln(d),v=c.words[c.length-1]|0);var h=f.length-c.length,o;if(u!=="mod"){o=new i(null),o.length=h+1,o.words=new Array(o.length);for(var p=0;p<o.length;p++)o.words[p]=0}var E=f.clone()._ishlnsubmul(c,1,h);E.negative===0&&(f=E,o&&(o.words[h]=1));for(var g=h-1;g>=0;g--){var w=(f.words[c.length+g]|0)*67108864+(f.words[c.length+g-1]|0);for(w=Math.min(w/v|0,67108863),f._ishlnsubmul(c,w,g);f.negative!==0;)w--,f.negative=0,f._ishlnsubmul(c,1,g),f.isZero()||(f.negative^=1);o&&(o.words[g]=w)}return o&&o.strip(),f.strip(),u!=="div"&&d!==0&&f.iushrn(d),{div:o||null,mod:f}},i.prototype.divmod=function(s,u,d){if(r(!s.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var f,c,v;return this.negative!==0&&s.negative===0?(v=this.neg().divmod(s,u),u!=="mod"&&(f=v.div.neg()),u!=="div"&&(c=v.mod.neg(),d&&c.negative!==0&&c.iadd(s)),{div:f,mod:c}):this.negative===0&&s.negative!==0?(v=this.divmod(s.neg(),u),u!=="mod"&&(f=v.div.neg()),{div:f,mod:v.mod}):this.negative&s.negative?(v=this.neg().divmod(s.neg(),u),u!=="div"&&(c=v.mod.neg(),d&&c.negative!==0&&c.isub(s)),{div:v.div,mod:c}):s.length>this.length||this.cmp(s)<0?{div:new i(0),mod:this}:s.length===1?u==="div"?{div:this.divn(s.words[0]),mod:null}:u==="mod"?{div:null,mod:new i(this.modn(s.words[0]))}:{div:this.divn(s.words[0]),mod:new i(this.modn(s.words[0]))}:this._wordDiv(s,u)},i.prototype.div=function(s){return this.divmod(s,"div",!1).div},i.prototype.mod=function(s){return this.divmod(s,"mod",!1).mod},i.prototype.umod=function(s){return this.divmod(s,"mod",!0).mod},i.prototype.divRound=function(s){var u=this.divmod(s);if(u.mod.isZero())return u.div;var d=u.div.negative!==0?u.mod.isub(s):u.mod,f=s.ushrn(1),c=s.andln(1),v=d.cmp(f);return v<0||c===1&&v===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},i.prototype.modn=function(s){r(s<=67108863);for(var u=(1<<26)%s,d=0,f=this.length-1;f>=0;f--)d=(u*d+(this.words[f]|0))%s;return d},i.prototype.idivn=function(s){r(s<=67108863);for(var u=0,d=this.length-1;d>=0;d--){var f=(this.words[d]|0)+u*67108864;this.words[d]=f/s|0,u=f%s}return this.strip()},i.prototype.divn=function(s){return this.clone().idivn(s)},i.prototype.egcd=function(s){r(s.negative===0),r(!s.isZero());var u=this,d=s.clone();u.negative!==0?u=u.umod(s):u=u.clone();for(var f=new i(1),c=new i(0),v=new i(0),m=new i(1),h=0;u.isEven()&&d.isEven();)u.iushrn(1),d.iushrn(1),++h;for(var o=d.clone(),p=u.clone();!u.isZero();){for(var E=0,g=1;!(u.words[0]&g)&&E<26;++E,g<<=1);if(E>0)for(u.iushrn(E);E-- >0;)(f.isOdd()||c.isOdd())&&(f.iadd(o),c.isub(p)),f.iushrn(1),c.iushrn(1);for(var w=0,U=1;!(d.words[0]&U)&&w<26;++w,U<<=1);if(w>0)for(d.iushrn(w);w-- >0;)(v.isOdd()||m.isOdd())&&(v.iadd(o),m.isub(p)),v.iushrn(1),m.iushrn(1);u.cmp(d)>=0?(u.isub(d),f.isub(v),c.isub(m)):(d.isub(u),v.isub(f),m.isub(c))}return{a:v,b:m,gcd:d.iushln(h)}},i.prototype._invmp=function(s){r(s.negative===0),r(!s.isZero());var u=this,d=s.clone();u.negative!==0?u=u.umod(s):u=u.clone();for(var f=new i(1),c=new i(0),v=d.clone();u.cmpn(1)>0&&d.cmpn(1)>0;){for(var m=0,h=1;!(u.words[0]&h)&&m<26;++m,h<<=1);if(m>0)for(u.iushrn(m);m-- >0;)f.isOdd()&&f.iadd(v),f.iushrn(1);for(var o=0,p=1;!(d.words[0]&p)&&o<26;++o,p<<=1);if(o>0)for(d.iushrn(o);o-- >0;)c.isOdd()&&c.iadd(v),c.iushrn(1);u.cmp(d)>=0?(u.isub(d),f.isub(c)):(d.isub(u),c.isub(f))}var E;return u.cmpn(1)===0?E=f:E=c,E.cmpn(0)<0&&E.iadd(s),E},i.prototype.gcd=function(s){if(this.isZero())return s.abs();if(s.isZero())return this.abs();var u=this.clone(),d=s.clone();u.negative=0,d.negative=0;for(var f=0;u.isEven()&&d.isEven();f++)u.iushrn(1),d.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;d.isEven();)d.iushrn(1);var c=u.cmp(d);if(c<0){var v=u;u=d,d=v}else if(c===0||d.cmpn(1)===0)break;u.isub(d)}while(!0);return d.iushln(f)},i.prototype.invm=function(s){return this.egcd(s).a.umod(s)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(s){return this.words[0]&s},i.prototype.bincn=function(s){r(typeof s=="number");var u=s%26,d=(s-u)/26,f=1<<u;if(this.length<=d)return this._expand(d+1),this.words[d]|=f,this;for(var c=f,v=d;c!==0&&v<this.length;v++){var m=this.words[v]|0;m+=c,c=m>>>26,m&=67108863,this.words[v]=m}return c!==0&&(this.words[v]=c,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(s){var u=s<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var d;if(this.length>1)d=1;else{u&&(s=-s),r(s<=67108863,"Number is too big");var f=this.words[0]|0;d=f===s?0:f<s?-1:1}return this.negative!==0?-d|0:d},i.prototype.cmp=function(s){if(this.negative!==0&&s.negative===0)return-1;if(this.negative===0&&s.negative!==0)return 1;var u=this.ucmp(s);return this.negative!==0?-u|0:u},i.prototype.ucmp=function(s){if(this.length>s.length)return 1;if(this.length<s.length)return-1;for(var u=0,d=this.length-1;d>=0;d--){var f=this.words[d]|0,c=s.words[d]|0;if(f!==c){f<c?u=-1:f>c&&(u=1);break}}return u},i.prototype.gtn=function(s){return this.cmpn(s)===1},i.prototype.gt=function(s){return this.cmp(s)===1},i.prototype.gten=function(s){return this.cmpn(s)>=0},i.prototype.gte=function(s){return this.cmp(s)>=0},i.prototype.ltn=function(s){return this.cmpn(s)===-1},i.prototype.lt=function(s){return this.cmp(s)===-1},i.prototype.lten=function(s){return this.cmpn(s)<=0},i.prototype.lte=function(s){return this.cmp(s)<=0},i.prototype.eqn=function(s){return this.cmpn(s)===0},i.prototype.eq=function(s){return this.cmp(s)===0},i.red=function(s){return new te(s)},i.prototype.toRed=function(s){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),s.convertTo(this)._forceRed(s)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(s){return this.red=s,this},i.prototype.forceRed=function(s){return r(!this.red,"Already a number in reduction context"),this._forceRed(s)},i.prototype.redAdd=function(s){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,s)},i.prototype.redIAdd=function(s){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,s)},i.prototype.redSub=function(s){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,s)},i.prototype.redISub=function(s){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,s)},i.prototype.redShl=function(s){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,s)},i.prototype.redMul=function(s){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.mul(this,s)},i.prototype.redIMul=function(s){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.imul(this,s)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(s){return r(this.red&&!s.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,s)};var ne={k256:null,p224:null,p192:null,p25519:null};function $(T,s){this.name=T,this.p=new i(s,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var s=new i(null);return s.words=new Array(Math.ceil(this.n/13)),s},$.prototype.ireduce=function(s){var u=s,d;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),d=u.bitLength();while(d>this.n);var f=d<this.n?-1:u.ucmp(this.p);return f===0?(u.words[0]=0,u.length=1):f>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},$.prototype.split=function(s,u){s.iushrn(this.n,0,u)},$.prototype.imulK=function(s){return s.imul(this.k)};function ae(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(ae,$),ae.prototype.split=function(s,u){for(var d=4194303,f=Math.min(s.length,9),c=0;c<f;c++)u.words[c]=s.words[c];if(u.length=f,s.length<=9){s.words[0]=0,s.length=1;return}var v=s.words[9];for(u.words[u.length++]=v&d,c=10;c<s.length;c++){var m=s.words[c]|0;s.words[c-10]=(m&d)<<4|v>>>22,v=m}v>>>=22,s.words[c-10]=v,v===0&&s.length>10?s.length-=10:s.length-=9},ae.prototype.imulK=function(s){s.words[s.length]=0,s.words[s.length+1]=0,s.length+=2;for(var u=0,d=0;d<s.length;d++){var f=s.words[d]|0;u+=f*977,s.words[d]=u&67108863,u=f*64+(u/67108864|0)}return s.words[s.length-1]===0&&(s.length--,s.words[s.length-1]===0&&s.length--),s};function ie(){$.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(ie,$);function ee(){$.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(ee,$);function ce(){$.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(ce,$),ce.prototype.imulK=function(s){for(var u=0,d=0;d<s.length;d++){var f=(s.words[d]|0)*19+u,c=f&67108863;f>>>=26,s.words[d]=c,u=f}return u!==0&&(s.words[s.length++]=u),s},i._prime=function(s){if(ne[s])return ne[s];var u;if(s==="k256")u=new ae;else if(s==="p224")u=new ie;else if(s==="p192")u=new ee;else if(s==="p25519")u=new ce;else throw new Error("Unknown prime "+s);return ne[s]=u,u};function te(T){if(typeof T=="string"){var s=i._prime(T);this.m=s.p,this.prime=s}else r(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}te.prototype._verify1=function(s){r(s.negative===0,"red works only with positives"),r(s.red,"red works only with red numbers")},te.prototype._verify2=function(s,u){r((s.negative|u.negative)===0,"red works only with positives"),r(s.red&&s.red===u.red,"red works only with red numbers")},te.prototype.imod=function(s){return this.prime?this.prime.ireduce(s)._forceRed(this):s.umod(this.m)._forceRed(this)},te.prototype.neg=function(s){return s.isZero()?s.clone():this.m.sub(s)._forceRed(this)},te.prototype.add=function(s,u){this._verify2(s,u);var d=s.add(u);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},te.prototype.iadd=function(s,u){this._verify2(s,u);var d=s.iadd(u);return d.cmp(this.m)>=0&&d.isub(this.m),d},te.prototype.sub=function(s,u){this._verify2(s,u);var d=s.sub(u);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},te.prototype.isub=function(s,u){this._verify2(s,u);var d=s.isub(u);return d.cmpn(0)<0&&d.iadd(this.m),d},te.prototype.shl=function(s,u){return this._verify1(s),this.imod(s.ushln(u))},te.prototype.imul=function(s,u){return this._verify2(s,u),this.imod(s.imul(u))},te.prototype.mul=function(s,u){return this._verify2(s,u),this.imod(s.mul(u))},te.prototype.isqr=function(s){return this.imul(s,s.clone())},te.prototype.sqr=function(s){return this.mul(s,s)},te.prototype.sqrt=function(s){if(s.isZero())return s.clone();var u=this.m.andln(3);if(r(u%2===1),u===3){var d=this.m.add(new i(1)).iushrn(2);return this.pow(s,d)}for(var f=this.m.subn(1),c=0;!f.isZero()&&f.andln(1)===0;)c++,f.iushrn(1);r(!f.isZero());var v=new i(1).toRed(this),m=v.redNeg(),h=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,h).cmp(m)!==0;)o.redIAdd(m);for(var p=this.pow(o,f),E=this.pow(s,f.addn(1).iushrn(1)),g=this.pow(s,f),w=c;g.cmp(v)!==0;){for(var U=g,M=0;U.cmp(v)!==0;M++)U=U.redSqr();r(M<w);var k=this.pow(p,new i(1).iushln(w-M-1));E=E.redMul(k),p=k.redSqr(),g=g.redMul(p),w=M}return E},te.prototype.invm=function(s){var u=s._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},te.prototype.pow=function(s,u){if(u.isZero())return new i(1).toRed(this);if(u.cmpn(1)===0)return s.clone();var d=4,f=new Array(1<<d);f[0]=new i(1).toRed(this),f[1]=s;for(var c=2;c<f.length;c++)f[c]=this.mul(f[c-1],s);var v=f[0],m=0,h=0,o=u.bitLength()%26;for(o===0&&(o=26),c=u.length-1;c>=0;c--){for(var p=u.words[c],E=o-1;E>=0;E--){var g=p>>E&1;if(v!==f[0]&&(v=this.sqr(v)),g===0&&m===0){h=0;continue}m<<=1,m|=g,h++,!(h!==d&&(c!==0||E!==0))&&(v=this.mul(v,f[m]),h=0,m=0)}o=26}return v},te.prototype.convertTo=function(s){var u=s.umod(this.m);return u===s?u.clone():u},te.prototype.convertFrom=function(s){var u=s.clone();return u.red=null,u},i.mont=function(s){return new Y(s)};function Y(T){te.call(this,T),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(Y,te),Y.prototype.convertTo=function(s){return this.imod(s.ushln(this.shift))},Y.prototype.convertFrom=function(s){var u=this.imod(s.mul(this.rinv));return u.red=null,u},Y.prototype.imul=function(s,u){if(s.isZero()||u.isZero())return s.words[0]=0,s.length=1,s;var d=s.imul(u),f=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=d.isub(f).iushrn(this.shift),v=c;return c.cmp(this.m)>=0?v=c.isub(this.m):c.cmpn(0)<0&&(v=c.iadd(this.m)),v._forceRed(this)},Y.prototype.mul=function(s,u){if(s.isZero()||u.isZero())return new i(0)._forceRed(this);var d=s.mul(u),f=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=d.isub(f).iushrn(this.shift),v=c;return c.cmp(this.m)>=0?v=c.isub(this.m):c.cmpn(0)<0&&(v=c.iadd(this.m)),v._forceRed(this)},Y.prototype.invm=function(s){var u=this.imod(s._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(typeof dl>"u"||dl,U1)});var H1=V((AC,pl)=>{var SC=A(S());typeof Object.create=="function"?pl.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:pl.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}}});var nr=V((MC,gl)=>{var TC=A(S());try{if(bl=it("util"),typeof bl.inherits!="function")throw"";gl.exports=bl.inherits}catch{gl.exports=H1()}var bl});var Wf=V((EC,q1)=>{"use strict";var _C=A(S()),Qf=it("buffer"),io=Qf.Buffer,Xr={},zr;for(zr in Qf)Qf.hasOwnProperty(zr)&&(zr==="SlowBuffer"||zr==="Buffer"||(Xr[zr]=Qf[zr]));var ao=Xr.Buffer={};for(zr in io)io.hasOwnProperty(zr)&&(zr==="allocUnsafe"||zr==="allocUnsafeSlow"||(ao[zr]=io[zr]));Xr.Buffer.prototype=io.prototype;(!ao.from||ao.from===Uint8Array.from)&&(ao.from=function(t,e,r){if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&typeof t.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return io(t,e,r)});ao.alloc||(ao.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=io(t);return!e||e.length===0?n.fill(0):typeof r=="string"?n.fill(e,r):n.fill(e),n});if(!Xr.kStringMaxLength)try{Xr.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}Xr.constants||(Xr.constants={MAX_LENGTH:Xr.kMaxLength},Xr.kStringMaxLength&&(Xr.constants.MAX_STRING_LENGTH=Xr.kStringMaxLength));q1.exports=Xr});var Yf=V(G1=>{"use strict";var CC=A(S()),e4=nr();function Kr(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}G1.Reporter=Kr;Kr.prototype.isError=function(e){return e instanceof oo};Kr.prototype.save=function(){let e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Kr.prototype.restore=function(e){let r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};Kr.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Kr.prototype.exitKey=function(e){let r=this._reporterState;r.path=r.path.slice(0,e-1)};Kr.prototype.leaveKey=function(e,r,n){let i=this._reporterState;this.exitKey(e),i.obj!==null&&(i.obj[r]=n)};Kr.prototype.path=function(){return this._reporterState.path.join("/")};Kr.prototype.enterObject=function(){let e=this._reporterState,r=e.obj;return e.obj={},r};Kr.prototype.leaveObject=function(e){let r=this._reporterState,n=r.obj;return r.obj=e,n};Kr.prototype.error=function(e){let r,n=this._reporterState,i=e instanceof oo;if(i?r=e:r=new oo(n.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw r;return i||n.errors.push(r),r};Kr.prototype.wrapResult=function(e){let r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function oo(t,e){this.path=t,this.rethrow(e)}e4(oo,Error);oo.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,oo),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var co=V(vl=>{"use strict";var LC=A(S()),t4=nr(),$f=Yf().Reporter,so=Wf().Buffer;function Zr(t,e){if($f.call(this,e),!so.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}t4(Zr,$f);vl.DecoderBuffer=Zr;Zr.isDecoderBuffer=function(e){return e instanceof Zr?!0:typeof e=="object"&&so.isBuffer(e.base)&&e.constructor.name==="DecoderBuffer"&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.save=="function"&&typeof e.restore=="function"&&typeof e.isEmpty=="function"&&typeof e.readUInt8=="function"&&typeof e.skip=="function"&&typeof e.raw=="function"};Zr.prototype.save=function(){return{offset:this.offset,reporter:$f.prototype.save.call(this)}};Zr.prototype.restore=function(e){let r=new Zr(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,$f.prototype.restore.call(this,e.reporter),r};Zr.prototype.isEmpty=function(){return this.offset===this.length};Zr.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};Zr.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");let n=new Zr(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n};Zr.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function fo(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return fo.isEncoderBuffer(r)||(r=new fo(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=so.byteLength(t);else if(so.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}vl.EncoderBuffer=fo;fo.isEncoderBuffer=function(e){return e instanceof fo?!0:typeof e=="object"&&e.constructor.name==="EncoderBuffer"&&typeof e.length=="number"&&typeof e.join=="function"};fo.prototype.join=function(e,r){return e||(e=so.alloc(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,r),r+=n.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):so.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var di=V((RC,z1)=>{var FC=A(S());z1.exports=X1;function X1(t,e){if(!t)throw new Error(e||"Assertion failed")}X1.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)}});var e0=V((DC,Z1)=>{"use strict";var IC=A(S()),r4=Yf().Reporter,n4=co().EncoderBuffer,i4=co().DecoderBuffer,Tr=di(),K1=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],a4=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(K1),o4=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function rt(t,e,r){let n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}Z1.exports=rt;var s4=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];rt.prototype.clone=function(){let e=this._baseState,r={};s4.forEach(function(i){r[i]=e[i]});let n=new this.constructor(r.parent);return n._baseState=r,n};rt.prototype._wrap=function(){let e=this._baseState;a4.forEach(function(r){this[r]=function(){let i=new this.constructor(this);return e.children.push(i),i[r].apply(i,arguments)}},this)};rt.prototype._init=function(e){let r=this._baseState;Tr(r.parent===null),e.call(this),r.children=r.children.filter(function(n){return n._baseState.parent===this},this),Tr.equal(r.children.length,1,"Root node can have only one child")};rt.prototype._useArgs=function(e){let r=this._baseState,n=e.filter(function(i){return i instanceof this.constructor},this);e=e.filter(function(i){return!(i instanceof this.constructor)},this),n.length!==0&&(Tr(r.children===null),r.children=n,n.forEach(function(i){i._baseState.parent=this},this)),e.length!==0&&(Tr(r.args===null),r.args=e,r.reverseArgs=e.map(function(i){if(typeof i!="object"||i.constructor!==Object)return i;let a={};return Object.keys(i).forEach(function(l){l==(l|0)&&(l|=0);let b=i[l];a[b]=l}),a}))};o4.forEach(function(t){rt.prototype[t]=function(){let r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});K1.forEach(function(t){rt.prototype[t]=function(){let r=this._baseState,n=Array.prototype.slice.call(arguments);return Tr(r.tag===null),r.tag=t,this._useArgs(n),this}});rt.prototype.use=function(e){Tr(e);let r=this._baseState;return Tr(r.use===null),r.use=e,this};rt.prototype.optional=function(){let e=this._baseState;return e.optional=!0,this};rt.prototype.def=function(e){let r=this._baseState;return Tr(r.default===null),r.default=e,r.optional=!0,this};rt.prototype.explicit=function(e){let r=this._baseState;return Tr(r.explicit===null&&r.implicit===null),r.explicit=e,this};rt.prototype.implicit=function(e){let r=this._baseState;return Tr(r.explicit===null&&r.implicit===null),r.implicit=e,this};rt.prototype.obj=function(){let e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};rt.prototype.key=function(e){let r=this._baseState;return Tr(r.key===null),r.key=e,this};rt.prototype.any=function(){let e=this._baseState;return e.any=!0,this};rt.prototype.choice=function(e){let r=this._baseState;return Tr(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(n){return e[n]})),this};rt.prototype.contains=function(e){let r=this._baseState;return Tr(r.use===null),r.contains=e,this};rt.prototype._decode=function(e,r){let n=this._baseState;if(n.parent===null)return e.wrapResult(n.children[0]._decode(e,r));let i=n.default,a=!0,l=null;if(n.key!==null&&(l=e.enterKey(n.key)),n.optional){let y=null;if(n.explicit!==null?y=n.explicit:n.implicit!==null?y=n.implicit:n.tag!==null&&(y=n.tag),y===null&&!n.any){let x=e.save();try{n.choice===null?this._decodeGeneric(n.tag,e,r):this._decodeChoice(e,r),a=!0}catch{a=!1}e.restore(x)}else if(a=this._peekTag(e,y,n.any),e.isError(a))return a}let b;if(n.obj&&a&&(b=e.enterObject()),a){if(n.explicit!==null){let x=this._decodeTag(e,n.explicit);if(e.isError(x))return x;e=x}let y=e.offset;if(n.use===null&&n.choice===null){let x;n.any&&(x=e.save());let _=this._decodeTag(e,n.implicit!==null?n.implicit:n.tag,n.any);if(e.isError(_))return _;n.any?i=e.raw(x):e=_}if(r&&r.track&&n.tag!==null&&r.track(e.path(),y,e.length,"tagged"),r&&r.track&&n.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),n.any||(n.choice===null?i=this._decodeGeneric(n.tag,e,r):i=this._decodeChoice(e,r)),e.isError(i))return i;if(!n.any&&n.choice===null&&n.children!==null&&n.children.forEach(function(_){_._decode(e,r)}),n.contains&&(n.tag==="octstr"||n.tag==="bitstr")){let x=new i4(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(x,r)}}return n.obj&&a&&(i=e.leaveObject(b)),n.key!==null&&(i!==null||a===!0)?e.leaveKey(l,n.key,i):l!==null&&e.exitKey(l),i};rt.prototype._decodeGeneric=function(e,r,n){let i=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,i.args[0],n):/str$/.test(e)?this._decodeStr(r,e,n):e==="objid"&&i.args?this._decodeObjid(r,i.args[0],i.args[1],n):e==="objid"?this._decodeObjid(r,null,null,n):e==="gentime"||e==="utctime"?this._decodeTime(r,e,n):e==="null_"?this._decodeNull(r,n):e==="bool"?this._decodeBool(r,n):e==="objDesc"?this._decodeStr(r,e,n):e==="int"||e==="enum"?this._decodeInt(r,i.args&&i.args[0],n):i.use!==null?this._getUse(i.use,r._reporterState.obj)._decode(r,n):r.error("unknown tag: "+e)};rt.prototype._getUse=function(e,r){let n=this._baseState;return n.useDecoder=this._use(e,r),Tr(n.useDecoder._baseState.parent===null),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder};rt.prototype._decodeChoice=function(e,r){let n=this._baseState,i=null,a=!1;return Object.keys(n.choice).some(function(l){let b=e.save(),y=n.choice[l];try{let x=y._decode(e,r);if(e.isError(x))return!1;i={type:l,value:x},a=!0}catch{return e.restore(b),!1}return!0},this),a?i:e.error("Choice not matched")};rt.prototype._createEncoderBuffer=function(e){return new n4(e,this.reporter)};rt.prototype._encode=function(e,r,n){let i=this._baseState;if(i.default!==null&&i.default===e)return;let a=this._encodeValue(e,r,n);if(a!==void 0&&!this._skipDefault(a,r,n))return a};rt.prototype._encodeValue=function(e,r,n){let i=this._baseState;if(i.parent===null)return i.children[0]._encode(e,r||new r4);let a=null;if(this.reporter=r,i.optional&&e===void 0)if(i.default!==null)e=i.default;else return;let l=null,b=!1;if(i.any)a=this._createEncoderBuffer(e);else if(i.choice)a=this._encodeChoice(e,r);else if(i.contains)l=this._getUse(i.contains,n)._encode(e,r),b=!0;else if(i.children)l=i.children.map(function(y){if(y._baseState.tag==="null_")return y._encode(null,r,e);if(y._baseState.key===null)return r.error("Child should have a key");let x=r.enterKey(y._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");let _=y._encode(e[y._baseState.key],r,e);return r.leaveKey(x),_},this).filter(function(y){return y}),l=this._createEncoderBuffer(l);else if(i.tag==="seqof"||i.tag==="setof"){if(!(i.args&&i.args.length===1))return r.error("Too many args for : "+i.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");let y=this.clone();y._baseState.implicit=null,l=this._createEncoderBuffer(e.map(function(x){let _=this._baseState;return this._getUse(_.args[0],e)._encode(x,r)},y))}else i.use!==null?a=this._getUse(i.use,n)._encode(e,r):(l=this._encodePrimitive(i.tag,e),b=!0);if(!i.any&&i.choice===null){let y=i.implicit!==null?i.implicit:i.tag,x=i.implicit===null?"universal":"context";y===null?i.use===null&&r.error("Tag could be omitted only for .use()"):i.use===null&&(a=this._encodeComposite(y,b,x,l))}return i.explicit!==null&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a};rt.prototype._encodeChoice=function(e,r){let n=this._baseState,i=n.choice[e.type];return i||Tr(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(e.value,r)};rt.prototype._encodePrimitive=function(e,r){let n=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&n.args)return this._encodeObjid(r,n.reverseArgs[0],n.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,n.args&&n.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};rt.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};rt.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}});var t0=V(da=>{"use strict";var kC=A(S());function V1(t){let e={};return Object.keys(t).forEach(function(r){(r|0)==r&&(r=r|0);let n=t[r];e[n]=r}),e}da.tagClass={0:"universal",1:"application",2:"context",3:"private"};da.tagClassByName=V1(da.tagClass);da.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"};da.tagByName=V1(da.tag)});var xl=V((NC,W1)=>{"use strict";var JC=A(S()),f4=nr(),hi=Wf().Buffer,j1=e0(),ml=t0();function Q1(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new vn,this.tree._init(t.body)}W1.exports=Q1;Q1.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function vn(t){j1.call(this,"der",t)}f4(vn,j1);vn.prototype._encodeComposite=function(e,r,n,i){let a=c4(e,r,n,this.reporter);if(i.length<128){let y=hi.alloc(2);return y[0]=a,y[1]=i.length,this._createEncoderBuffer([y,i])}let l=1;for(let y=i.length;y>=256;y>>=8)l++;let b=hi.alloc(2+l);b[0]=a,b[1]=128|l;for(let y=1+l,x=i.length;x>0;y--,x>>=8)b[y]=x&255;return this._createEncoderBuffer([b,i])};vn.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){let n=hi.alloc(e.length*2);for(let i=0;i<e.length;i++)n.writeUInt16BE(e.charCodeAt(i),i*2);return this._createEncoderBuffer(n)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};vn.prototype._encodeObjid=function(e,r,n){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s.]+/g);for(let b=0;b<e.length;b++)e[b]|=0}else if(Array.isArray(e)){e=e.slice();for(let b=0;b<e.length;b++)e[b]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}let i=0;for(let b=0;b<e.length;b++){let y=e[b];for(i++;y>=128;y>>=7)i++}let a=hi.alloc(i),l=a.length-1;for(let b=e.length-1;b>=0;b--){let y=e[b];for(a[l--]=y&127;(y>>=7)>0;)a[l--]=128|y&127}return this._createEncoderBuffer(a)};function Vr(t){return t<10?"0"+t:t}vn.prototype._encodeTime=function(e,r){let n,i=new Date(e);return r==="gentime"?n=[Vr(i.getUTCFullYear()),Vr(i.getUTCMonth()+1),Vr(i.getUTCDate()),Vr(i.getUTCHours()),Vr(i.getUTCMinutes()),Vr(i.getUTCSeconds()),"Z"].join(""):r==="utctime"?n=[Vr(i.getUTCFullYear()%100),Vr(i.getUTCMonth()+1),Vr(i.getUTCDate()),Vr(i.getUTCHours()),Vr(i.getUTCMinutes()),Vr(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(n,"octstr")};vn.prototype._encodeNull=function(){return this._createEncoderBuffer("")};vn.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!hi.isBuffer(e)){let a=e.toArray();!e.sign&&a[0]&128&&a.unshift(0),e=hi.from(a)}if(hi.isBuffer(e)){let a=e.length;e.length===0&&a++;let l=hi.alloc(a);return e.copy(l),e.length===0&&(l[0]=0),this._createEncoderBuffer(l)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let a=e;a>=256;a>>=8)n++;let i=new Array(n);for(let a=i.length-1;a>=0;a--)i[a]=e&255,e>>=8;return i[0]&128&&i.unshift(0),this._createEncoderBuffer(hi.from(i))};vn.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};vn.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};vn.prototype._skipDefault=function(e,r,n){let i=this._baseState,a;if(i.default===null)return!1;let l=e.join();if(i.defaultBuffer===void 0&&(i.defaultBuffer=this._encodeValue(i.default,r,n).join()),l.length!==i.defaultBuffer.length)return!1;for(a=0;a<l.length;a++)if(l[a]!==i.defaultBuffer[a])return!1;return!0};function c4(t,e,r,n){let i;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),ml.tagByName.hasOwnProperty(t))i=ml.tagByName[t];else if(typeof t=="number"&&(t|0)===t)i=t;else return n.error("Unknown tag: "+t);return i>=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=ml.tagClassByName[r||"universal"]<<6,i)}});var $1=V((UC,Y1)=>{"use strict";var HC=A(S()),u4=nr(),yl=xl();function wl(t){yl.call(this,t),this.enc="pem"}u4(wl,yl);Y1.exports=wl;wl.prototype.encode=function(e,r){let i=yl.prototype.encode.call(this,e).toString("base64"),a=["-----BEGIN "+r.label+"-----"];for(let l=0;l<i.length;l+=64)a.push(i.slice(l,l+64));return a.push("-----END "+r.label+"-----"),a.join(`
5
+ `)}});var Al=V(tb=>{"use strict";var GC=A(S()),eb=tb;eb.der=xl();eb.pem=$1()});var Ml=V((XC,sb)=>{"use strict";var zC=A(S()),l4=nr(),d4=hl(),rb=co().DecoderBuffer,ib=e0(),nb=t0();function ab(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Ir,this.tree._init(t.body)}sb.exports=ab;ab.prototype.decode=function(e,r){return rb.isDecoderBuffer(e)||(e=new rb(e,r)),this.tree._decode(e,r)};function Ir(t){ib.call(this,"der",t)}l4(Ir,ib);Ir.prototype._peekTag=function(e,r,n){if(e.isEmpty())return!1;let i=e.save(),a=Sl(e,'Failed to peek tag: "'+r+'"');return e.isError(a)?a:(e.restore(i),a.tag===r||a.tagStr===r||a.tagStr+"of"===r||n)};Ir.prototype._decodeTag=function(e,r,n){let i=Sl(e,'Failed to decode tag of "'+r+'"');if(e.isError(i))return i;let a=ob(e,i.primitive,'Failed to get length of "'+r+'"');if(e.isError(a))return a;if(!n&&i.tag!==r&&i.tagStr!==r&&i.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(i.primitive||a!==null)return e.skip(a,'Failed to match body of: "'+r+'"');let l=e.save(),b=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(b)?b:(a=e.offset-l.offset,e.restore(l),e.skip(a,'Failed to match body of: "'+r+'"'))};Ir.prototype._skipUntilEnd=function(e,r){for(;;){let n=Sl(e,r);if(e.isError(n))return n;let i=ob(e,n.primitive,r);if(e.isError(i))return i;let a;if(n.primitive||i!==null?a=e.skip(i):a=this._skipUntilEnd(e,r),e.isError(a))return a;if(n.tagStr==="end")break}};Ir.prototype._decodeList=function(e,r,n,i){let a=[];for(;!e.isEmpty();){let l=this._peekTag(e,"end");if(e.isError(l))return l;let b=n.decode(e,"der",i);if(e.isError(b)&&l)break;a.push(b)}return a};Ir.prototype._decodeStr=function(e,r){if(r==="bitstr"){let n=e.readUInt8();return e.isError(n)?n:{unused:n,data:e.raw()}}else if(r==="bmpstr"){let n=e.raw();if(n.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");let i="";for(let a=0;a<n.length/2;a++)i+=String.fromCharCode(n.readUInt16BE(a*2));return i}else if(r==="numstr"){let n=e.raw().toString("ascii");return this._isNumstr(n)?n:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){let n=e.raw().toString("ascii");return this._isPrintstr(n)?n:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};Ir.prototype._decodeObjid=function(e,r,n){let i,a=[],l=0,b=0;for(;!e.isEmpty();)b=e.readUInt8(),l<<=7,l|=b&127,b&128||(a.push(l),l=0);b&128&&a.push(l);let y=a[0]/40|0,x=a[0]%40;if(n?i=a:i=[y,x].concat(a.slice(1)),r){let _=r[i.join(" ")];_===void 0&&(_=r[i.join(".")]),_!==void 0&&(i=_)}return i};Ir.prototype._decodeTime=function(e,r){let n=e.raw().toString(),i,a,l,b,y,x;if(r==="gentime")i=n.slice(0,4)|0,a=n.slice(4,6)|0,l=n.slice(6,8)|0,b=n.slice(8,10)|0,y=n.slice(10,12)|0,x=n.slice(12,14)|0;else if(r==="utctime")i=n.slice(0,2)|0,a=n.slice(2,4)|0,l=n.slice(4,6)|0,b=n.slice(6,8)|0,y=n.slice(8,10)|0,x=n.slice(10,12)|0,i<70?i=2e3+i:i=1900+i;else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(i,a-1,l,b,y,x,0)};Ir.prototype._decodeNull=function(){return null};Ir.prototype._decodeBool=function(e){let r=e.readUInt8();return e.isError(r)?r:r!==0};Ir.prototype._decodeInt=function(e,r){let n=e.raw(),i=new d4(n);return r&&(i=r[i.toString(10)]||i),i};Ir.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function Sl(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;let n=nb.tagClass[r>>6],i=(r&32)===0;if((r&31)===31){let l=r;for(r=0;(l&128)===128;){if(l=t.readUInt8(e),t.isError(l))return l;r<<=7,r|=l&127}}else r&=31;let a=nb.tag[r];return{cls:n,primitive:i,tag:r,tagStr:a}}function ob(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&n===128)return null;if(!(n&128))return n;let i=n&127;if(i>4)return t.error("length octect is too long");n=0;for(let a=0;a<i;a++){n<<=8;let l=t.readUInt8(r);if(t.isError(l))return l;n|=l}return n}});var cb=V((KC,fb)=>{"use strict";var ZC=A(S()),h4=nr(),p4=Wf().Buffer,Tl=Ml();function El(t){Tl.call(this,t),this.enc="pem"}h4(El,Tl);fb.exports=El;El.prototype.decode=function(e,r){let n=e.toString().split(/[\r\n]+/g),i=r.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,l=-1,b=-1;for(let _=0;_<n.length;_++){let C=n[_].match(a);if(C!==null&&C[2]===i)if(l===-1){if(C[1]!=="BEGIN")break;l=_}else{if(C[1]!=="END")break;b=_;break}}if(l===-1||b===-1)throw new Error("PEM section not found for: "+i);let y=n.slice(l+1,b).join("");y.replace(/[^a-z0-9+/=]+/gi,"");let x=p4.from(y,"base64");return Tl.prototype.decode.call(this,x,r)}});var _l=V(lb=>{"use strict";var jC=A(S()),ub=lb;ub.der=Ml();ub.pem=cb()});var hb=V(db=>{"use strict";var WC=A(S()),b4=Al(),g4=_l(),v4=nr(),m4=db;m4.define=function(e,r){return new uo(e,r)};function uo(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}uo.prototype._createNamed=function(e){let r=this.name;function n(i){this._initNamed(i,r)}return v4(n,e),n.prototype._initNamed=function(a,l){e.call(this,a,l)},new n(this)};uo.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(g4[e])),this.decoders[e]};uo.prototype.decode=function(e,r,n){return this._getDecoder(r).decode(e,n)};uo.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(b4[e])),this.encoders[e]};uo.prototype.encode=function(e,r,n){return this._getEncoder(r).encode(e,n)}});var bb=V(pb=>{"use strict";var $C=A(S()),r0=pb;r0.Reporter=Yf().Reporter;r0.DecoderBuffer=co().DecoderBuffer;r0.EncoderBuffer=co().EncoderBuffer;r0.Node=e0()});var mb=V(vb=>{"use strict";var tP=A(S()),gb=vb;gb._reverse=function(e){let r={};return Object.keys(e).forEach(function(n){(n|0)==n&&(n=n|0);let i=e[n];r[i]=n}),r};gb.der=t0()});var yb=V(xb=>{"use strict";var nP=A(S()),lo=xb;lo.bignum=hl();lo.define=hb().define;lo.base=bb();lo.constants=mb();lo.decoders=_l();lo.encoders=Al()});var Bb=V(In=>{"use strict";var aP=A(S()),x4=In&&In.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(e,r);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,i)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),y4=In&&In.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),w4=In&&In.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&x4(e,t,r);return y4(e,t),e};Object.defineProperty(In,"__esModule",{value:!0});In.pemTojwk=L4;In.jwkTopem=R4;var pi=w4(yb());function A4(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Bl(t){return A4(Buffer.from(t,"hex").toString("base64"))}var wb=pi.define("RSAPublicKey",function(){this.seq().obj(this.key("n").int(),this.key("e").int())}),Ab=pi.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional().any())}),S4=pi.define("PublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Ab),this.key("publicKey").bitstr())}),Sb=pi.define("Version",function(){this.int({0:"two-prime",1:"multi"})}),M4=pi.define("OtherPrimeInfos",function(){this.seq().obj(this.key("ri").int(),this.key("di").int(),this.key("ti").int())}),Mb=pi.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").use(Sb),this.key("n").int(),this.key("e").int(),this.key("d").int(),this.key("p").int(),this.key("q").int(),this.key("dp").int(),this.key("dq").int(),this.key("qi").int(),this.key("other").optional().use(M4))}),T4=pi.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").use(Sb),this.key("algorithm").use(Ab),this.key("privateKey").bitstr())});function Tb(t,e){return e=e||{},Object.keys(e).forEach(function(r){t[r]=e[r]}),t}function Cl(t){return t.length%2===1?"0"+t:t}function Eb(t,e){var r=wb.decode(t,"der"),n=Cl(r.e.toString(16)),i={kty:"RSA",n:Oi(r.n),e:Bl(n)};return Tb(i,e)}function _b(t,e){var r=Mb.decode(t,"der"),n=Cl(r.e.toString(16)),i={kty:"RSA",n:Oi(r.n),e:Bl(n),d:Oi(r.d),p:Oi(r.p),q:Oi(r.q),dp:Oi(r.dp),dq:Oi(r.dq),qi:Oi(r.qi)};return Tb(i,e)}function E4(t,e){var r=S4.decode(t,"der");return Eb(r.publicKey.data,e)}function _4(t,e){var r=T4.decode(t,"der");return _b(r.privateKey.data,e)}function B4(t){var e=/^-----BEGIN (RSA )?(PUBLIC|PRIVATE) KEY-----$/.exec(t);if(!e)return null;var r=!!e[1],n=e[2]==="PRIVATE";return n?r?_b:_4:r?Eb:E4}function C4(t){return{n:Ii(t.n),e:Ii(t.e),d:t.d&&Ii(t.d),p:t.p&&Ii(t.p),q:t.q&&Ii(t.q),dp:t.dp&&Ii(t.dp),dq:t.dq&&Ii(t.dq),qi:t.qi&&Ii(t.qi)}}function Oi(t){return Bl(Cl(t.toString(16)))}function P4(t){return new pi.bignum(Buffer.from(t,"base64"))}function Ii(t){return/^[0-9]+$/.test(t)?new pi.bignum(t,10):P4(t)}function L4(t,e){var r=t.toString().split(/(\r\n|\r|\n)+/g);r=r.filter(function(i){return i.trim().length!==0});var n=B4(r[0]);return r=r.slice(1,-1).join(""),n(Buffer.from(r.replace(/[^\w\d\+\/=]+/g,""),"base64"),e)}function R4(t){var e=C4(t),r=!!e.d,n=r?"PRIVATE":"PUBLIC",i="-----BEGIN RSA "+n+` KEY-----
6
6
  `,a=`
7
7
  -----END RSA `+n+` KEY-----
8
- `,l=Buffer.alloc(0);r?(e.version="two-prime",l=Sb.encode(e,"der")):l=yb.encode(e,"der");var b=l.toString("base64").match(/.{1,64}/g).join(`
9
- `);return i+b+a}});var Lb=V((hP,n0)=>{var pP=A(S());(function(){"use strict";var t="input is invalid type",e="finalize already called",r=typeof window=="object",n=r?window:{};n.JS_SHA3_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",a=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?n=global:i&&(n=self);var l=!n.JS_SHA3_NO_COMMON_JS&&typeof n0=="object"&&n0.exports,b=typeof define=="function"&&define.amd,y=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",x="0123456789abcdef".split(""),_=[31,7936,2031616,520093696],C=[4,1024,262144,67108864],D=[1,256,65536,16777216],F=[6,1536,393216,100663296],P=[0,8,16,24],z=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],W=[224,256,384,512],X=[128,256],ne=["hex","buffer","arrayBuffer","array","digest"],$={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(M){return Object.prototype.toString.call(M)==="[object Array]"}),y&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(M){return typeof M=="object"&&M.buffer&&M.buffer.constructor===ArrayBuffer});for(var ae=function(M,k,G){return function(Z){return new g(M,k,M).update(Z)[G]()}},ie=function(M,k,G){return function(Z,B){return new g(M,k,B).update(Z)[G]()}},ee=function(M,k,G){return function(Z,B,R,L){return f["cshake"+M].update(Z,B,R,L)[G]()}},ce=function(M,k,G){return function(Z,B,R,L){return f["kmac"+M].update(Z,B,R,L)[G]()}},te=function(M,k,G,Z){for(var B=0;B<ne.length;++B){var R=ne[B];M[R]=k(G,Z,R)}return M},Y=function(M,k){var G=ae(M,k,"hex");return G.create=function(){return new g(M,k,M)},G.update=function(Z){return G.create().update(Z)},te(G,ae,M,k)},T=function(M,k){var G=ie(M,k,"hex");return G.create=function(Z){return new g(M,k,Z)},G.update=function(Z,B){return G.create(B).update(Z)},te(G,ie,M,k)},s=function(M,k){var G=$[M],Z=ee(M,k,"hex");return Z.create=function(B,R,L){return!R&&!L?f["shake"+M].create(B):new g(M,k,B).bytepad([R,L],G)},Z.update=function(B,R,L,I){return Z.create(R,L,I).update(B)},te(Z,ee,M,k)},u=function(M,k){var G=$[M],Z=ce(M,k,"hex");return Z.create=function(B,R,L){return new w(M,k,R).bytepad(["KMAC",L],G).bytepad([B],G)},Z.update=function(B,R,L,I){return Z.create(B,L,I).update(R)},te(Z,ce,M,k)},d=[{name:"keccak",padding:D,bits:W,createMethod:Y},{name:"sha3",padding:F,bits:W,createMethod:Y},{name:"shake",padding:_,bits:X,createMethod:T},{name:"cshake",padding:C,bits:X,createMethod:s},{name:"kmac",padding:C,bits:X,createMethod:u}],f={},c=[],v=0;v<d.length;++v)for(var m=d[v],h=m.bits,o=0;o<h.length;++o){var p=m.name+"_"+h[o];if(c.push(p),f[p]=m.createMethod(h[o],m.padding),m.name!=="sha3"){var E=m.name+h[o];c.push(E),f[E]=f[p]}}function g(M,k,G){this.blocks=[],this.s=[],this.padding=k,this.outputBits=G,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(M<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=G>>5,this.extraBytes=(G&31)>>3;for(var Z=0;Z<50;++Z)this.s[Z]=0}g.prototype.update=function(M){if(this.finalized)throw new Error(e);var k,G=typeof M;if(G!=="string"){if(G==="object"){if(M===null)throw new Error(t);if(y&&M.constructor===ArrayBuffer)M=new Uint8Array(M);else if(!Array.isArray(M)&&(!y||!ArrayBuffer.isView(M)))throw new Error(t)}else throw new Error(t);k=!0}for(var Z=this.blocks,B=this.byteCount,R=M.length,L=this.blockCount,I=0,q=this.s,O,J;I<R;){if(this.reset)for(this.reset=!1,Z[0]=this.block,O=1;O<L+1;++O)Z[O]=0;if(k)for(O=this.start;I<R&&O<B;++I)Z[O>>2]|=M[I]<<P[O++&3];else for(O=this.start;I<R&&O<B;++I)J=M.charCodeAt(I),J<128?Z[O>>2]|=J<<P[O++&3]:J<2048?(Z[O>>2]|=(192|J>>6)<<P[O++&3],Z[O>>2]|=(128|J&63)<<P[O++&3]):J<55296||J>=57344?(Z[O>>2]|=(224|J>>12)<<P[O++&3],Z[O>>2]|=(128|J>>6&63)<<P[O++&3],Z[O>>2]|=(128|J&63)<<P[O++&3]):(J=65536+((J&1023)<<10|M.charCodeAt(++I)&1023),Z[O>>2]|=(240|J>>18)<<P[O++&3],Z[O>>2]|=(128|J>>12&63)<<P[O++&3],Z[O>>2]|=(128|J>>6&63)<<P[O++&3],Z[O>>2]|=(128|J&63)<<P[O++&3]);if(this.lastByteIndex=O,O>=B){for(this.start=O-B,this.block=Z[L],O=0;O<L;++O)q[O]^=Z[O];U(q),this.reset=!0}else this.start=O}return this},g.prototype.encode=function(M,k){var G=M&255,Z=1,B=[G];for(M=M>>8,G=M&255;G>0;)B.unshift(G),M=M>>8,G=M&255,++Z;return k?B.push(Z):B.unshift(Z),this.update(B),B.length},g.prototype.encodeString=function(M){var k,G=typeof M;if(G!=="string"){if(G==="object"){if(M===null)throw new Error(t);if(y&&M.constructor===ArrayBuffer)M=new Uint8Array(M);else if(!Array.isArray(M)&&(!y||!ArrayBuffer.isView(M)))throw new Error(t)}else throw new Error(t);k=!0}var Z=0,B=M.length;if(k)Z=B;else for(var R=0;R<M.length;++R){var L=M.charCodeAt(R);L<128?Z+=1:L<2048?Z+=2:L<55296||L>=57344?Z+=3:(L=65536+((L&1023)<<10|M.charCodeAt(++R)&1023),Z+=4)}return Z+=this.encode(Z*8),this.update(M),Z},g.prototype.bytepad=function(M,k){for(var G=this.encode(k),Z=0;Z<M.length;++Z)G+=this.encodeString(M[Z]);var B=k-G%k,R=[];return R.length=B,this.update(R),this},g.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var M=this.blocks,k=this.lastByteIndex,G=this.blockCount,Z=this.s;if(M[k>>2]|=this.padding[k&3],this.lastByteIndex===this.byteCount)for(M[0]=M[G],k=1;k<G+1;++k)M[k]=0;for(M[G-1]|=2147483648,k=0;k<G;++k)Z[k]^=M[k];U(Z)}},g.prototype.toString=g.prototype.hex=function(){this.finalize();for(var M=this.blockCount,k=this.s,G=this.outputBlocks,Z=this.extraBytes,B=0,R=0,L="",I;R<G;){for(B=0;B<M&&R<G;++B,++R)I=k[B],L+=x[I>>4&15]+x[I&15]+x[I>>12&15]+x[I>>8&15]+x[I>>20&15]+x[I>>16&15]+x[I>>28&15]+x[I>>24&15];R%M===0&&(U(k),B=0)}return Z&&(I=k[B],L+=x[I>>4&15]+x[I&15],Z>1&&(L+=x[I>>12&15]+x[I>>8&15]),Z>2&&(L+=x[I>>20&15]+x[I>>16&15])),L},g.prototype.arrayBuffer=function(){this.finalize();var M=this.blockCount,k=this.s,G=this.outputBlocks,Z=this.extraBytes,B=0,R=0,L=this.outputBits>>3,I;Z?I=new ArrayBuffer(G+1<<2):I=new ArrayBuffer(L);for(var q=new Uint32Array(I);R<G;){for(B=0;B<M&&R<G;++B,++R)q[R]=k[B];R%M===0&&U(k)}return Z&&(q[B]=k[B],I=I.slice(0,L)),I},g.prototype.buffer=g.prototype.arrayBuffer,g.prototype.digest=g.prototype.array=function(){this.finalize();for(var M=this.blockCount,k=this.s,G=this.outputBlocks,Z=this.extraBytes,B=0,R=0,L=[],I,q;R<G;){for(B=0;B<M&&R<G;++B,++R)I=R<<2,q=k[B],L[I]=q&255,L[I+1]=q>>8&255,L[I+2]=q>>16&255,L[I+3]=q>>24&255;R%M===0&&U(k)}return Z&&(I=R<<2,q=k[B],L[I]=q&255,Z>1&&(L[I+1]=q>>8&255),Z>2&&(L[I+2]=q>>16&255)),L};function w(M,k,G){g.call(this,M,k,G)}w.prototype=new g,w.prototype.finalize=function(){return this.encode(this.outputBits,!0),g.prototype.finalize.call(this)};var U=function(M){var k,G,Z,B,R,L,I,q,O,J,K,N,H,Q,j,re,De,se,le,Ue,oe,fe,Xe,ge,ve,mt,pe,be,Ye,de,ue,Zt,me,xe,Vt,ye,we,jt,Ae,Se,Qt,Me,Te,Wt,Ee,_e,Yt,Be,Ce,$t,Pe,Le,er,Re,Fe,It,ke,Ne,Tt,Et,_t,Bt,Ct;for(Z=0;Z<48;Z+=2)B=M[0]^M[10]^M[20]^M[30]^M[40],R=M[1]^M[11]^M[21]^M[31]^M[41],L=M[2]^M[12]^M[22]^M[32]^M[42],I=M[3]^M[13]^M[23]^M[33]^M[43],q=M[4]^M[14]^M[24]^M[34]^M[44],O=M[5]^M[15]^M[25]^M[35]^M[45],J=M[6]^M[16]^M[26]^M[36]^M[46],K=M[7]^M[17]^M[27]^M[37]^M[47],N=M[8]^M[18]^M[28]^M[38]^M[48],H=M[9]^M[19]^M[29]^M[39]^M[49],k=N^(L<<1|I>>>31),G=H^(I<<1|L>>>31),M[0]^=k,M[1]^=G,M[10]^=k,M[11]^=G,M[20]^=k,M[21]^=G,M[30]^=k,M[31]^=G,M[40]^=k,M[41]^=G,k=B^(q<<1|O>>>31),G=R^(O<<1|q>>>31),M[2]^=k,M[3]^=G,M[12]^=k,M[13]^=G,M[22]^=k,M[23]^=G,M[32]^=k,M[33]^=G,M[42]^=k,M[43]^=G,k=L^(J<<1|K>>>31),G=I^(K<<1|J>>>31),M[4]^=k,M[5]^=G,M[14]^=k,M[15]^=G,M[24]^=k,M[25]^=G,M[34]^=k,M[35]^=G,M[44]^=k,M[45]^=G,k=q^(N<<1|H>>>31),G=O^(H<<1|N>>>31),M[6]^=k,M[7]^=G,M[16]^=k,M[17]^=G,M[26]^=k,M[27]^=G,M[36]^=k,M[37]^=G,M[46]^=k,M[47]^=G,k=J^(B<<1|R>>>31),G=K^(R<<1|B>>>31),M[8]^=k,M[9]^=G,M[18]^=k,M[19]^=G,M[28]^=k,M[29]^=G,M[38]^=k,M[39]^=G,M[48]^=k,M[49]^=G,Q=M[0],j=M[1],_e=M[11]<<4|M[10]>>>28,Yt=M[10]<<4|M[11]>>>28,be=M[20]<<3|M[21]>>>29,Ye=M[21]<<3|M[20]>>>29,Et=M[31]<<9|M[30]>>>23,_t=M[30]<<9|M[31]>>>23,Me=M[40]<<18|M[41]>>>14,Te=M[41]<<18|M[40]>>>14,xe=M[2]<<1|M[3]>>>31,Vt=M[3]<<1|M[2]>>>31,re=M[13]<<12|M[12]>>>20,De=M[12]<<12|M[13]>>>20,Be=M[22]<<10|M[23]>>>22,Ce=M[23]<<10|M[22]>>>22,de=M[33]<<13|M[32]>>>19,ue=M[32]<<13|M[33]>>>19,Bt=M[42]<<2|M[43]>>>30,Ct=M[43]<<2|M[42]>>>30,Re=M[5]<<30|M[4]>>>2,Fe=M[4]<<30|M[5]>>>2,ye=M[14]<<6|M[15]>>>26,we=M[15]<<6|M[14]>>>26,se=M[25]<<11|M[24]>>>21,le=M[24]<<11|M[25]>>>21,$t=M[34]<<15|M[35]>>>17,Pe=M[35]<<15|M[34]>>>17,Zt=M[45]<<29|M[44]>>>3,me=M[44]<<29|M[45]>>>3,ge=M[6]<<28|M[7]>>>4,ve=M[7]<<28|M[6]>>>4,It=M[17]<<23|M[16]>>>9,ke=M[16]<<23|M[17]>>>9,jt=M[26]<<25|M[27]>>>7,Ae=M[27]<<25|M[26]>>>7,Ue=M[36]<<21|M[37]>>>11,oe=M[37]<<21|M[36]>>>11,Le=M[47]<<24|M[46]>>>8,er=M[46]<<24|M[47]>>>8,Wt=M[8]<<27|M[9]>>>5,Ee=M[9]<<27|M[8]>>>5,mt=M[18]<<20|M[19]>>>12,pe=M[19]<<20|M[18]>>>12,Ne=M[29]<<7|M[28]>>>25,Tt=M[28]<<7|M[29]>>>25,Se=M[38]<<8|M[39]>>>24,Qt=M[39]<<8|M[38]>>>24,fe=M[48]<<14|M[49]>>>18,Xe=M[49]<<14|M[48]>>>18,M[0]=Q^~re&se,M[1]=j^~De&le,M[10]=ge^~mt&be,M[11]=ve^~pe&Ye,M[20]=xe^~ye&jt,M[21]=Vt^~we&Ae,M[30]=Wt^~_e&Be,M[31]=Ee^~Yt&Ce,M[40]=Re^~It&Ne,M[41]=Fe^~ke&Tt,M[2]=re^~se&Ue,M[3]=De^~le&oe,M[12]=mt^~be&de,M[13]=pe^~Ye&ue,M[22]=ye^~jt&Se,M[23]=we^~Ae&Qt,M[32]=_e^~Be&$t,M[33]=Yt^~Ce&Pe,M[42]=It^~Ne&Et,M[43]=ke^~Tt&_t,M[4]=se^~Ue&fe,M[5]=le^~oe&Xe,M[14]=be^~de&Zt,M[15]=Ye^~ue&me,M[24]=jt^~Se&Me,M[25]=Ae^~Qt&Te,M[34]=Be^~$t&Le,M[35]=Ce^~Pe&er,M[44]=Ne^~Et&Bt,M[45]=Tt^~_t&Ct,M[6]=Ue^~fe&Q,M[7]=oe^~Xe&j,M[16]=de^~Zt&ge,M[17]=ue^~me&ve,M[26]=Se^~Me&xe,M[27]=Qt^~Te&Vt,M[36]=$t^~Le&Wt,M[37]=Pe^~er&Ee,M[46]=Et^~Bt&Re,M[47]=_t^~Ct&Fe,M[8]=fe^~Q&re,M[9]=Xe^~j&De,M[18]=Zt^~ge&mt,M[19]=me^~ve&pe,M[28]=Me^~xe&ye,M[29]=Te^~Vt&we,M[38]=Le^~Wt&_e,M[39]=er^~Ee&Yt,M[48]=Bt^~Re&It,M[49]=Ct^~Fe&ke,M[0]^=z[Z],M[1]^=z[Z+1]};if(l)n0.exports=f;else{for(v=0;v<c.length;++v)n[c[v]]=f[c[v]];b&&define(function(){return f})}})()});var Rb=V(i0=>{"use strict";var gP=A(S());Object.defineProperty(i0,"__esModule",{value:!0});i0.version=void 0;i0.version="logger/5.8.0"});var Pt=V(kn=>{"use strict";var mP=A(S());Object.defineProperty(kn,"__esModule",{value:!0});kn.Logger=kn.ErrorCode=kn.LogLevel=void 0;var Fb=!1,Db=!1,a0={debug:1,default:2,info:2,warning:3,error:4,off:5},Ib=a0.default,R4=Rb(),Pl=null;function F4(){try{var t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(function(e){try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("\xE9".normalize("NFD")!=="e\u0301")throw new Error("broken implementation")}catch(e){return e.message}return null}var Ob=F4(),Nb;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(Nb=kn.LogLevel||(kn.LogLevel={}));var On;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(On=kn.ErrorCode||(kn.ErrorCode={}));var kb="0123456789abcdef",D4=function(){function t(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}return t.prototype._log=function(e,r){var n=e.toLowerCase();a0[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Ib>a0[n])&&console.log.apply(console,r)},t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this._log(t.levels.DEBUG,e)},t.prototype.info=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this._log(t.levels.INFO,e)},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this._log(t.levels.WARNING,e)},t.prototype.makeError=function(e,r,n){if(Db)return this.makeError("censored error",r,{});r||(r=t.errors.UNKNOWN_ERROR),n||(n={});var i=[];Object.keys(n).forEach(function(x){var _=n[x];try{if(_ instanceof Uint8Array){for(var C="",D=0;D<_.length;D++)C+=kb[_[D]>>4],C+=kb[_[D]&15];i.push(x+"=Uint8Array(0x"+C+")")}else i.push(x+"="+JSON.stringify(_))}catch{i.push(x+"="+JSON.stringify(n[x].toString()))}}),i.push("code="+r),i.push("version="+this.version);var a=e,l="";switch(r){case On.NUMERIC_FAULT:{l="NUMERIC_FAULT";var b=e;switch(b){case"overflow":case"underflow":case"division-by-zero":l+="-"+b;break;case"negative-power":case"negative-width":l+="-unsupported";break;case"unbound-bitwise-result":l+="-unbound-result";break}break}case On.CALL_EXCEPTION:case On.INSUFFICIENT_FUNDS:case On.MISSING_NEW:case On.NONCE_EXPIRED:case On.REPLACEMENT_UNDERPRICED:case On.TRANSACTION_REPLACED:case On.UNPREDICTABLE_GAS_LIMIT:l=r;break}l&&(e+=" [ See: https://links.ethers.org/v5-errors-"+l+" ]"),i.length&&(e+=" ("+i.join(", ")+")");var y=new Error(e);return y.reason=a,y.code=r,Object.keys(n).forEach(function(x){y[x]=n[x]}),y},t.prototype.throwError=function(e,r,n){throw this.makeError(e,r,n)},t.prototype.throwArgumentError=function(e,r,n){return this.throwError(e,t.errors.INVALID_ARGUMENT,{argument:r,value:n})},t.prototype.assert=function(e,r,n,i){e||this.throwError(r,n,i)},t.prototype.assertArgument=function(e,r,n,i){e||this.throwArgumentError(r,n,i)},t.prototype.checkNormalize=function(e){e==null&&(e="platform missing String.prototype.normalize"),Ob&&this.throwError("platform missing String.prototype.normalize",t.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ob})},t.prototype.checkSafeUint53=function(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))},t.prototype.checkArgumentCount=function(e,r,n){n?n=": "+n:n="",e<r&&this.throwError("missing argument"+n,t.errors.MISSING_ARGUMENT,{count:e,expectedCount:r}),e>r&&this.throwError("too many arguments"+n,t.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})},t.prototype.checkNew=function(e,r){(e===Object||e==null)&&this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name})},t.prototype.checkAbstract=function(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",t.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name})},t.globalLogger=function(){return Pl||(Pl=new t(R4.version)),Pl},t.setCensorship=function(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Fb){if(!e)return;this.globalLogger().throwError("error censorship permanent",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Db=!!e,Fb=!!r},t.setLogLevel=function(e){var r=a0[e.toLowerCase()];if(r==null){t.globalLogger().warn("invalid log level - "+e);return}Ib=r},t.from=function(e){return new t(e)},t.errors=On,t.levels=Nb,t}();kn.Logger=D4});var Jb=V(o0=>{"use strict";var yP=A(S());Object.defineProperty(o0,"__esModule",{value:!0});o0.version=void 0;o0.version="bytes/5.8.0"});var at=V(Ke=>{"use strict";var AP=A(S());Object.defineProperty(Ke,"__esModule",{value:!0});Ke.joinSignature=Ke.splitSignature=Ke.hexZeroPad=Ke.hexStripZeros=Ke.hexValue=Ke.hexConcat=Ke.hexDataSlice=Ke.hexDataLength=Ke.hexlify=Ke.isHexString=Ke.zeroPad=Ke.stripZeros=Ke.concat=Ke.arrayify=Ke.isBytes=Ke.isBytesLike=void 0;var I4=Pt(),O4=Jb(),ht=new I4.Logger(O4.version);function Hb(t){return!!t.toHexString}function ho(t){return t.slice||(t.slice=function(){var e=Array.prototype.slice.call(arguments);return ho(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function qb(t){return mn(t)&&!(t.length%2)||f0(t)}Ke.isBytesLike=qb;function Ub(t){return typeof t=="number"&&t==t&&t%1===0}function f0(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!Ub(t.length)||t.length<0)return!1;for(var e=0;e<t.length;e++){var r=t[e];if(!Ub(r)||r<0||r>=256)return!1}return!0}Ke.isBytes=f0;function pa(t,e){if(e||(e={}),typeof t=="number"){ht.checkSafeUint53(t,"invalid arrayify value");for(var r=[];t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),ho(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),Hb(t)&&(t=t.toHexString()),mn(t)){var n=t.substring(2);n.length%2&&(e.hexPad==="left"?n="0"+n:e.hexPad==="right"?n+="0":ht.throwArgumentError("hex data is odd-length","value",t));for(var r=[],i=0;i<n.length;i+=2)r.push(parseInt(n.substring(i,i+2),16));return ho(new Uint8Array(r))}return f0(t)?ho(new Uint8Array(t)):ht.throwArgumentError("invalid arrayify value","value",t)}Ke.arrayify=pa;function Gb(t){var e=t.map(function(i){return pa(i)}),r=e.reduce(function(i,a){return i+a.length},0),n=new Uint8Array(r);return e.reduce(function(i,a){return n.set(a,i),i+a.length},0),ho(n)}Ke.concat=Gb;function k4(t){var e=pa(t);if(e.length===0)return e;for(var r=0;r<e.length&&e[r]===0;)r++;return r&&(e=e.slice(r)),e}Ke.stripZeros=k4;function Xb(t,e){t=pa(t),t.length>e&&ht.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(e);return r.set(t,e-t.length),ho(r)}Ke.zeroPad=Xb;function mn(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}Ke.isHexString=mn;var Ll="0123456789abcdef";function cr(t,e){if(e||(e={}),typeof t=="number"){ht.checkSafeUint53(t,"invalid hexlify value");for(var r="";t;)r=Ll[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),Hb(t))return t.toHexString();if(mn(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":ht.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(f0(t)){for(var n="0x",i=0;i<t.length;i++){var a=t[i];n+=Ll[(a&240)>>4]+Ll[a&15]}return n}return ht.throwArgumentError("invalid hexlify value","value",t)}Ke.hexlify=cr;function N4(t){if(typeof t!="string")t=cr(t);else if(!mn(t)||t.length%2)return null;return(t.length-2)/2}Ke.hexDataLength=N4;function J4(t,e,r){return typeof t!="string"?t=cr(t):(!mn(t)||t.length%2)&&ht.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}Ke.hexDataSlice=J4;function U4(t){var e="0x";return t.forEach(function(r){e+=cr(r).substring(2)}),e}Ke.hexConcat=U4;function H4(t){var e=zb(cr(t,{hexPad:"left"}));return e==="0x"?"0x0":e}Ke.hexValue=H4;function zb(t){typeof t!="string"&&(t=cr(t)),mn(t)||ht.throwArgumentError("invalid hex string","value",t),t=t.substring(2);for(var e=0;e<t.length&&t[e]==="0";)e++;return"0x"+t.substring(e)}Ke.hexStripZeros=zb;function s0(t,e){for(typeof t!="string"?t=cr(t):mn(t)||ht.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&ht.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}Ke.hexZeroPad=s0;function Kb(t){var e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(qb(t)){var r=pa(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=cr(r.slice(0,32)),e.s=cr(r.slice(32,64))):r.length===65?(e.r=cr(r.slice(0,32)),e.s=cr(r.slice(32,64)),e.v=r[64]):ht.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:ht.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=cr(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){var n=Xb(pa(e._vs),32);e._vs=cr(n);var i=n[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=i:e.recoveryParam!==i&&ht.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),n[0]&=127;var a=cr(n);e.s==null?e.s=a:e.s!==a&&ht.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?ht.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{var l=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==l&&ht.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!mn(e.r)?ht.throwArgumentError("signature missing or invalid r","signature",t):e.r=s0(e.r,32),e.s==null||!mn(e.s)?ht.throwArgumentError("signature missing or invalid s","signature",t):e.s=s0(e.s,32);var b=pa(e.s);b[0]>=128&&ht.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(b[0]|=128);var y=cr(b);e._vs&&(mn(e._vs)||ht.throwArgumentError("signature invalid _vs","signature",t),e._vs=s0(e._vs,32)),e._vs==null?e._vs=y:e._vs!==y&&ht.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}Ke.splitSignature=Kb;function q4(t){return t=Kb(t),cr(Gb([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}Ke.joinSignature=q4});var Nn=V(po=>{"use strict";var MP=A(S()),G4=po&&po.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(po,"__esModule",{value:!0});po.keccak256=void 0;var X4=G4(Lb()),z4=at();function K4(t){return"0x"+X4.default.keccak_256((0,z4.arrayify)(t))}po.keccak256=K4});var Zb=V(c0=>{"use strict";var EP=A(S());Object.defineProperty(c0,"__esModule",{value:!0});c0.AddressZero=void 0;c0.AddressZero="0x0000000000000000000000000000000000000000"});var jb=V((Vb,Rl)=>{var _P=A(S());(function(t,e){"use strict";function r(d,f){if(!d)throw new Error(f||"Assertion failed")}function n(d,f){d.super_=f;var c=function(){};c.prototype=f.prototype,d.prototype=new c,d.prototype.constructor=d}function i(d,f,c){if(i.isBN(d))return d;this.negative=0,this.words=null,this.length=0,this.red=null,d!==null&&((f==="le"||f==="be")&&(c=f,f=10),this._init(d||0,f||10,c||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=it("buffer").Buffer}catch{}i.isBN=function(f){return f instanceof i?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===i.wordSize&&Array.isArray(f.words)},i.max=function(f,c){return f.cmp(c)>0?f:c},i.min=function(f,c){return f.cmp(c)<0?f:c},i.prototype._init=function(f,c,v){if(typeof f=="number")return this._initNumber(f,c,v);if(typeof f=="object")return this._initArray(f,c,v);c==="hex"&&(c=16),r(c===(c|0)&&c>=2&&c<=36),f=f.toString().replace(/\s+/g,"");var m=0;f[0]==="-"&&(m++,this.negative=1),m<f.length&&(c===16?this._parseHex(f,m,v):(this._parseBase(f,c,m),v==="le"&&this._initArray(this.toArray(),c,v)))},i.prototype._initNumber=function(f,c,v){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),c,v)},i.prototype._initArray=function(f,c,v){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var h,o,p=0;if(v==="be")for(m=f.length-1,h=0;m>=0;m-=3)o=f[m]|f[m-1]<<8|f[m-2]<<16,this.words[h]|=o<<p&67108863,this.words[h+1]=o>>>26-p&67108863,p+=24,p>=26&&(p-=26,h++);else if(v==="le")for(m=0,h=0;m<f.length;m+=3)o=f[m]|f[m+1]<<8|f[m+2]<<16,this.words[h]|=o<<p&67108863,this.words[h+1]=o>>>26-p&67108863,p+=24,p>=26&&(p-=26,h++);return this._strip()};function l(d,f){var c=d.charCodeAt(f);if(c>=48&&c<=57)return c-48;if(c>=65&&c<=70)return c-55;if(c>=97&&c<=102)return c-87;r(!1,"Invalid character in "+d)}function b(d,f,c){var v=l(d,c);return c-1>=f&&(v|=l(d,c-1)<<4),v}i.prototype._parseHex=function(f,c,v){this.length=Math.ceil((f.length-c)/6),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var h=0,o=0,p;if(v==="be")for(m=f.length-1;m>=c;m-=2)p=b(f,c,m)<<h,this.words[o]|=p&67108863,h>=18?(h-=18,o+=1,this.words[o]|=p>>>26):h+=8;else{var E=f.length-c;for(m=E%2===0?c+1:c;m<f.length;m+=2)p=b(f,c,m)<<h,this.words[o]|=p&67108863,h>=18?(h-=18,o+=1,this.words[o]|=p>>>26):h+=8}this._strip()};function y(d,f,c,v){for(var m=0,h=0,o=Math.min(d.length,c),p=f;p<o;p++){var E=d.charCodeAt(p)-48;m*=v,E>=49?h=E-49+10:E>=17?h=E-17+10:h=E,r(E>=0&&h<v,"Invalid character"),m+=h}return m}i.prototype._parseBase=function(f,c,v){this.words=[0],this.length=1;for(var m=0,h=1;h<=67108863;h*=c)m++;m--,h=h/c|0;for(var o=f.length-v,p=o%m,E=Math.min(o,o-p)+v,g=0,w=v;w<E;w+=m)g=y(f,w,w+m,c),this.imuln(h),this.words[0]+g<67108864?this.words[0]+=g:this._iaddn(g);if(p!==0){var U=1;for(g=y(f,w,f.length,c),w=0;w<p;w++)U*=c;this.imuln(U),this.words[0]+g<67108864?this.words[0]+=g:this._iaddn(g)}this._strip()},i.prototype.copy=function(f){f.words=new Array(this.length);for(var c=0;c<this.length;c++)f.words[c]=this.words[c];f.length=this.length,f.negative=this.negative,f.red=this.red};function x(d,f){d.words=f.words,d.length=f.length,d.negative=f.negative,d.red=f.red}if(i.prototype._move=function(f){x(f,this)},i.prototype.clone=function(){var f=new i(null);return this.copy(f),f},i.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=_}catch{i.prototype.inspect=_}else i.prototype.inspect=_;function _(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var C=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],D=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],F=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(f,c){f=f||10,c=c|0||1;var v;if(f===16||f==="hex"){v="";for(var m=0,h=0,o=0;o<this.length;o++){var p=this.words[o],E=((p<<m|h)&16777215).toString(16);h=p>>>24-m&16777215,m+=2,m>=26&&(m-=26,o--),h!==0||o!==this.length-1?v=C[6-E.length]+E+v:v=E+v}for(h!==0&&(v=h.toString(16)+v);v.length%c!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(f===(f|0)&&f>=2&&f<=36){var g=D[f],w=F[f];v="";var U=this.clone();for(U.negative=0;!U.isZero();){var M=U.modrn(w).toString(f);U=U.idivn(w),U.isZero()?v=M+v:v=C[g-M.length]+M+v}for(this.isZero()&&(v="0"+v);v.length%c!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(f,c){return this.toArrayLike(a,f,c)}),i.prototype.toArray=function(f,c){return this.toArrayLike(Array,f,c)};var P=function(f,c){return f.allocUnsafe?f.allocUnsafe(c):new f(c)};i.prototype.toArrayLike=function(f,c,v){this._strip();var m=this.byteLength(),h=v||Math.max(1,m);r(m<=h,"byte array longer than desired length"),r(h>0,"Requested array length <= 0");var o=P(f,h),p=c==="le"?"LE":"BE";return this["_toArrayLike"+p](o,m),o},i.prototype._toArrayLikeLE=function(f,c){for(var v=0,m=0,h=0,o=0;h<this.length;h++){var p=this.words[h]<<o|m;f[v++]=p&255,v<f.length&&(f[v++]=p>>8&255),v<f.length&&(f[v++]=p>>16&255),o===6?(v<f.length&&(f[v++]=p>>24&255),m=0,o=0):(m=p>>>24,o+=2)}if(v<f.length)for(f[v++]=m;v<f.length;)f[v++]=0},i.prototype._toArrayLikeBE=function(f,c){for(var v=f.length-1,m=0,h=0,o=0;h<this.length;h++){var p=this.words[h]<<o|m;f[v--]=p&255,v>=0&&(f[v--]=p>>8&255),v>=0&&(f[v--]=p>>16&255),o===6?(v>=0&&(f[v--]=p>>24&255),m=0,o=0):(m=p>>>24,o+=2)}if(v>=0)for(f[v--]=m;v>=0;)f[v--]=0},Math.clz32?i.prototype._countBits=function(f){return 32-Math.clz32(f)}:i.prototype._countBits=function(f){var c=f,v=0;return c>=4096&&(v+=13,c>>>=13),c>=64&&(v+=7,c>>>=7),c>=8&&(v+=4,c>>>=4),c>=2&&(v+=2,c>>>=2),v+c},i.prototype._zeroBits=function(f){if(f===0)return 26;var c=f,v=0;return c&8191||(v+=13,c>>>=13),c&127||(v+=7,c>>>=7),c&15||(v+=4,c>>>=4),c&3||(v+=2,c>>>=2),c&1||v++,v},i.prototype.bitLength=function(){var f=this.words[this.length-1],c=this._countBits(f);return(this.length-1)*26+c};function z(d){for(var f=new Array(d.bitLength()),c=0;c<f.length;c++){var v=c/26|0,m=c%26;f[c]=d.words[v]>>>m&1}return f}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,c=0;c<this.length;c++){var v=this._zeroBits(this.words[c]);if(f+=v,v!==26)break}return f},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},i.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var c=0;c<f.length;c++)this.words[c]=this.words[c]|f.words[c];return this._strip()},i.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},i.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},i.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},i.prototype.iuand=function(f){var c;this.length>f.length?c=f:c=this;for(var v=0;v<c.length;v++)this.words[v]=this.words[v]&f.words[v];return this.length=c.length,this._strip()},i.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},i.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},i.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},i.prototype.iuxor=function(f){var c,v;this.length>f.length?(c=this,v=f):(c=f,v=this);for(var m=0;m<v.length;m++)this.words[m]=c.words[m]^v.words[m];if(this!==c)for(;m<c.length;m++)this.words[m]=c.words[m];return this.length=c.length,this._strip()},i.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},i.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},i.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},i.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var c=Math.ceil(f/26)|0,v=f%26;this._expand(c),v>0&&c--;for(var m=0;m<c;m++)this.words[m]=~this.words[m]&67108863;return v>0&&(this.words[m]=~this.words[m]&67108863>>26-v),this._strip()},i.prototype.notn=function(f){return this.clone().inotn(f)},i.prototype.setn=function(f,c){r(typeof f=="number"&&f>=0);var v=f/26|0,m=f%26;return this._expand(v+1),c?this.words[v]=this.words[v]|1<<m:this.words[v]=this.words[v]&~(1<<m),this._strip()},i.prototype.iadd=function(f){var c;if(this.negative!==0&&f.negative===0)return this.negative=0,c=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,c=this.isub(f),f.negative=1,c._normSign();var v,m;this.length>f.length?(v=this,m=f):(v=f,m=this);for(var h=0,o=0;o<m.length;o++)c=(v.words[o]|0)+(m.words[o]|0)+h,this.words[o]=c&67108863,h=c>>>26;for(;h!==0&&o<v.length;o++)c=(v.words[o]|0)+h,this.words[o]=c&67108863,h=c>>>26;if(this.length=v.length,h!==0)this.words[this.length]=h,this.length++;else if(v!==this)for(;o<v.length;o++)this.words[o]=v.words[o];return this},i.prototype.add=function(f){var c;return f.negative!==0&&this.negative===0?(f.negative=0,c=this.sub(f),f.negative^=1,c):f.negative===0&&this.negative!==0?(this.negative=0,c=f.sub(this),this.negative=1,c):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},i.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var c=this.iadd(f);return f.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var v=this.cmp(f);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var m,h;v>0?(m=this,h=f):(m=f,h=this);for(var o=0,p=0;p<h.length;p++)c=(m.words[p]|0)-(h.words[p]|0)+o,o=c>>26,this.words[p]=c&67108863;for(;o!==0&&p<m.length;p++)c=(m.words[p]|0)+o,o=c>>26,this.words[p]=c&67108863;if(o===0&&p<m.length&&m!==this)for(;p<m.length;p++)this.words[p]=m.words[p];return this.length=Math.max(this.length,p),m!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(f){return this.clone().isub(f)};function W(d,f,c){c.negative=f.negative^d.negative;var v=d.length+f.length|0;c.length=v,v=v-1|0;var m=d.words[0]|0,h=f.words[0]|0,o=m*h,p=o&67108863,E=o/67108864|0;c.words[0]=p;for(var g=1;g<v;g++){for(var w=E>>>26,U=E&67108863,M=Math.min(g,f.length-1),k=Math.max(0,g-d.length+1);k<=M;k++){var G=g-k|0;m=d.words[G]|0,h=f.words[k]|0,o=m*h+U,w+=o/67108864|0,U=o&67108863}c.words[g]=U|0,E=w|0}return E!==0?c.words[g]=E|0:c.length--,c._strip()}var X=function(f,c,v){var m=f.words,h=c.words,o=v.words,p=0,E,g,w,U=m[0]|0,M=U&8191,k=U>>>13,G=m[1]|0,Z=G&8191,B=G>>>13,R=m[2]|0,L=R&8191,I=R>>>13,q=m[3]|0,O=q&8191,J=q>>>13,K=m[4]|0,N=K&8191,H=K>>>13,Q=m[5]|0,j=Q&8191,re=Q>>>13,De=m[6]|0,se=De&8191,le=De>>>13,Ue=m[7]|0,oe=Ue&8191,fe=Ue>>>13,Xe=m[8]|0,ge=Xe&8191,ve=Xe>>>13,mt=m[9]|0,pe=mt&8191,be=mt>>>13,Ye=h[0]|0,de=Ye&8191,ue=Ye>>>13,Zt=h[1]|0,me=Zt&8191,xe=Zt>>>13,Vt=h[2]|0,ye=Vt&8191,we=Vt>>>13,jt=h[3]|0,Ae=jt&8191,Se=jt>>>13,Qt=h[4]|0,Me=Qt&8191,Te=Qt>>>13,Wt=h[5]|0,Ee=Wt&8191,_e=Wt>>>13,Yt=h[6]|0,Be=Yt&8191,Ce=Yt>>>13,$t=h[7]|0,Pe=$t&8191,Le=$t>>>13,er=h[8]|0,Re=er&8191,Fe=er>>>13,It=h[9]|0,ke=It&8191,Ne=It>>>13;v.negative=f.negative^c.negative,v.length=19,E=Math.imul(M,de),g=Math.imul(M,ue),g=g+Math.imul(k,de)|0,w=Math.imul(k,ue);var Tt=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,E=Math.imul(Z,de),g=Math.imul(Z,ue),g=g+Math.imul(B,de)|0,w=Math.imul(B,ue),E=E+Math.imul(M,me)|0,g=g+Math.imul(M,xe)|0,g=g+Math.imul(k,me)|0,w=w+Math.imul(k,xe)|0;var Et=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Et>>>26)|0,Et&=67108863,E=Math.imul(L,de),g=Math.imul(L,ue),g=g+Math.imul(I,de)|0,w=Math.imul(I,ue),E=E+Math.imul(Z,me)|0,g=g+Math.imul(Z,xe)|0,g=g+Math.imul(B,me)|0,w=w+Math.imul(B,xe)|0,E=E+Math.imul(M,ye)|0,g=g+Math.imul(M,we)|0,g=g+Math.imul(k,ye)|0,w=w+Math.imul(k,we)|0;var _t=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(_t>>>26)|0,_t&=67108863,E=Math.imul(O,de),g=Math.imul(O,ue),g=g+Math.imul(J,de)|0,w=Math.imul(J,ue),E=E+Math.imul(L,me)|0,g=g+Math.imul(L,xe)|0,g=g+Math.imul(I,me)|0,w=w+Math.imul(I,xe)|0,E=E+Math.imul(Z,ye)|0,g=g+Math.imul(Z,we)|0,g=g+Math.imul(B,ye)|0,w=w+Math.imul(B,we)|0,E=E+Math.imul(M,Ae)|0,g=g+Math.imul(M,Se)|0,g=g+Math.imul(k,Ae)|0,w=w+Math.imul(k,Se)|0;var Bt=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,E=Math.imul(N,de),g=Math.imul(N,ue),g=g+Math.imul(H,de)|0,w=Math.imul(H,ue),E=E+Math.imul(O,me)|0,g=g+Math.imul(O,xe)|0,g=g+Math.imul(J,me)|0,w=w+Math.imul(J,xe)|0,E=E+Math.imul(L,ye)|0,g=g+Math.imul(L,we)|0,g=g+Math.imul(I,ye)|0,w=w+Math.imul(I,we)|0,E=E+Math.imul(Z,Ae)|0,g=g+Math.imul(Z,Se)|0,g=g+Math.imul(B,Ae)|0,w=w+Math.imul(B,Se)|0,E=E+Math.imul(M,Me)|0,g=g+Math.imul(M,Te)|0,g=g+Math.imul(k,Me)|0,w=w+Math.imul(k,Te)|0;var Ct=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,E=Math.imul(j,de),g=Math.imul(j,ue),g=g+Math.imul(re,de)|0,w=Math.imul(re,ue),E=E+Math.imul(N,me)|0,g=g+Math.imul(N,xe)|0,g=g+Math.imul(H,me)|0,w=w+Math.imul(H,xe)|0,E=E+Math.imul(O,ye)|0,g=g+Math.imul(O,we)|0,g=g+Math.imul(J,ye)|0,w=w+Math.imul(J,we)|0,E=E+Math.imul(L,Ae)|0,g=g+Math.imul(L,Se)|0,g=g+Math.imul(I,Ae)|0,w=w+Math.imul(I,Se)|0,E=E+Math.imul(Z,Me)|0,g=g+Math.imul(Z,Te)|0,g=g+Math.imul(B,Me)|0,w=w+Math.imul(B,Te)|0,E=E+Math.imul(M,Ee)|0,g=g+Math.imul(M,_e)|0,g=g+Math.imul(k,Ee)|0,w=w+Math.imul(k,_e)|0;var gr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(gr>>>26)|0,gr&=67108863,E=Math.imul(se,de),g=Math.imul(se,ue),g=g+Math.imul(le,de)|0,w=Math.imul(le,ue),E=E+Math.imul(j,me)|0,g=g+Math.imul(j,xe)|0,g=g+Math.imul(re,me)|0,w=w+Math.imul(re,xe)|0,E=E+Math.imul(N,ye)|0,g=g+Math.imul(N,we)|0,g=g+Math.imul(H,ye)|0,w=w+Math.imul(H,we)|0,E=E+Math.imul(O,Ae)|0,g=g+Math.imul(O,Se)|0,g=g+Math.imul(J,Ae)|0,w=w+Math.imul(J,Se)|0,E=E+Math.imul(L,Me)|0,g=g+Math.imul(L,Te)|0,g=g+Math.imul(I,Me)|0,w=w+Math.imul(I,Te)|0,E=E+Math.imul(Z,Ee)|0,g=g+Math.imul(Z,_e)|0,g=g+Math.imul(B,Ee)|0,w=w+Math.imul(B,_e)|0,E=E+Math.imul(M,Be)|0,g=g+Math.imul(M,Ce)|0,g=g+Math.imul(k,Be)|0,w=w+Math.imul(k,Ce)|0;var vr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(vr>>>26)|0,vr&=67108863,E=Math.imul(oe,de),g=Math.imul(oe,ue),g=g+Math.imul(fe,de)|0,w=Math.imul(fe,ue),E=E+Math.imul(se,me)|0,g=g+Math.imul(se,xe)|0,g=g+Math.imul(le,me)|0,w=w+Math.imul(le,xe)|0,E=E+Math.imul(j,ye)|0,g=g+Math.imul(j,we)|0,g=g+Math.imul(re,ye)|0,w=w+Math.imul(re,we)|0,E=E+Math.imul(N,Ae)|0,g=g+Math.imul(N,Se)|0,g=g+Math.imul(H,Ae)|0,w=w+Math.imul(H,Se)|0,E=E+Math.imul(O,Me)|0,g=g+Math.imul(O,Te)|0,g=g+Math.imul(J,Me)|0,w=w+Math.imul(J,Te)|0,E=E+Math.imul(L,Ee)|0,g=g+Math.imul(L,_e)|0,g=g+Math.imul(I,Ee)|0,w=w+Math.imul(I,_e)|0,E=E+Math.imul(Z,Be)|0,g=g+Math.imul(Z,Ce)|0,g=g+Math.imul(B,Be)|0,w=w+Math.imul(B,Ce)|0,E=E+Math.imul(M,Pe)|0,g=g+Math.imul(M,Le)|0,g=g+Math.imul(k,Pe)|0,w=w+Math.imul(k,Le)|0;var mr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(mr>>>26)|0,mr&=67108863,E=Math.imul(ge,de),g=Math.imul(ge,ue),g=g+Math.imul(ve,de)|0,w=Math.imul(ve,ue),E=E+Math.imul(oe,me)|0,g=g+Math.imul(oe,xe)|0,g=g+Math.imul(fe,me)|0,w=w+Math.imul(fe,xe)|0,E=E+Math.imul(se,ye)|0,g=g+Math.imul(se,we)|0,g=g+Math.imul(le,ye)|0,w=w+Math.imul(le,we)|0,E=E+Math.imul(j,Ae)|0,g=g+Math.imul(j,Se)|0,g=g+Math.imul(re,Ae)|0,w=w+Math.imul(re,Se)|0,E=E+Math.imul(N,Me)|0,g=g+Math.imul(N,Te)|0,g=g+Math.imul(H,Me)|0,w=w+Math.imul(H,Te)|0,E=E+Math.imul(O,Ee)|0,g=g+Math.imul(O,_e)|0,g=g+Math.imul(J,Ee)|0,w=w+Math.imul(J,_e)|0,E=E+Math.imul(L,Be)|0,g=g+Math.imul(L,Ce)|0,g=g+Math.imul(I,Be)|0,w=w+Math.imul(I,Ce)|0,E=E+Math.imul(Z,Pe)|0,g=g+Math.imul(Z,Le)|0,g=g+Math.imul(B,Pe)|0,w=w+Math.imul(B,Le)|0,E=E+Math.imul(M,Re)|0,g=g+Math.imul(M,Fe)|0,g=g+Math.imul(k,Re)|0,w=w+Math.imul(k,Fe)|0;var xr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(xr>>>26)|0,xr&=67108863,E=Math.imul(pe,de),g=Math.imul(pe,ue),g=g+Math.imul(be,de)|0,w=Math.imul(be,ue),E=E+Math.imul(ge,me)|0,g=g+Math.imul(ge,xe)|0,g=g+Math.imul(ve,me)|0,w=w+Math.imul(ve,xe)|0,E=E+Math.imul(oe,ye)|0,g=g+Math.imul(oe,we)|0,g=g+Math.imul(fe,ye)|0,w=w+Math.imul(fe,we)|0,E=E+Math.imul(se,Ae)|0,g=g+Math.imul(se,Se)|0,g=g+Math.imul(le,Ae)|0,w=w+Math.imul(le,Se)|0,E=E+Math.imul(j,Me)|0,g=g+Math.imul(j,Te)|0,g=g+Math.imul(re,Me)|0,w=w+Math.imul(re,Te)|0,E=E+Math.imul(N,Ee)|0,g=g+Math.imul(N,_e)|0,g=g+Math.imul(H,Ee)|0,w=w+Math.imul(H,_e)|0,E=E+Math.imul(O,Be)|0,g=g+Math.imul(O,Ce)|0,g=g+Math.imul(J,Be)|0,w=w+Math.imul(J,Ce)|0,E=E+Math.imul(L,Pe)|0,g=g+Math.imul(L,Le)|0,g=g+Math.imul(I,Pe)|0,w=w+Math.imul(I,Le)|0,E=E+Math.imul(Z,Re)|0,g=g+Math.imul(Z,Fe)|0,g=g+Math.imul(B,Re)|0,w=w+Math.imul(B,Fe)|0,E=E+Math.imul(M,ke)|0,g=g+Math.imul(M,Ne)|0,g=g+Math.imul(k,ke)|0,w=w+Math.imul(k,Ne)|0;var yr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(yr>>>26)|0,yr&=67108863,E=Math.imul(pe,me),g=Math.imul(pe,xe),g=g+Math.imul(be,me)|0,w=Math.imul(be,xe),E=E+Math.imul(ge,ye)|0,g=g+Math.imul(ge,we)|0,g=g+Math.imul(ve,ye)|0,w=w+Math.imul(ve,we)|0,E=E+Math.imul(oe,Ae)|0,g=g+Math.imul(oe,Se)|0,g=g+Math.imul(fe,Ae)|0,w=w+Math.imul(fe,Se)|0,E=E+Math.imul(se,Me)|0,g=g+Math.imul(se,Te)|0,g=g+Math.imul(le,Me)|0,w=w+Math.imul(le,Te)|0,E=E+Math.imul(j,Ee)|0,g=g+Math.imul(j,_e)|0,g=g+Math.imul(re,Ee)|0,w=w+Math.imul(re,_e)|0,E=E+Math.imul(N,Be)|0,g=g+Math.imul(N,Ce)|0,g=g+Math.imul(H,Be)|0,w=w+Math.imul(H,Ce)|0,E=E+Math.imul(O,Pe)|0,g=g+Math.imul(O,Le)|0,g=g+Math.imul(J,Pe)|0,w=w+Math.imul(J,Le)|0,E=E+Math.imul(L,Re)|0,g=g+Math.imul(L,Fe)|0,g=g+Math.imul(I,Re)|0,w=w+Math.imul(I,Fe)|0,E=E+Math.imul(Z,ke)|0,g=g+Math.imul(Z,Ne)|0,g=g+Math.imul(B,ke)|0,w=w+Math.imul(B,Ne)|0;var wr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(wr>>>26)|0,wr&=67108863,E=Math.imul(pe,ye),g=Math.imul(pe,we),g=g+Math.imul(be,ye)|0,w=Math.imul(be,we),E=E+Math.imul(ge,Ae)|0,g=g+Math.imul(ge,Se)|0,g=g+Math.imul(ve,Ae)|0,w=w+Math.imul(ve,Se)|0,E=E+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Te)|0,g=g+Math.imul(fe,Me)|0,w=w+Math.imul(fe,Te)|0,E=E+Math.imul(se,Ee)|0,g=g+Math.imul(se,_e)|0,g=g+Math.imul(le,Ee)|0,w=w+Math.imul(le,_e)|0,E=E+Math.imul(j,Be)|0,g=g+Math.imul(j,Ce)|0,g=g+Math.imul(re,Be)|0,w=w+Math.imul(re,Ce)|0,E=E+Math.imul(N,Pe)|0,g=g+Math.imul(N,Le)|0,g=g+Math.imul(H,Pe)|0,w=w+Math.imul(H,Le)|0,E=E+Math.imul(O,Re)|0,g=g+Math.imul(O,Fe)|0,g=g+Math.imul(J,Re)|0,w=w+Math.imul(J,Fe)|0,E=E+Math.imul(L,ke)|0,g=g+Math.imul(L,Ne)|0,g=g+Math.imul(I,ke)|0,w=w+Math.imul(I,Ne)|0;var Ar=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,E=Math.imul(pe,Ae),g=Math.imul(pe,Se),g=g+Math.imul(be,Ae)|0,w=Math.imul(be,Se),E=E+Math.imul(ge,Me)|0,g=g+Math.imul(ge,Te)|0,g=g+Math.imul(ve,Me)|0,w=w+Math.imul(ve,Te)|0,E=E+Math.imul(oe,Ee)|0,g=g+Math.imul(oe,_e)|0,g=g+Math.imul(fe,Ee)|0,w=w+Math.imul(fe,_e)|0,E=E+Math.imul(se,Be)|0,g=g+Math.imul(se,Ce)|0,g=g+Math.imul(le,Be)|0,w=w+Math.imul(le,Ce)|0,E=E+Math.imul(j,Pe)|0,g=g+Math.imul(j,Le)|0,g=g+Math.imul(re,Pe)|0,w=w+Math.imul(re,Le)|0,E=E+Math.imul(N,Re)|0,g=g+Math.imul(N,Fe)|0,g=g+Math.imul(H,Re)|0,w=w+Math.imul(H,Fe)|0,E=E+Math.imul(O,ke)|0,g=g+Math.imul(O,Ne)|0,g=g+Math.imul(J,ke)|0,w=w+Math.imul(J,Ne)|0;var Sr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,E=Math.imul(pe,Me),g=Math.imul(pe,Te),g=g+Math.imul(be,Me)|0,w=Math.imul(be,Te),E=E+Math.imul(ge,Ee)|0,g=g+Math.imul(ge,_e)|0,g=g+Math.imul(ve,Ee)|0,w=w+Math.imul(ve,_e)|0,E=E+Math.imul(oe,Be)|0,g=g+Math.imul(oe,Ce)|0,g=g+Math.imul(fe,Be)|0,w=w+Math.imul(fe,Ce)|0,E=E+Math.imul(se,Pe)|0,g=g+Math.imul(se,Le)|0,g=g+Math.imul(le,Pe)|0,w=w+Math.imul(le,Le)|0,E=E+Math.imul(j,Re)|0,g=g+Math.imul(j,Fe)|0,g=g+Math.imul(re,Re)|0,w=w+Math.imul(re,Fe)|0,E=E+Math.imul(N,ke)|0,g=g+Math.imul(N,Ne)|0,g=g+Math.imul(H,ke)|0,w=w+Math.imul(H,Ne)|0;var Mr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,E=Math.imul(pe,Ee),g=Math.imul(pe,_e),g=g+Math.imul(be,Ee)|0,w=Math.imul(be,_e),E=E+Math.imul(ge,Be)|0,g=g+Math.imul(ge,Ce)|0,g=g+Math.imul(ve,Be)|0,w=w+Math.imul(ve,Ce)|0,E=E+Math.imul(oe,Pe)|0,g=g+Math.imul(oe,Le)|0,g=g+Math.imul(fe,Pe)|0,w=w+Math.imul(fe,Le)|0,E=E+Math.imul(se,Re)|0,g=g+Math.imul(se,Fe)|0,g=g+Math.imul(le,Re)|0,w=w+Math.imul(le,Fe)|0,E=E+Math.imul(j,ke)|0,g=g+Math.imul(j,Ne)|0,g=g+Math.imul(re,ke)|0,w=w+Math.imul(re,Ne)|0;var pn=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(pn>>>26)|0,pn&=67108863,E=Math.imul(pe,Be),g=Math.imul(pe,Ce),g=g+Math.imul(be,Be)|0,w=Math.imul(be,Ce),E=E+Math.imul(ge,Pe)|0,g=g+Math.imul(ge,Le)|0,g=g+Math.imul(ve,Pe)|0,w=w+Math.imul(ve,Le)|0,E=E+Math.imul(oe,Re)|0,g=g+Math.imul(oe,Fe)|0,g=g+Math.imul(fe,Re)|0,w=w+Math.imul(fe,Fe)|0,E=E+Math.imul(se,ke)|0,g=g+Math.imul(se,Ne)|0,g=g+Math.imul(le,ke)|0,w=w+Math.imul(le,Ne)|0;var bn=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(bn>>>26)|0,bn&=67108863,E=Math.imul(pe,Pe),g=Math.imul(pe,Le),g=g+Math.imul(be,Pe)|0,w=Math.imul(be,Le),E=E+Math.imul(ge,Re)|0,g=g+Math.imul(ge,Fe)|0,g=g+Math.imul(ve,Re)|0,w=w+Math.imul(ve,Fe)|0,E=E+Math.imul(oe,ke)|0,g=g+Math.imul(oe,Ne)|0,g=g+Math.imul(fe,ke)|0,w=w+Math.imul(fe,Ne)|0;var su=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(su>>>26)|0,su&=67108863,E=Math.imul(pe,Re),g=Math.imul(pe,Fe),g=g+Math.imul(be,Re)|0,w=Math.imul(be,Fe),E=E+Math.imul(ge,ke)|0,g=g+Math.imul(ge,Ne)|0,g=g+Math.imul(ve,ke)|0,w=w+Math.imul(ve,Ne)|0;var fu=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(fu>>>26)|0,fu&=67108863,E=Math.imul(pe,ke),g=Math.imul(pe,Ne),g=g+Math.imul(be,ke)|0,w=Math.imul(be,Ne);var cu=(p+E|0)+((g&8191)<<13)|0;return p=(w+(g>>>13)|0)+(cu>>>26)|0,cu&=67108863,o[0]=Tt,o[1]=Et,o[2]=_t,o[3]=Bt,o[4]=Ct,o[5]=gr,o[6]=vr,o[7]=mr,o[8]=xr,o[9]=yr,o[10]=wr,o[11]=Ar,o[12]=Sr,o[13]=Mr,o[14]=pn,o[15]=bn,o[16]=su,o[17]=fu,o[18]=cu,p!==0&&(o[19]=p,v.length++),v};Math.imul||(X=W);function ne(d,f,c){c.negative=f.negative^d.negative,c.length=d.length+f.length;for(var v=0,m=0,h=0;h<c.length-1;h++){var o=m;m=0;for(var p=v&67108863,E=Math.min(h,f.length-1),g=Math.max(0,h-d.length+1);g<=E;g++){var w=h-g,U=d.words[w]|0,M=f.words[g]|0,k=U*M,G=k&67108863;o=o+(k/67108864|0)|0,G=G+p|0,p=G&67108863,o=o+(G>>>26)|0,m+=o>>>26,o&=67108863}c.words[h]=p,v=o,o=m}return v!==0?c.words[h]=v:c.length--,c._strip()}function $(d,f,c){return ne(d,f,c)}i.prototype.mulTo=function(f,c){var v,m=this.length+f.length;return this.length===10&&f.length===10?v=X(this,f,c):m<63?v=W(this,f,c):m<1024?v=ne(this,f,c):v=$(this,f,c),v};function ae(d,f){this.x=d,this.y=f}ae.prototype.makeRBT=function(f){for(var c=new Array(f),v=i.prototype._countBits(f)-1,m=0;m<f;m++)c[m]=this.revBin(m,v,f);return c},ae.prototype.revBin=function(f,c,v){if(f===0||f===v-1)return f;for(var m=0,h=0;h<c;h++)m|=(f&1)<<c-h-1,f>>=1;return m},ae.prototype.permute=function(f,c,v,m,h,o){for(var p=0;p<o;p++)m[p]=c[f[p]],h[p]=v[f[p]]},ae.prototype.transform=function(f,c,v,m,h,o){this.permute(o,f,c,v,m,h);for(var p=1;p<h;p<<=1)for(var E=p<<1,g=Math.cos(2*Math.PI/E),w=Math.sin(2*Math.PI/E),U=0;U<h;U+=E)for(var M=g,k=w,G=0;G<p;G++){var Z=v[U+G],B=m[U+G],R=v[U+G+p],L=m[U+G+p],I=M*R-k*L;L=M*L+k*R,R=I,v[U+G]=Z+R,m[U+G]=B+L,v[U+G+p]=Z-R,m[U+G+p]=B-L,G!==E&&(I=g*M-w*k,k=g*k+w*M,M=I)}},ae.prototype.guessLen13b=function(f,c){var v=Math.max(c,f)|1,m=v&1,h=0;for(v=v/2|0;v;v=v>>>1)h++;return 1<<h+1+m},ae.prototype.conjugate=function(f,c,v){if(!(v<=1))for(var m=0;m<v/2;m++){var h=f[m];f[m]=f[v-m-1],f[v-m-1]=h,h=c[m],c[m]=-c[v-m-1],c[v-m-1]=-h}},ae.prototype.normalize13b=function(f,c){for(var v=0,m=0;m<c/2;m++){var h=Math.round(f[2*m+1]/c)*8192+Math.round(f[2*m]/c)+v;f[m]=h&67108863,h<67108864?v=0:v=h/67108864|0}return f},ae.prototype.convert13b=function(f,c,v,m){for(var h=0,o=0;o<c;o++)h=h+(f[o]|0),v[2*o]=h&8191,h=h>>>13,v[2*o+1]=h&8191,h=h>>>13;for(o=2*c;o<m;++o)v[o]=0;r(h===0),r((h&-8192)===0)},ae.prototype.stub=function(f){for(var c=new Array(f),v=0;v<f;v++)c[v]=0;return c},ae.prototype.mulp=function(f,c,v){var m=2*this.guessLen13b(f.length,c.length),h=this.makeRBT(m),o=this.stub(m),p=new Array(m),E=new Array(m),g=new Array(m),w=new Array(m),U=new Array(m),M=new Array(m),k=v.words;k.length=m,this.convert13b(f.words,f.length,p,m),this.convert13b(c.words,c.length,w,m),this.transform(p,o,E,g,m,h),this.transform(w,o,U,M,m,h);for(var G=0;G<m;G++){var Z=E[G]*U[G]-g[G]*M[G];g[G]=E[G]*M[G]+g[G]*U[G],E[G]=Z}return this.conjugate(E,g,m),this.transform(E,g,k,o,m,h),this.conjugate(k,o,m),this.normalize13b(k,m),v.negative=f.negative^c.negative,v.length=f.length+c.length,v._strip()},i.prototype.mul=function(f){var c=new i(null);return c.words=new Array(this.length+f.length),this.mulTo(f,c)},i.prototype.mulf=function(f){var c=new i(null);return c.words=new Array(this.length+f.length),$(this,f,c)},i.prototype.imul=function(f){return this.clone().mulTo(f,this)},i.prototype.imuln=function(f){var c=f<0;c&&(f=-f),r(typeof f=="number"),r(f<67108864);for(var v=0,m=0;m<this.length;m++){var h=(this.words[m]|0)*f,o=(h&67108863)+(v&67108863);v>>=26,v+=h/67108864|0,v+=o>>>26,this.words[m]=o&67108863}return v!==0&&(this.words[m]=v,this.length++),this.length=f===0?1:this.length,c?this.ineg():this},i.prototype.muln=function(f){return this.clone().imuln(f)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(f){var c=z(f);if(c.length===0)return new i(1);for(var v=this,m=0;m<c.length&&c[m]===0;m++,v=v.sqr());if(++m<c.length)for(var h=v.sqr();m<c.length;m++,h=h.sqr())c[m]!==0&&(v=v.mul(h));return v},i.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26,m=67108863>>>26-c<<26-c,h;if(c!==0){var o=0;for(h=0;h<this.length;h++){var p=this.words[h]&m,E=(this.words[h]|0)-p<<c;this.words[h]=E|o,o=p>>>26-c}o&&(this.words[h]=o,this.length++)}if(v!==0){for(h=this.length-1;h>=0;h--)this.words[h+v]=this.words[h];for(h=0;h<v;h++)this.words[h]=0;this.length+=v}return this._strip()},i.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},i.prototype.iushrn=function(f,c,v){r(typeof f=="number"&&f>=0);var m;c?m=(c-c%26)/26:m=0;var h=f%26,o=Math.min((f-h)/26,this.length),p=67108863^67108863>>>h<<h,E=v;if(m-=o,m=Math.max(0,m),E){for(var g=0;g<o;g++)E.words[g]=this.words[g];E.length=o}if(o!==0)if(this.length>o)for(this.length-=o,g=0;g<this.length;g++)this.words[g]=this.words[g+o];else this.words[0]=0,this.length=1;var w=0;for(g=this.length-1;g>=0&&(w!==0||g>=m);g--){var U=this.words[g]|0;this.words[g]=w<<26-h|U>>>h,w=U&p}return E&&w!==0&&(E.words[E.length++]=w),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(f,c,v){return r(this.negative===0),this.iushrn(f,c,v)},i.prototype.shln=function(f){return this.clone().ishln(f)},i.prototype.ushln=function(f){return this.clone().iushln(f)},i.prototype.shrn=function(f){return this.clone().ishrn(f)},i.prototype.ushrn=function(f){return this.clone().iushrn(f)},i.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26,m=1<<c;if(this.length<=v)return!1;var h=this.words[v];return!!(h&m)},i.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(c!==0&&v++,this.length=Math.min(v,this.length),c!==0){var m=67108863^67108863>>>c<<c;this.words[this.length-1]&=m}return this._strip()},i.prototype.maskn=function(f){return this.clone().imaskn(f)},i.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},i.prototype._iaddn=function(f){this.words[0]+=f;for(var c=0;c<this.length&&this.words[c]>=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},i.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c<this.length&&this.words[c]<0;c++)this.words[c]+=67108864,this.words[c+1]-=1;return this._strip()},i.prototype.addn=function(f){return this.clone().iaddn(f)},i.prototype.subn=function(f){return this.clone().isubn(f)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(f,c,v){var m=f.length+v,h;this._expand(m);var o,p=0;for(h=0;h<f.length;h++){o=(this.words[h+v]|0)+p;var E=(f.words[h]|0)*c;o-=E&67108863,p=(o>>26)-(E/67108864|0),this.words[h+v]=o&67108863}for(;h<this.length-v;h++)o=(this.words[h+v]|0)+p,p=o>>26,this.words[h+v]=o&67108863;if(p===0)return this._strip();for(r(p===-1),p=0,h=0;h<this.length;h++)o=-(this.words[h]|0)+p,p=o>>26,this.words[h]=o&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(f,c){var v=this.length-f.length,m=this.clone(),h=f,o=h.words[h.length-1]|0,p=this._countBits(o);v=26-p,v!==0&&(h=h.ushln(v),m.iushln(v),o=h.words[h.length-1]|0);var E=m.length-h.length,g;if(c!=="mod"){g=new i(null),g.length=E+1,g.words=new Array(g.length);for(var w=0;w<g.length;w++)g.words[w]=0}var U=m.clone()._ishlnsubmul(h,1,E);U.negative===0&&(m=U,g&&(g.words[E]=1));for(var M=E-1;M>=0;M--){var k=(m.words[h.length+M]|0)*67108864+(m.words[h.length+M-1]|0);for(k=Math.min(k/o|0,67108863),m._ishlnsubmul(h,k,M);m.negative!==0;)k--,m.negative=0,m._ishlnsubmul(h,1,M),m.isZero()||(m.negative^=1);g&&(g.words[M]=k)}return g&&g._strip(),m._strip(),c!=="div"&&v!==0&&m.iushrn(v),{div:g||null,mod:m}},i.prototype.divmod=function(f,c,v){if(r(!f.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var m,h,o;return this.negative!==0&&f.negative===0?(o=this.neg().divmod(f,c),c!=="mod"&&(m=o.div.neg()),c!=="div"&&(h=o.mod.neg(),v&&h.negative!==0&&h.iadd(f)),{div:m,mod:h}):this.negative===0&&f.negative!==0?(o=this.divmod(f.neg(),c),c!=="mod"&&(m=o.div.neg()),{div:m,mod:o.mod}):this.negative&f.negative?(o=this.neg().divmod(f.neg(),c),c!=="div"&&(h=o.mod.neg(),v&&h.negative!==0&&h.isub(f)),{div:o.div,mod:h}):f.length>this.length||this.cmp(f)<0?{div:new i(0),mod:this}:f.length===1?c==="div"?{div:this.divn(f.words[0]),mod:null}:c==="mod"?{div:null,mod:new i(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new i(this.modrn(f.words[0]))}:this._wordDiv(f,c)},i.prototype.div=function(f){return this.divmod(f,"div",!1).div},i.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},i.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},i.prototype.divRound=function(f){var c=this.divmod(f);if(c.mod.isZero())return c.div;var v=c.div.negative!==0?c.mod.isub(f):c.mod,m=f.ushrn(1),h=f.andln(1),o=v.cmp(m);return o<0||h===1&&o===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},i.prototype.modrn=function(f){var c=f<0;c&&(f=-f),r(f<=67108863);for(var v=(1<<26)%f,m=0,h=this.length-1;h>=0;h--)m=(v*m+(this.words[h]|0))%f;return c?-m:m},i.prototype.modn=function(f){return this.modrn(f)},i.prototype.idivn=function(f){var c=f<0;c&&(f=-f),r(f<=67108863);for(var v=0,m=this.length-1;m>=0;m--){var h=(this.words[m]|0)+v*67108864;this.words[m]=h/f|0,v=h%f}return this._strip(),c?this.ineg():this},i.prototype.divn=function(f){return this.clone().idivn(f)},i.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var c=this,v=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var m=new i(1),h=new i(0),o=new i(0),p=new i(1),E=0;c.isEven()&&v.isEven();)c.iushrn(1),v.iushrn(1),++E;for(var g=v.clone(),w=c.clone();!c.isZero();){for(var U=0,M=1;!(c.words[0]&M)&&U<26;++U,M<<=1);if(U>0)for(c.iushrn(U);U-- >0;)(m.isOdd()||h.isOdd())&&(m.iadd(g),h.isub(w)),m.iushrn(1),h.iushrn(1);for(var k=0,G=1;!(v.words[0]&G)&&k<26;++k,G<<=1);if(k>0)for(v.iushrn(k);k-- >0;)(o.isOdd()||p.isOdd())&&(o.iadd(g),p.isub(w)),o.iushrn(1),p.iushrn(1);c.cmp(v)>=0?(c.isub(v),m.isub(o),h.isub(p)):(v.isub(c),o.isub(m),p.isub(h))}return{a:o,b:p,gcd:v.iushln(E)}},i.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var c=this,v=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var m=new i(1),h=new i(0),o=v.clone();c.cmpn(1)>0&&v.cmpn(1)>0;){for(var p=0,E=1;!(c.words[0]&E)&&p<26;++p,E<<=1);if(p>0)for(c.iushrn(p);p-- >0;)m.isOdd()&&m.iadd(o),m.iushrn(1);for(var g=0,w=1;!(v.words[0]&w)&&g<26;++g,w<<=1);if(g>0)for(v.iushrn(g);g-- >0;)h.isOdd()&&h.iadd(o),h.iushrn(1);c.cmp(v)>=0?(c.isub(v),m.isub(h)):(v.isub(c),h.isub(m))}var U;return c.cmpn(1)===0?U=m:U=h,U.cmpn(0)<0&&U.iadd(f),U},i.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var c=this.clone(),v=f.clone();c.negative=0,v.negative=0;for(var m=0;c.isEven()&&v.isEven();m++)c.iushrn(1),v.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;v.isEven();)v.iushrn(1);var h=c.cmp(v);if(h<0){var o=c;c=v,v=o}else if(h===0||v.cmpn(1)===0)break;c.isub(v)}while(!0);return v.iushln(m)},i.prototype.invm=function(f){return this.egcd(f).a.umod(f)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(f){return this.words[0]&f},i.prototype.bincn=function(f){r(typeof f=="number");var c=f%26,v=(f-c)/26,m=1<<c;if(this.length<=v)return this._expand(v+1),this.words[v]|=m,this;for(var h=m,o=v;h!==0&&o<this.length;o++){var p=this.words[o]|0;p+=h,h=p>>>26,p&=67108863,this.words[o]=p}return h!==0&&(this.words[o]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(f){var c=f<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this._strip();var v;if(this.length>1)v=1;else{c&&(f=-f),r(f<=67108863,"Number is too big");var m=this.words[0]|0;v=m===f?0:m<f?-1:1}return this.negative!==0?-v|0:v},i.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var c=this.ucmp(f);return this.negative!==0?-c|0:c},i.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var c=0,v=this.length-1;v>=0;v--){var m=this.words[v]|0,h=f.words[v]|0;if(m!==h){m<h?c=-1:m>h&&(c=1);break}}return c},i.prototype.gtn=function(f){return this.cmpn(f)===1},i.prototype.gt=function(f){return this.cmp(f)===1},i.prototype.gten=function(f){return this.cmpn(f)>=0},i.prototype.gte=function(f){return this.cmp(f)>=0},i.prototype.ltn=function(f){return this.cmpn(f)===-1},i.prototype.lt=function(f){return this.cmp(f)===-1},i.prototype.lten=function(f){return this.cmpn(f)<=0},i.prototype.lte=function(f){return this.cmp(f)<=0},i.prototype.eqn=function(f){return this.cmpn(f)===0},i.prototype.eq=function(f){return this.cmp(f)===0},i.red=function(f){return new s(f)},i.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(f){return this.red=f,this},i.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},i.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},i.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},i.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},i.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},i.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},i.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},i.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var ie={k256:null,p224:null,p192:null,p25519:null};function ee(d,f){this.name=d,this.p=new i(f,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}ee.prototype._tmp=function(){var f=new i(null);return f.words=new Array(Math.ceil(this.n/13)),f},ee.prototype.ireduce=function(f){var c=f,v;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),v=c.bitLength();while(v>this.n);var m=v<this.n?-1:c.ucmp(this.p);return m===0?(c.words[0]=0,c.length=1):m>0?c.isub(this.p):c.strip!==void 0?c.strip():c._strip(),c},ee.prototype.split=function(f,c){f.iushrn(this.n,0,c)},ee.prototype.imulK=function(f){return f.imul(this.k)};function ce(){ee.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(ce,ee),ce.prototype.split=function(f,c){for(var v=4194303,m=Math.min(f.length,9),h=0;h<m;h++)c.words[h]=f.words[h];if(c.length=m,f.length<=9){f.words[0]=0,f.length=1;return}var o=f.words[9];for(c.words[c.length++]=o&v,h=10;h<f.length;h++){var p=f.words[h]|0;f.words[h-10]=(p&v)<<4|o>>>22,o=p}o>>>=22,f.words[h-10]=o,o===0&&f.length>10?f.length-=10:f.length-=9},ce.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var c=0,v=0;v<f.length;v++){var m=f.words[v]|0;c+=m*977,f.words[v]=c&67108863,c=m*64+(c/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function te(){ee.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(te,ee);function Y(){ee.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(Y,ee);function T(){ee.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(T,ee),T.prototype.imulK=function(f){for(var c=0,v=0;v<f.length;v++){var m=(f.words[v]|0)*19+c,h=m&67108863;m>>>=26,f.words[v]=h,c=m}return c!==0&&(f.words[f.length++]=c),f},i._prime=function(f){if(ie[f])return ie[f];var c;if(f==="k256")c=new ce;else if(f==="p224")c=new te;else if(f==="p192")c=new Y;else if(f==="p25519")c=new T;else throw new Error("Unknown prime "+f);return ie[f]=c,c};function s(d){if(typeof d=="string"){var f=i._prime(d);this.m=f.p,this.prime=f}else r(d.gtn(1),"modulus must be greater than 1"),this.m=d,this.prime=null}s.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},s.prototype._verify2=function(f,c){r((f.negative|c.negative)===0,"red works only with positives"),r(f.red&&f.red===c.red,"red works only with red numbers")},s.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(x(f,f.umod(this.m)._forceRed(this)),f)},s.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},s.prototype.add=function(f,c){this._verify2(f,c);var v=f.add(c);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},s.prototype.iadd=function(f,c){this._verify2(f,c);var v=f.iadd(c);return v.cmp(this.m)>=0&&v.isub(this.m),v},s.prototype.sub=function(f,c){this._verify2(f,c);var v=f.sub(c);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},s.prototype.isub=function(f,c){this._verify2(f,c);var v=f.isub(c);return v.cmpn(0)<0&&v.iadd(this.m),v},s.prototype.shl=function(f,c){return this._verify1(f),this.imod(f.ushln(c))},s.prototype.imul=function(f,c){return this._verify2(f,c),this.imod(f.imul(c))},s.prototype.mul=function(f,c){return this._verify2(f,c),this.imod(f.mul(c))},s.prototype.isqr=function(f){return this.imul(f,f.clone())},s.prototype.sqr=function(f){return this.mul(f,f)},s.prototype.sqrt=function(f){if(f.isZero())return f.clone();var c=this.m.andln(3);if(r(c%2===1),c===3){var v=this.m.add(new i(1)).iushrn(2);return this.pow(f,v)}for(var m=this.m.subn(1),h=0;!m.isZero()&&m.andln(1)===0;)h++,m.iushrn(1);r(!m.isZero());var o=new i(1).toRed(this),p=o.redNeg(),E=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);this.pow(g,E).cmp(p)!==0;)g.redIAdd(p);for(var w=this.pow(g,m),U=this.pow(f,m.addn(1).iushrn(1)),M=this.pow(f,m),k=h;M.cmp(o)!==0;){for(var G=M,Z=0;G.cmp(o)!==0;Z++)G=G.redSqr();r(Z<k);var B=this.pow(w,new i(1).iushln(k-Z-1));U=U.redMul(B),w=B.redSqr(),M=M.redMul(w),k=Z}return U},s.prototype.invm=function(f){var c=f._invmp(this.m);return c.negative!==0?(c.negative=0,this.imod(c).redNeg()):this.imod(c)},s.prototype.pow=function(f,c){if(c.isZero())return new i(1).toRed(this);if(c.cmpn(1)===0)return f.clone();var v=4,m=new Array(1<<v);m[0]=new i(1).toRed(this),m[1]=f;for(var h=2;h<m.length;h++)m[h]=this.mul(m[h-1],f);var o=m[0],p=0,E=0,g=c.bitLength()%26;for(g===0&&(g=26),h=c.length-1;h>=0;h--){for(var w=c.words[h],U=g-1;U>=0;U--){var M=w>>U&1;if(o!==m[0]&&(o=this.sqr(o)),M===0&&p===0){E=0;continue}p<<=1,p|=M,E++,!(E!==v&&(h!==0||U!==0))&&(o=this.mul(o,m[p]),E=0,p=0)}g=26}return o},s.prototype.convertTo=function(f){var c=f.umod(this.m);return c===f?c.clone():c},s.prototype.convertFrom=function(f){var c=f.clone();return c.red=null,c},i.mont=function(f){return new u(f)};function u(d){s.call(this,d),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(u,s),u.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},u.prototype.convertFrom=function(f){var c=this.imod(f.mul(this.rinv));return c.red=null,c},u.prototype.imul=function(f,c){if(f.isZero()||c.isZero())return f.words[0]=0,f.length=1,f;var v=f.imul(c),m=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=v.isub(m).iushrn(this.shift),o=h;return h.cmp(this.m)>=0?o=h.isub(this.m):h.cmpn(0)<0&&(o=h.iadd(this.m)),o._forceRed(this)},u.prototype.mul=function(f,c){if(f.isZero()||c.isZero())return new i(0)._forceRed(this);var v=f.mul(c),m=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=v.isub(m).iushrn(this.shift),o=h;return h.cmp(this.m)>=0?o=h.isub(this.m):h.cmpn(0)<0&&(o=h.iadd(this.m)),o._forceRed(this)},u.prototype.invm=function(f){var c=this.imod(f._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(typeof Rl>"u"||Rl,Vb)});var Fl=V(u0=>{"use strict";var CP=A(S());Object.defineProperty(u0,"__esModule",{value:!0});u0.version=void 0;u0.version="bignumber/5.8.0"});var d0=V(Qr=>{"use strict";var LP=A(S()),Z4=Qr&&Qr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr._base16To36=Qr._base36To16=Qr.BigNumber=Qr.isBigNumberish=void 0;var V4=Z4(jb()),Ss=V4.default.BN,bo=at(),go=Pt(),j4=Fl(),bi=new go.Logger(j4.version),Dl={},Qb=9007199254740991;function Q4(t){return t!=null&&(l0.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||(0,bo.isHexString)(t)||typeof t=="bigint"||(0,bo.isBytes)(t))}Qr.isBigNumberish=Q4;var Wb=!1,l0=function(){function t(e,r){e!==Dl&&bi.throwError("cannot call constructor directly; use BigNumber.from",go.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return t.prototype.fromTwos=function(e){return Cr(He(this).fromTwos(e))},t.prototype.toTwos=function(e){return Cr(He(this).toTwos(e))},t.prototype.abs=function(){return this._hex[0]==="-"?t.from(this._hex.substring(1)):this},t.prototype.add=function(e){return Cr(He(this).add(He(e)))},t.prototype.sub=function(e){return Cr(He(this).sub(He(e)))},t.prototype.div=function(e){var r=t.from(e);return r.isZero()&&jr("division-by-zero","div"),Cr(He(this).div(He(e)))},t.prototype.mul=function(e){return Cr(He(this).mul(He(e)))},t.prototype.mod=function(e){var r=He(e);return r.isNeg()&&jr("division-by-zero","mod"),Cr(He(this).umod(r))},t.prototype.pow=function(e){var r=He(e);return r.isNeg()&&jr("negative-power","pow"),Cr(He(this).pow(r))},t.prototype.and=function(e){var r=He(e);return(this.isNegative()||r.isNeg())&&jr("unbound-bitwise-result","and"),Cr(He(this).and(r))},t.prototype.or=function(e){var r=He(e);return(this.isNegative()||r.isNeg())&&jr("unbound-bitwise-result","or"),Cr(He(this).or(r))},t.prototype.xor=function(e){var r=He(e);return(this.isNegative()||r.isNeg())&&jr("unbound-bitwise-result","xor"),Cr(He(this).xor(r))},t.prototype.mask=function(e){return(this.isNegative()||e<0)&&jr("negative-width","mask"),Cr(He(this).maskn(e))},t.prototype.shl=function(e){return(this.isNegative()||e<0)&&jr("negative-width","shl"),Cr(He(this).shln(e))},t.prototype.shr=function(e){return(this.isNegative()||e<0)&&jr("negative-width","shr"),Cr(He(this).shrn(e))},t.prototype.eq=function(e){return He(this).eq(He(e))},t.prototype.lt=function(e){return He(this).lt(He(e))},t.prototype.lte=function(e){return He(this).lte(He(e))},t.prototype.gt=function(e){return He(this).gt(He(e))},t.prototype.gte=function(e){return He(this).gte(He(e))},t.prototype.isNegative=function(){return this._hex[0]==="-"},t.prototype.isZero=function(){return He(this).isZero()},t.prototype.toNumber=function(){try{return He(this).toNumber()}catch{jr("overflow","toNumber",this.toString())}return null},t.prototype.toBigInt=function(){try{return BigInt(this.toString())}catch{}return bi.throwError("this platform does not support BigInt",go.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})},t.prototype.toString=function(){return arguments.length>0&&(arguments[0]===10?Wb||(Wb=!0,bi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?bi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",go.Logger.errors.UNEXPECTED_ARGUMENT,{}):bi.throwError("BigNumber.toString does not accept parameters",go.Logger.errors.UNEXPECTED_ARGUMENT,{})),He(this).toString(10)},t.prototype.toHexString=function(){return this._hex},t.prototype.toJSON=function(e){return{type:"BigNumber",hex:this.toHexString()}},t.from=function(e){if(e instanceof t)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new t(Dl,Ms(e)):e.match(/^-?[0-9]+$/)?new t(Dl,Ms(new Ss(e))):bi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&jr("underflow","BigNumber.from",e),(e>=Qb||e<=-Qb)&&jr("overflow","BigNumber.from",e),t.from(String(e));var r=e;if(typeof r=="bigint")return t.from(r.toString());if((0,bo.isBytes)(r))return t.from((0,bo.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if(typeof n=="string")return t.from(n)}else{var n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&((0,bo.isHexString)(n)||n[0]==="-"&&(0,bo.isHexString)(n.substring(1))))return t.from(n)}return bi.throwArgumentError("invalid BigNumber value","value",e)},t.isBigNumber=function(e){return!!(e&&e._isBigNumber)},t}();Qr.BigNumber=l0;function Ms(t){if(typeof t!="string")return Ms(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&bi.throwArgumentError("invalid hex","value",t),t=Ms(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Cr(t){return l0.from(Ms(t))}function He(t){var e=l0.from(t).toHexString();return e[0]==="-"?new Ss("-"+e.substring(3),16):new Ss(e.substring(2),16)}function jr(t,e,r){var n={fault:t,operation:e};return r!=null&&(n.value=r),bi.throwError(t,go.Logger.errors.NUMERIC_FAULT,n)}function W4(t){return new Ss(t,36).toString(16)}Qr._base36To16=W4;function Y4(t){return new Ss(t,16).toString(36)}Qr._base16To36=Y4});var rg=V(Un=>{"use strict";var FP=A(S());Object.defineProperty(Un,"__esModule",{value:!0});Un.FixedNumber=Un.FixedFormat=Un.parseFixed=Un.formatFixed=void 0;var h0=at(),_s=Pt(),$4=Fl(),Er=new _s.Logger($4.version),gi=d0(),Ts={},$b=gi.BigNumber.from(0),eg=gi.BigNumber.from(-1);function tg(t,e,r,n){var i={fault:e,operation:r};return n!==void 0&&(i.value=n),Er.throwError(t,_s.Logger.errors.NUMERIC_FAULT,i)}var Es="0";for(;Es.length<256;)Es+=Es;function Il(t){if(typeof t!="number")try{t=gi.BigNumber.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+Es.substring(0,t):Er.throwArgumentError("invalid decimal size","decimals",t)}function p0(t,e){e==null&&(e=0);var r=Il(e);t=gi.BigNumber.from(t);var n=t.lt($b);n&&(t=t.mul(eg));for(var i=t.mod(r).toString();i.length<r.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];var a=t.div(r).toString();return r.length===1?t=a:t=a+"."+i,n&&(t="-"+t),t}Un.formatFixed=p0;function Jn(t,e){e==null&&(e=0);var r=Il(e);(typeof t!="string"||!t.match(/^-?[0-9.]+$/))&&Er.throwArgumentError("invalid decimal value","value",t);var n=t.substring(0,1)==="-";n&&(t=t.substring(1)),t==="."&&Er.throwArgumentError("missing value","value",t);var i=t.split(".");i.length>2&&Er.throwArgumentError("too many decimal points","value",t);var a=i[0],l=i[1];for(a||(a="0"),l||(l="0");l[l.length-1]==="0";)l=l.substring(0,l.length-1);for(l.length>r.length-1&&tg("fractional component exceeds decimals","underflow","parseFixed"),l===""&&(l="0");l.length<r.length-1;)l+="0";var b=gi.BigNumber.from(a),y=gi.BigNumber.from(l),x=b.mul(r).add(y);return n&&(x=x.mul(eg)),x}Un.parseFixed=Jn;var b0=function(){function t(e,r,n,i){e!==Ts&&Er.throwError("cannot use FixedFormat constructor; use FixedFormat.from",_s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=r,this.width=n,this.decimals=i,this.name=(r?"":"u")+"fixed"+String(n)+"x"+String(i),this._multiplier=Il(i),Object.freeze(this)}return t.from=function(e){if(e instanceof t)return e;typeof e=="number"&&(e="fixed128x"+e);var r=!0,n=128,i=18;if(typeof e=="string"){if(e!=="fixed")if(e==="ufixed")r=!1;else{var a=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);a||Er.throwArgumentError("invalid fixed format","format",e),r=a[1]!=="u",n=parseInt(a[2]),i=parseInt(a[3])}}else if(e){var l=function(b,y,x){return e[b]==null?x:(typeof e[b]!==y&&Er.throwArgumentError("invalid fixed format ("+b+" not "+y+")","format."+b,e[b]),e[b])};r=l("signed","boolean",r),n=l("width","number",n),i=l("decimals","number",i)}return n%8&&Er.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Er.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new t(Ts,r,n,i)},t}();Un.FixedFormat=b0;var Ol=function(){function t(e,r,n,i){e!==Ts&&Er.throwError("cannot use FixedNumber constructor; use FixedNumber.from",_s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return t.prototype._checkFormat=function(e){this.format.name!==e.format.name&&Er.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)},t.prototype.addUnsafe=function(e){this._checkFormat(e);var r=Jn(this._value,this.format.decimals),n=Jn(e._value,e.format.decimals);return t.fromValue(r.add(n),this.format.decimals,this.format)},t.prototype.subUnsafe=function(e){this._checkFormat(e);var r=Jn(this._value,this.format.decimals),n=Jn(e._value,e.format.decimals);return t.fromValue(r.sub(n),this.format.decimals,this.format)},t.prototype.mulUnsafe=function(e){this._checkFormat(e);var r=Jn(this._value,this.format.decimals),n=Jn(e._value,e.format.decimals);return t.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)},t.prototype.divUnsafe=function(e){this._checkFormat(e);var r=Jn(this._value,this.format.decimals),n=Jn(e._value,e.format.decimals);return t.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)},t.prototype.floor=function(){var e=this.toString().split(".");e.length===1&&e.push("0");var r=t.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe(Yb.toFormat(r.format))),r},t.prototype.ceiling=function(){var e=this.toString().split(".");e.length===1&&e.push("0");var r=t.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe(Yb.toFormat(r.format))),r},t.prototype.round=function(e){e==null&&(e=0);var r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Er.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;var n=t.from("1"+Es.substring(0,e),this.format),i=e5.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)},t.prototype.isZero=function(){return this._value==="0.0"||this._value==="0"},t.prototype.isNegative=function(){return this._value[0]==="-"},t.prototype.toString=function(){return this._value},t.prototype.toHexString=function(e){if(e==null)return this._hex;e%8&&Er.throwArgumentError("invalid byte width","width",e);var r=gi.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,h0.hexZeroPad)(r,e/8)},t.prototype.toUnsafeFloat=function(){return parseFloat(this.toString())},t.prototype.toFormat=function(e){return t.fromString(this._value,e)},t.fromValue=function(e,r,n){return n==null&&r!=null&&!(0,gi.isBigNumberish)(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),t.fromString(p0(e,r),b0.from(n))},t.fromString=function(e,r){r==null&&(r="fixed");var n=b0.from(r),i=Jn(e,n.decimals);!n.signed&&i.lt($b)&&tg("unsigned value cannot be negative","overflow","value",e);var a=null;n.signed?a=i.toTwos(n.width).toHexString():(a=i.toHexString(),a=(0,h0.hexZeroPad)(a,n.width/8));var l=p0(i,n.decimals);return new t(Ts,a,l,n)},t.fromBytes=function(e,r){r==null&&(r="fixed");var n=b0.from(r);if((0,h0.arrayify)(e).length>n.width/8)throw new Error("overflow");var i=gi.BigNumber.from(e);n.signed&&(i=i.fromTwos(n.width));var a=i.toTwos((n.signed?0:1)+n.width).toHexString(),l=p0(i,n.decimals);return new t(Ts,a,l,n)},t.from=function(e,r){if(typeof e=="string")return t.fromString(e,r);if((0,h0.isBytes)(e))return t.fromBytes(e,r);try{return t.fromValue(e,0,r)}catch(n){if(n.code!==_s.Logger.errors.INVALID_ARGUMENT)throw n}return Er.throwArgumentError("invalid FixedNumber value","value",e)},t.isFixedNumber=function(e){return!!(e&&e._isFixedNumber)},t}();Un.FixedNumber=Ol;var Yb=Ol.from(1),e5=Ol.from("0.5")});var ba=V(ur=>{"use strict";var IP=A(S());Object.defineProperty(ur,"__esModule",{value:!0});ur._base36To16=ur._base16To36=ur.parseFixed=ur.FixedNumber=ur.FixedFormat=ur.formatFixed=ur.BigNumber=void 0;var t5=d0();Object.defineProperty(ur,"BigNumber",{enumerable:!0,get:function(){return t5.BigNumber}});var g0=rg();Object.defineProperty(ur,"formatFixed",{enumerable:!0,get:function(){return g0.formatFixed}});Object.defineProperty(ur,"FixedFormat",{enumerable:!0,get:function(){return g0.FixedFormat}});Object.defineProperty(ur,"FixedNumber",{enumerable:!0,get:function(){return g0.FixedNumber}});Object.defineProperty(ur,"parseFixed",{enumerable:!0,get:function(){return g0.parseFixed}});var ng=d0();Object.defineProperty(ur,"_base16To36",{enumerable:!0,get:function(){return ng._base16To36}});Object.defineProperty(ur,"_base36To16",{enumerable:!0,get:function(){return ng._base36To16}})});var ig=V(Jt=>{"use strict";var kP=A(S());Object.defineProperty(Jt,"__esModule",{value:!0});Jt.MaxInt256=Jt.MinInt256=Jt.MaxUint256=Jt.WeiPerEther=Jt.Two=Jt.One=Jt.Zero=Jt.NegativeOne=void 0;var ki=ba(),r5=ki.BigNumber.from(-1);Jt.NegativeOne=r5;var n5=ki.BigNumber.from(0);Jt.Zero=n5;var i5=ki.BigNumber.from(1);Jt.One=i5;var a5=ki.BigNumber.from(2);Jt.Two=a5;var o5=ki.BigNumber.from("1000000000000000000");Jt.WeiPerEther=o5;var s5=ki.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");Jt.MaxUint256=s5;var f5=ki.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");Jt.MinInt256=f5;var c5=ki.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");Jt.MaxInt256=c5});var ag=V(v0=>{"use strict";var JP=A(S());Object.defineProperty(v0,"__esModule",{value:!0});v0.HashZero=void 0;v0.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"});var og=V(m0=>{"use strict";var HP=A(S());Object.defineProperty(m0,"__esModule",{value:!0});m0.EtherSymbol=void 0;m0.EtherSymbol="\u039E"});var kl=V(lt=>{"use strict";var GP=A(S());Object.defineProperty(lt,"__esModule",{value:!0});lt.EtherSymbol=lt.HashZero=lt.MaxInt256=lt.MinInt256=lt.MaxUint256=lt.WeiPerEther=lt.Two=lt.One=lt.Zero=lt.NegativeOne=lt.AddressZero=void 0;var u5=Zb();Object.defineProperty(lt,"AddressZero",{enumerable:!0,get:function(){return u5.AddressZero}});var Ni=ig();Object.defineProperty(lt,"NegativeOne",{enumerable:!0,get:function(){return Ni.NegativeOne}});Object.defineProperty(lt,"Zero",{enumerable:!0,get:function(){return Ni.Zero}});Object.defineProperty(lt,"One",{enumerable:!0,get:function(){return Ni.One}});Object.defineProperty(lt,"Two",{enumerable:!0,get:function(){return Ni.Two}});Object.defineProperty(lt,"WeiPerEther",{enumerable:!0,get:function(){return Ni.WeiPerEther}});Object.defineProperty(lt,"MaxUint256",{enumerable:!0,get:function(){return Ni.MaxUint256}});Object.defineProperty(lt,"MinInt256",{enumerable:!0,get:function(){return Ni.MinInt256}});Object.defineProperty(lt,"MaxInt256",{enumerable:!0,get:function(){return Ni.MaxInt256}});var l5=ag();Object.defineProperty(lt,"HashZero",{enumerable:!0,get:function(){return l5.HashZero}});var d5=og();Object.defineProperty(lt,"EtherSymbol",{enumerable:!0,get:function(){return d5.EtherSymbol}})});var sg=V(x0=>{"use strict";var zP=A(S());Object.defineProperty(x0,"__esModule",{value:!0});x0.version=void 0;x0.version="strings/5.8.0"});var w0=V(St=>{"use strict";var ZP=A(S());Object.defineProperty(St,"__esModule",{value:!0});St.toUtf8CodePoints=St.toUtf8String=St._toUtf8String=St._toEscapedUtf8String=St.toUtf8Bytes=St.Utf8ErrorFuncs=St.Utf8ErrorReason=St.UnicodeNormalizationForm=void 0;var fg=at(),h5=Pt(),p5=sg(),cg=new h5.Logger(p5.version),y0;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"})(y0=St.UnicodeNormalizationForm||(St.UnicodeNormalizationForm={}));var Wr;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"})(Wr=St.Utf8ErrorReason||(St.Utf8ErrorReason={}));function b5(t,e,r,n,i){return cg.throwArgumentError("invalid codepoint at offset "+e+"; "+t,"bytes",r)}function ug(t,e,r,n,i){if(t===Wr.BAD_PREFIX||t===Wr.UNEXPECTED_CONTINUE){for(var a=0,l=e+1;l<r.length&&r[l]>>6===2;l++)a++;return a}return t===Wr.OVERRUN?r.length-e-1:0}function g5(t,e,r,n,i){return t===Wr.OVERLONG?(n.push(i),0):(n.push(65533),ug(t,e,r,n,i))}St.Utf8ErrorFuncs=Object.freeze({error:b5,ignore:ug,replace:g5});function Jl(t,e){e==null&&(e=St.Utf8ErrorFuncs.error),t=(0,fg.arrayify)(t);for(var r=[],n=0;n<t.length;){var i=t[n++];if(!(i>>7)){r.push(i);continue}var a=null,l=null;if((i&224)===192)a=1,l=127;else if((i&240)===224)a=2,l=2047;else if((i&248)===240)a=3,l=65535;else{(i&192)===128?n+=e(Wr.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Wr.BAD_PREFIX,n-1,t,r);continue}if(n-1+a>=t.length){n+=e(Wr.OVERRUN,n-1,t,r);continue}for(var b=i&(1<<8-a-1)-1,y=0;y<a;y++){var x=t[n];if((x&192)!=128){n+=e(Wr.MISSING_CONTINUE,n,t,r),b=null;break}b=b<<6|x&63,n++}if(b!==null){if(b>1114111){n+=e(Wr.OUT_OF_RANGE,n-1-a,t,r,b);continue}if(b>=55296&&b<=57343){n+=e(Wr.UTF16_SURROGATE,n-1-a,t,r,b);continue}if(b<=l){n+=e(Wr.OVERLONG,n-1-a,t,r,b);continue}r.push(b)}}return r}function lg(t,e){e===void 0&&(e=y0.current),e!=y0.current&&(cg.checkNormalize(),t=t.normalize(e));for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;var a=t.charCodeAt(n);if(n>=t.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");var l=65536+((i&1023)<<10)+(a&1023);r.push(l>>18|240),r.push(l>>12&63|128),r.push(l>>6&63|128),r.push(l&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return(0,fg.arrayify)(r)}St.toUtf8Bytes=lg;function Nl(t){var e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function v5(t,e){return'"'+Jl(t,e).map(function(r){if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?Nl(r):(r-=65536,Nl((r>>10&1023)+55296)+Nl((r&1023)+56320))}).join("")+'"'}St._toEscapedUtf8String=v5;function dg(t){return t.map(function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))}).join("")}St._toUtf8String=dg;function m5(t,e){return dg(Jl(t,e))}St.toUtf8String=m5;function x5(t,e){return e===void 0&&(e=y0.current),Jl(lg(t,e))}St.toUtf8CodePoints=x5});var pg=V(vo=>{"use strict";var jP=A(S());Object.defineProperty(vo,"__esModule",{value:!0});vo.parseBytes32String=vo.formatBytes32String=void 0;var y5=kl(),Ul=at(),hg=w0();function w5(t){var e=(0,hg.toUtf8Bytes)(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,Ul.hexlify)((0,Ul.concat)([e,y5.HashZero]).slice(0,32))}vo.formatBytes32String=w5;function A5(t){var e=(0,Ul.arrayify)(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");for(var r=31;e[r-1]===0;)r--;return(0,hg.toUtf8String)(e.slice(0,r))}vo.parseBytes32String=A5});var xg=V(Hn=>{"use strict";var WP=A(S());Object.defineProperty(Hn,"__esModule",{value:!0});Hn.nameprep=Hn._nameprepTableC=Hn._nameprepTableB2=Hn._nameprepTableA1=void 0;var Bs=w0();function S5(t){if(t.length%4!==0)throw new Error("bad data");for(var e=[],r=0;r<t.length;r+=4)e.push(parseInt(t.substring(r,r+4),16));return e}function Hl(t,e){e||(e=function(i){return[parseInt(i,16)]});var r=0,n={};return t.split(",").forEach(function(i){var a=i.split(":");r+=parseInt(a[0],16),n[r]=e(a[1])}),n}function bg(t){var e=0;return t.split(",").map(function(r){var n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");var i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function ql(t,e){for(var r=0,n=0;n<e.length;n++){var i=e[n];if(r+=i.l,t>=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}var M5=bg("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),T5="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(function(t){return parseInt(t,16)}),E5=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],_5=Hl("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),B5=Hl("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),C5=Hl("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",S5),P5=bg("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function L5(t){return t.reduce(function(e,r){return r.forEach(function(n){e.push(n)}),e},[])}function gg(t){return!!ql(t,M5)}Hn._nameprepTableA1=gg;function vg(t){var e=ql(t,E5);if(e)return[t+e.s];var r=_5[t];if(r)return r;var n=B5[t];if(n)return[t+n[0]];var i=C5[t];return i||null}Hn._nameprepTableB2=vg;function mg(t){return!!ql(t,P5)}Hn._nameprepTableC=mg;function R5(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();var e=(0,Bs.toUtf8CodePoints)(t);e=L5(e.map(function(n){if(T5.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];var i=vg(n);return i||[n]})),e=(0,Bs.toUtf8CodePoints)((0,Bs._toUtf8String)(e),Bs.UnicodeNormalizationForm.NFKC),e.forEach(function(n){if(mg(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(function(n){if(gg(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});var r=(0,Bs._toUtf8String)(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}Hn.nameprep=R5});var Or=V(pt=>{"use strict";var $P=A(S());Object.defineProperty(pt,"__esModule",{value:!0});pt.nameprep=pt.parseBytes32String=pt.formatBytes32String=pt.UnicodeNormalizationForm=pt.Utf8ErrorReason=pt.Utf8ErrorFuncs=pt.toUtf8String=pt.toUtf8CodePoints=pt.toUtf8Bytes=pt._toEscapedUtf8String=void 0;var yg=pg();Object.defineProperty(pt,"formatBytes32String",{enumerable:!0,get:function(){return yg.formatBytes32String}});Object.defineProperty(pt,"parseBytes32String",{enumerable:!0,get:function(){return yg.parseBytes32String}});var F5=xg();Object.defineProperty(pt,"nameprep",{enumerable:!0,get:function(){return F5.nameprep}});var ga=w0();Object.defineProperty(pt,"_toEscapedUtf8String",{enumerable:!0,get:function(){return ga._toEscapedUtf8String}});Object.defineProperty(pt,"toUtf8Bytes",{enumerable:!0,get:function(){return ga.toUtf8Bytes}});Object.defineProperty(pt,"toUtf8CodePoints",{enumerable:!0,get:function(){return ga.toUtf8CodePoints}});Object.defineProperty(pt,"toUtf8String",{enumerable:!0,get:function(){return ga.toUtf8String}});Object.defineProperty(pt,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return ga.UnicodeNormalizationForm}});Object.defineProperty(pt,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return ga.Utf8ErrorFuncs}});Object.defineProperty(pt,"Utf8ErrorReason",{enumerable:!0,get:function(){return ga.Utf8ErrorReason}})});var Gl=V(A0=>{"use strict";var tL=A(S());Object.defineProperty(A0,"__esModule",{value:!0});A0.id=void 0;var D5=Nn(),I5=Or();function O5(t){return(0,D5.keccak256)((0,I5.toUtf8Bytes)(t))}A0.id=O5});var Xl=V(S0=>{"use strict";var nL=A(S());Object.defineProperty(S0,"__esModule",{value:!0});S0.version=void 0;S0.version="hash/5.8.0"});var Ag=V(mo=>{"use strict";var aL=A(S());Object.defineProperty(mo,"__esModule",{value:!0});mo.encode=mo.decode=void 0;var wg=at();function k5(t){return(0,wg.arrayify)(new Uint8Array(Buffer.from(t,"base64")))}mo.decode=k5;function N5(t){return Buffer.from((0,wg.arrayify)(t)).toString("base64")}mo.encode=N5});var Mg=V(xo=>{"use strict";var sL=A(S());Object.defineProperty(xo,"__esModule",{value:!0});xo.encode=xo.decode=void 0;var Sg=Ag();Object.defineProperty(xo,"decode",{enumerable:!0,get:function(){return Sg.decode}});Object.defineProperty(xo,"encode",{enumerable:!0,get:function(){return Sg.encode}})});var Kl=V(Ut=>{"use strict";var cL=A(S());Object.defineProperty(Ut,"__esModule",{value:!0});Ut.read_emoji_trie=Ut.read_zero_terminated_array=Ut.read_mapped_map=Ut.read_member_array=Ut.signed=Ut.read_compressed_payload=Ut.read_payload=Ut.decode_arithmetic=void 0;function Eg(t,e){e==null&&(e=1);var r=[],n=r.forEach,i=function(a,l){n.call(a,function(b){l>0&&Array.isArray(b)?i(b,l-1):r.push(b)})};return i(t,e),r}function J5(t){for(var e={},r=0;r<t.length;r++){var n=t[r];e[n[0]]=n[1]}return e}function _g(t){var e=0;function r(){return t[e++]<<8|t[e++]}for(var n=r(),i=1,a=[0,1],l=1;l<n;l++)a.push(i+=r());var b=r(),y=e;e+=b;var x=0,_=0;function C(){return x==0&&(_=_<<8|t[e++],x=8),_>>--x&1}for(var D=31,F=Math.pow(2,D),P=F>>>1,z=P>>1,W=F-1,X=0,l=0;l<D;l++)X=X<<1|C();for(var ne=[],$=0,ae=F;;){for(var ie=Math.floor(((X-$+1)*i-1)/ae),ee=0,ce=n;ce-ee>1;){var te=ee+ce>>>1;ie<a[te]?ce=te:ee=te}if(ee==0)break;ne.push(ee);for(var Y=$+Math.floor(ae*a[ee]/i),T=$+Math.floor(ae*a[ee+1]/i)-1;!((Y^T)&P);)X=X<<1&W|C(),Y=Y<<1&W,T=T<<1&W|1;for(;Y&~T&z;)X=X&P|X<<1&W>>>1|C(),Y=Y<<1^P,T=(T^P)<<1|P|1;$=Y,ae=1+T-Y}var s=n-4;return ne.map(function(u){switch(u-s){case 3:return s+65792+(t[y++]<<16|t[y++]<<8|t[y++]);case 2:return s+256+(t[y++]<<8|t[y++]);case 1:return s+t[y++];default:return u-1}})}Ut.decode_arithmetic=_g;function Bg(t){var e=0;return function(){return t[e++]}}Ut.read_payload=Bg;function U5(t){return Bg(_g(t))}Ut.read_compressed_payload=U5;function Cg(t){return t&1?~t>>1:t>>1}Ut.signed=Cg;function H5(t,e){for(var r=Array(t),n=0;n<t;n++)r[n]=1+e();return r}function Tg(t,e){for(var r=Array(t),n=0,i=-1;n<t;n++)r[n]=i+=1+e();return r}function q5(t,e){for(var r=Array(t),n=0,i=0;n<t;n++)r[n]=i+=Cg(e());return r}function zl(t,e){for(var r=Tg(t(),t),n=t(),i=Tg(n,t),a=H5(n,t),l=0;l<n;l++)for(var b=0;b<a[l];b++)r.push(i[l]+b);return e?r.map(function(y){return e[y]}):r}Ut.read_member_array=zl;function G5(t){for(var e=[];;){var r=t();if(r==0)break;e.push(X5(r,t))}for(;;){var r=t()-1;if(r<0)break;e.push(z5(r,t))}return J5(Eg(e))}Ut.read_mapped_map=G5;function Pg(t){for(var e=[];;){var r=t();if(r==0)break;e.push(r)}return e}Ut.read_zero_terminated_array=Pg;function Lg(t,e,r){for(var n=Array(t).fill(void 0).map(function(){return[]}),i=0;i<e;i++)q5(t,r).forEach(function(a,l){return n[l].push(a)});return n}function X5(t,e){var r=1+e(),n=e(),i=Pg(e),a=Lg(i.length,1+t,e);return Eg(a.map(function(l,b){var y=l[0],x=l.slice(1);return Array(i[b]).fill(void 0).map(function(_,C){var D=C*n;return[y+C*r,x.map(function(F){return F+D})]})}))}function z5(t,e){var r=1+e(),n=Lg(r,1+t,e);return n.map(function(i){return[i[0],i.slice(1)]})}function K5(t){var e=zl(t).sort(function(n,i){return n-i});return r();function r(){for(var n=[];;){var i=zl(t,e);if(i.length==0)break;n.push({set:new Set(i),node:r()})}n.sort(function(_,C){return C.set.size-_.set.size});var a=t(),l=a%3;a=a/3|0;var b=!!(a&1);a>>=1;var y=a==1,x=a==2;return{branches:n,valid:l,fe0f:b,save:y,check:x}}}Ut.read_emoji_trie=K5});var Rg=V(M0=>{"use strict";var lL=A(S());Object.defineProperty(M0,"__esModule",{value:!0});M0.getData=void 0;var Z5=Mg(),V5=Kl();function j5(){return(0,V5.read_compressed_payload)((0,Z5.decode)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}M0.getData=j5});var Og=V(yo=>{"use strict";var hL=A(S());Object.defineProperty(yo,"__esModule",{value:!0});yo.ens_normalize=yo.ens_normalize_post_check=void 0;var Q5=Or(),W5=Rg(),T0=(0,W5.getData)(),E0=Kl(),Y5=new Set((0,E0.read_member_array)(T0)),$5=new Set((0,E0.read_member_array)(T0)),ew=(0,E0.read_mapped_map)(T0),tw=(0,E0.read_emoji_trie)(T0),Fg=45,Dg=95;function Ig(t){return(0,Q5.toUtf8CodePoints)(t)}function rw(t){return t.filter(function(e){return e!=65039})}function Zl(t){for(var e=0,r=t.split(".");e<r.length;e++){var n=r[e],i=Ig(n);try{for(var a=i.lastIndexOf(Dg)-1;a>=0;a--)if(i[a]!==Dg)throw new Error("underscore only allowed at start");if(i.length>=4&&i.every(function(l){return l<128})&&i[2]===Fg&&i[3]===Fg)throw new Error("invalid label extension")}catch(l){throw new Error('Invalid label "'+n+'": '+l.message)}}return t}yo.ens_normalize_post_check=Zl;function nw(t){return Zl(iw(t,rw))}yo.ens_normalize=nw;function iw(t,e){for(var r=Ig(t).reverse(),n=[];r.length;){var i=ow(r);if(i){n.push.apply(n,e(i));continue}var a=r.pop();if(Y5.has(a)){n.push(a);continue}if(!$5.has(a)){var l=ew[a];if(l){n.push.apply(n,l);continue}throw new Error("Disallowed codepoint: 0x"+a.toString(16).toUpperCase())}}return Zl(aw(String.fromCodePoint.apply(String,n)))}function aw(t){return t.normalize("NFC")}function ow(t,e){var r,n=tw,i,a,l=[],b=t.length;e&&(e.length=0);for(var y=function(){var _=t[--b];if(n=(r=n.branches.find(function(C){return C.set.has(_)}))===null||r===void 0?void 0:r.node,!n)return"break";if(n.save)a=_;else if(n.check&&_===a)return"break";l.push(_),n.fe0f&&(l.push(65039),b>0&&t[b-1]==65039&&b--),n.valid&&(i=l.slice(),n.valid==2&&i.splice(1,1),e&&e.push.apply(e,t.slice(b).reverse()),t.length=b)};b;){var x=y();if(x==="break")break}return i}});var Vl=V(qn=>{"use strict";var bL=A(S());Object.defineProperty(qn,"__esModule",{value:!0});qn.dnsEncode=qn.namehash=qn.isValidName=qn.ensNormalize=void 0;var _0=at(),Jg=Or(),kg=Nn(),sw=Pt(),fw=Xl(),cw=new sw.Logger(fw.version),uw=Og(),Ug=new Uint8Array(32);Ug.fill(0);function Ng(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function B0(t){var e=(0,Jg.toUtf8Bytes)((0,uw.ens_normalize)(t)),r=[];if(t.length===0)return r;for(var n=0,i=0;i<e.length;i++){var a=e[i];a===46&&(r.push(Ng(e.slice(n,i))),n=i+1)}if(n>=e.length)throw new Error("invalid ENS name; empty component");return r.push(Ng(e.slice(n))),r}function lw(t){return B0(t).map(function(e){return(0,Jg.toUtf8String)(e)}).join(".")}qn.ensNormalize=lw;function dw(t){try{return B0(t).length!==0}catch{}return!1}qn.isValidName=dw;function hw(t){typeof t!="string"&&cw.throwArgumentError("invalid ENS name; not a string","name",t);for(var e=Ug,r=B0(t);r.length;)e=(0,kg.keccak256)((0,_0.concat)([e,(0,kg.keccak256)(r.pop())]));return(0,_0.hexlify)(e)}qn.namehash=hw;function pw(t){return(0,_0.hexlify)((0,_0.concat)(B0(t).map(function(e){if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}qn.dnsEncode=pw});var Hg=V(va=>{"use strict";var vL=A(S());Object.defineProperty(va,"__esModule",{value:!0});va.hashMessage=va.messagePrefix=void 0;var bw=at(),gw=Nn(),jl=Or();va.messagePrefix=`Ethereum Signed Message:
10
- `;function vw(t){return typeof t=="string"&&(t=(0,jl.toUtf8Bytes)(t)),(0,gw.keccak256)((0,bw.concat)([(0,jl.toUtf8Bytes)(va.messagePrefix),(0,jl.toUtf8Bytes)(String(t.length)),t]))}va.hashMessage=vw});var qg=V(C0=>{"use strict";var xL=A(S());Object.defineProperty(C0,"__esModule",{value:!0});C0.version=void 0;C0.version="rlp/5.8.0"});var Ql=V(wo=>{"use strict";var wL=A(S());Object.defineProperty(wo,"__esModule",{value:!0});wo.decode=wo.encode=void 0;var ma=at(),vi=Pt(),mw=qg(),Gn=new vi.Logger(mw.version);function Gg(t){for(var e=[];t;)e.unshift(t&255),t>>=8;return e}function Xg(t,e,r){for(var n=0,i=0;i<r;i++)n=n*256+t[e+i];return n}function Kg(t){if(Array.isArray(t)){var e=[];if(t.forEach(function(a){e=e.concat(Kg(a))}),e.length<=55)return e.unshift(192+e.length),e;var r=Gg(e.length);return r.unshift(247+r.length),r.concat(e)}(0,ma.isBytesLike)(t)||Gn.throwArgumentError("RLP object must be BytesLike","object",t);var n=Array.prototype.slice.call((0,ma.arrayify)(t));if(n.length===1&&n[0]<=127)return n;if(n.length<=55)return n.unshift(128+n.length),n;var i=Gg(n.length);return i.unshift(183+i.length),i.concat(n)}function xw(t){return(0,ma.hexlify)(Kg(t))}wo.encode=xw;function zg(t,e,r,n){for(var i=[];r<e+1+n;){var a=Zg(t,r);i.push(a.result),r+=a.consumed,r>e+1+n&&Gn.throwError("child data too short",vi.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function Zg(t,e){if(t.length===0&&Gn.throwError("data too short",vi.Logger.errors.BUFFER_OVERRUN,{}),t[e]>=248){var r=t[e]-247;e+1+r>t.length&&Gn.throwError("data short segment too short",vi.Logger.errors.BUFFER_OVERRUN,{});var n=Xg(t,e+1,r);return e+1+r+n>t.length&&Gn.throwError("data long segment too short",vi.Logger.errors.BUFFER_OVERRUN,{}),zg(t,e,e+1+r,r+n)}else if(t[e]>=192){var i=t[e]-192;return e+1+i>t.length&&Gn.throwError("data array too short",vi.Logger.errors.BUFFER_OVERRUN,{}),zg(t,e,e+1,i)}else if(t[e]>=184){var r=t[e]-183;e+1+r>t.length&&Gn.throwError("data array too short",vi.Logger.errors.BUFFER_OVERRUN,{});var a=Xg(t,e+1,r);e+1+r+a>t.length&&Gn.throwError("data array too short",vi.Logger.errors.BUFFER_OVERRUN,{});var l=(0,ma.hexlify)(t.slice(e+1+r,e+1+r+a));return{consumed:1+r+a,result:l}}else if(t[e]>=128){var b=t[e]-128;e+1+b>t.length&&Gn.throwError("data too short",vi.Logger.errors.BUFFER_OVERRUN,{});var l=(0,ma.hexlify)(t.slice(e+1,e+1+b));return{consumed:1+b,result:l}}return{consumed:1,result:(0,ma.hexlify)(t[e])}}function yw(t){var e=(0,ma.arrayify)(t),r=Zg(e,0);return r.consumed!==e.length&&Gn.throwArgumentError("invalid rlp data","data",t),r.result}wo.decode=yw});var Vg=V(P0=>{"use strict";var SL=A(S());Object.defineProperty(P0,"__esModule",{value:!0});P0.version=void 0;P0.version="address/5.8.0"});var ya=V(Yr=>{"use strict";var TL=A(S());Object.defineProperty(Yr,"__esModule",{value:!0});Yr.getCreate2Address=Yr.getContractAddress=Yr.getIcapAddress=Yr.isAddress=Yr.getAddress=void 0;var mi=at(),Wl=ba(),Yl=Nn(),ww=Ql(),Aw=Pt(),Sw=Vg(),Ji=new Aw.Logger(Sw.version);function jg(t){(0,mi.isHexString)(t,20)||Ji.throwArgumentError("invalid address","address",t),t=t.toLowerCase();for(var e=t.substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=e[n].charCodeAt(0);for(var i=(0,mi.arrayify)((0,Yl.keccak256)(r)),n=0;n<40;n+=2)i[n>>1]>>4>=8&&(e[n]=e[n].toUpperCase()),(i[n>>1]&15)>=8&&(e[n+1]=e[n+1].toUpperCase());return"0x"+e.join("")}var Mw=9007199254740991;function Tw(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}var $l={};for(xn=0;xn<10;xn++)$l[String(xn)]=String(xn);var xn;for(xn=0;xn<26;xn++)$l[String.fromCharCode(65+xn)]=String(10+xn);var xn,Qg=Math.floor(Tw(Mw));function Wg(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";for(var e=t.split("").map(function(i){return $l[i]}).join("");e.length>=Qg;){var r=e.substring(0,Qg);e=parseInt(r,10)%97+e.substring(r.length)}for(var n=String(98-parseInt(e,10)%97);n.length<2;)n="0"+n;return n}function xa(t){var e=null;if(typeof t!="string"&&Ji.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=jg(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Ji.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==Wg(t)&&Ji.throwArgumentError("bad icap checksum","address",t),e=(0,Wl._base36To16)(t.substring(4));e.length<40;)e="0"+e;e=jg("0x"+e)}else Ji.throwArgumentError("invalid address","address",t);return e}Yr.getAddress=xa;function Ew(t){try{return xa(t),!0}catch{}return!1}Yr.isAddress=Ew;function _w(t){for(var e=(0,Wl._base16To36)(xa(t).substring(2)).toUpperCase();e.length<30;)e="0"+e;return"XE"+Wg("XE00"+e)+e}Yr.getIcapAddress=_w;function Bw(t){var e=null;try{e=xa(t.from)}catch{Ji.throwArgumentError("missing from address","transaction",t)}var r=(0,mi.stripZeros)((0,mi.arrayify)(Wl.BigNumber.from(t.nonce).toHexString()));return xa((0,mi.hexDataSlice)((0,Yl.keccak256)((0,ww.encode)([e,r])),12))}Yr.getContractAddress=Bw;function Cw(t,e,r){return(0,mi.hexDataLength)(e)!==32&&Ji.throwArgumentError("salt must be 32 bytes","salt",e),(0,mi.hexDataLength)(r)!==32&&Ji.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),xa((0,mi.hexDataSlice)((0,Yl.keccak256)((0,mi.concat)(["0xff",xa(t),e,r])),12))}Yr.getCreate2Address=Cw});var Yg=V(L0=>{"use strict";var _L=A(S());Object.defineProperty(L0,"__esModule",{value:!0});L0.version=void 0;L0.version="properties/5.8.0"});var $r=V(Lt=>{"use strict";var CL=A(S()),Pw=Lt&&Lt.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},Lw=Lt&&Lt.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.Description=Lt.deepCopy=Lt.shallowCopy=Lt.checkProperties=Lt.resolveProperties=Lt.getStatic=Lt.defineReadOnly=void 0;var Rw=Pt(),Fw=Yg(),R0=new Rw.Logger(Fw.version);function $g(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}Lt.defineReadOnly=$g;function Dw(t,e){for(var r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}Lt.getStatic=Dw;function Iw(t){return Pw(this,void 0,void 0,function(){var e,r;return Lw(this,function(n){switch(n.label){case 0:return e=Object.keys(t).map(function(i){var a=t[i];return Promise.resolve(a).then(function(l){return{key:i,value:l}})}),[4,Promise.all(e)];case 1:return r=n.sent(),[2,r.reduce(function(i,a){return i[a.key]=a.value,i},{})]}})})}Lt.resolveProperties=Iw;function Ow(t,e){(!t||typeof t!="object")&&R0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(function(r){e[r]||R0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}Lt.checkProperties=Ow;function kw(t){var e={};for(var r in t)e[r]=t[r];return e}Lt.shallowCopy=kw;var Nw={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function ev(t){if(t==null||Nw[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;for(var e=Object.keys(t),r=0;r<e.length;r++){var n=null;try{n=t[e[r]]}catch{continue}if(!ev(n))return!1}return!0}return R0.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function Jw(t){if(ev(t))return t;if(Array.isArray(t))return Object.freeze(t.map(function(i){return F0(i)}));if(typeof t=="object"){var e={};for(var r in t){var n=t[r];n!==void 0&&$g(e,r,F0(n))}return e}return R0.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function F0(t){return Jw(t)}Lt.deepCopy=F0;var Uw=function(){function t(e){for(var r in e)this[r]=F0(e[r])}return t}();Lt.Description=Uw});var cv=V(Ui=>{"use strict";var LL=A(S()),Hw=Ui&&Ui.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},qw=Ui&&Ui.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.TypedDataEncoder=void 0;var iv=ya(),Aa=ba(),ir=at(),Ao=Nn(),wa=$r(),Gw=Pt(),Xw=Xl(),dt=new Gw.Logger(Xw.version),av=Gl(),ov=new Uint8Array(32);ov.fill(0);var zw=Aa.BigNumber.from(-1),sv=Aa.BigNumber.from(0),fv=Aa.BigNumber.from(1),Kw=Aa.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Zw(t){var e=(0,ir.arrayify)(t),r=e.length%32;return r?(0,ir.hexConcat)([e,ov.slice(r)]):(0,ir.hexlify)(e)}var Vw=(0,ir.hexZeroPad)(fv.toHexString(),32),jw=(0,ir.hexZeroPad)(sv.toHexString(),32),tv={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},ed=["name","version","chainId","verifyingContract","salt"];function rv(t){return function(e){return typeof e!="string"&&dt.throwArgumentError("invalid domain value for "+JSON.stringify(t),"domain."+t,e),e}}var Qw={name:rv("name"),version:rv("version"),chainId:function(t){try{return Aa.BigNumber.from(t).toString()}catch{}return dt.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return(0,iv.getAddress)(t).toLowerCase()}catch{}return dt.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{var e=(0,ir.arrayify)(t);if(e.length!==32)throw new Error("bad length");return(0,ir.hexlify)(e)}catch{}return dt.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function td(t){{var e=t.match(/^(u?)int(\d*)$/);if(e){var r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&dt.throwArgumentError("invalid numeric width","type",t);var i=Kw.mask(r?n-1:n),a=r?i.add(fv).mul(zw):sv;return function(b){var y=Aa.BigNumber.from(b);return(y.lt(a)||y.gt(i))&&dt.throwArgumentError("value out-of-bounds for "+t,"value",b),(0,ir.hexZeroPad)(y.toTwos(256).toHexString(),32)}}}{var e=t.match(/^bytes(\d+)$/);if(e){var l=parseInt(e[1]);return(l===0||l>32||e[1]!==String(l))&&dt.throwArgumentError("invalid bytes width","type",t),function(y){var x=(0,ir.arrayify)(y);return x.length!==l&&dt.throwArgumentError("invalid length for "+t,"value",y),Zw(y)}}}switch(t){case"address":return function(b){return(0,ir.hexZeroPad)((0,iv.getAddress)(b),32)};case"bool":return function(b){return b?Vw:jw};case"bytes":return function(b){return(0,Ao.keccak256)(b)};case"string":return function(b){return(0,av.id)(b)}}return null}function nv(t,e){return t+"("+e.map(function(r){var n=r.name,i=r.type;return i+" "+n}).join(",")+")"}var Ww=function(){function t(e){(0,wa.defineReadOnly)(this,"types",Object.freeze((0,wa.deepCopy)(e))),(0,wa.defineReadOnly)(this,"_encoderCache",{}),(0,wa.defineReadOnly)(this,"_types",{});var r={},n={},i={};Object.keys(e).forEach(function(C){r[C]={},n[C]=[],i[C]={}});var a=function(C){var D={};e[C].forEach(function(F){D[F.name]&&dt.throwArgumentError("duplicate variable name "+JSON.stringify(F.name)+" in "+JSON.stringify(C),"types",e),D[F.name]=!0;var P=F.type.match(/^([^\x5b]*)(\x5b|$)/)[1];P===C&&dt.throwArgumentError("circular type reference to "+JSON.stringify(P),"types",e);var z=td(P);z||(n[P]||dt.throwArgumentError("unknown type "+JSON.stringify(P),"types",e),n[P].push(C),r[C][P]=!0)})};for(var l in e)a(l);var b=Object.keys(n).filter(function(C){return n[C].length===0});b.length===0?dt.throwArgumentError("missing primary type","types",e):b.length>1&&dt.throwArgumentError("ambiguous primary types or unused types: "+b.map(function(C){return JSON.stringify(C)}).join(", "),"types",e),(0,wa.defineReadOnly)(this,"primaryType",b[0]);function y(C,D){D[C]&&dt.throwArgumentError("circular type reference to "+JSON.stringify(C),"types",e),D[C]=!0,Object.keys(r[C]).forEach(function(F){n[F]&&(y(F,D),Object.keys(D).forEach(function(P){i[P][F]=!0}))}),delete D[C]}y(this.primaryType,{});for(var x in i){var _=Object.keys(i[x]);_.sort(),this._types[x]=nv(x,e[x])+_.map(function(C){return nv(C,e[C])}).join("")}}return t.prototype.getEncoder=function(e){var r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r},t.prototype._getEncoder=function(e){var r=this;{var n=td(e);if(n)return n}var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var a=i[1],l=this.getEncoder(a),b=parseInt(i[3]);return function(_){b>=0&&_.length!==b&&dt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",_);var C=_.map(l);return r._types[a]&&(C=C.map(Ao.keccak256)),(0,Ao.keccak256)((0,ir.hexConcat)(C))}}var y=this.types[e];if(y){var x=(0,av.id)(this._types[e]);return function(_){var C=y.map(function(D){var F=D.name,P=D.type,z=r.getEncoder(P)(_[F]);return r._types[P]?(0,Ao.keccak256)(z):z});return C.unshift(x),(0,ir.hexConcat)(C)}}return dt.throwArgumentError("unknown type: "+e,"type",e)},t.prototype.encodeType=function(e){var r=this._types[e];return r||dt.throwArgumentError("unknown type: "+JSON.stringify(e),"name",e),r},t.prototype.encodeData=function(e,r){return this.getEncoder(e)(r)},t.prototype.hashStruct=function(e,r){return(0,Ao.keccak256)(this.encodeData(e,r))},t.prototype.encode=function(e){return this.encodeData(this.primaryType,e)},t.prototype.hash=function(e){return this.hashStruct(this.primaryType,e)},t.prototype._visit=function(e,r,n){var i=this;{var a=td(e);if(a)return n(e,r)}var l=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(l){var b=l[1],y=parseInt(l[3]);return y>=0&&r.length!==y&&dt.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(function(_){return i._visit(b,_,n)})}var x=this.types[e];return x?x.reduce(function(_,C){var D=C.name,F=C.type;return _[D]=i._visit(F,r[D],n),_},{}):dt.throwArgumentError("unknown type: "+e,"type",e)},t.prototype.visit=function(e,r){return this._visit(this.primaryType,e,r)},t.from=function(e){return new t(e)},t.getPrimaryType=function(e){return t.from(e).primaryType},t.hashStruct=function(e,r,n){return t.from(r).hashStruct(e,n)},t.hashDomain=function(e){var r=[];for(var n in e){var i=tv[n];i||dt.throwArgumentError("invalid typed-data domain key: "+JSON.stringify(n),"domain",e),r.push({name:n,type:i})}return r.sort(function(a,l){return ed.indexOf(a.name)-ed.indexOf(l.name)}),t.hashStruct("EIP712Domain",{EIP712Domain:r},e)},t.encode=function(e,r,n){return(0,ir.hexConcat)(["0x1901",t.hashDomain(e),t.from(r).hash(n)])},t.hash=function(e,r,n){return(0,Ao.keccak256)(t.encode(e,r,n))},t.resolveNames=function(e,r,n,i){return Hw(this,void 0,void 0,function(){var a,l,b,y,x,_,C,D;return qw(this,function(F){switch(F.label){case 0:e=(0,wa.shallowCopy)(e),a={},e.verifyingContract&&!(0,ir.isHexString)(e.verifyingContract,20)&&(a[e.verifyingContract]="0x"),l=t.from(r),l.visit(n,function(P,z){return P==="address"&&!(0,ir.isHexString)(z,20)&&(a[z]="0x"),z}),b=[];for(y in a)b.push(y);x=0,F.label=1;case 1:return x<b.length?(_=b[x],C=a,D=_,[4,i(_)]):[3,4];case 2:C[D]=F.sent(),F.label=3;case 3:return x++,[3,1];case 4:return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=l.visit(n,function(P,z){return P==="address"&&a[z]?a[z]:z}),[2,{domain:e,value:n}]}})})},t.getPayload=function(e,r,n){t.hashDomain(e);var i={},a=[];ed.forEach(function(y){var x=e[y];x!=null&&(i[y]=Qw[y](x),a.push({name:y,type:tv[y]}))});var l=t.from(r),b=(0,wa.shallowCopy)(r);return b.EIP712Domain?dt.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):b.EIP712Domain=a,l.encode(n),{types:b,domain:i,primaryType:l.primaryType,message:l.visit(n,function(y,x){if(y.match(/^bytes(\d*)/))return(0,ir.hexlify)((0,ir.arrayify)(x));if(y.match(/^u?int/))return Aa.BigNumber.from(x).toString();switch(y){case"address":return x.toLowerCase();case"bool":return!!x;case"string":return typeof x!="string"&&dt.throwArgumentError("invalid string","value",x),x}return dt.throwArgumentError("unsupported type","type",y)})}},t}();Ui.TypedDataEncoder=Ww});var Cs=V(Ht=>{"use strict";var FL=A(S());Object.defineProperty(Ht,"__esModule",{value:!0});Ht._TypedDataEncoder=Ht.hashMessage=Ht.messagePrefix=Ht.ensNormalize=Ht.isValidName=Ht.namehash=Ht.dnsEncode=Ht.id=void 0;var Yw=Gl();Object.defineProperty(Ht,"id",{enumerable:!0,get:function(){return Yw.id}});var rd=Vl();Object.defineProperty(Ht,"dnsEncode",{enumerable:!0,get:function(){return rd.dnsEncode}});Object.defineProperty(Ht,"isValidName",{enumerable:!0,get:function(){return rd.isValidName}});Object.defineProperty(Ht,"namehash",{enumerable:!0,get:function(){return rd.namehash}});var uv=Hg();Object.defineProperty(Ht,"hashMessage",{enumerable:!0,get:function(){return uv.hashMessage}});Object.defineProperty(Ht,"messagePrefix",{enumerable:!0,get:function(){return uv.messagePrefix}});var $w=Vl();Object.defineProperty(Ht,"ensNormalize",{enumerable:!0,get:function(){return $w.ensNormalize}});var e7=cv();Object.defineProperty(Ht,"_TypedDataEncoder",{enumerable:!0,get:function(){return e7.TypedDataEncoder}})});var lv=V((DL,t7)=>{t7.exports={name:"elliptic",version:"6.6.1",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}});var Xn=V((dv,nd)=>{var IL=A(S());(function(t,e){"use strict";function r(T,s){if(!T)throw new Error(s||"Assertion failed")}function n(T,s){T.super_=s;var u=function(){};u.prototype=s.prototype,T.prototype=new u,T.prototype.constructor=T}function i(T,s,u){if(i.isBN(T))return T;this.negative=0,this.words=null,this.length=0,this.red=null,T!==null&&((s==="le"||s==="be")&&(u=s,s=10),this._init(T||0,s||10,u||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=it("buffer").Buffer}catch{}i.isBN=function(s){return s instanceof i?!0:s!==null&&typeof s=="object"&&s.constructor.wordSize===i.wordSize&&Array.isArray(s.words)},i.max=function(s,u){return s.cmp(u)>0?s:u},i.min=function(s,u){return s.cmp(u)<0?s:u},i.prototype._init=function(s,u,d){if(typeof s=="number")return this._initNumber(s,u,d);if(typeof s=="object")return this._initArray(s,u,d);u==="hex"&&(u=16),r(u===(u|0)&&u>=2&&u<=36),s=s.toString().replace(/\s+/g,"");var f=0;s[0]==="-"&&(f++,this.negative=1),f<s.length&&(u===16?this._parseHex(s,f,d):(this._parseBase(s,u,f),d==="le"&&this._initArray(this.toArray(),u,d)))},i.prototype._initNumber=function(s,u,d){s<0&&(this.negative=1,s=-s),s<67108864?(this.words=[s&67108863],this.length=1):s<4503599627370496?(this.words=[s&67108863,s/67108864&67108863],this.length=2):(r(s<9007199254740992),this.words=[s&67108863,s/67108864&67108863,1],this.length=3),d==="le"&&this._initArray(this.toArray(),u,d)},i.prototype._initArray=function(s,u,d){if(r(typeof s.length=="number"),s.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(s.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var c,v,m=0;if(d==="be")for(f=s.length-1,c=0;f>=0;f-=3)v=s[f]|s[f-1]<<8|s[f-2]<<16,this.words[c]|=v<<m&67108863,this.words[c+1]=v>>>26-m&67108863,m+=24,m>=26&&(m-=26,c++);else if(d==="le")for(f=0,c=0;f<s.length;f+=3)v=s[f]|s[f+1]<<8|s[f+2]<<16,this.words[c]|=v<<m&67108863,this.words[c+1]=v>>>26-m&67108863,m+=24,m>=26&&(m-=26,c++);return this.strip()};function l(T,s){var u=T.charCodeAt(s);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function b(T,s,u){var d=l(T,u);return u-1>=s&&(d|=l(T,u-1)<<4),d}i.prototype._parseHex=function(s,u,d){this.length=Math.ceil((s.length-u)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var c=0,v=0,m;if(d==="be")for(f=s.length-1;f>=u;f-=2)m=b(s,u,f)<<c,this.words[v]|=m&67108863,c>=18?(c-=18,v+=1,this.words[v]|=m>>>26):c+=8;else{var h=s.length-u;for(f=h%2===0?u+1:u;f<s.length;f+=2)m=b(s,u,f)<<c,this.words[v]|=m&67108863,c>=18?(c-=18,v+=1,this.words[v]|=m>>>26):c+=8}this.strip()};function y(T,s,u,d){for(var f=0,c=Math.min(T.length,u),v=s;v<c;v++){var m=T.charCodeAt(v)-48;f*=d,m>=49?f+=m-49+10:m>=17?f+=m-17+10:f+=m}return f}i.prototype._parseBase=function(s,u,d){this.words=[0],this.length=1;for(var f=0,c=1;c<=67108863;c*=u)f++;f--,c=c/u|0;for(var v=s.length-d,m=v%f,h=Math.min(v,v-m)+d,o=0,p=d;p<h;p+=f)o=y(s,p,p+f,u),this.imuln(c),this.words[0]+o<67108864?this.words[0]+=o:this._iaddn(o);if(m!==0){var E=1;for(o=y(s,p,s.length,u),p=0;p<m;p++)E*=u;this.imuln(E),this.words[0]+o<67108864?this.words[0]+=o:this._iaddn(o)}this.strip()},i.prototype.copy=function(s){s.words=new Array(this.length);for(var u=0;u<this.length;u++)s.words[u]=this.words[u];s.length=this.length,s.negative=this.negative,s.red=this.red},i.prototype.clone=function(){var s=new i(null);return this.copy(s),s},i.prototype._expand=function(s){for(;this.length<s;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],_=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(s,u){s=s||10,u=u|0||1;var d;if(s===16||s==="hex"){d="";for(var f=0,c=0,v=0;v<this.length;v++){var m=this.words[v],h=((m<<f|c)&16777215).toString(16);c=m>>>24-f&16777215,f+=2,f>=26&&(f-=26,v--),c!==0||v!==this.length-1?d=x[6-h.length]+h+d:d=h+d}for(c!==0&&(d=c.toString(16)+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(s===(s|0)&&s>=2&&s<=36){var o=_[s],p=C[s];d="";var E=this.clone();for(E.negative=0;!E.isZero();){var g=E.modn(p).toString(s);E=E.idivn(p),E.isZero()?d=g+d:d=x[o-g.length]+g+d}for(this.isZero()&&(d="0"+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var s=this.words[0];return this.length===2?s+=this.words[1]*67108864:this.length===3&&this.words[2]===1?s+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-s:s},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(s,u){return r(typeof a<"u"),this.toArrayLike(a,s,u)},i.prototype.toArray=function(s,u){return this.toArrayLike(Array,s,u)},i.prototype.toArrayLike=function(s,u,d){var f=this.byteLength(),c=d||Math.max(1,f);r(f<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0"),this.strip();var v=u==="le",m=new s(c),h,o,p=this.clone();if(v){for(o=0;!p.isZero();o++)h=p.andln(255),p.iushrn(8),m[o]=h;for(;o<c;o++)m[o]=0}else{for(o=0;o<c-f;o++)m[o]=0;for(o=0;!p.isZero();o++)h=p.andln(255),p.iushrn(8),m[c-o-1]=h}return m},Math.clz32?i.prototype._countBits=function(s){return 32-Math.clz32(s)}:i.prototype._countBits=function(s){var u=s,d=0;return u>=4096&&(d+=13,u>>>=13),u>=64&&(d+=7,u>>>=7),u>=8&&(d+=4,u>>>=4),u>=2&&(d+=2,u>>>=2),d+u},i.prototype._zeroBits=function(s){if(s===0)return 26;var u=s,d=0;return u&8191||(d+=13,u>>>=13),u&127||(d+=7,u>>>=7),u&15||(d+=4,u>>>=4),u&3||(d+=2,u>>>=2),u&1||d++,d},i.prototype.bitLength=function(){var s=this.words[this.length-1],u=this._countBits(s);return(this.length-1)*26+u};function D(T){for(var s=new Array(T.bitLength()),u=0;u<s.length;u++){var d=u/26|0,f=u%26;s[u]=(T.words[d]&1<<f)>>>f}return s}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var s=0,u=0;u<this.length;u++){var d=this._zeroBits(this.words[u]);if(s+=d,d!==26)break}return s},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(s){return this.negative!==0?this.abs().inotn(s).iaddn(1):this.clone()},i.prototype.fromTwos=function(s){return this.testn(s-1)?this.notn(s).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(s){for(;this.length<s.length;)this.words[this.length++]=0;for(var u=0;u<s.length;u++)this.words[u]=this.words[u]|s.words[u];return this.strip()},i.prototype.ior=function(s){return r((this.negative|s.negative)===0),this.iuor(s)},i.prototype.or=function(s){return this.length>s.length?this.clone().ior(s):s.clone().ior(this)},i.prototype.uor=function(s){return this.length>s.length?this.clone().iuor(s):s.clone().iuor(this)},i.prototype.iuand=function(s){var u;this.length>s.length?u=s:u=this;for(var d=0;d<u.length;d++)this.words[d]=this.words[d]&s.words[d];return this.length=u.length,this.strip()},i.prototype.iand=function(s){return r((this.negative|s.negative)===0),this.iuand(s)},i.prototype.and=function(s){return this.length>s.length?this.clone().iand(s):s.clone().iand(this)},i.prototype.uand=function(s){return this.length>s.length?this.clone().iuand(s):s.clone().iuand(this)},i.prototype.iuxor=function(s){var u,d;this.length>s.length?(u=this,d=s):(u=s,d=this);for(var f=0;f<d.length;f++)this.words[f]=u.words[f]^d.words[f];if(this!==u)for(;f<u.length;f++)this.words[f]=u.words[f];return this.length=u.length,this.strip()},i.prototype.ixor=function(s){return r((this.negative|s.negative)===0),this.iuxor(s)},i.prototype.xor=function(s){return this.length>s.length?this.clone().ixor(s):s.clone().ixor(this)},i.prototype.uxor=function(s){return this.length>s.length?this.clone().iuxor(s):s.clone().iuxor(this)},i.prototype.inotn=function(s){r(typeof s=="number"&&s>=0);var u=Math.ceil(s/26)|0,d=s%26;this._expand(u),d>0&&u--;for(var f=0;f<u;f++)this.words[f]=~this.words[f]&67108863;return d>0&&(this.words[f]=~this.words[f]&67108863>>26-d),this.strip()},i.prototype.notn=function(s){return this.clone().inotn(s)},i.prototype.setn=function(s,u){r(typeof s=="number"&&s>=0);var d=s/26|0,f=s%26;return this._expand(d+1),u?this.words[d]=this.words[d]|1<<f:this.words[d]=this.words[d]&~(1<<f),this.strip()},i.prototype.iadd=function(s){var u;if(this.negative!==0&&s.negative===0)return this.negative=0,u=this.isub(s),this.negative^=1,this._normSign();if(this.negative===0&&s.negative!==0)return s.negative=0,u=this.isub(s),s.negative=1,u._normSign();var d,f;this.length>s.length?(d=this,f=s):(d=s,f=this);for(var c=0,v=0;v<f.length;v++)u=(d.words[v]|0)+(f.words[v]|0)+c,this.words[v]=u&67108863,c=u>>>26;for(;c!==0&&v<d.length;v++)u=(d.words[v]|0)+c,this.words[v]=u&67108863,c=u>>>26;if(this.length=d.length,c!==0)this.words[this.length]=c,this.length++;else if(d!==this)for(;v<d.length;v++)this.words[v]=d.words[v];return this},i.prototype.add=function(s){var u;return s.negative!==0&&this.negative===0?(s.negative=0,u=this.sub(s),s.negative^=1,u):s.negative===0&&this.negative!==0?(this.negative=0,u=s.sub(this),this.negative=1,u):this.length>s.length?this.clone().iadd(s):s.clone().iadd(this)},i.prototype.isub=function(s){if(s.negative!==0){s.negative=0;var u=this.iadd(s);return s.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(s),this.negative=1,this._normSign();var d=this.cmp(s);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,c;d>0?(f=this,c=s):(f=s,c=this);for(var v=0,m=0;m<c.length;m++)u=(f.words[m]|0)-(c.words[m]|0)+v,v=u>>26,this.words[m]=u&67108863;for(;v!==0&&m<f.length;m++)u=(f.words[m]|0)+v,v=u>>26,this.words[m]=u&67108863;if(v===0&&m<f.length&&f!==this)for(;m<f.length;m++)this.words[m]=f.words[m];return this.length=Math.max(this.length,m),f!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(s){return this.clone().isub(s)};function F(T,s,u){u.negative=s.negative^T.negative;var d=T.length+s.length|0;u.length=d,d=d-1|0;var f=T.words[0]|0,c=s.words[0]|0,v=f*c,m=v&67108863,h=v/67108864|0;u.words[0]=m;for(var o=1;o<d;o++){for(var p=h>>>26,E=h&67108863,g=Math.min(o,s.length-1),w=Math.max(0,o-T.length+1);w<=g;w++){var U=o-w|0;f=T.words[U]|0,c=s.words[w]|0,v=f*c+E,p+=v/67108864|0,E=v&67108863}u.words[o]=E|0,h=p|0}return h!==0?u.words[o]=h|0:u.length--,u.strip()}var P=function(s,u,d){var f=s.words,c=u.words,v=d.words,m=0,h,o,p,E=f[0]|0,g=E&8191,w=E>>>13,U=f[1]|0,M=U&8191,k=U>>>13,G=f[2]|0,Z=G&8191,B=G>>>13,R=f[3]|0,L=R&8191,I=R>>>13,q=f[4]|0,O=q&8191,J=q>>>13,K=f[5]|0,N=K&8191,H=K>>>13,Q=f[6]|0,j=Q&8191,re=Q>>>13,De=f[7]|0,se=De&8191,le=De>>>13,Ue=f[8]|0,oe=Ue&8191,fe=Ue>>>13,Xe=f[9]|0,ge=Xe&8191,ve=Xe>>>13,mt=c[0]|0,pe=mt&8191,be=mt>>>13,Ye=c[1]|0,de=Ye&8191,ue=Ye>>>13,Zt=c[2]|0,me=Zt&8191,xe=Zt>>>13,Vt=c[3]|0,ye=Vt&8191,we=Vt>>>13,jt=c[4]|0,Ae=jt&8191,Se=jt>>>13,Qt=c[5]|0,Me=Qt&8191,Te=Qt>>>13,Wt=c[6]|0,Ee=Wt&8191,_e=Wt>>>13,Yt=c[7]|0,Be=Yt&8191,Ce=Yt>>>13,$t=c[8]|0,Pe=$t&8191,Le=$t>>>13,er=c[9]|0,Re=er&8191,Fe=er>>>13;d.negative=s.negative^u.negative,d.length=19,h=Math.imul(g,pe),o=Math.imul(g,be),o=o+Math.imul(w,pe)|0,p=Math.imul(w,be);var It=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(It>>>26)|0,It&=67108863,h=Math.imul(M,pe),o=Math.imul(M,be),o=o+Math.imul(k,pe)|0,p=Math.imul(k,be),h=h+Math.imul(g,de)|0,o=o+Math.imul(g,ue)|0,o=o+Math.imul(w,de)|0,p=p+Math.imul(w,ue)|0;var ke=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,h=Math.imul(Z,pe),o=Math.imul(Z,be),o=o+Math.imul(B,pe)|0,p=Math.imul(B,be),h=h+Math.imul(M,de)|0,o=o+Math.imul(M,ue)|0,o=o+Math.imul(k,de)|0,p=p+Math.imul(k,ue)|0,h=h+Math.imul(g,me)|0,o=o+Math.imul(g,xe)|0,o=o+Math.imul(w,me)|0,p=p+Math.imul(w,xe)|0;var Ne=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,h=Math.imul(L,pe),o=Math.imul(L,be),o=o+Math.imul(I,pe)|0,p=Math.imul(I,be),h=h+Math.imul(Z,de)|0,o=o+Math.imul(Z,ue)|0,o=o+Math.imul(B,de)|0,p=p+Math.imul(B,ue)|0,h=h+Math.imul(M,me)|0,o=o+Math.imul(M,xe)|0,o=o+Math.imul(k,me)|0,p=p+Math.imul(k,xe)|0,h=h+Math.imul(g,ye)|0,o=o+Math.imul(g,we)|0,o=o+Math.imul(w,ye)|0,p=p+Math.imul(w,we)|0;var Tt=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,h=Math.imul(O,pe),o=Math.imul(O,be),o=o+Math.imul(J,pe)|0,p=Math.imul(J,be),h=h+Math.imul(L,de)|0,o=o+Math.imul(L,ue)|0,o=o+Math.imul(I,de)|0,p=p+Math.imul(I,ue)|0,h=h+Math.imul(Z,me)|0,o=o+Math.imul(Z,xe)|0,o=o+Math.imul(B,me)|0,p=p+Math.imul(B,xe)|0,h=h+Math.imul(M,ye)|0,o=o+Math.imul(M,we)|0,o=o+Math.imul(k,ye)|0,p=p+Math.imul(k,we)|0,h=h+Math.imul(g,Ae)|0,o=o+Math.imul(g,Se)|0,o=o+Math.imul(w,Ae)|0,p=p+Math.imul(w,Se)|0;var Et=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,h=Math.imul(N,pe),o=Math.imul(N,be),o=o+Math.imul(H,pe)|0,p=Math.imul(H,be),h=h+Math.imul(O,de)|0,o=o+Math.imul(O,ue)|0,o=o+Math.imul(J,de)|0,p=p+Math.imul(J,ue)|0,h=h+Math.imul(L,me)|0,o=o+Math.imul(L,xe)|0,o=o+Math.imul(I,me)|0,p=p+Math.imul(I,xe)|0,h=h+Math.imul(Z,ye)|0,o=o+Math.imul(Z,we)|0,o=o+Math.imul(B,ye)|0,p=p+Math.imul(B,we)|0,h=h+Math.imul(M,Ae)|0,o=o+Math.imul(M,Se)|0,o=o+Math.imul(k,Ae)|0,p=p+Math.imul(k,Se)|0,h=h+Math.imul(g,Me)|0,o=o+Math.imul(g,Te)|0,o=o+Math.imul(w,Me)|0,p=p+Math.imul(w,Te)|0;var _t=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,h=Math.imul(j,pe),o=Math.imul(j,be),o=o+Math.imul(re,pe)|0,p=Math.imul(re,be),h=h+Math.imul(N,de)|0,o=o+Math.imul(N,ue)|0,o=o+Math.imul(H,de)|0,p=p+Math.imul(H,ue)|0,h=h+Math.imul(O,me)|0,o=o+Math.imul(O,xe)|0,o=o+Math.imul(J,me)|0,p=p+Math.imul(J,xe)|0,h=h+Math.imul(L,ye)|0,o=o+Math.imul(L,we)|0,o=o+Math.imul(I,ye)|0,p=p+Math.imul(I,we)|0,h=h+Math.imul(Z,Ae)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(B,Ae)|0,p=p+Math.imul(B,Se)|0,h=h+Math.imul(M,Me)|0,o=o+Math.imul(M,Te)|0,o=o+Math.imul(k,Me)|0,p=p+Math.imul(k,Te)|0,h=h+Math.imul(g,Ee)|0,o=o+Math.imul(g,_e)|0,o=o+Math.imul(w,Ee)|0,p=p+Math.imul(w,_e)|0;var Bt=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,h=Math.imul(se,pe),o=Math.imul(se,be),o=o+Math.imul(le,pe)|0,p=Math.imul(le,be),h=h+Math.imul(j,de)|0,o=o+Math.imul(j,ue)|0,o=o+Math.imul(re,de)|0,p=p+Math.imul(re,ue)|0,h=h+Math.imul(N,me)|0,o=o+Math.imul(N,xe)|0,o=o+Math.imul(H,me)|0,p=p+Math.imul(H,xe)|0,h=h+Math.imul(O,ye)|0,o=o+Math.imul(O,we)|0,o=o+Math.imul(J,ye)|0,p=p+Math.imul(J,we)|0,h=h+Math.imul(L,Ae)|0,o=o+Math.imul(L,Se)|0,o=o+Math.imul(I,Ae)|0,p=p+Math.imul(I,Se)|0,h=h+Math.imul(Z,Me)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(B,Me)|0,p=p+Math.imul(B,Te)|0,h=h+Math.imul(M,Ee)|0,o=o+Math.imul(M,_e)|0,o=o+Math.imul(k,Ee)|0,p=p+Math.imul(k,_e)|0,h=h+Math.imul(g,Be)|0,o=o+Math.imul(g,Ce)|0,o=o+Math.imul(w,Be)|0,p=p+Math.imul(w,Ce)|0;var Ct=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,h=Math.imul(oe,pe),o=Math.imul(oe,be),o=o+Math.imul(fe,pe)|0,p=Math.imul(fe,be),h=h+Math.imul(se,de)|0,o=o+Math.imul(se,ue)|0,o=o+Math.imul(le,de)|0,p=p+Math.imul(le,ue)|0,h=h+Math.imul(j,me)|0,o=o+Math.imul(j,xe)|0,o=o+Math.imul(re,me)|0,p=p+Math.imul(re,xe)|0,h=h+Math.imul(N,ye)|0,o=o+Math.imul(N,we)|0,o=o+Math.imul(H,ye)|0,p=p+Math.imul(H,we)|0,h=h+Math.imul(O,Ae)|0,o=o+Math.imul(O,Se)|0,o=o+Math.imul(J,Ae)|0,p=p+Math.imul(J,Se)|0,h=h+Math.imul(L,Me)|0,o=o+Math.imul(L,Te)|0,o=o+Math.imul(I,Me)|0,p=p+Math.imul(I,Te)|0,h=h+Math.imul(Z,Ee)|0,o=o+Math.imul(Z,_e)|0,o=o+Math.imul(B,Ee)|0,p=p+Math.imul(B,_e)|0,h=h+Math.imul(M,Be)|0,o=o+Math.imul(M,Ce)|0,o=o+Math.imul(k,Be)|0,p=p+Math.imul(k,Ce)|0,h=h+Math.imul(g,Pe)|0,o=o+Math.imul(g,Le)|0,o=o+Math.imul(w,Pe)|0,p=p+Math.imul(w,Le)|0;var gr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(gr>>>26)|0,gr&=67108863,h=Math.imul(ge,pe),o=Math.imul(ge,be),o=o+Math.imul(ve,pe)|0,p=Math.imul(ve,be),h=h+Math.imul(oe,de)|0,o=o+Math.imul(oe,ue)|0,o=o+Math.imul(fe,de)|0,p=p+Math.imul(fe,ue)|0,h=h+Math.imul(se,me)|0,o=o+Math.imul(se,xe)|0,o=o+Math.imul(le,me)|0,p=p+Math.imul(le,xe)|0,h=h+Math.imul(j,ye)|0,o=o+Math.imul(j,we)|0,o=o+Math.imul(re,ye)|0,p=p+Math.imul(re,we)|0,h=h+Math.imul(N,Ae)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul(H,Ae)|0,p=p+Math.imul(H,Se)|0,h=h+Math.imul(O,Me)|0,o=o+Math.imul(O,Te)|0,o=o+Math.imul(J,Me)|0,p=p+Math.imul(J,Te)|0,h=h+Math.imul(L,Ee)|0,o=o+Math.imul(L,_e)|0,o=o+Math.imul(I,Ee)|0,p=p+Math.imul(I,_e)|0,h=h+Math.imul(Z,Be)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(B,Be)|0,p=p+Math.imul(B,Ce)|0,h=h+Math.imul(M,Pe)|0,o=o+Math.imul(M,Le)|0,o=o+Math.imul(k,Pe)|0,p=p+Math.imul(k,Le)|0,h=h+Math.imul(g,Re)|0,o=o+Math.imul(g,Fe)|0,o=o+Math.imul(w,Re)|0,p=p+Math.imul(w,Fe)|0;var vr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(vr>>>26)|0,vr&=67108863,h=Math.imul(ge,de),o=Math.imul(ge,ue),o=o+Math.imul(ve,de)|0,p=Math.imul(ve,ue),h=h+Math.imul(oe,me)|0,o=o+Math.imul(oe,xe)|0,o=o+Math.imul(fe,me)|0,p=p+Math.imul(fe,xe)|0,h=h+Math.imul(se,ye)|0,o=o+Math.imul(se,we)|0,o=o+Math.imul(le,ye)|0,p=p+Math.imul(le,we)|0,h=h+Math.imul(j,Ae)|0,o=o+Math.imul(j,Se)|0,o=o+Math.imul(re,Ae)|0,p=p+Math.imul(re,Se)|0,h=h+Math.imul(N,Me)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul(H,Me)|0,p=p+Math.imul(H,Te)|0,h=h+Math.imul(O,Ee)|0,o=o+Math.imul(O,_e)|0,o=o+Math.imul(J,Ee)|0,p=p+Math.imul(J,_e)|0,h=h+Math.imul(L,Be)|0,o=o+Math.imul(L,Ce)|0,o=o+Math.imul(I,Be)|0,p=p+Math.imul(I,Ce)|0,h=h+Math.imul(Z,Pe)|0,o=o+Math.imul(Z,Le)|0,o=o+Math.imul(B,Pe)|0,p=p+Math.imul(B,Le)|0,h=h+Math.imul(M,Re)|0,o=o+Math.imul(M,Fe)|0,o=o+Math.imul(k,Re)|0,p=p+Math.imul(k,Fe)|0;var mr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(mr>>>26)|0,mr&=67108863,h=Math.imul(ge,me),o=Math.imul(ge,xe),o=o+Math.imul(ve,me)|0,p=Math.imul(ve,xe),h=h+Math.imul(oe,ye)|0,o=o+Math.imul(oe,we)|0,o=o+Math.imul(fe,ye)|0,p=p+Math.imul(fe,we)|0,h=h+Math.imul(se,Ae)|0,o=o+Math.imul(se,Se)|0,o=o+Math.imul(le,Ae)|0,p=p+Math.imul(le,Se)|0,h=h+Math.imul(j,Me)|0,o=o+Math.imul(j,Te)|0,o=o+Math.imul(re,Me)|0,p=p+Math.imul(re,Te)|0,h=h+Math.imul(N,Ee)|0,o=o+Math.imul(N,_e)|0,o=o+Math.imul(H,Ee)|0,p=p+Math.imul(H,_e)|0,h=h+Math.imul(O,Be)|0,o=o+Math.imul(O,Ce)|0,o=o+Math.imul(J,Be)|0,p=p+Math.imul(J,Ce)|0,h=h+Math.imul(L,Pe)|0,o=o+Math.imul(L,Le)|0,o=o+Math.imul(I,Pe)|0,p=p+Math.imul(I,Le)|0,h=h+Math.imul(Z,Re)|0,o=o+Math.imul(Z,Fe)|0,o=o+Math.imul(B,Re)|0,p=p+Math.imul(B,Fe)|0;var xr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(xr>>>26)|0,xr&=67108863,h=Math.imul(ge,ye),o=Math.imul(ge,we),o=o+Math.imul(ve,ye)|0,p=Math.imul(ve,we),h=h+Math.imul(oe,Ae)|0,o=o+Math.imul(oe,Se)|0,o=o+Math.imul(fe,Ae)|0,p=p+Math.imul(fe,Se)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(se,Te)|0,o=o+Math.imul(le,Me)|0,p=p+Math.imul(le,Te)|0,h=h+Math.imul(j,Ee)|0,o=o+Math.imul(j,_e)|0,o=o+Math.imul(re,Ee)|0,p=p+Math.imul(re,_e)|0,h=h+Math.imul(N,Be)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul(H,Be)|0,p=p+Math.imul(H,Ce)|0,h=h+Math.imul(O,Pe)|0,o=o+Math.imul(O,Le)|0,o=o+Math.imul(J,Pe)|0,p=p+Math.imul(J,Le)|0,h=h+Math.imul(L,Re)|0,o=o+Math.imul(L,Fe)|0,o=o+Math.imul(I,Re)|0,p=p+Math.imul(I,Fe)|0;var yr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(yr>>>26)|0,yr&=67108863,h=Math.imul(ge,Ae),o=Math.imul(ge,Se),o=o+Math.imul(ve,Ae)|0,p=Math.imul(ve,Se),h=h+Math.imul(oe,Me)|0,o=o+Math.imul(oe,Te)|0,o=o+Math.imul(fe,Me)|0,p=p+Math.imul(fe,Te)|0,h=h+Math.imul(se,Ee)|0,o=o+Math.imul(se,_e)|0,o=o+Math.imul(le,Ee)|0,p=p+Math.imul(le,_e)|0,h=h+Math.imul(j,Be)|0,o=o+Math.imul(j,Ce)|0,o=o+Math.imul(re,Be)|0,p=p+Math.imul(re,Ce)|0,h=h+Math.imul(N,Pe)|0,o=o+Math.imul(N,Le)|0,o=o+Math.imul(H,Pe)|0,p=p+Math.imul(H,Le)|0,h=h+Math.imul(O,Re)|0,o=o+Math.imul(O,Fe)|0,o=o+Math.imul(J,Re)|0,p=p+Math.imul(J,Fe)|0;var wr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(wr>>>26)|0,wr&=67108863,h=Math.imul(ge,Me),o=Math.imul(ge,Te),o=o+Math.imul(ve,Me)|0,p=Math.imul(ve,Te),h=h+Math.imul(oe,Ee)|0,o=o+Math.imul(oe,_e)|0,o=o+Math.imul(fe,Ee)|0,p=p+Math.imul(fe,_e)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(se,Ce)|0,o=o+Math.imul(le,Be)|0,p=p+Math.imul(le,Ce)|0,h=h+Math.imul(j,Pe)|0,o=o+Math.imul(j,Le)|0,o=o+Math.imul(re,Pe)|0,p=p+Math.imul(re,Le)|0,h=h+Math.imul(N,Re)|0,o=o+Math.imul(N,Fe)|0,o=o+Math.imul(H,Re)|0,p=p+Math.imul(H,Fe)|0;var Ar=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,h=Math.imul(ge,Ee),o=Math.imul(ge,_e),o=o+Math.imul(ve,Ee)|0,p=Math.imul(ve,_e),h=h+Math.imul(oe,Be)|0,o=o+Math.imul(oe,Ce)|0,o=o+Math.imul(fe,Be)|0,p=p+Math.imul(fe,Ce)|0,h=h+Math.imul(se,Pe)|0,o=o+Math.imul(se,Le)|0,o=o+Math.imul(le,Pe)|0,p=p+Math.imul(le,Le)|0,h=h+Math.imul(j,Re)|0,o=o+Math.imul(j,Fe)|0,o=o+Math.imul(re,Re)|0,p=p+Math.imul(re,Fe)|0;var Sr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,h=Math.imul(ge,Be),o=Math.imul(ge,Ce),o=o+Math.imul(ve,Be)|0,p=Math.imul(ve,Ce),h=h+Math.imul(oe,Pe)|0,o=o+Math.imul(oe,Le)|0,o=o+Math.imul(fe,Pe)|0,p=p+Math.imul(fe,Le)|0,h=h+Math.imul(se,Re)|0,o=o+Math.imul(se,Fe)|0,o=o+Math.imul(le,Re)|0,p=p+Math.imul(le,Fe)|0;var Mr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,h=Math.imul(ge,Pe),o=Math.imul(ge,Le),o=o+Math.imul(ve,Pe)|0,p=Math.imul(ve,Le),h=h+Math.imul(oe,Re)|0,o=o+Math.imul(oe,Fe)|0,o=o+Math.imul(fe,Re)|0,p=p+Math.imul(fe,Fe)|0;var pn=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(pn>>>26)|0,pn&=67108863,h=Math.imul(ge,Re),o=Math.imul(ge,Fe),o=o+Math.imul(ve,Re)|0,p=Math.imul(ve,Fe);var bn=(m+h|0)+((o&8191)<<13)|0;return m=(p+(o>>>13)|0)+(bn>>>26)|0,bn&=67108863,v[0]=It,v[1]=ke,v[2]=Ne,v[3]=Tt,v[4]=Et,v[5]=_t,v[6]=Bt,v[7]=Ct,v[8]=gr,v[9]=vr,v[10]=mr,v[11]=xr,v[12]=yr,v[13]=wr,v[14]=Ar,v[15]=Sr,v[16]=Mr,v[17]=pn,v[18]=bn,m!==0&&(v[19]=m,d.length++),d};Math.imul||(P=F);function z(T,s,u){u.negative=s.negative^T.negative,u.length=T.length+s.length;for(var d=0,f=0,c=0;c<u.length-1;c++){var v=f;f=0;for(var m=d&67108863,h=Math.min(c,s.length-1),o=Math.max(0,c-T.length+1);o<=h;o++){var p=c-o,E=T.words[p]|0,g=s.words[o]|0,w=E*g,U=w&67108863;v=v+(w/67108864|0)|0,U=U+m|0,m=U&67108863,v=v+(U>>>26)|0,f+=v>>>26,v&=67108863}u.words[c]=m,d=v,v=f}return d!==0?u.words[c]=d:u.length--,u.strip()}function W(T,s,u){var d=new X;return d.mulp(T,s,u)}i.prototype.mulTo=function(s,u){var d,f=this.length+s.length;return this.length===10&&s.length===10?d=P(this,s,u):f<63?d=F(this,s,u):f<1024?d=z(this,s,u):d=W(this,s,u),d};function X(T,s){this.x=T,this.y=s}X.prototype.makeRBT=function(s){for(var u=new Array(s),d=i.prototype._countBits(s)-1,f=0;f<s;f++)u[f]=this.revBin(f,d,s);return u},X.prototype.revBin=function(s,u,d){if(s===0||s===d-1)return s;for(var f=0,c=0;c<u;c++)f|=(s&1)<<u-c-1,s>>=1;return f},X.prototype.permute=function(s,u,d,f,c,v){for(var m=0;m<v;m++)f[m]=u[s[m]],c[m]=d[s[m]]},X.prototype.transform=function(s,u,d,f,c,v){this.permute(v,s,u,d,f,c);for(var m=1;m<c;m<<=1)for(var h=m<<1,o=Math.cos(2*Math.PI/h),p=Math.sin(2*Math.PI/h),E=0;E<c;E+=h)for(var g=o,w=p,U=0;U<m;U++){var M=d[E+U],k=f[E+U],G=d[E+U+m],Z=f[E+U+m],B=g*G-w*Z;Z=g*Z+w*G,G=B,d[E+U]=M+G,f[E+U]=k+Z,d[E+U+m]=M-G,f[E+U+m]=k-Z,U!==h&&(B=o*g-p*w,w=o*w+p*g,g=B)}},X.prototype.guessLen13b=function(s,u){var d=Math.max(u,s)|1,f=d&1,c=0;for(d=d/2|0;d;d=d>>>1)c++;return 1<<c+1+f},X.prototype.conjugate=function(s,u,d){if(!(d<=1))for(var f=0;f<d/2;f++){var c=s[f];s[f]=s[d-f-1],s[d-f-1]=c,c=u[f],u[f]=-u[d-f-1],u[d-f-1]=-c}},X.prototype.normalize13b=function(s,u){for(var d=0,f=0;f<u/2;f++){var c=Math.round(s[2*f+1]/u)*8192+Math.round(s[2*f]/u)+d;s[f]=c&67108863,c<67108864?d=0:d=c/67108864|0}return s},X.prototype.convert13b=function(s,u,d,f){for(var c=0,v=0;v<u;v++)c=c+(s[v]|0),d[2*v]=c&8191,c=c>>>13,d[2*v+1]=c&8191,c=c>>>13;for(v=2*u;v<f;++v)d[v]=0;r(c===0),r((c&-8192)===0)},X.prototype.stub=function(s){for(var u=new Array(s),d=0;d<s;d++)u[d]=0;return u},X.prototype.mulp=function(s,u,d){var f=2*this.guessLen13b(s.length,u.length),c=this.makeRBT(f),v=this.stub(f),m=new Array(f),h=new Array(f),o=new Array(f),p=new Array(f),E=new Array(f),g=new Array(f),w=d.words;w.length=f,this.convert13b(s.words,s.length,m,f),this.convert13b(u.words,u.length,p,f),this.transform(m,v,h,o,f,c),this.transform(p,v,E,g,f,c);for(var U=0;U<f;U++){var M=h[U]*E[U]-o[U]*g[U];o[U]=h[U]*g[U]+o[U]*E[U],h[U]=M}return this.conjugate(h,o,f),this.transform(h,o,w,v,f,c),this.conjugate(w,v,f),this.normalize13b(w,f),d.negative=s.negative^u.negative,d.length=s.length+u.length,d.strip()},i.prototype.mul=function(s){var u=new i(null);return u.words=new Array(this.length+s.length),this.mulTo(s,u)},i.prototype.mulf=function(s){var u=new i(null);return u.words=new Array(this.length+s.length),W(this,s,u)},i.prototype.imul=function(s){return this.clone().mulTo(s,this)},i.prototype.imuln=function(s){r(typeof s=="number"),r(s<67108864);for(var u=0,d=0;d<this.length;d++){var f=(this.words[d]|0)*s,c=(f&67108863)+(u&67108863);u>>=26,u+=f/67108864|0,u+=c>>>26,this.words[d]=c&67108863}return u!==0&&(this.words[d]=u,this.length++),this.length=s===0?1:this.length,this},i.prototype.muln=function(s){return this.clone().imuln(s)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(s){var u=D(s);if(u.length===0)return new i(1);for(var d=this,f=0;f<u.length&&u[f]===0;f++,d=d.sqr());if(++f<u.length)for(var c=d.sqr();f<u.length;f++,c=c.sqr())u[f]!==0&&(d=d.mul(c));return d},i.prototype.iushln=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26,f=67108863>>>26-u<<26-u,c;if(u!==0){var v=0;for(c=0;c<this.length;c++){var m=this.words[c]&f,h=(this.words[c]|0)-m<<u;this.words[c]=h|v,v=m>>>26-u}v&&(this.words[c]=v,this.length++)}if(d!==0){for(c=this.length-1;c>=0;c--)this.words[c+d]=this.words[c];for(c=0;c<d;c++)this.words[c]=0;this.length+=d}return this.strip()},i.prototype.ishln=function(s){return r(this.negative===0),this.iushln(s)},i.prototype.iushrn=function(s,u,d){r(typeof s=="number"&&s>=0);var f;u?f=(u-u%26)/26:f=0;var c=s%26,v=Math.min((s-c)/26,this.length),m=67108863^67108863>>>c<<c,h=d;if(f-=v,f=Math.max(0,f),h){for(var o=0;o<v;o++)h.words[o]=this.words[o];h.length=v}if(v!==0)if(this.length>v)for(this.length-=v,o=0;o<this.length;o++)this.words[o]=this.words[o+v];else this.words[0]=0,this.length=1;var p=0;for(o=this.length-1;o>=0&&(p!==0||o>=f);o--){var E=this.words[o]|0;this.words[o]=p<<26-c|E>>>c,p=E&m}return h&&p!==0&&(h.words[h.length++]=p),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(s,u,d){return r(this.negative===0),this.iushrn(s,u,d)},i.prototype.shln=function(s){return this.clone().ishln(s)},i.prototype.ushln=function(s){return this.clone().iushln(s)},i.prototype.shrn=function(s){return this.clone().ishrn(s)},i.prototype.ushrn=function(s){return this.clone().iushrn(s)},i.prototype.testn=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26,f=1<<u;if(this.length<=d)return!1;var c=this.words[d];return!!(c&f)},i.prototype.imaskn=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(u!==0&&d++,this.length=Math.min(d,this.length),u!==0){var f=67108863^67108863>>>u<<u;this.words[this.length-1]&=f}return this.strip()},i.prototype.maskn=function(s){return this.clone().imaskn(s)},i.prototype.iaddn=function(s){return r(typeof s=="number"),r(s<67108864),s<0?this.isubn(-s):this.negative!==0?this.length===1&&(this.words[0]|0)<s?(this.words[0]=s-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(s),this.negative=1,this):this._iaddn(s)},i.prototype._iaddn=function(s){this.words[0]+=s;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},i.prototype.isubn=function(s){if(r(typeof s=="number"),r(s<67108864),s<0)return this.iaddn(-s);if(this.negative!==0)return this.negative=0,this.iaddn(s),this.negative=1,this;if(this.words[0]-=s,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this.strip()},i.prototype.addn=function(s){return this.clone().iaddn(s)},i.prototype.subn=function(s){return this.clone().isubn(s)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(s,u,d){var f=s.length+d,c;this._expand(f);var v,m=0;for(c=0;c<s.length;c++){v=(this.words[c+d]|0)+m;var h=(s.words[c]|0)*u;v-=h&67108863,m=(v>>26)-(h/67108864|0),this.words[c+d]=v&67108863}for(;c<this.length-d;c++)v=(this.words[c+d]|0)+m,m=v>>26,this.words[c+d]=v&67108863;if(m===0)return this.strip();for(r(m===-1),m=0,c=0;c<this.length;c++)v=-(this.words[c]|0)+m,m=v>>26,this.words[c]=v&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(s,u){var d=this.length-s.length,f=this.clone(),c=s,v=c.words[c.length-1]|0,m=this._countBits(v);d=26-m,d!==0&&(c=c.ushln(d),f.iushln(d),v=c.words[c.length-1]|0);var h=f.length-c.length,o;if(u!=="mod"){o=new i(null),o.length=h+1,o.words=new Array(o.length);for(var p=0;p<o.length;p++)o.words[p]=0}var E=f.clone()._ishlnsubmul(c,1,h);E.negative===0&&(f=E,o&&(o.words[h]=1));for(var g=h-1;g>=0;g--){var w=(f.words[c.length+g]|0)*67108864+(f.words[c.length+g-1]|0);for(w=Math.min(w/v|0,67108863),f._ishlnsubmul(c,w,g);f.negative!==0;)w--,f.negative=0,f._ishlnsubmul(c,1,g),f.isZero()||(f.negative^=1);o&&(o.words[g]=w)}return o&&o.strip(),f.strip(),u!=="div"&&d!==0&&f.iushrn(d),{div:o||null,mod:f}},i.prototype.divmod=function(s,u,d){if(r(!s.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var f,c,v;return this.negative!==0&&s.negative===0?(v=this.neg().divmod(s,u),u!=="mod"&&(f=v.div.neg()),u!=="div"&&(c=v.mod.neg(),d&&c.negative!==0&&c.iadd(s)),{div:f,mod:c}):this.negative===0&&s.negative!==0?(v=this.divmod(s.neg(),u),u!=="mod"&&(f=v.div.neg()),{div:f,mod:v.mod}):this.negative&s.negative?(v=this.neg().divmod(s.neg(),u),u!=="div"&&(c=v.mod.neg(),d&&c.negative!==0&&c.isub(s)),{div:v.div,mod:c}):s.length>this.length||this.cmp(s)<0?{div:new i(0),mod:this}:s.length===1?u==="div"?{div:this.divn(s.words[0]),mod:null}:u==="mod"?{div:null,mod:new i(this.modn(s.words[0]))}:{div:this.divn(s.words[0]),mod:new i(this.modn(s.words[0]))}:this._wordDiv(s,u)},i.prototype.div=function(s){return this.divmod(s,"div",!1).div},i.prototype.mod=function(s){return this.divmod(s,"mod",!1).mod},i.prototype.umod=function(s){return this.divmod(s,"mod",!0).mod},i.prototype.divRound=function(s){var u=this.divmod(s);if(u.mod.isZero())return u.div;var d=u.div.negative!==0?u.mod.isub(s):u.mod,f=s.ushrn(1),c=s.andln(1),v=d.cmp(f);return v<0||c===1&&v===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},i.prototype.modn=function(s){r(s<=67108863);for(var u=(1<<26)%s,d=0,f=this.length-1;f>=0;f--)d=(u*d+(this.words[f]|0))%s;return d},i.prototype.idivn=function(s){r(s<=67108863);for(var u=0,d=this.length-1;d>=0;d--){var f=(this.words[d]|0)+u*67108864;this.words[d]=f/s|0,u=f%s}return this.strip()},i.prototype.divn=function(s){return this.clone().idivn(s)},i.prototype.egcd=function(s){r(s.negative===0),r(!s.isZero());var u=this,d=s.clone();u.negative!==0?u=u.umod(s):u=u.clone();for(var f=new i(1),c=new i(0),v=new i(0),m=new i(1),h=0;u.isEven()&&d.isEven();)u.iushrn(1),d.iushrn(1),++h;for(var o=d.clone(),p=u.clone();!u.isZero();){for(var E=0,g=1;!(u.words[0]&g)&&E<26;++E,g<<=1);if(E>0)for(u.iushrn(E);E-- >0;)(f.isOdd()||c.isOdd())&&(f.iadd(o),c.isub(p)),f.iushrn(1),c.iushrn(1);for(var w=0,U=1;!(d.words[0]&U)&&w<26;++w,U<<=1);if(w>0)for(d.iushrn(w);w-- >0;)(v.isOdd()||m.isOdd())&&(v.iadd(o),m.isub(p)),v.iushrn(1),m.iushrn(1);u.cmp(d)>=0?(u.isub(d),f.isub(v),c.isub(m)):(d.isub(u),v.isub(f),m.isub(c))}return{a:v,b:m,gcd:d.iushln(h)}},i.prototype._invmp=function(s){r(s.negative===0),r(!s.isZero());var u=this,d=s.clone();u.negative!==0?u=u.umod(s):u=u.clone();for(var f=new i(1),c=new i(0),v=d.clone();u.cmpn(1)>0&&d.cmpn(1)>0;){for(var m=0,h=1;!(u.words[0]&h)&&m<26;++m,h<<=1);if(m>0)for(u.iushrn(m);m-- >0;)f.isOdd()&&f.iadd(v),f.iushrn(1);for(var o=0,p=1;!(d.words[0]&p)&&o<26;++o,p<<=1);if(o>0)for(d.iushrn(o);o-- >0;)c.isOdd()&&c.iadd(v),c.iushrn(1);u.cmp(d)>=0?(u.isub(d),f.isub(c)):(d.isub(u),c.isub(f))}var E;return u.cmpn(1)===0?E=f:E=c,E.cmpn(0)<0&&E.iadd(s),E},i.prototype.gcd=function(s){if(this.isZero())return s.abs();if(s.isZero())return this.abs();var u=this.clone(),d=s.clone();u.negative=0,d.negative=0;for(var f=0;u.isEven()&&d.isEven();f++)u.iushrn(1),d.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;d.isEven();)d.iushrn(1);var c=u.cmp(d);if(c<0){var v=u;u=d,d=v}else if(c===0||d.cmpn(1)===0)break;u.isub(d)}while(!0);return d.iushln(f)},i.prototype.invm=function(s){return this.egcd(s).a.umod(s)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(s){return this.words[0]&s},i.prototype.bincn=function(s){r(typeof s=="number");var u=s%26,d=(s-u)/26,f=1<<u;if(this.length<=d)return this._expand(d+1),this.words[d]|=f,this;for(var c=f,v=d;c!==0&&v<this.length;v++){var m=this.words[v]|0;m+=c,c=m>>>26,m&=67108863,this.words[v]=m}return c!==0&&(this.words[v]=c,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(s){var u=s<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var d;if(this.length>1)d=1;else{u&&(s=-s),r(s<=67108863,"Number is too big");var f=this.words[0]|0;d=f===s?0:f<s?-1:1}return this.negative!==0?-d|0:d},i.prototype.cmp=function(s){if(this.negative!==0&&s.negative===0)return-1;if(this.negative===0&&s.negative!==0)return 1;var u=this.ucmp(s);return this.negative!==0?-u|0:u},i.prototype.ucmp=function(s){if(this.length>s.length)return 1;if(this.length<s.length)return-1;for(var u=0,d=this.length-1;d>=0;d--){var f=this.words[d]|0,c=s.words[d]|0;if(f!==c){f<c?u=-1:f>c&&(u=1);break}}return u},i.prototype.gtn=function(s){return this.cmpn(s)===1},i.prototype.gt=function(s){return this.cmp(s)===1},i.prototype.gten=function(s){return this.cmpn(s)>=0},i.prototype.gte=function(s){return this.cmp(s)>=0},i.prototype.ltn=function(s){return this.cmpn(s)===-1},i.prototype.lt=function(s){return this.cmp(s)===-1},i.prototype.lten=function(s){return this.cmpn(s)<=0},i.prototype.lte=function(s){return this.cmp(s)<=0},i.prototype.eqn=function(s){return this.cmpn(s)===0},i.prototype.eq=function(s){return this.cmp(s)===0},i.red=function(s){return new te(s)},i.prototype.toRed=function(s){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),s.convertTo(this)._forceRed(s)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(s){return this.red=s,this},i.prototype.forceRed=function(s){return r(!this.red,"Already a number in reduction context"),this._forceRed(s)},i.prototype.redAdd=function(s){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,s)},i.prototype.redIAdd=function(s){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,s)},i.prototype.redSub=function(s){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,s)},i.prototype.redISub=function(s){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,s)},i.prototype.redShl=function(s){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,s)},i.prototype.redMul=function(s){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.mul(this,s)},i.prototype.redIMul=function(s){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.imul(this,s)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(s){return r(this.red&&!s.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,s)};var ne={k256:null,p224:null,p192:null,p25519:null};function $(T,s){this.name=T,this.p=new i(s,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var s=new i(null);return s.words=new Array(Math.ceil(this.n/13)),s},$.prototype.ireduce=function(s){var u=s,d;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),d=u.bitLength();while(d>this.n);var f=d<this.n?-1:u.ucmp(this.p);return f===0?(u.words[0]=0,u.length=1):f>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},$.prototype.split=function(s,u){s.iushrn(this.n,0,u)},$.prototype.imulK=function(s){return s.imul(this.k)};function ae(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(ae,$),ae.prototype.split=function(s,u){for(var d=4194303,f=Math.min(s.length,9),c=0;c<f;c++)u.words[c]=s.words[c];if(u.length=f,s.length<=9){s.words[0]=0,s.length=1;return}var v=s.words[9];for(u.words[u.length++]=v&d,c=10;c<s.length;c++){var m=s.words[c]|0;s.words[c-10]=(m&d)<<4|v>>>22,v=m}v>>>=22,s.words[c-10]=v,v===0&&s.length>10?s.length-=10:s.length-=9},ae.prototype.imulK=function(s){s.words[s.length]=0,s.words[s.length+1]=0,s.length+=2;for(var u=0,d=0;d<s.length;d++){var f=s.words[d]|0;u+=f*977,s.words[d]=u&67108863,u=f*64+(u/67108864|0)}return s.words[s.length-1]===0&&(s.length--,s.words[s.length-1]===0&&s.length--),s};function ie(){$.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(ie,$);function ee(){$.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(ee,$);function ce(){$.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(ce,$),ce.prototype.imulK=function(s){for(var u=0,d=0;d<s.length;d++){var f=(s.words[d]|0)*19+u,c=f&67108863;f>>>=26,s.words[d]=c,u=f}return u!==0&&(s.words[s.length++]=u),s},i._prime=function(s){if(ne[s])return ne[s];var u;if(s==="k256")u=new ae;else if(s==="p224")u=new ie;else if(s==="p192")u=new ee;else if(s==="p25519")u=new ce;else throw new Error("Unknown prime "+s);return ne[s]=u,u};function te(T){if(typeof T=="string"){var s=i._prime(T);this.m=s.p,this.prime=s}else r(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}te.prototype._verify1=function(s){r(s.negative===0,"red works only with positives"),r(s.red,"red works only with red numbers")},te.prototype._verify2=function(s,u){r((s.negative|u.negative)===0,"red works only with positives"),r(s.red&&s.red===u.red,"red works only with red numbers")},te.prototype.imod=function(s){return this.prime?this.prime.ireduce(s)._forceRed(this):s.umod(this.m)._forceRed(this)},te.prototype.neg=function(s){return s.isZero()?s.clone():this.m.sub(s)._forceRed(this)},te.prototype.add=function(s,u){this._verify2(s,u);var d=s.add(u);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},te.prototype.iadd=function(s,u){this._verify2(s,u);var d=s.iadd(u);return d.cmp(this.m)>=0&&d.isub(this.m),d},te.prototype.sub=function(s,u){this._verify2(s,u);var d=s.sub(u);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},te.prototype.isub=function(s,u){this._verify2(s,u);var d=s.isub(u);return d.cmpn(0)<0&&d.iadd(this.m),d},te.prototype.shl=function(s,u){return this._verify1(s),this.imod(s.ushln(u))},te.prototype.imul=function(s,u){return this._verify2(s,u),this.imod(s.imul(u))},te.prototype.mul=function(s,u){return this._verify2(s,u),this.imod(s.mul(u))},te.prototype.isqr=function(s){return this.imul(s,s.clone())},te.prototype.sqr=function(s){return this.mul(s,s)},te.prototype.sqrt=function(s){if(s.isZero())return s.clone();var u=this.m.andln(3);if(r(u%2===1),u===3){var d=this.m.add(new i(1)).iushrn(2);return this.pow(s,d)}for(var f=this.m.subn(1),c=0;!f.isZero()&&f.andln(1)===0;)c++,f.iushrn(1);r(!f.isZero());var v=new i(1).toRed(this),m=v.redNeg(),h=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,h).cmp(m)!==0;)o.redIAdd(m);for(var p=this.pow(o,f),E=this.pow(s,f.addn(1).iushrn(1)),g=this.pow(s,f),w=c;g.cmp(v)!==0;){for(var U=g,M=0;U.cmp(v)!==0;M++)U=U.redSqr();r(M<w);var k=this.pow(p,new i(1).iushln(w-M-1));E=E.redMul(k),p=k.redSqr(),g=g.redMul(p),w=M}return E},te.prototype.invm=function(s){var u=s._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},te.prototype.pow=function(s,u){if(u.isZero())return new i(1).toRed(this);if(u.cmpn(1)===0)return s.clone();var d=4,f=new Array(1<<d);f[0]=new i(1).toRed(this),f[1]=s;for(var c=2;c<f.length;c++)f[c]=this.mul(f[c-1],s);var v=f[0],m=0,h=0,o=u.bitLength()%26;for(o===0&&(o=26),c=u.length-1;c>=0;c--){for(var p=u.words[c],E=o-1;E>=0;E--){var g=p>>E&1;if(v!==f[0]&&(v=this.sqr(v)),g===0&&m===0){h=0;continue}m<<=1,m|=g,h++,!(h!==d&&(c!==0||E!==0))&&(v=this.mul(v,f[m]),h=0,m=0)}o=26}return v},te.prototype.convertTo=function(s){var u=s.umod(this.m);return u===s?u.clone():u},te.prototype.convertFrom=function(s){var u=s.clone();return u.red=null,u},i.mont=function(s){return new Y(s)};function Y(T){te.call(this,T),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(Y,te),Y.prototype.convertTo=function(s){return this.imod(s.ushln(this.shift))},Y.prototype.convertFrom=function(s){var u=this.imod(s.mul(this.rinv));return u.red=null,u},Y.prototype.imul=function(s,u){if(s.isZero()||u.isZero())return s.words[0]=0,s.length=1,s;var d=s.imul(u),f=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=d.isub(f).iushrn(this.shift),v=c;return c.cmp(this.m)>=0?v=c.isub(this.m):c.cmpn(0)<0&&(v=c.iadd(this.m)),v._forceRed(this)},Y.prototype.mul=function(s,u){if(s.isZero()||u.isZero())return new i(0)._forceRed(this);var d=s.mul(u),f=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=d.isub(f).iushrn(this.shift),v=c;return c.cmp(this.m)>=0?v=c.isub(this.m):c.cmpn(0)<0&&(v=c.iadd(this.m)),v._forceRed(this)},Y.prototype.invm=function(s){var u=this.imod(s._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(typeof nd>"u"||nd,dv)});var id=V(bv=>{"use strict";var kL=A(S()),D0=bv;function r7(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t!="string"){for(var n=0;n<t.length;n++)r[n]=t[n]|0;return r}if(e==="hex"){t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t);for(var n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),a=i>>8,l=i&255;a?r.push(a,l):r.push(l)}return r}D0.toArray=r7;function hv(t){return t.length===1?"0"+t:t}D0.zero2=hv;function pv(t){for(var e="",r=0;r<t.length;r++)e+=hv(t[r].toString(16));return e}D0.toHex=pv;D0.encode=function(e,r){return r==="hex"?pv(e):e}});var kr=V(gv=>{"use strict";var JL=A(S()),yn=gv,n7=Xn(),i7=di(),I0=id();yn.assert=i7;yn.toArray=I0.toArray;yn.zero2=I0.zero2;yn.toHex=I0.toHex;yn.encode=I0.encode;function a7(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1),i;for(i=0;i<n.length;i+=1)n[i]=0;var a=1<<e+1,l=t.clone();for(i=0;i<n.length;i++){var b,y=l.andln(a-1);l.isOdd()?(y>(a>>1)-1?b=(a>>1)-y:b=y,l.isubn(b)):b=0,n[i]=b,l.iushrn(1)}return n}yn.getNAF=a7;function o7(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0,a;t.cmpn(-n)>0||e.cmpn(-i)>0;){var l=t.andln(3)+n&3,b=e.andln(3)+i&3;l===3&&(l=-1),b===3&&(b=-1);var y;l&1?(a=t.andln(7)+n&7,(a===3||a===5)&&b===2?y=-l:y=l):y=0,r[0].push(y);var x;b&1?(a=e.andln(7)+i&7,(a===3||a===5)&&l===2?x=-b:x=b):x=0,r[1].push(x),2*n===y+1&&(n=1-n),2*i===x+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r}yn.getJSF=o7;function s7(t,e,r){var n="_"+e;t.prototype[e]=function(){return this[n]!==void 0?this[n]:this[n]=r.call(this)}}yn.cachedProperty=s7;function f7(t){return typeof t=="string"?yn.toArray(t,"hex"):t}yn.parseBytes=f7;function c7(t){return new n7(t,"hex","le")}yn.intFromLE=c7});var fd=V((UL,sd)=>{var HL=A(S()),ad;sd.exports=function(e){return ad||(ad=new Hi(null)),ad.generate(e)};function Hi(t){this.rand=t}sd.exports.Rand=Hi;Hi.prototype.generate=function(e){return this._rand(e)};Hi.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),n=0;n<r.length;n++)r[n]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Hi.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Hi.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Hi.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(od=it("crypto"),typeof od.randomBytes!="function")throw new Error("Not supported");Hi.prototype._rand=function(e){return od.randomBytes(e)}}catch{}var od});var Ls=V((qL,vv)=>{"use strict";var GL=A(S()),Sa=Xn(),Ps=kr(),O0=Ps.getNAF,u7=Ps.getJSF,k0=Ps.assert;function qi(t,e){this.type=t,this.p=new Sa(e.p,16),this.red=e.prime?Sa.red(e.prime):Sa.mont(this.p),this.zero=new Sa(0).toRed(this.red),this.one=new Sa(1).toRed(this.red),this.two=new Sa(2).toRed(this.red),this.n=e.n&&new Sa(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}vv.exports=qi;qi.prototype.point=function(){throw new Error("Not implemented")};qi.prototype.validate=function(){throw new Error("Not implemented")};qi.prototype._fixedNafMul=function(e,r){k0(e.precomputed);var n=e._getDoubles(),i=O0(r,1,this._bitLength),a=(1<<n.step+1)-(n.step%2===0?2:1);a/=3;var l=[],b,y;for(b=0;b<i.length;b+=n.step){y=0;for(var x=b+n.step-1;x>=b;x--)y=(y<<1)+i[x];l.push(y)}for(var _=this.jpoint(null,null,null),C=this.jpoint(null,null,null),D=a;D>0;D--){for(b=0;b<l.length;b++)y=l[b],y===D?C=C.mixedAdd(n.points[b]):y===-D&&(C=C.mixedAdd(n.points[b].neg()));_=_.add(C)}return _.toP()};qi.prototype._wnafMul=function(e,r){var n=4,i=e._getNAFPoints(n);n=i.wnd;for(var a=i.points,l=O0(r,n,this._bitLength),b=this.jpoint(null,null,null),y=l.length-1;y>=0;y--){for(var x=0;y>=0&&l[y]===0;y--)x++;if(y>=0&&x++,b=b.dblp(x),y<0)break;var _=l[y];k0(_!==0),e.type==="affine"?_>0?b=b.mixedAdd(a[_-1>>1]):b=b.mixedAdd(a[-_-1>>1].neg()):_>0?b=b.add(a[_-1>>1]):b=b.add(a[-_-1>>1].neg())}return e.type==="affine"?b.toP():b};qi.prototype._wnafMulAdd=function(e,r,n,i,a){var l=this._wnafT1,b=this._wnafT2,y=this._wnafT3,x=0,_,C,D;for(_=0;_<i;_++){D=r[_];var F=D._getNAFPoints(e);l[_]=F.wnd,b[_]=F.points}for(_=i-1;_>=1;_-=2){var P=_-1,z=_;if(l[P]!==1||l[z]!==1){y[P]=O0(n[P],l[P],this._bitLength),y[z]=O0(n[z],l[z],this._bitLength),x=Math.max(y[P].length,x),x=Math.max(y[z].length,x);continue}var W=[r[P],null,null,r[z]];r[P].y.cmp(r[z].y)===0?(W[1]=r[P].add(r[z]),W[2]=r[P].toJ().mixedAdd(r[z].neg())):r[P].y.cmp(r[z].y.redNeg())===0?(W[1]=r[P].toJ().mixedAdd(r[z]),W[2]=r[P].add(r[z].neg())):(W[1]=r[P].toJ().mixedAdd(r[z]),W[2]=r[P].toJ().mixedAdd(r[z].neg()));var X=[-3,-1,-5,-7,0,7,5,1,3],ne=u7(n[P],n[z]);for(x=Math.max(ne[0].length,x),y[P]=new Array(x),y[z]=new Array(x),C=0;C<x;C++){var $=ne[0][C]|0,ae=ne[1][C]|0;y[P][C]=X[($+1)*3+(ae+1)],y[z][C]=0,b[P]=W}}var ie=this.jpoint(null,null,null),ee=this._wnafT4;for(_=x;_>=0;_--){for(var ce=0;_>=0;){var te=!0;for(C=0;C<i;C++)ee[C]=y[C][_]|0,ee[C]!==0&&(te=!1);if(!te)break;ce++,_--}if(_>=0&&ce++,ie=ie.dblp(ce),_<0)break;for(C=0;C<i;C++){var Y=ee[C];Y!==0&&(Y>0?D=b[C][Y-1>>1]:Y<0&&(D=b[C][-Y-1>>1].neg()),D.type==="affine"?ie=ie.mixedAdd(D):ie=ie.add(D))}}for(_=0;_<i;_++)b[_]=null;return a?ie:ie.toP()};function en(t,e){this.curve=t,this.type=e,this.precomputed=null}qi.BasePoint=en;en.prototype.eq=function(){throw new Error("Not implemented")};en.prototype.validate=function(){return this.curve.validate(this)};qi.prototype.decodePoint=function(e,r){e=Ps.toArray(e,r);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*n){e[0]===6?k0(e[e.length-1]%2===0):e[0]===7&&k0(e[e.length-1]%2===1);var i=this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));return i}else if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw new Error("Unknown point format")};en.prototype.encodeCompressed=function(e){return this.encode(e,!0)};en.prototype._encode=function(e){var r=this.curve.p.byteLength(),n=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",r))};en.prototype.encode=function(e,r){return Ps.encode(this._encode(r),e)};en.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this};en.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1};en.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,a=0;a<r;a+=e){for(var l=0;l<e;l++)i=i.dbl();n.push(i)}return{step:e,points:n}};en.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],n=(1<<e)-1,i=n===1?null:this.dbl(),a=1;a<n;a++)r[a]=r[a-1].add(i);return{wnd:e,points:r}};en.prototype._getBeta=function(){return null};en.prototype.dblp=function(e){for(var r=this,n=0;n<e;n++)r=r.dbl();return r}});var xv=V((XL,mv)=>{"use strict";var zL=A(S()),l7=kr(),bt=Xn(),cd=nr(),So=Ls(),d7=l7.assert;function tn(t){So.call(this,"short",t),this.a=new bt(t.a,16).toRed(this.red),this.b=new bt(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}cd(tn,So);mv.exports=tn;tn.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,n;if(e.beta)r=new bt(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);r=i[0].cmp(i[1])<0?i[0]:i[1],r=r.toRed(this.red)}if(e.lambda)n=new bt(e.lambda,16);else{var a=this._getEndoRoots(this.n);this.g.mul(a[0]).x.cmp(this.g.x.redMul(r))===0?n=a[0]:(n=a[1],d7(this.g.mul(n).x.cmp(this.g.x.redMul(r))===0))}var l;return e.basis?l=e.basis.map(function(b){return{a:new bt(b.a,16),b:new bt(b.b,16)}}):l=this._getEndoBasis(n),{beta:r,lambda:n,basis:l}}};tn.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:bt.mont(e),n=new bt(2).toRed(r).redInvm(),i=n.redNeg(),a=new bt(3).toRed(r).redNeg().redSqrt().redMul(n),l=i.redAdd(a).fromRed(),b=i.redSub(a).fromRed();return[l,b]};tn.prototype._getEndoBasis=function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,i=this.n.clone(),a=new bt(1),l=new bt(0),b=new bt(0),y=new bt(1),x,_,C,D,F,P,z,W=0,X,ne;n.cmpn(0)!==0;){var $=i.div(n);X=i.sub($.mul(n)),ne=b.sub($.mul(a));var ae=y.sub($.mul(l));if(!C&&X.cmp(r)<0)x=z.neg(),_=a,C=X.neg(),D=ne;else if(C&&++W===2)break;z=X,i=n,n=X,b=a,a=ne,y=l,l=ae}F=X.neg(),P=ne;var ie=C.sqr().add(D.sqr()),ee=F.sqr().add(P.sqr());return ee.cmp(ie)>=0&&(F=x,P=_),C.negative&&(C=C.neg(),D=D.neg()),F.negative&&(F=F.neg(),P=P.neg()),[{a:C,b:D},{a:F,b:P}]};tn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],a=i.b.mul(e).divRound(this.n),l=n.b.neg().mul(e).divRound(this.n),b=a.mul(n.a),y=l.mul(i.a),x=a.mul(n.b),_=l.mul(i.b),C=e.sub(b).sub(y),D=x.add(_).neg();return{k1:C,k2:D}};tn.prototype.pointFromX=function(e,r){e=new bt(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=i.fromRed().isOdd();return(r&&!a||!r&&a)&&(i=i.redNeg()),this.point(e,i)};tn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),a=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};tn.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,a=this._endoWnafT2,l=0;l<e.length;l++){var b=this._endoSplit(r[l]),y=e[l],x=y._getBeta();b.k1.negative&&(b.k1.ineg(),y=y.neg(!0)),b.k2.negative&&(b.k2.ineg(),x=x.neg(!0)),i[l*2]=y,i[l*2+1]=x,a[l*2]=b.k1,a[l*2+1]=b.k2}for(var _=this._wnafMulAdd(1,i,a,l*2,n),C=0;C<l*2;C++)i[C]=null,a[C]=null;return _};function qt(t,e,r,n){So.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new bt(e,16),this.y=new bt(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}cd(qt,So.BasePoint);tn.prototype.point=function(e,r,n){return new qt(this,e,r,n)};tn.prototype.pointFromJSON=function(e,r){return qt.fromJSON(this,e,r)};qt.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,i=function(a){return n.point(a.x.redMul(n.endo.beta),a.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return r}};qt.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};qt.fromJSON=function(e,r,n){typeof r=="string"&&(r=JSON.parse(r));var i=e.point(r[0],r[1],n);if(!r[2])return i;function a(b){return e.point(b[0],b[1],n)}var l=r[2];return i.precomputed={beta:null,doubles:l.doubles&&{step:l.doubles.step,points:[i].concat(l.doubles.points.map(a))},naf:l.naf&&{wnd:l.naf.wnd,points:[i].concat(l.naf.points.map(a))}},i};qt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};qt.prototype.isInfinity=function(){return this.inf};qt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};qt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),l=a.redSqr().redISub(this.x.redAdd(this.x)),b=a.redMul(this.x.redSub(l)).redISub(this.y);return this.curve.point(l,b)};qt.prototype.getX=function(){return this.x.fromRed()};qt.prototype.getY=function(){return this.y.fromRed()};qt.prototype.mul=function(e){return e=new bt(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};qt.prototype.mulAdd=function(e,r,n){var i=[this,r],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,a):this.curve._wnafMulAdd(1,i,a,2)};qt.prototype.jmulAdd=function(e,r,n){var i=[this,r],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,a,!0):this.curve._wnafMulAdd(1,i,a,2,!0)};qt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};qt.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(a){return a.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};qt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function ar(t,e,r,n){So.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new bt(0)):(this.x=new bt(e,16),this.y=new bt(r,16),this.z=new bt(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}cd(ar,So.BasePoint);tn.prototype.jpoint=function(e,r,n){return new ar(this,e,r,n)};ar.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};ar.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};ar.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),a=e.x.redMul(n),l=this.y.redMul(r.redMul(e.z)),b=e.y.redMul(n.redMul(this.z)),y=i.redSub(a),x=l.redSub(b);if(y.cmpn(0)===0)return x.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var _=y.redSqr(),C=_.redMul(y),D=i.redMul(_),F=x.redSqr().redIAdd(C).redISub(D).redISub(D),P=x.redMul(D.redISub(F)).redISub(l.redMul(C)),z=this.z.redMul(e.z).redMul(y);return this.curve.jpoint(F,P,z)};ar.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),a=this.y,l=e.y.redMul(r).redMul(this.z),b=n.redSub(i),y=a.redSub(l);if(b.cmpn(0)===0)return y.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var x=b.redSqr(),_=x.redMul(b),C=n.redMul(x),D=y.redSqr().redIAdd(_).redISub(C).redISub(C),F=y.redMul(C.redISub(D)).redISub(a.redMul(_)),P=this.z.redMul(b);return this.curve.jpoint(D,F,P)};ar.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r<e;r++)n=n.dbl();return n}var i=this.curve.a,a=this.curve.tinv,l=this.x,b=this.y,y=this.z,x=y.redSqr().redSqr(),_=b.redAdd(b);for(r=0;r<e;r++){var C=l.redSqr(),D=_.redSqr(),F=D.redSqr(),P=C.redAdd(C).redIAdd(C).redIAdd(i.redMul(x)),z=l.redMul(D),W=P.redSqr().redISub(z.redAdd(z)),X=z.redISub(W),ne=P.redMul(X);ne=ne.redIAdd(ne).redISub(F);var $=_.redMul(y);r+1<e&&(x=x.redMul(F)),l=W,y=$,_=ne}return this.curve.jpoint(l,_.redMul(a),y)};ar.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};ar.prototype._zeroDbl=function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),a=this.y.redSqr(),l=a.redSqr(),b=this.x.redAdd(a).redSqr().redISub(i).redISub(l);b=b.redIAdd(b);var y=i.redAdd(i).redIAdd(i),x=y.redSqr().redISub(b).redISub(b),_=l.redIAdd(l);_=_.redIAdd(_),_=_.redIAdd(_),e=x,r=y.redMul(b.redISub(x)).redISub(_),n=this.y.redAdd(this.y)}else{var C=this.x.redSqr(),D=this.y.redSqr(),F=D.redSqr(),P=this.x.redAdd(D).redSqr().redISub(C).redISub(F);P=P.redIAdd(P);var z=C.redAdd(C).redIAdd(C),W=z.redSqr(),X=F.redIAdd(F);X=X.redIAdd(X),X=X.redIAdd(X),e=W.redISub(P).redISub(P),r=z.redMul(P.redISub(e)).redISub(X),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(e,r,n)};ar.prototype._threeDbl=function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),a=this.y.redSqr(),l=a.redSqr(),b=this.x.redAdd(a).redSqr().redISub(i).redISub(l);b=b.redIAdd(b);var y=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),x=y.redSqr().redISub(b).redISub(b);e=x;var _=l.redIAdd(l);_=_.redIAdd(_),_=_.redIAdd(_),r=y.redMul(b.redISub(x)).redISub(_),n=this.y.redAdd(this.y)}else{var C=this.z.redSqr(),D=this.y.redSqr(),F=this.x.redMul(D),P=this.x.redSub(C).redMul(this.x.redAdd(C));P=P.redAdd(P).redIAdd(P);var z=F.redIAdd(F);z=z.redIAdd(z);var W=z.redAdd(z);e=P.redSqr().redISub(W),n=this.y.redAdd(this.z).redSqr().redISub(D).redISub(C);var X=D.redSqr();X=X.redIAdd(X),X=X.redIAdd(X),X=X.redIAdd(X),r=P.redMul(z.redISub(e)).redISub(X)}return this.curve.jpoint(e,r,n)};ar.prototype._dbl=function(){var e=this.curve.a,r=this.x,n=this.y,i=this.z,a=i.redSqr().redSqr(),l=r.redSqr(),b=n.redSqr(),y=l.redAdd(l).redIAdd(l).redIAdd(e.redMul(a)),x=r.redAdd(r);x=x.redIAdd(x);var _=x.redMul(b),C=y.redSqr().redISub(_.redAdd(_)),D=_.redISub(C),F=b.redSqr();F=F.redIAdd(F),F=F.redIAdd(F),F=F.redIAdd(F);var P=y.redMul(D).redISub(F),z=n.redAdd(n).redMul(i);return this.curve.jpoint(C,P,z)};ar.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr(),i=r.redSqr(),a=e.redAdd(e).redIAdd(e),l=a.redSqr(),b=this.x.redAdd(r).redSqr().redISub(e).redISub(i);b=b.redIAdd(b),b=b.redAdd(b).redIAdd(b),b=b.redISub(l);var y=b.redSqr(),x=i.redIAdd(i);x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x);var _=a.redIAdd(b).redSqr().redISub(l).redISub(y).redISub(x),C=r.redMul(_);C=C.redIAdd(C),C=C.redIAdd(C);var D=this.x.redMul(y).redISub(C);D=D.redIAdd(D),D=D.redIAdd(D);var F=this.y.redMul(_.redMul(x.redISub(_)).redISub(b.redMul(y)));F=F.redIAdd(F),F=F.redIAdd(F),F=F.redIAdd(F);var P=this.z.redAdd(b).redSqr().redISub(n).redISub(y);return this.curve.jpoint(D,F,P)};ar.prototype.mul=function(e,r){return e=new bt(e,r),this.curve._wnafMul(this,e)};ar.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var i=r.redMul(this.z),a=n.redMul(e.z);return this.y.redMul(a).redISub(e.y.redMul(i)).cmpn(0)===0};ar.prototype.eqXToP=function(e){var r=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(n)===0)return!0;for(var i=e.clone(),a=this.curve.redN.redMul(r);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}};ar.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};ar.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var Av=V((KL,wv)=>{"use strict";var ZL=A(S()),Mo=Xn(),yv=nr(),N0=Ls(),h7=kr();function To(t){N0.call(this,"mont",t),this.a=new Mo(t.a,16).toRed(this.red),this.b=new Mo(t.b,16).toRed(this.red),this.i4=new Mo(4).toRed(this.red).redInvm(),this.two=new Mo(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}yv(To,N0);wv.exports=To;To.prototype.validate=function(e){var r=e.normalize().x,n=r.redSqr(),i=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),a=i.redSqrt();return a.redSqr().cmp(i)===0};function Gt(t,e,r){N0.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Mo(e,16),this.z=new Mo(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}yv(Gt,N0.BasePoint);To.prototype.decodePoint=function(e,r){return this.point(h7.toArray(e,r),1)};To.prototype.point=function(e,r){return new Gt(this,e,r)};To.prototype.pointFromJSON=function(e){return Gt.fromJSON(this,e)};Gt.prototype.precompute=function(){};Gt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Gt.fromJSON=function(e,r){return new Gt(e,r[0],r[1]||e.one)};Gt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Gt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Gt.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),n=this.x.redSub(this.z),i=n.redSqr(),a=r.redSub(i),l=r.redMul(i),b=a.redMul(i.redAdd(this.curve.a24.redMul(a)));return this.curve.point(l,b)};Gt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Gt.prototype.diffAdd=function(e,r){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),a=e.x.redAdd(e.z),l=e.x.redSub(e.z),b=l.redMul(n),y=a.redMul(i),x=r.z.redMul(b.redAdd(y).redSqr()),_=r.x.redMul(b.redISub(y).redSqr());return this.curve.point(x,_)};Gt.prototype.mul=function(e){for(var r=e.clone(),n=this,i=this.curve.point(null,null),a=this,l=[];r.cmpn(0)!==0;r.iushrn(1))l.push(r.andln(1));for(var b=l.length-1;b>=0;b--)l[b]===0?(n=n.diffAdd(i,a),i=i.dbl()):(i=n.diffAdd(i,a),n=n.dbl());return i};Gt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Gt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Gt.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};Gt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Gt.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var Tv=V((VL,Mv)=>{"use strict";var jL=A(S()),p7=kr(),xi=Xn(),Sv=nr(),J0=Ls(),b7=p7.assert;function zn(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,J0.call(this,"edwards",t),this.a=new xi(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new xi(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new xi(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),b7(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}Sv(zn,J0);Mv.exports=zn;zn.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};zn.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};zn.prototype.jpoint=function(e,r,n,i){return this.point(e,r,n,i)};zn.prototype.pointFromX=function(e,r){e=new xi(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),a=this.one.redSub(this.c2.redMul(this.d).redMul(n)),l=i.redMul(a.redInvm()),b=l.redSqrt();if(b.redSqr().redSub(l).cmp(this.zero)!==0)throw new Error("invalid point");var y=b.fromRed().isOdd();return(r&&!y||!r&&y)&&(b=b.redNeg()),this.point(e,b)};zn.prototype.pointFromY=function(e,r){e=new xi(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),a=n.redMul(this.d).redMul(this.c2).redSub(this.a),l=i.redMul(a.redInvm());if(l.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var b=l.redSqrt();if(b.redSqr().redSub(l).cmp(this.zero)!==0)throw new Error("invalid point");return b.fromRed().isOdd()!==r&&(b=b.redNeg()),this.point(b,e)};zn.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),n=e.y.redSqr(),i=r.redMul(this.a).redAdd(n),a=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return i.cmp(a)===0};function ut(t,e,r,n,i){J0.BasePoint.call(this,t,"projective"),e===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new xi(e,16),this.y=new xi(r,16),this.z=n?new xi(n,16):this.curve.one,this.t=i&&new xi(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}Sv(ut,J0.BasePoint);zn.prototype.pointFromJSON=function(e){return ut.fromJSON(this,e)};zn.prototype.point=function(e,r,n,i){return new ut(this,e,r,n,i)};ut.fromJSON=function(e,r){return new ut(e,r[0],r[1],r[2])};ut.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};ut.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};ut.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),a=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),l=i.redAdd(r),b=l.redSub(n),y=i.redSub(r),x=a.redMul(b),_=l.redMul(y),C=a.redMul(y),D=b.redMul(l);return this.curve.point(x,_,D,C)};ut.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),i,a,l,b,y,x;if(this.curve.twisted){b=this.curve._mulA(r);var _=b.redAdd(n);this.zOne?(i=e.redSub(r).redSub(n).redMul(_.redSub(this.curve.two)),a=_.redMul(b.redSub(n)),l=_.redSqr().redSub(_).redSub(_)):(y=this.z.redSqr(),x=_.redSub(y).redISub(y),i=e.redSub(r).redISub(n).redMul(x),a=_.redMul(b.redSub(n)),l=_.redMul(x))}else b=r.redAdd(n),y=this.curve._mulC(this.z).redSqr(),x=b.redSub(y).redSub(y),i=this.curve._mulC(e.redISub(b)).redMul(x),a=this.curve._mulC(b).redMul(r.redISub(n)),l=b.redMul(x);return this.curve.point(i,a,l)};ut.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};ut.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),a=this.z.redMul(e.z.redAdd(e.z)),l=n.redSub(r),b=a.redSub(i),y=a.redAdd(i),x=n.redAdd(r),_=l.redMul(b),C=y.redMul(x),D=l.redMul(x),F=b.redMul(y);return this.curve.point(_,C,F,D)};ut.prototype._projAdd=function(e){var r=this.z.redMul(e.z),n=r.redSqr(),i=this.x.redMul(e.x),a=this.y.redMul(e.y),l=this.curve.d.redMul(i).redMul(a),b=n.redSub(l),y=n.redAdd(l),x=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(a),_=r.redMul(b).redMul(x),C,D;return this.curve.twisted?(C=r.redMul(y).redMul(a.redSub(this.curve._mulA(i))),D=b.redMul(y)):(C=r.redMul(y).redMul(a.redSub(i)),D=this.curve._mulC(b).redMul(y)),this.curve.point(_,C,D)};ut.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};ut.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};ut.prototype.mulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!1)};ut.prototype.jmulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!0)};ut.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};ut.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};ut.prototype.getX=function(){return this.normalize(),this.x.fromRed()};ut.prototype.getY=function(){return this.normalize(),this.y.fromRed()};ut.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};ut.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),this.x.cmp(r)===0)return!0}};ut.prototype.toP=ut.prototype.normalize;ut.prototype.mixedAdd=ut.prototype.add});var ud=V(Ev=>{"use strict";var WL=A(S()),U0=Ev;U0.base=Ls();U0.short=xv();U0.mont=Av();U0.edwards=Tv()});var wn=V(ot=>{"use strict";var $L=A(S()),g7=di(),v7=nr();ot.inherits=v7;function m7(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function x7(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var a=t.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=a&63|128):m7(t,i)?(a=65536+((a&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=a&63|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=a&63|128)}else for(i=0;i<t.length;i++)r[i]=t[i]|0;return r}ot.toArray=x7;function y7(t){for(var e="",r=0;r<t.length;r++)e+=Bv(t[r].toString(16));return e}ot.toHex=y7;function _v(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}ot.htonl=_v;function w7(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];e==="little"&&(i=_v(i)),r+=Cv(i.toString(16))}return r}ot.toHex32=w7;function Bv(t){return t.length===1?"0"+t:t}ot.zero2=Bv;function Cv(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}ot.zero8=Cv;function A7(t,e,r,n){var i=r-e;g7(i%4===0);for(var a=new Array(i/4),l=0,b=e;l<a.length;l++,b+=4){var y;n==="big"?y=t[b]<<24|t[b+1]<<16|t[b+2]<<8|t[b+3]:y=t[b+3]<<24|t[b+2]<<16|t[b+1]<<8|t[b],a[l]=y>>>0}return a}ot.join32=A7;function S7(t,e){for(var r=new Array(t.length*4),n=0,i=0;n<t.length;n++,i+=4){var a=t[n];e==="big"?(r[i]=a>>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=a&255):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=a&255)}return r}ot.split32=S7;function M7(t,e){return t>>>e|t<<32-e}ot.rotr32=M7;function T7(t,e){return t<<e|t>>>32-e}ot.rotl32=T7;function E7(t,e){return t+e>>>0}ot.sum32=E7;function _7(t,e,r){return t+e+r>>>0}ot.sum32_3=_7;function B7(t,e,r,n){return t+e+r+n>>>0}ot.sum32_4=B7;function C7(t,e,r,n,i){return t+e+r+n+i>>>0}ot.sum32_5=C7;function P7(t,e,r,n){var i=t[e],a=t[e+1],l=n+a>>>0,b=(l<n?1:0)+r+i;t[e]=b>>>0,t[e+1]=l}ot.sum64=P7;function L7(t,e,r,n){var i=e+n>>>0,a=(i<e?1:0)+t+r;return a>>>0}ot.sum64_hi=L7;function R7(t,e,r,n){var i=e+n;return i>>>0}ot.sum64_lo=R7;function F7(t,e,r,n,i,a,l,b){var y=0,x=e;x=x+n>>>0,y+=x<e?1:0,x=x+a>>>0,y+=x<a?1:0,x=x+b>>>0,y+=x<b?1:0;var _=t+r+i+l+y;return _>>>0}ot.sum64_4_hi=F7;function D7(t,e,r,n,i,a,l,b){var y=e+n+a+b;return y>>>0}ot.sum64_4_lo=D7;function I7(t,e,r,n,i,a,l,b,y,x){var _=0,C=e;C=C+n>>>0,_+=C<e?1:0,C=C+a>>>0,_+=C<a?1:0,C=C+b>>>0,_+=C<b?1:0,C=C+x>>>0,_+=C<x?1:0;var D=t+r+i+l+y+_;return D>>>0}ot.sum64_5_hi=I7;function O7(t,e,r,n,i,a,l,b,y,x){var _=e+n+a+b+x;return _>>>0}ot.sum64_5_lo=O7;function k7(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}ot.rotr64_hi=k7;function N7(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}ot.rotr64_lo=N7;function J7(t,e,r){return t>>>r}ot.shr64_hi=J7;function U7(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}ot.shr64_lo=U7});var Eo=V(Lv=>{"use strict";var tR=A(S()),Pv=wn(),H7=di();function H0(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Lv.BlockHash=H0;H0.prototype.update=function(e,r){if(e=Pv.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Pv.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this};H0.prototype.digest=function(e){return this.update(this._pad()),H7(this.pending===null),this._digest(e)};H0.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,n=r-(e+this.padLength)%r,i=new Array(n+this.padLength);i[0]=128;for(var a=1;a<n;a++)i[a]=0;if(e<<=3,this.endian==="big"){for(var l=8;l<this.padLength;l++)i[a++]=0;i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=e>>>24&255,i[a++]=e>>>16&255,i[a++]=e>>>8&255,i[a++]=e&255}else for(i[a++]=e&255,i[a++]=e>>>8&255,i[a++]=e>>>16&255,i[a++]=e>>>24&255,i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=0,l=8;l<this.padLength;l++)i[a++]=0;return i}});var ld=V(yi=>{"use strict";var nR=A(S()),q7=wn(),Kn=q7.rotr32;function G7(t,e,r,n){if(t===0)return Rv(e,r,n);if(t===1||t===3)return Dv(e,r,n);if(t===2)return Fv(e,r,n)}yi.ft_1=G7;function Rv(t,e,r){return t&e^~t&r}yi.ch32=Rv;function Fv(t,e,r){return t&e^t&r^e&r}yi.maj32=Fv;function Dv(t,e,r){return t^e^r}yi.p32=Dv;function X7(t){return Kn(t,2)^Kn(t,13)^Kn(t,22)}yi.s0_256=X7;function z7(t){return Kn(t,6)^Kn(t,11)^Kn(t,25)}yi.s1_256=z7;function K7(t){return Kn(t,7)^Kn(t,18)^t>>>3}yi.g0_256=K7;function Z7(t){return Kn(t,17)^Kn(t,19)^t>>>10}yi.g1_256=Z7});var kv=V((iR,Ov)=>{"use strict";var aR=A(S()),_o=wn(),V7=Eo(),j7=ld(),dd=_o.rotl32,Rs=_o.sum32,Q7=_o.sum32_5,W7=j7.ft_1,Iv=V7.BlockHash,Y7=[1518500249,1859775393,2400959708,3395469782];function Zn(){if(!(this instanceof Zn))return new Zn;Iv.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}_o.inherits(Zn,Iv);Ov.exports=Zn;Zn.blockSize=512;Zn.outSize=160;Zn.hmacStrength=80;Zn.padLength=64;Zn.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=dd(n[i-3]^n[i-8]^n[i-14]^n[i-16],1);var a=this.h[0],l=this.h[1],b=this.h[2],y=this.h[3],x=this.h[4];for(i=0;i<n.length;i++){var _=~~(i/20),C=Q7(dd(a,5),W7(_,l,b,y),x,n[i],Y7[_]);x=y,y=b,b=dd(l,30),l=a,a=C}this.h[0]=Rs(this.h[0],a),this.h[1]=Rs(this.h[1],l),this.h[2]=Rs(this.h[2],b),this.h[3]=Rs(this.h[3],y),this.h[4]=Rs(this.h[4],x)};Zn.prototype._digest=function(e){return e==="hex"?_o.toHex32(this.h,"big"):_o.split32(this.h,"big")}});var hd=V((oR,Jv)=>{"use strict";var sR=A(S()),Bo=wn(),$7=Eo(),Co=ld(),e9=di(),An=Bo.sum32,t9=Bo.sum32_4,r9=Bo.sum32_5,n9=Co.ch32,i9=Co.maj32,a9=Co.s0_256,o9=Co.s1_256,s9=Co.g0_256,f9=Co.g1_256,Nv=$7.BlockHash,c9=[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 Vn(){if(!(this instanceof Vn))return new Vn;Nv.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=c9,this.W=new Array(64)}Bo.inherits(Vn,Nv);Jv.exports=Vn;Vn.blockSize=512;Vn.outSize=256;Vn.hmacStrength=192;Vn.padLength=64;Vn.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=t9(f9(n[i-2]),n[i-7],s9(n[i-15]),n[i-16]);var a=this.h[0],l=this.h[1],b=this.h[2],y=this.h[3],x=this.h[4],_=this.h[5],C=this.h[6],D=this.h[7];for(e9(this.k.length===n.length),i=0;i<n.length;i++){var F=r9(D,o9(x),n9(x,_,C),this.k[i],n[i]),P=An(a9(a),i9(a,l,b));D=C,C=_,_=x,x=An(y,F),y=b,b=l,l=a,a=An(F,P)}this.h[0]=An(this.h[0],a),this.h[1]=An(this.h[1],l),this.h[2]=An(this.h[2],b),this.h[3]=An(this.h[3],y),this.h[4]=An(this.h[4],x),this.h[5]=An(this.h[5],_),this.h[6]=An(this.h[6],C),this.h[7]=An(this.h[7],D)};Vn.prototype._digest=function(e){return e==="hex"?Bo.toHex32(this.h,"big"):Bo.split32(this.h,"big")}});var qv=V((fR,Hv)=>{"use strict";var cR=A(S()),pd=wn(),Uv=hd();function wi(){if(!(this instanceof wi))return new wi;Uv.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}pd.inherits(wi,Uv);Hv.exports=wi;wi.blockSize=512;wi.outSize=224;wi.hmacStrength=192;wi.padLength=64;wi.prototype._digest=function(e){return e==="hex"?pd.toHex32(this.h.slice(0,7),"big"):pd.split32(this.h.slice(0,7),"big")}});var vd=V((uR,Kv)=>{"use strict";var lR=A(S()),Pr=wn(),u9=Eo(),l9=di(),jn=Pr.rotr64_hi,Qn=Pr.rotr64_lo,Gv=Pr.shr64_hi,Xv=Pr.shr64_lo,Gi=Pr.sum64,bd=Pr.sum64_hi,gd=Pr.sum64_lo,d9=Pr.sum64_4_hi,h9=Pr.sum64_4_lo,p9=Pr.sum64_5_hi,b9=Pr.sum64_5_lo,zv=u9.BlockHash,g9=[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 Sn(){if(!(this instanceof Sn))return new Sn;zv.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g9,this.W=new Array(160)}Pr.inherits(Sn,zv);Kv.exports=Sn;Sn.blockSize=1024;Sn.outSize=512;Sn.hmacStrength=192;Sn.padLength=128;Sn.prototype._prepareBlock=function(e,r){for(var n=this.W,i=0;i<32;i++)n[i]=e[r+i];for(;i<n.length;i+=2){var a=_9(n[i-4],n[i-3]),l=B9(n[i-4],n[i-3]),b=n[i-14],y=n[i-13],x=T9(n[i-30],n[i-29]),_=E9(n[i-30],n[i-29]),C=n[i-32],D=n[i-31];n[i]=d9(a,l,b,y,x,_,C,D),n[i+1]=h9(a,l,b,y,x,_,C,D)}};Sn.prototype._update=function(e,r){this._prepareBlock(e,r);var n=this.W,i=this.h[0],a=this.h[1],l=this.h[2],b=this.h[3],y=this.h[4],x=this.h[5],_=this.h[6],C=this.h[7],D=this.h[8],F=this.h[9],P=this.h[10],z=this.h[11],W=this.h[12],X=this.h[13],ne=this.h[14],$=this.h[15];l9(this.k.length===n.length);for(var ae=0;ae<n.length;ae+=2){var ie=ne,ee=$,ce=S9(D,F),te=M9(D,F),Y=v9(D,F,P,z,W,X),T=m9(D,F,P,z,W,X),s=this.k[ae],u=this.k[ae+1],d=n[ae],f=n[ae+1],c=p9(ie,ee,ce,te,Y,T,s,u,d,f),v=b9(ie,ee,ce,te,Y,T,s,u,d,f);ie=w9(i,a),ee=A9(i,a),ce=x9(i,a,l,b,y,x),te=y9(i,a,l,b,y,x);var m=bd(ie,ee,ce,te),h=gd(ie,ee,ce,te);ne=W,$=X,W=P,X=z,P=D,z=F,D=bd(_,C,c,v),F=gd(C,C,c,v),_=y,C=x,y=l,x=b,l=i,b=a,i=bd(c,v,m,h),a=gd(c,v,m,h)}Gi(this.h,0,i,a),Gi(this.h,2,l,b),Gi(this.h,4,y,x),Gi(this.h,6,_,C),Gi(this.h,8,D,F),Gi(this.h,10,P,z),Gi(this.h,12,W,X),Gi(this.h,14,ne,$)};Sn.prototype._digest=function(e){return e==="hex"?Pr.toHex32(this.h,"big"):Pr.split32(this.h,"big")};function v9(t,e,r,n,i){var a=t&r^~t&i;return a<0&&(a+=4294967296),a}function m9(t,e,r,n,i,a){var l=e&n^~e&a;return l<0&&(l+=4294967296),l}function x9(t,e,r,n,i){var a=t&r^t&i^r&i;return a<0&&(a+=4294967296),a}function y9(t,e,r,n,i,a){var l=e&n^e&a^n&a;return l<0&&(l+=4294967296),l}function w9(t,e){var r=jn(t,e,28),n=jn(e,t,2),i=jn(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function A9(t,e){var r=Qn(t,e,28),n=Qn(e,t,2),i=Qn(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function S9(t,e){var r=jn(t,e,14),n=jn(t,e,18),i=jn(e,t,9),a=r^n^i;return a<0&&(a+=4294967296),a}function M9(t,e){var r=Qn(t,e,14),n=Qn(t,e,18),i=Qn(e,t,9),a=r^n^i;return a<0&&(a+=4294967296),a}function T9(t,e){var r=jn(t,e,1),n=jn(t,e,8),i=Gv(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function E9(t,e){var r=Qn(t,e,1),n=Qn(t,e,8),i=Xv(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function _9(t,e){var r=jn(t,e,19),n=jn(e,t,29),i=Gv(t,e,6),a=r^n^i;return a<0&&(a+=4294967296),a}function B9(t,e){var r=Qn(t,e,19),n=Qn(e,t,29),i=Xv(t,e,6),a=r^n^i;return a<0&&(a+=4294967296),a}});var jv=V((dR,Vv)=>{"use strict";var hR=A(S()),md=wn(),Zv=vd();function Ai(){if(!(this instanceof Ai))return new Ai;Zv.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}md.inherits(Ai,Zv);Vv.exports=Ai;Ai.blockSize=1024;Ai.outSize=384;Ai.hmacStrength=192;Ai.padLength=128;Ai.prototype._digest=function(e){return e==="hex"?md.toHex32(this.h.slice(0,12),"big"):md.split32(this.h.slice(0,12),"big")}});var Qv=V(Po=>{"use strict";var bR=A(S());Po.sha1=kv();Po.sha224=qv();Po.sha256=hd();Po.sha384=jv();Po.sha512=vd()});var rm=V(tm=>{"use strict";var vR=A(S()),Ma=wn(),C9=Eo(),q0=Ma.rotl32,Wv=Ma.sum32,Fs=Ma.sum32_3,Yv=Ma.sum32_4,em=C9.BlockHash;function Wn(){if(!(this instanceof Wn))return new Wn;em.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Ma.inherits(Wn,em);tm.ripemd160=Wn;Wn.blockSize=512;Wn.outSize=160;Wn.hmacStrength=192;Wn.padLength=64;Wn.prototype._update=function(e,r){for(var n=this.h[0],i=this.h[1],a=this.h[2],l=this.h[3],b=this.h[4],y=n,x=i,_=a,C=l,D=b,F=0;F<80;F++){var P=Wv(q0(Yv(n,$v(F,i,a,l),e[R9[F]+r],P9(F)),D9[F]),b);n=b,b=l,l=q0(a,10),a=i,i=P,P=Wv(q0(Yv(y,$v(79-F,x,_,C),e[F9[F]+r],L9(F)),I9[F]),D),y=D,D=C,C=q0(_,10),_=x,x=P}P=Fs(this.h[1],a,C),this.h[1]=Fs(this.h[2],l,D),this.h[2]=Fs(this.h[3],b,y),this.h[3]=Fs(this.h[4],n,x),this.h[4]=Fs(this.h[0],i,_),this.h[0]=P};Wn.prototype._digest=function(e){return e==="hex"?Ma.toHex32(this.h,"little"):Ma.split32(this.h,"little")};function $v(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function P9(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function L9(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var R9=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],F9=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],D9=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],I9=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var im=V((mR,nm)=>{"use strict";var xR=A(S()),O9=wn(),k9=di();function Lo(t,e,r){if(!(this instanceof Lo))return new Lo(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(O9.toArray(e,r))}nm.exports=Lo;Lo.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),k9(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};Lo.prototype.update=function(e,r){return this.inner.update(e,r),this};Lo.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}});var Ds=V(am=>{var wR=A(S()),or=am;or.utils=wn();or.common=Eo();or.sha=Qv();or.ripemd=rm();or.hmac=im();or.sha1=or.sha.sha1;or.sha256=or.sha.sha256;or.sha224=or.sha.sha224;or.sha384=or.sha.sha384;or.sha512=or.sha.sha512;or.ripemd160=or.ripemd.ripemd160});var sm=V((AR,om)=>{var SR=A(S());om.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}});var G0=V(um=>{"use strict";var TR=A(S()),yd=um,Xi=Ds(),xd=ud(),N9=kr(),fm=N9.assert;function cm(t){t.type==="short"?this.curve=new xd.short(t):t.type==="edwards"?this.curve=new xd.edwards(t):this.curve=new xd.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,fm(this.g.validate(),"Invalid curve"),fm(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}yd.PresetCurve=cm;function zi(t,e){Object.defineProperty(yd,t,{configurable:!0,enumerable:!0,get:function(){var r=new cm(e);return Object.defineProperty(yd,t,{configurable:!0,enumerable:!0,value:r}),r}})}zi("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Xi.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});zi("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Xi.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});zi("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Xi.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});zi("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Xi.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});zi("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Xi.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});zi("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Xi.sha256,gRed:!1,g:["9"]});zi("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Xi.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var wd;try{wd=sm()}catch{wd=void 0}zi("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Xi.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",wd]})});var hm=V((ER,dm)=>{"use strict";var _R=A(S()),J9=Ds(),Ta=id(),lm=di();function Ki(t){if(!(this instanceof Ki))return new Ki(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Ta.toArray(t.entropy,t.entropyEnc||"hex"),r=Ta.toArray(t.nonce,t.nonceEnc||"hex"),n=Ta.toArray(t.pers,t.persEnc||"hex");lm(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}dm.exports=Ki;Ki.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a<this.V.length;a++)this.K[a]=0,this.V[a]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656};Ki.prototype._hmac=function(){return new J9.hmac(this.hash,this.K)};Ki.prototype._update=function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};Ki.prototype.reseed=function(e,r,n,i){typeof r!="string"&&(i=n,n=r,r=null),e=Ta.toArray(e,r),n=Ta.toArray(n,i),lm(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ki.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Ta.toArray(n,i||"hex"),this._update(n));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var l=a.slice(0,e);return this._update(n),this._reseed++,Ta.encode(l,r)}});var bm=V((BR,pm)=>{"use strict";var CR=A(S()),U9=Xn(),H9=kr(),Ad=H9.assert;function lr(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}pm.exports=lr;lr.fromPublic=function(e,r,n){return r instanceof lr?r:new lr(e,{pub:r,pubEnc:n})};lr.fromPrivate=function(e,r,n){return r instanceof lr?r:new lr(e,{priv:r,privEnc:n})};lr.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};lr.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub};lr.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};lr.prototype._importPrivate=function(e,r){this.priv=new U9(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)};lr.prototype._importPublic=function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?Ad(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Ad(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)};lr.prototype.derive=function(e){return e.validate()||Ad(e.validate(),"public point not validated"),e.mul(this.priv).getX()};lr.prototype.sign=function(e,r,n){return this.ec.sign(e,this,r,n)};lr.prototype.verify=function(e,r,n){return this.ec.verify(e,r,this,void 0,n)};lr.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var mm=V((PR,vm)=>{"use strict";var LR=A(S()),X0=Xn(),Td=kr(),q9=Td.assert;function z0(t,e){if(t instanceof z0)return t;this._importDER(t,e)||(q9(t.r&&t.s,"Signature without r or s"),this.r=new X0(t.r,16),this.s=new X0(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}vm.exports=z0;function G9(){this.place=0}function Sd(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4||t[e.place]===0)return!1;for(var i=0,a=0,l=e.place;a<n;a++,l++)i<<=8,i|=t[l],i>>>=0;return i<=127?!1:(e.place=l,i)}function gm(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}z0.prototype._importDER=function(e,r){e=Td.toArray(e,r);var n=new G9;if(e[n.place++]!==48)return!1;var i=Sd(e,n);if(i===!1||i+n.place!==e.length||e[n.place++]!==2)return!1;var a=Sd(e,n);if(a===!1||e[n.place]&128)return!1;var l=e.slice(n.place,a+n.place);if(n.place+=a,e[n.place++]!==2)return!1;var b=Sd(e,n);if(b===!1||e.length!==b+n.place||e[n.place]&128)return!1;var y=e.slice(n.place,b+n.place);if(l[0]===0)if(l[1]&128)l=l.slice(1);else return!1;if(y[0]===0)if(y[1]&128)y=y.slice(1);else return!1;return this.r=new X0(l),this.s=new X0(y),this.recoveryParam=null,!0};function Md(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}z0.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=gm(r),n=gm(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Md(i,r.length),i=i.concat(r),i.push(2),Md(i,n.length);var a=i.concat(n),l=[48];return Md(l,a.length),l=l.concat(a),Td.encode(l,e)}});var wm=V((RR,ym)=>{"use strict";var FR=A(S()),Mn=Xn(),xm=hm(),X9=kr(),Ed=G0(),z9=fd(),Ea=X9.assert,_d=bm(),K0=mm();function rn(t){if(!(this instanceof rn))return new rn(t);typeof t=="string"&&(Ea(Object.prototype.hasOwnProperty.call(Ed,t),"Unknown curve "+t),t=Ed[t]),t instanceof Ed.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}ym.exports=rn;rn.prototype.keyPair=function(e){return new _d(this,e)};rn.prototype.keyFromPrivate=function(e,r){return _d.fromPrivate(this,e,r)};rn.prototype.keyFromPublic=function(e,r){return _d.fromPublic(this,e,r)};rn.prototype.genKeyPair=function(e){e||(e={});for(var r=new xm({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||z9(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Mn(2));;){var a=new Mn(r.generate(n));if(!(a.cmp(i)>0))return a.iaddn(1),this.keyFromPrivate(a)}};rn.prototype._truncateToN=function(e,r,n){var i;if(Mn.isBN(e)||typeof e=="number")e=new Mn(e,16),i=e.byteLength();else if(typeof e=="object")i=e.length,e=new Mn(e,16);else{var a=e.toString();i=a.length+1>>>1,e=new Mn(a,16)}typeof n!="number"&&(n=i*8);var l=n-this.n.bitLength();return l>0&&(e=e.ushrn(l)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};rn.prototype.sign=function(e,r,n,i){if(typeof n=="object"&&(i=n,n=null),i||(i={}),typeof e!="string"&&typeof e!="number"&&!Mn.isBN(e)){Ea(typeof e=="object"&&e&&typeof e.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),Ea(e.length>>>0===e.length);for(var a=0;a<e.length;a++)Ea((e[a]&255)===e[a])}r=this.keyFromPrivate(r,n),e=this._truncateToN(e,!1,i.msgBitLength),Ea(!e.isNeg(),"Can not sign a negative message");var l=this.n.byteLength(),b=r.getPrivate().toArray("be",l),y=e.toArray("be",l);Ea(new Mn(y).eq(e),"Can not sign message");for(var x=new xm({hash:this.hash,entropy:b,nonce:y,pers:i.pers,persEnc:i.persEnc||"utf8"}),_=this.n.sub(new Mn(1)),C=0;;C++){var D=i.k?i.k(C):new Mn(x.generate(this.n.byteLength()));if(D=this._truncateToN(D,!0),!(D.cmpn(1)<=0||D.cmp(_)>=0)){var F=this.g.mul(D);if(!F.isInfinity()){var P=F.getX(),z=P.umod(this.n);if(z.cmpn(0)!==0){var W=D.invm(this.n).mul(z.mul(r.getPrivate()).iadd(e));if(W=W.umod(this.n),W.cmpn(0)!==0){var X=(F.getY().isOdd()?1:0)|(P.cmp(z)!==0?2:0);return i.canonical&&W.cmp(this.nh)>0&&(W=this.n.sub(W),X^=1),new K0({r:z,s:W,recoveryParam:X})}}}}}};rn.prototype.verify=function(e,r,n,i,a){a||(a={}),e=this._truncateToN(e,!1,a.msgBitLength),n=this.keyFromPublic(n,i),r=new K0(r,"hex");var l=r.r,b=r.s;if(l.cmpn(1)<0||l.cmp(this.n)>=0||b.cmpn(1)<0||b.cmp(this.n)>=0)return!1;var y=b.invm(this.n),x=y.mul(e).umod(this.n),_=y.mul(l).umod(this.n),C;return this.curve._maxwellTrick?(C=this.g.jmulAdd(x,n.getPublic(),_),C.isInfinity()?!1:C.eqXToP(l)):(C=this.g.mulAdd(x,n.getPublic(),_),C.isInfinity()?!1:C.getX().umod(this.n).cmp(l)===0)};rn.prototype.recoverPubKey=function(t,e,r,n){Ea((3&r)===r,"The recovery param is more than two bits"),e=new K0(e,n);var i=this.n,a=new Mn(t),l=e.r,b=e.s,y=r&1,x=r>>1;if(l.cmp(this.curve.p.umod(this.curve.n))>=0&&x)throw new Error("Unable to find sencond key candinate");x?l=this.curve.pointFromX(l.add(this.curve.n),y):l=this.curve.pointFromX(l,y);var _=e.r.invm(i),C=i.sub(a).mul(_).umod(i),D=b.mul(_).umod(i);return this.g.mulAdd(C,l,D)};rn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new K0(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(t,e,i)}catch{continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}});var Tm=V((DR,Mm)=>{"use strict";var IR=A(S()),Is=kr(),Sm=Is.assert,Am=Is.parseBytes,Ro=Is.cachedProperty;function Xt(t,e){this.eddsa=t,this._secret=Am(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Am(e.pub)}Xt.fromPublic=function(e,r){return r instanceof Xt?r:new Xt(e,{pub:r})};Xt.fromSecret=function(e,r){return r instanceof Xt?r:new Xt(e,{secret:r})};Xt.prototype.secret=function(){return this._secret};Ro(Xt,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Ro(Xt,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Ro(Xt,"privBytes",function(){var e=this.eddsa,r=this.hash(),n=e.encodingLength-1,i=r.slice(0,e.encodingLength);return i[0]&=248,i[n]&=127,i[n]|=64,i});Ro(Xt,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Ro(Xt,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Ro(Xt,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Xt.prototype.sign=function(e){return Sm(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};Xt.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};Xt.prototype.getSecret=function(e){return Sm(this._secret,"KeyPair is public only"),Is.encode(this.secret(),e)};Xt.prototype.getPublic=function(e){return Is.encode(this.pubBytes(),e)};Mm.exports=Xt});var Bm=V((OR,_m)=>{"use strict";var kR=A(S()),K9=Xn(),Z0=kr(),Em=Z0.assert,V0=Z0.cachedProperty,Z9=Z0.parseBytes;function _a(t,e){this.eddsa=t,typeof e!="object"&&(e=Z9(e)),Array.isArray(e)&&(Em(e.length===t.encodingLength*2,"Signature has invalid size"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),Em(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof K9&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}V0(_a,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});V0(_a,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});V0(_a,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});V0(_a,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});_a.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};_a.prototype.toHex=function(){return Z0.encode(this.toBytes(),"hex").toUpperCase()};_m.exports=_a});var Fm=V((NR,Rm)=>{"use strict";var JR=A(S()),V9=Ds(),j9=G0(),Fo=kr(),Q9=Fo.assert,Pm=Fo.parseBytes,Lm=Tm(),Cm=Bm();function Lr(t){if(Q9(t==="ed25519","only tested with ed25519 so far"),!(this instanceof Lr))return new Lr(t);t=j9[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=V9.sha512}Rm.exports=Lr;Lr.prototype.sign=function(e,r){e=Pm(e);var n=this.keyFromSecret(r),i=this.hashInt(n.messagePrefix(),e),a=this.g.mul(i),l=this.encodePoint(a),b=this.hashInt(l,n.pubBytes(),e).mul(n.priv()),y=i.add(b).umod(this.curve.n);return this.makeSignature({R:a,S:y,Rencoded:l})};Lr.prototype.verify=function(e,r,n){if(e=Pm(e),r=this.makeSignature(r),r.S().gte(r.eddsa.curve.n)||r.S().isNeg())return!1;var i=this.keyFromPublic(n),a=this.hashInt(r.Rencoded(),i.pubBytes(),e),l=this.g.mul(r.S()),b=r.R().add(i.pub().mul(a));return b.eq(l)};Lr.prototype.hashInt=function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return Fo.intFromLE(e.digest()).umod(this.curve.n)};Lr.prototype.keyFromPublic=function(e){return Lm.fromPublic(this,e)};Lr.prototype.keyFromSecret=function(e){return Lm.fromSecret(this,e)};Lr.prototype.makeSignature=function(e){return e instanceof Cm?e:new Cm(this,e)};Lr.prototype.encodePoint=function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r};Lr.prototype.decodePoint=function(e){e=Fo.parseBytes(e);var r=e.length-1,n=e.slice(0,r).concat(e[r]&-129),i=(e[r]&128)!==0,a=Fo.intFromLE(n);return this.curve.pointFromY(a,i)};Lr.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};Lr.prototype.decodeInt=function(e){return Fo.intFromLE(e)};Lr.prototype.isPoint=function(e){return e instanceof this.pointClass}});var Bd=V(Dm=>{"use strict";var HR=A(S()),Ba=Dm;Ba.version=lv().version;Ba.utils=kr();Ba.rand=fd();Ba.curve=ud();Ba.curves=G0();Ba.ec=wm();Ba.eddsa=Fm()});var Im=V(Do=>{"use strict";var GR=A(S()),W9=Do&&Do.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Do,"__esModule",{value:!0});Do.EC=void 0;var Y9=W9(Bd()),$9=Y9.default.ec;Do.EC=$9});var Om=V(j0=>{"use strict";var zR=A(S());Object.defineProperty(j0,"__esModule",{value:!0});j0.version=void 0;j0.version="signing-key/5.8.0"});var ks=V(Zi=>{"use strict";var ZR=A(S());Object.defineProperty(Zi,"__esModule",{value:!0});Zi.computePublicKey=Zi.recoverPublicKey=Zi.SigningKey=void 0;var eA=Im(),Rt=at(),Os=$r(),tA=Pt(),rA=Om(),Pd=new tA.Logger(rA.version),Cd=null;function Yn(){return Cd||(Cd=new eA.EC("secp256k1")),Cd}var km=function(){function t(e){(0,Os.defineReadOnly)(this,"curve","secp256k1"),(0,Os.defineReadOnly)(this,"privateKey",(0,Rt.hexlify)(e)),(0,Rt.hexDataLength)(this.privateKey)!==32&&Pd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=Yn().keyFromPrivate((0,Rt.arrayify)(this.privateKey));(0,Os.defineReadOnly)(this,"publicKey","0x"+r.getPublic(!1,"hex")),(0,Os.defineReadOnly)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),(0,Os.defineReadOnly)(this,"_isSigningKey",!0)}return t.prototype._addPoint=function(e){var r=Yn().keyFromPublic((0,Rt.arrayify)(this.publicKey)),n=Yn().keyFromPublic((0,Rt.arrayify)(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")},t.prototype.signDigest=function(e){var r=Yn().keyFromPrivate((0,Rt.arrayify)(this.privateKey)),n=(0,Rt.arrayify)(e);n.length!==32&&Pd.throwArgumentError("bad digest length","digest",e);var i=r.sign(n,{canonical:!0});return(0,Rt.splitSignature)({recoveryParam:i.recoveryParam,r:(0,Rt.hexZeroPad)("0x"+i.r.toString(16),32),s:(0,Rt.hexZeroPad)("0x"+i.s.toString(16),32)})},t.prototype.computeSharedSecret=function(e){var r=Yn().keyFromPrivate((0,Rt.arrayify)(this.privateKey)),n=Yn().keyFromPublic((0,Rt.arrayify)(Nm(e)));return(0,Rt.hexZeroPad)("0x"+r.derive(n.getPublic()).toString(16),32)},t.isSigningKey=function(e){return!!(e&&e._isSigningKey)},t}();Zi.SigningKey=km;function nA(t,e){var r=(0,Rt.splitSignature)(e),n={r:(0,Rt.arrayify)(r.r),s:(0,Rt.arrayify)(r.s)};return"0x"+Yn().recoverPubKey((0,Rt.arrayify)(t),n,r.recoveryParam).encode("hex",!1)}Zi.recoverPublicKey=nA;function Nm(t,e){var r=(0,Rt.arrayify)(t);if(r.length===32){var n=new km(r);return e?"0x"+Yn().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?(0,Rt.hexlify)(r):"0x"+Yn().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+Yn().keyFromPublic(r).getPublic(!0,"hex"):(0,Rt.hexlify)(r)}return Pd.throwArgumentError("invalid public or private key","key","[REDACTED]")}Zi.computePublicKey=Nm});var Jm=V(Q0=>{"use strict";var jR=A(S());Object.defineProperty(Q0,"__esModule",{value:!0});Q0.version=void 0;Q0.version="transactions/5.8.0"});var Js=V(Mt=>{"use strict";var WR=A(S()),iA=Mt&&Mt.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),aA=Mt&&Mt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),oA=Mt&&Mt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&iA(e,t,r);return aA(e,t),e};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.parse=Mt.serialize=Mt.accessListify=Mt.recoverAddress=Mt.computeAddress=Mt.TransactionTypes=void 0;var Ns=ya(),Ca=ba(),Ge=at(),sA=kl(),Io=Nn(),fA=$r(),Vi=oA(Ql()),Um=ks(),Rd=Pt(),cA=Jm(),hr=new Rd.Logger(cA.version),uA;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(uA=Mt.TransactionTypes||(Mt.TransactionTypes={}));function Fd(t){return t==="0x"?null:(0,Ns.getAddress)(t)}function dr(t){return t==="0x"?sA.Zero:Ca.BigNumber.from(t)}var lA=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],dA={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Hm(t){var e=(0,Um.computePublicKey)(t);return(0,Ns.getAddress)((0,Ge.hexDataSlice)((0,Io.keccak256)((0,Ge.hexDataSlice)(e,1)),12))}Mt.computeAddress=Hm;function Dd(t,e){return Hm((0,Um.recoverPublicKey)((0,Ge.arrayify)(t),e))}Mt.recoverAddress=Dd;function Nr(t,e){var r=(0,Ge.stripZeros)(Ca.BigNumber.from(t).toHexString());return r.length>32&&hr.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function Ld(t,e){return{address:(0,Ns.getAddress)(t),storageKeys:(e||[]).map(function(r,n){return(0,Ge.hexDataLength)(r)!==32&&hr.throwArgumentError("invalid access list storageKey","accessList["+t+":"+n+"]",r),r.toLowerCase()})}}function W0(t){if(Array.isArray(t))return t.map(function(r,n){return Array.isArray(r)?(r.length>2&&hr.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value["+n+"]",r),Ld(r[0],r[1])):Ld(r.address,r.storageKeys)});var e=Object.keys(t).map(function(r){var n=t[r].reduce(function(i,a){return i[a]=!0,i},{});return Ld(r,Object.keys(n).sort())});return e.sort(function(r,n){return r.address.localeCompare(n.address)}),e}Mt.accessListify=W0;function qm(t){return W0(t).map(function(e){return[e.address,e.storageKeys]})}function Gm(t,e){if(t.gasPrice!=null){var r=Ca.BigNumber.from(t.gasPrice),n=Ca.BigNumber.from(t.maxFeePerGas||0);r.eq(n)||hr.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var i=[Nr(t.chainId||0,"chainId"),Nr(t.nonce||0,"nonce"),Nr(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nr(t.maxFeePerGas||0,"maxFeePerGas"),Nr(t.gasLimit||0,"gasLimit"),t.to!=null?(0,Ns.getAddress)(t.to):"0x",Nr(t.value||0,"value"),t.data||"0x",qm(t.accessList||[])];if(e){var a=(0,Ge.splitSignature)(e);i.push(Nr(a.recoveryParam,"recoveryParam")),i.push((0,Ge.stripZeros)(a.r)),i.push((0,Ge.stripZeros)(a.s))}return(0,Ge.hexConcat)(["0x02",Vi.encode(i)])}function Xm(t,e){var r=[Nr(t.chainId||0,"chainId"),Nr(t.nonce||0,"nonce"),Nr(t.gasPrice||0,"gasPrice"),Nr(t.gasLimit||0,"gasLimit"),t.to!=null?(0,Ns.getAddress)(t.to):"0x",Nr(t.value||0,"value"),t.data||"0x",qm(t.accessList||[])];if(e){var n=(0,Ge.splitSignature)(e);r.push(Nr(n.recoveryParam,"recoveryParam")),r.push((0,Ge.stripZeros)(n.r)),r.push((0,Ge.stripZeros)(n.s))}return(0,Ge.hexConcat)(["0x01",Vi.encode(r)])}function hA(t,e){(0,fA.checkProperties)(t,dA);var r=[];lA.forEach(function(l){var b=t[l.name]||[],y={};l.numeric&&(y.hexPad="left"),b=(0,Ge.arrayify)((0,Ge.hexlify)(b,y)),l.length&&b.length!==l.length&&b.length>0&&hr.throwArgumentError("invalid length for "+l.name,"transaction:"+l.name,b),l.maxLength&&(b=(0,Ge.stripZeros)(b),b.length>l.maxLength&&hr.throwArgumentError("invalid length for "+l.name,"transaction:"+l.name,b)),r.push((0,Ge.hexlify)(b))});var n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&hr.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!(0,Ge.isBytesLike)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push((0,Ge.hexlify)(n)),r.push("0x"),r.push("0x")),!e)return Vi.encode(r);var i=(0,Ge.splitSignature)(e),a=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),a+=n*2+8,i.v>28&&i.v!==a&&hr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==a&&hr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push((0,Ge.hexlify)(a)),r.push((0,Ge.stripZeros)((0,Ge.arrayify)(i.r))),r.push((0,Ge.stripZeros)((0,Ge.arrayify)(i.s))),Vi.encode(r)}function pA(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&hr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),hA(t,e);switch(t.type){case 1:return Xm(t,e);case 2:return Gm(t,e);default:break}return hr.throwError("unsupported transaction type: "+t.type,Rd.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}Mt.serialize=pA;function zm(t,e,r){try{var n=dr(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{hr.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=(0,Ge.hexZeroPad)(e[1],32),t.s=(0,Ge.hexZeroPad)(e[2],32);try{var i=(0,Io.keccak256)(r(t));t.from=Dd(i,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function bA(t){var e=Vi.decode(t.slice(1));e.length!==9&&e.length!==12&&hr.throwArgumentError("invalid component count for transaction type: 2","payload",(0,Ge.hexlify)(t));var r=dr(e[2]),n=dr(e[3]),i={type:2,chainId:dr(e[0]).toNumber(),nonce:dr(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:dr(e[4]),to:Fd(e[5]),value:dr(e[6]),data:e[7],accessList:W0(e[8])};return e.length===9||(i.hash=(0,Io.keccak256)(t),zm(i,e.slice(9),Gm)),i}function gA(t){var e=Vi.decode(t.slice(1));e.length!==8&&e.length!==11&&hr.throwArgumentError("invalid component count for transaction type: 1","payload",(0,Ge.hexlify)(t));var r={type:1,chainId:dr(e[0]).toNumber(),nonce:dr(e[1]).toNumber(),gasPrice:dr(e[2]),gasLimit:dr(e[3]),to:Fd(e[4]),value:dr(e[5]),data:e[6],accessList:W0(e[7])};return e.length===8||(r.hash=(0,Io.keccak256)(t),zm(r,e.slice(8),Xm)),r}function vA(t){var e=Vi.decode(t);e.length!==9&&e.length!==6&&hr.throwArgumentError("invalid raw transaction","rawTransaction",t);var r={nonce:dr(e[0]).toNumber(),gasPrice:dr(e[1]),gasLimit:dr(e[2]),to:Fd(e[3]),value:dr(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=Ca.BigNumber.from(e[6]).toNumber()}catch{return r}if(r.r=(0,Ge.hexZeroPad)(e[7],32),r.s=(0,Ge.hexZeroPad)(e[8],32),Ca.BigNumber.from(r.r).isZero()&&Ca.BigNumber.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,i=e.slice(0,6);r.chainId!==0&&(i.push((0,Ge.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);var a=(0,Io.keccak256)(Vi.encode(i));try{r.from=Dd(a,{r:(0,Ge.hexlify)(r.r),s:(0,Ge.hexlify)(r.s),recoveryParam:n})}catch{}r.hash=(0,Io.keccak256)(t)}return r.type=null,r}function mA(t){var e=(0,Ge.arrayify)(t);if(e[0]>127)return vA(e);switch(e[0]){case 1:return gA(e);case 2:return bA(e);default:break}return hr.throwError("unsupported transaction type: "+e[0],Rd.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}Mt.parse=mA});var Km=V(Y0=>{"use strict";var $R=A(S());Object.defineProperty(Y0,"__esModule",{value:!0});Y0.version=void 0;Y0.version="abstract-provider/5.8.0"});var Zm=V(zt=>{"use strict";var tF=A(S()),ec=zt&&zt.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),xA=zt&&zt.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},yA=zt&&zt.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(zt,"__esModule",{value:!0});zt.Provider=zt.TransactionOrderForkEvent=zt.TransactionForkEvent=zt.BlockForkEvent=zt.ForkEvent=void 0;var wA=ba(),$0=at(),Id=$r(),AA=Pt(),SA=Km(),Us=new AA.Logger(SA.version),tc=function(t){ec(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.isForkEvent=function(r){return!!(r&&r._isForkEvent)},e}(Id.Description);zt.ForkEvent=tc;var MA=function(t){ec(e,t);function e(r,n){var i=this;return(0,$0.isHexString)(r,32)||Us.throwArgumentError("invalid blockHash","blockHash",r),i=t.call(this,{_isForkEvent:!0,_isBlockForkEvent:!0,expiry:n||0,blockHash:r})||this,i}return e}(tc);zt.BlockForkEvent=MA;var TA=function(t){ec(e,t);function e(r,n){var i=this;return(0,$0.isHexString)(r,32)||Us.throwArgumentError("invalid transaction hash","hash",r),i=t.call(this,{_isForkEvent:!0,_isTransactionForkEvent:!0,expiry:n||0,hash:r})||this,i}return e}(tc);zt.TransactionForkEvent=TA;var EA=function(t){ec(e,t);function e(r,n,i){var a=this;return(0,$0.isHexString)(r,32)||Us.throwArgumentError("invalid transaction hash","beforeHash",r),(0,$0.isHexString)(n,32)||Us.throwArgumentError("invalid transaction hash","afterHash",n),a=t.call(this,{_isForkEvent:!0,_isTransactionOrderForkEvent:!0,expiry:i||0,beforeHash:r,afterHash:n})||this,a}return e}(tc);zt.TransactionOrderForkEvent=EA;var _A=function(){function t(){var e=this.constructor;Us.checkAbstract(e,t),(0,Id.defineReadOnly)(this,"_isProvider",!0)}return t.prototype.getFeeData=function(){return xA(this,void 0,void 0,function(){var e,r,n,i,a,l;return yA(this,function(b){switch(b.label){case 0:return[4,(0,Id.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(function(y){return null})})];case 1:return e=b.sent(),r=e.block,n=e.gasPrice,i=null,a=null,l=null,r&&r.baseFeePerGas&&(i=r.baseFeePerGas,l=wA.BigNumber.from("1500000000"),a=r.baseFeePerGas.mul(2).add(l)),[2,{lastBaseFeePerGas:i,maxFeePerGas:a,maxPriorityFeePerGas:l,gasPrice:n}]}})})},t.prototype.addListener=function(e,r){return this.on(e,r)},t.prototype.removeListener=function(e,r){return this.off(e,r)},t.isProvider=function(e){return!!(e&&e._isProvider)},t}();zt.Provider=_A});var Vm=V(rc=>{"use strict";var nF=A(S());Object.defineProperty(rc,"__esModule",{value:!0});rc.version=void 0;rc.version="abstract-signer/5.8.0"});var Qm=V(an=>{"use strict";var aF=A(S()),BA=an&&an.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tn=an&&an.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},En=an&&an.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(an,"__esModule",{value:!0});an.VoidSigner=an.Signer=void 0;var ji=$r(),Si=Pt(),CA=Vm(),nn=new Si.Logger(CA.version),PA=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],LA=[Si.Logger.errors.INSUFFICIENT_FUNDS,Si.Logger.errors.NONCE_EXPIRED,Si.Logger.errors.REPLACEMENT_UNDERPRICED],jm=function(){function t(){var e=this.constructor;nn.checkAbstract(e,t),(0,ji.defineReadOnly)(this,"_isSigner",!0)}return t.prototype.getBalance=function(e){return Tn(this,void 0,void 0,function(){return En(this,function(r){switch(r.label){case 0:return this._checkProvider("getBalance"),[4,this.provider.getBalance(this.getAddress(),e)];case 1:return[2,r.sent()]}})})},t.prototype.getTransactionCount=function(e){return Tn(this,void 0,void 0,function(){return En(this,function(r){switch(r.label){case 0:return this._checkProvider("getTransactionCount"),[4,this.provider.getTransactionCount(this.getAddress(),e)];case 1:return[2,r.sent()]}})})},t.prototype.estimateGas=function(e){return Tn(this,void 0,void 0,function(){var r;return En(this,function(n){switch(n.label){case 0:return this._checkProvider("estimateGas"),[4,(0,ji.resolveProperties)(this.checkTransaction(e))];case 1:return r=n.sent(),[4,this.provider.estimateGas(r)];case 2:return[2,n.sent()]}})})},t.prototype.call=function(e,r){return Tn(this,void 0,void 0,function(){var n;return En(this,function(i){switch(i.label){case 0:return this._checkProvider("call"),[4,(0,ji.resolveProperties)(this.checkTransaction(e))];case 1:return n=i.sent(),[4,this.provider.call(n,r)];case 2:return[2,i.sent()]}})})},t.prototype.sendTransaction=function(e){return Tn(this,void 0,void 0,function(){var r,n;return En(this,function(i){switch(i.label){case 0:return this._checkProvider("sendTransaction"),[4,this.populateTransaction(e)];case 1:return r=i.sent(),[4,this.signTransaction(r)];case 2:return n=i.sent(),[4,this.provider.sendTransaction(n)];case 3:return[2,i.sent()]}})})},t.prototype.getChainId=function(){return Tn(this,void 0,void 0,function(){var e;return En(this,function(r){switch(r.label){case 0:return this._checkProvider("getChainId"),[4,this.provider.getNetwork()];case 1:return e=r.sent(),[2,e.chainId]}})})},t.prototype.getGasPrice=function(){return Tn(this,void 0,void 0,function(){return En(this,function(e){switch(e.label){case 0:return this._checkProvider("getGasPrice"),[4,this.provider.getGasPrice()];case 1:return[2,e.sent()]}})})},t.prototype.getFeeData=function(){return Tn(this,void 0,void 0,function(){return En(this,function(e){switch(e.label){case 0:return this._checkProvider("getFeeData"),[4,this.provider.getFeeData()];case 1:return[2,e.sent()]}})})},t.prototype.resolveName=function(e){return Tn(this,void 0,void 0,function(){return En(this,function(r){switch(r.label){case 0:return this._checkProvider("resolveName"),[4,this.provider.resolveName(e)];case 1:return[2,r.sent()]}})})},t.prototype.checkTransaction=function(e){for(var r in e)PA.indexOf(r)===-1&&nn.throwArgumentError("invalid transaction key: "+r,"transaction",e);var n=(0,ji.shallowCopy)(e);return n.from==null?n.from=this.getAddress():n.from=Promise.all([Promise.resolve(n.from),this.getAddress()]).then(function(i){return i[0].toLowerCase()!==i[1].toLowerCase()&&nn.throwArgumentError("from address mismatch","transaction",e),i[0]}),n},t.prototype.populateTransaction=function(e){return Tn(this,void 0,void 0,function(){var r,n,i,a,l=this;return En(this,function(b){switch(b.label){case 0:return[4,(0,ji.resolveProperties)(this.checkTransaction(e))];case 1:return r=b.sent(),r.to!=null&&(r.to=Promise.resolve(r.to).then(function(y){return Tn(l,void 0,void 0,function(){var x;return En(this,function(_){switch(_.label){case 0:return y==null?[2,null]:[4,this.resolveName(y)];case 1:return x=_.sent(),x==null&&nn.throwArgumentError("provided ENS name resolves to null","tx.to",y),[2,x]}})})}),r.to.catch(function(y){})),n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null,r.gasPrice!=null&&(r.type===2||n)?nn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&nn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null?(r.type=2,[3,5]):[3,2];case 2:return r.type===0||r.type===1?(r.gasPrice==null&&(r.gasPrice=this.getGasPrice()),[3,5]):[3,3];case 3:return[4,this.getFeeData()];case 4:i=b.sent(),r.type==null?i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null?(r.type=2,r.gasPrice!=null?(a=r.gasPrice,delete r.gasPrice,r.maxFeePerGas=a,r.maxPriorityFeePerGas=a):(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))):i.gasPrice!=null?(n&&nn.throwError("network does not support EIP-1559",Si.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):nn.throwError("failed to get consistent fee data",Si.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"}):r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas)),b.label=5;case 5:return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(function(y){if(LA.indexOf(y.code)>=0)throw y;return nn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Si.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:y,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(function(y){return y[1]!==0&&y[0]!==y[1]&&nn.throwArgumentError("chainId address mismatch","transaction",e),y[0]}),[4,(0,ji.resolveProperties)(r)];case 6:return[2,b.sent()]}})})},t.prototype._checkProvider=function(e){this.provider||nn.throwError("missing provider",Si.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})},t.isSigner=function(e){return!!(e&&e._isSigner)},t}();an.Signer=jm;var RA=function(t){BA(e,t);function e(r,n){var i=t.call(this)||this;return(0,ji.defineReadOnly)(i,"address",r),(0,ji.defineReadOnly)(i,"provider",n||null),i}return e.prototype.getAddress=function(){return Promise.resolve(this.address)},e.prototype._fail=function(r,n){return Promise.resolve().then(function(){nn.throwError(r,Si.Logger.errors.UNSUPPORTED_OPERATION,{operation:n})})},e.prototype.signMessage=function(r){return this._fail("VoidSigner cannot sign messages","signMessage")},e.prototype.signTransaction=function(r){return this._fail("VoidSigner cannot sign transactions","signTransaction")},e.prototype._signTypedData=function(r,n,i){return this._fail("VoidSigner cannot sign typed data","signTypedData")},e.prototype.connect=function(r){return new e(this.address,r)},e}(jm);an.VoidSigner=RA});var Ym=V(Qi=>{"use strict";var sF=A(S());Object.defineProperty(Qi,"__esModule",{value:!0});Qi.Base58=Qi.Base32=Qi.BaseX=void 0;var Wm=at(),nc=$r(),Od=function(){function t(e){(0,nc.defineReadOnly)(this,"alphabet",e),(0,nc.defineReadOnly)(this,"base",e.length),(0,nc.defineReadOnly)(this,"_alphabetMap",{}),(0,nc.defineReadOnly)(this,"_leader",e.charAt(0));for(var r=0;r<e.length;r++)this._alphabetMap[e.charAt(r)]=r}return t.prototype.encode=function(e){var r=(0,Wm.arrayify)(e);if(r.length===0)return"";for(var n=[0],i=0;i<r.length;++i){for(var a=r[i],l=0;l<n.length;++l)a+=n[l]<<8,n[l]=a%this.base,a=a/this.base|0;for(;a>0;)n.push(a%this.base),a=a/this.base|0}for(var b="",y=0;r[y]===0&&y<r.length-1;++y)b+=this._leader;for(var x=n.length-1;x>=0;--x)b+=this.alphabet[n[x]];return b},t.prototype.decode=function(e){if(typeof e!="string")throw new TypeError("Expected String");var r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(var n=0;n<e.length;n++){var i=this._alphabetMap[e[n]];if(i===void 0)throw new Error("Non-base"+this.base+" character");for(var a=i,l=0;l<r.length;++l)a+=r[l]*this.base,r[l]=a&255,a>>=8;for(;a>0;)r.push(a&255),a>>=8}for(var b=0;e[b]===this._leader&&b<e.length-1;++b)r.push(0);return(0,Wm.arrayify)(new Uint8Array(r.reverse()))},t}();Qi.BaseX=Od;var FA=new Od("abcdefghijklmnopqrstuvwxyz234567");Qi.Base32=FA;var DA=new Od("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");Qi.Base58=DA});var tx=V(ic=>{"use strict";var cF=A(S());Object.defineProperty(ic,"__esModule",{value:!0});ic.pbkdf2=void 0;var IA=it("crypto"),ex=at();function $m(t){return Buffer.from((0,ex.arrayify)(t))}function OA(t,e,r,n,i){return(0,ex.hexlify)((0,IA.pbkdf2Sync)($m(t),$m(e),r,n,i))}ic.pbkdf2=OA});var oc=V(ac=>{"use strict";var lF=A(S());Object.defineProperty(ac,"__esModule",{value:!0});ac.pbkdf2=void 0;var kA=tx();Object.defineProperty(ac,"pbkdf2",{enumerable:!0,get:function(){return kA.pbkdf2}})});var kd=V(Hs=>{"use strict";var hF=A(S());Object.defineProperty(Hs,"__esModule",{value:!0});Hs.SupportedAlgorithm=void 0;var NA;(function(t){t.sha256="sha256",t.sha512="sha512"})(NA=Hs.SupportedAlgorithm||(Hs.SupportedAlgorithm={}))});var rx=V(sc=>{"use strict";var bF=A(S());Object.defineProperty(sc,"__esModule",{value:!0});sc.version=void 0;sc.version="sha2/5.8.0"});var ix=V(on=>{"use strict";var vF=A(S()),JA=on&&on.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(on,"__esModule",{value:!0});on.computeHmac=on.sha512=on.sha256=on.ripemd160=void 0;var Nd=it("crypto"),UA=JA(Ds()),qs=at(),HA=kd(),nx=Pt(),qA=rx(),GA=new nx.Logger(qA.version);function XA(t){return"0x"+UA.default.ripemd160().update((0,qs.arrayify)(t)).digest("hex")}on.ripemd160=XA;function zA(t){return"0x"+(0,Nd.createHash)("sha256").update(Buffer.from((0,qs.arrayify)(t))).digest("hex")}on.sha256=zA;function KA(t){return"0x"+(0,Nd.createHash)("sha512").update(Buffer.from((0,qs.arrayify)(t))).digest("hex")}on.sha512=KA;function ZA(t,e,r){return HA.SupportedAlgorithm[t]||GA.throwError("unsupported algorithm - "+t,nx.Logger.errors.UNSUPPORTED_OPERATION,{operation:"computeHmac",algorithm:t}),"0x"+(0,Nd.createHmac)(t,Buffer.from((0,qs.arrayify)(e))).update(Buffer.from((0,qs.arrayify)(r))).digest("hex")}on.computeHmac=ZA});var ax=V(sn=>{"use strict";var xF=A(S());Object.defineProperty(sn,"__esModule",{value:!0});sn.SupportedAlgorithm=sn.sha512=sn.sha256=sn.ripemd160=sn.computeHmac=void 0;var fc=ix();Object.defineProperty(sn,"computeHmac",{enumerable:!0,get:function(){return fc.computeHmac}});Object.defineProperty(sn,"ripemd160",{enumerable:!0,get:function(){return fc.ripemd160}});Object.defineProperty(sn,"sha256",{enumerable:!0,get:function(){return fc.sha256}});Object.defineProperty(sn,"sha512",{enumerable:!0,get:function(){return fc.sha512}});var VA=kd();Object.defineProperty(sn,"SupportedAlgorithm",{enumerable:!0,get:function(){return VA.SupportedAlgorithm}})});var ox=V(cc=>{"use strict";var wF=A(S());Object.defineProperty(cc,"__esModule",{value:!0});cc.version=void 0;cc.version="wordlists/5.8.0"});var $n=V(Pa=>{"use strict";var SF=A(S());Object.defineProperty(Pa,"__esModule",{value:!0});Pa.Wordlist=Pa.logger=void 0;var jA=!1,QA=Cs(),sx=$r(),WA=Pt(),YA=ox();Pa.logger=new WA.Logger(YA.version);var $A=function(){function t(e){var r=this.constructor;Pa.logger.checkAbstract(r,t),(0,sx.defineReadOnly)(this,"locale",e)}return t.prototype.split=function(e){return e.toLowerCase().split(/ +/g)},t.prototype.join=function(e){return e.join(" ")},t.check=function(e){for(var r=[],n=0;n<2048;n++){var i=e.getWord(n);if(n!==e.getWordIndex(i))return"0x";r.push(i)}return(0,QA.id)(r.join(`
8
+ `,l=Buffer.alloc(0);r?(e.version="two-prime",l=Mb.encode(e,"der")):l=wb.encode(e,"der");var b=l.toString("base64").match(/.{1,64}/g).join(`
9
+ `);return i+b+a}});var Rb=V((pP,n0)=>{var bP=A(S());(function(){"use strict";var t="input is invalid type",e="finalize already called",r=typeof window=="object",n=r?window:{};n.JS_SHA3_NO_WINDOW&&(r=!1);var i=!r&&typeof self=="object",a=!n.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;a?n=global:i&&(n=self);var l=!n.JS_SHA3_NO_COMMON_JS&&typeof n0=="object"&&n0.exports,b=typeof define=="function"&&define.amd,y=!n.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",x="0123456789abcdef".split(""),_=[31,7936,2031616,520093696],C=[4,1024,262144,67108864],D=[1,256,65536,16777216],F=[6,1536,393216,100663296],P=[0,8,16,24],z=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],W=[224,256,384,512],X=[128,256],ne=["hex","buffer","arrayBuffer","array","digest"],$={128:168,256:136};(n.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(M){return Object.prototype.toString.call(M)==="[object Array]"}),y&&(n.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(M){return typeof M=="object"&&M.buffer&&M.buffer.constructor===ArrayBuffer});for(var ae=function(M,k,G){return function(Z){return new g(M,k,M).update(Z)[G]()}},ie=function(M,k,G){return function(Z,B){return new g(M,k,B).update(Z)[G]()}},ee=function(M,k,G){return function(Z,B,R,L){return f["cshake"+M].update(Z,B,R,L)[G]()}},ce=function(M,k,G){return function(Z,B,R,L){return f["kmac"+M].update(Z,B,R,L)[G]()}},te=function(M,k,G,Z){for(var B=0;B<ne.length;++B){var R=ne[B];M[R]=k(G,Z,R)}return M},Y=function(M,k){var G=ae(M,k,"hex");return G.create=function(){return new g(M,k,M)},G.update=function(Z){return G.create().update(Z)},te(G,ae,M,k)},T=function(M,k){var G=ie(M,k,"hex");return G.create=function(Z){return new g(M,k,Z)},G.update=function(Z,B){return G.create(B).update(Z)},te(G,ie,M,k)},s=function(M,k){var G=$[M],Z=ee(M,k,"hex");return Z.create=function(B,R,L){return!R&&!L?f["shake"+M].create(B):new g(M,k,B).bytepad([R,L],G)},Z.update=function(B,R,L,I){return Z.create(R,L,I).update(B)},te(Z,ee,M,k)},u=function(M,k){var G=$[M],Z=ce(M,k,"hex");return Z.create=function(B,R,L){return new w(M,k,R).bytepad(["KMAC",L],G).bytepad([B],G)},Z.update=function(B,R,L,I){return Z.create(B,L,I).update(R)},te(Z,ce,M,k)},d=[{name:"keccak",padding:D,bits:W,createMethod:Y},{name:"sha3",padding:F,bits:W,createMethod:Y},{name:"shake",padding:_,bits:X,createMethod:T},{name:"cshake",padding:C,bits:X,createMethod:s},{name:"kmac",padding:C,bits:X,createMethod:u}],f={},c=[],v=0;v<d.length;++v)for(var m=d[v],h=m.bits,o=0;o<h.length;++o){var p=m.name+"_"+h[o];if(c.push(p),f[p]=m.createMethod(h[o],m.padding),m.name!=="sha3"){var E=m.name+h[o];c.push(E),f[E]=f[p]}}function g(M,k,G){this.blocks=[],this.s=[],this.padding=k,this.outputBits=G,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(M<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=G>>5,this.extraBytes=(G&31)>>3;for(var Z=0;Z<50;++Z)this.s[Z]=0}g.prototype.update=function(M){if(this.finalized)throw new Error(e);var k,G=typeof M;if(G!=="string"){if(G==="object"){if(M===null)throw new Error(t);if(y&&M.constructor===ArrayBuffer)M=new Uint8Array(M);else if(!Array.isArray(M)&&(!y||!ArrayBuffer.isView(M)))throw new Error(t)}else throw new Error(t);k=!0}for(var Z=this.blocks,B=this.byteCount,R=M.length,L=this.blockCount,I=0,q=this.s,O,J;I<R;){if(this.reset)for(this.reset=!1,Z[0]=this.block,O=1;O<L+1;++O)Z[O]=0;if(k)for(O=this.start;I<R&&O<B;++I)Z[O>>2]|=M[I]<<P[O++&3];else for(O=this.start;I<R&&O<B;++I)J=M.charCodeAt(I),J<128?Z[O>>2]|=J<<P[O++&3]:J<2048?(Z[O>>2]|=(192|J>>6)<<P[O++&3],Z[O>>2]|=(128|J&63)<<P[O++&3]):J<55296||J>=57344?(Z[O>>2]|=(224|J>>12)<<P[O++&3],Z[O>>2]|=(128|J>>6&63)<<P[O++&3],Z[O>>2]|=(128|J&63)<<P[O++&3]):(J=65536+((J&1023)<<10|M.charCodeAt(++I)&1023),Z[O>>2]|=(240|J>>18)<<P[O++&3],Z[O>>2]|=(128|J>>12&63)<<P[O++&3],Z[O>>2]|=(128|J>>6&63)<<P[O++&3],Z[O>>2]|=(128|J&63)<<P[O++&3]);if(this.lastByteIndex=O,O>=B){for(this.start=O-B,this.block=Z[L],O=0;O<L;++O)q[O]^=Z[O];U(q),this.reset=!0}else this.start=O}return this},g.prototype.encode=function(M,k){var G=M&255,Z=1,B=[G];for(M=M>>8,G=M&255;G>0;)B.unshift(G),M=M>>8,G=M&255,++Z;return k?B.push(Z):B.unshift(Z),this.update(B),B.length},g.prototype.encodeString=function(M){var k,G=typeof M;if(G!=="string"){if(G==="object"){if(M===null)throw new Error(t);if(y&&M.constructor===ArrayBuffer)M=new Uint8Array(M);else if(!Array.isArray(M)&&(!y||!ArrayBuffer.isView(M)))throw new Error(t)}else throw new Error(t);k=!0}var Z=0,B=M.length;if(k)Z=B;else for(var R=0;R<M.length;++R){var L=M.charCodeAt(R);L<128?Z+=1:L<2048?Z+=2:L<55296||L>=57344?Z+=3:(L=65536+((L&1023)<<10|M.charCodeAt(++R)&1023),Z+=4)}return Z+=this.encode(Z*8),this.update(M),Z},g.prototype.bytepad=function(M,k){for(var G=this.encode(k),Z=0;Z<M.length;++Z)G+=this.encodeString(M[Z]);var B=k-G%k,R=[];return R.length=B,this.update(R),this},g.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var M=this.blocks,k=this.lastByteIndex,G=this.blockCount,Z=this.s;if(M[k>>2]|=this.padding[k&3],this.lastByteIndex===this.byteCount)for(M[0]=M[G],k=1;k<G+1;++k)M[k]=0;for(M[G-1]|=2147483648,k=0;k<G;++k)Z[k]^=M[k];U(Z)}},g.prototype.toString=g.prototype.hex=function(){this.finalize();for(var M=this.blockCount,k=this.s,G=this.outputBlocks,Z=this.extraBytes,B=0,R=0,L="",I;R<G;){for(B=0;B<M&&R<G;++B,++R)I=k[B],L+=x[I>>4&15]+x[I&15]+x[I>>12&15]+x[I>>8&15]+x[I>>20&15]+x[I>>16&15]+x[I>>28&15]+x[I>>24&15];R%M===0&&(U(k),B=0)}return Z&&(I=k[B],L+=x[I>>4&15]+x[I&15],Z>1&&(L+=x[I>>12&15]+x[I>>8&15]),Z>2&&(L+=x[I>>20&15]+x[I>>16&15])),L},g.prototype.arrayBuffer=function(){this.finalize();var M=this.blockCount,k=this.s,G=this.outputBlocks,Z=this.extraBytes,B=0,R=0,L=this.outputBits>>3,I;Z?I=new ArrayBuffer(G+1<<2):I=new ArrayBuffer(L);for(var q=new Uint32Array(I);R<G;){for(B=0;B<M&&R<G;++B,++R)q[R]=k[B];R%M===0&&U(k)}return Z&&(q[B]=k[B],I=I.slice(0,L)),I},g.prototype.buffer=g.prototype.arrayBuffer,g.prototype.digest=g.prototype.array=function(){this.finalize();for(var M=this.blockCount,k=this.s,G=this.outputBlocks,Z=this.extraBytes,B=0,R=0,L=[],I,q;R<G;){for(B=0;B<M&&R<G;++B,++R)I=R<<2,q=k[B],L[I]=q&255,L[I+1]=q>>8&255,L[I+2]=q>>16&255,L[I+3]=q>>24&255;R%M===0&&U(k)}return Z&&(I=R<<2,q=k[B],L[I]=q&255,Z>1&&(L[I+1]=q>>8&255),Z>2&&(L[I+2]=q>>16&255)),L};function w(M,k,G){g.call(this,M,k,G)}w.prototype=new g,w.prototype.finalize=function(){return this.encode(this.outputBits,!0),g.prototype.finalize.call(this)};var U=function(M){var k,G,Z,B,R,L,I,q,O,J,K,N,H,Q,j,re,De,se,le,He,oe,fe,ze,ge,ve,xt,pe,be,$e,de,ue,Zt,me,xe,Vt,ye,we,jt,Ae,Se,Qt,Me,Te,Wt,Ee,_e,Yt,Be,Ce,$t,Pe,Le,er,Re,Fe,It,ke,Ne,Tt,Et,_t,Bt,Ct;for(Z=0;Z<48;Z+=2)B=M[0]^M[10]^M[20]^M[30]^M[40],R=M[1]^M[11]^M[21]^M[31]^M[41],L=M[2]^M[12]^M[22]^M[32]^M[42],I=M[3]^M[13]^M[23]^M[33]^M[43],q=M[4]^M[14]^M[24]^M[34]^M[44],O=M[5]^M[15]^M[25]^M[35]^M[45],J=M[6]^M[16]^M[26]^M[36]^M[46],K=M[7]^M[17]^M[27]^M[37]^M[47],N=M[8]^M[18]^M[28]^M[38]^M[48],H=M[9]^M[19]^M[29]^M[39]^M[49],k=N^(L<<1|I>>>31),G=H^(I<<1|L>>>31),M[0]^=k,M[1]^=G,M[10]^=k,M[11]^=G,M[20]^=k,M[21]^=G,M[30]^=k,M[31]^=G,M[40]^=k,M[41]^=G,k=B^(q<<1|O>>>31),G=R^(O<<1|q>>>31),M[2]^=k,M[3]^=G,M[12]^=k,M[13]^=G,M[22]^=k,M[23]^=G,M[32]^=k,M[33]^=G,M[42]^=k,M[43]^=G,k=L^(J<<1|K>>>31),G=I^(K<<1|J>>>31),M[4]^=k,M[5]^=G,M[14]^=k,M[15]^=G,M[24]^=k,M[25]^=G,M[34]^=k,M[35]^=G,M[44]^=k,M[45]^=G,k=q^(N<<1|H>>>31),G=O^(H<<1|N>>>31),M[6]^=k,M[7]^=G,M[16]^=k,M[17]^=G,M[26]^=k,M[27]^=G,M[36]^=k,M[37]^=G,M[46]^=k,M[47]^=G,k=J^(B<<1|R>>>31),G=K^(R<<1|B>>>31),M[8]^=k,M[9]^=G,M[18]^=k,M[19]^=G,M[28]^=k,M[29]^=G,M[38]^=k,M[39]^=G,M[48]^=k,M[49]^=G,Q=M[0],j=M[1],_e=M[11]<<4|M[10]>>>28,Yt=M[10]<<4|M[11]>>>28,be=M[20]<<3|M[21]>>>29,$e=M[21]<<3|M[20]>>>29,Et=M[31]<<9|M[30]>>>23,_t=M[30]<<9|M[31]>>>23,Me=M[40]<<18|M[41]>>>14,Te=M[41]<<18|M[40]>>>14,xe=M[2]<<1|M[3]>>>31,Vt=M[3]<<1|M[2]>>>31,re=M[13]<<12|M[12]>>>20,De=M[12]<<12|M[13]>>>20,Be=M[22]<<10|M[23]>>>22,Ce=M[23]<<10|M[22]>>>22,de=M[33]<<13|M[32]>>>19,ue=M[32]<<13|M[33]>>>19,Bt=M[42]<<2|M[43]>>>30,Ct=M[43]<<2|M[42]>>>30,Re=M[5]<<30|M[4]>>>2,Fe=M[4]<<30|M[5]>>>2,ye=M[14]<<6|M[15]>>>26,we=M[15]<<6|M[14]>>>26,se=M[25]<<11|M[24]>>>21,le=M[24]<<11|M[25]>>>21,$t=M[34]<<15|M[35]>>>17,Pe=M[35]<<15|M[34]>>>17,Zt=M[45]<<29|M[44]>>>3,me=M[44]<<29|M[45]>>>3,ge=M[6]<<28|M[7]>>>4,ve=M[7]<<28|M[6]>>>4,It=M[17]<<23|M[16]>>>9,ke=M[16]<<23|M[17]>>>9,jt=M[26]<<25|M[27]>>>7,Ae=M[27]<<25|M[26]>>>7,He=M[36]<<21|M[37]>>>11,oe=M[37]<<21|M[36]>>>11,Le=M[47]<<24|M[46]>>>8,er=M[46]<<24|M[47]>>>8,Wt=M[8]<<27|M[9]>>>5,Ee=M[9]<<27|M[8]>>>5,xt=M[18]<<20|M[19]>>>12,pe=M[19]<<20|M[18]>>>12,Ne=M[29]<<7|M[28]>>>25,Tt=M[28]<<7|M[29]>>>25,Se=M[38]<<8|M[39]>>>24,Qt=M[39]<<8|M[38]>>>24,fe=M[48]<<14|M[49]>>>18,ze=M[49]<<14|M[48]>>>18,M[0]=Q^~re&se,M[1]=j^~De&le,M[10]=ge^~xt&be,M[11]=ve^~pe&$e,M[20]=xe^~ye&jt,M[21]=Vt^~we&Ae,M[30]=Wt^~_e&Be,M[31]=Ee^~Yt&Ce,M[40]=Re^~It&Ne,M[41]=Fe^~ke&Tt,M[2]=re^~se&He,M[3]=De^~le&oe,M[12]=xt^~be&de,M[13]=pe^~$e&ue,M[22]=ye^~jt&Se,M[23]=we^~Ae&Qt,M[32]=_e^~Be&$t,M[33]=Yt^~Ce&Pe,M[42]=It^~Ne&Et,M[43]=ke^~Tt&_t,M[4]=se^~He&fe,M[5]=le^~oe&ze,M[14]=be^~de&Zt,M[15]=$e^~ue&me,M[24]=jt^~Se&Me,M[25]=Ae^~Qt&Te,M[34]=Be^~$t&Le,M[35]=Ce^~Pe&er,M[44]=Ne^~Et&Bt,M[45]=Tt^~_t&Ct,M[6]=He^~fe&Q,M[7]=oe^~ze&j,M[16]=de^~Zt&ge,M[17]=ue^~me&ve,M[26]=Se^~Me&xe,M[27]=Qt^~Te&Vt,M[36]=$t^~Le&Wt,M[37]=Pe^~er&Ee,M[46]=Et^~Bt&Re,M[47]=_t^~Ct&Fe,M[8]=fe^~Q&re,M[9]=ze^~j&De,M[18]=Zt^~ge&xt,M[19]=me^~ve&pe,M[28]=Me^~xe&ye,M[29]=Te^~Vt&we,M[38]=Le^~Wt&_e,M[39]=er^~Ee&Yt,M[48]=Bt^~Re&It,M[49]=Ct^~Fe&ke,M[0]^=z[Z],M[1]^=z[Z+1]};if(l)n0.exports=f;else{for(v=0;v<c.length;++v)n[c[v]]=f[c[v]];b&&define(function(){return f})}})()});var Fb=V(i0=>{"use strict";var vP=A(S());Object.defineProperty(i0,"__esModule",{value:!0});i0.version=void 0;i0.version="logger/5.8.0"});var Pt=V(kn=>{"use strict";var xP=A(S());Object.defineProperty(kn,"__esModule",{value:!0});kn.Logger=kn.ErrorCode=kn.LogLevel=void 0;var Db=!1,Ib=!1,a0={debug:1,default:2,info:2,warning:3,error:4,off:5},Ob=a0.default,F4=Fb(),Pl=null;function D4(){try{var t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(function(e){try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch{t.push(e)}}),t.length)throw new Error("missing "+t.join(", "));if("\xE9".normalize("NFD")!=="e\u0301")throw new Error("broken implementation")}catch(e){return e.message}return null}var kb=D4(),Jb;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF"})(Jb=kn.LogLevel||(kn.LogLevel={}));var On;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED"})(On=kn.ErrorCode||(kn.ErrorCode={}));var Nb="0123456789abcdef",I4=function(){function t(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}return t.prototype._log=function(e,r){var n=e.toLowerCase();a0[n]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Ob>a0[n])&&console.log.apply(console,r)},t.prototype.debug=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this._log(t.levels.DEBUG,e)},t.prototype.info=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this._log(t.levels.INFO,e)},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];this._log(t.levels.WARNING,e)},t.prototype.makeError=function(e,r,n){if(Ib)return this.makeError("censored error",r,{});r||(r=t.errors.UNKNOWN_ERROR),n||(n={});var i=[];Object.keys(n).forEach(function(x){var _=n[x];try{if(_ instanceof Uint8Array){for(var C="",D=0;D<_.length;D++)C+=Nb[_[D]>>4],C+=Nb[_[D]&15];i.push(x+"=Uint8Array(0x"+C+")")}else i.push(x+"="+JSON.stringify(_))}catch{i.push(x+"="+JSON.stringify(n[x].toString()))}}),i.push("code="+r),i.push("version="+this.version);var a=e,l="";switch(r){case On.NUMERIC_FAULT:{l="NUMERIC_FAULT";var b=e;switch(b){case"overflow":case"underflow":case"division-by-zero":l+="-"+b;break;case"negative-power":case"negative-width":l+="-unsupported";break;case"unbound-bitwise-result":l+="-unbound-result";break}break}case On.CALL_EXCEPTION:case On.INSUFFICIENT_FUNDS:case On.MISSING_NEW:case On.NONCE_EXPIRED:case On.REPLACEMENT_UNDERPRICED:case On.TRANSACTION_REPLACED:case On.UNPREDICTABLE_GAS_LIMIT:l=r;break}l&&(e+=" [ See: https://links.ethers.org/v5-errors-"+l+" ]"),i.length&&(e+=" ("+i.join(", ")+")");var y=new Error(e);return y.reason=a,y.code=r,Object.keys(n).forEach(function(x){y[x]=n[x]}),y},t.prototype.throwError=function(e,r,n){throw this.makeError(e,r,n)},t.prototype.throwArgumentError=function(e,r,n){return this.throwError(e,t.errors.INVALID_ARGUMENT,{argument:r,value:n})},t.prototype.assert=function(e,r,n,i){e||this.throwError(r,n,i)},t.prototype.assertArgument=function(e,r,n,i){e||this.throwArgumentError(r,n,i)},t.prototype.checkNormalize=function(e){e==null&&(e="platform missing String.prototype.normalize"),kb&&this.throwError("platform missing String.prototype.normalize",t.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:kb})},t.prototype.checkSafeUint53=function(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))},t.prototype.checkArgumentCount=function(e,r,n){n?n=": "+n:n="",e<r&&this.throwError("missing argument"+n,t.errors.MISSING_ARGUMENT,{count:e,expectedCount:r}),e>r&&this.throwError("too many arguments"+n,t.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r})},t.prototype.checkNew=function(e,r){(e===Object||e==null)&&this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name})},t.prototype.checkAbstract=function(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",t.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name})},t.globalLogger=function(){return Pl||(Pl=new t(F4.version)),Pl},t.setCensorship=function(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Db){if(!e)return;this.globalLogger().throwError("error censorship permanent",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Ib=!!e,Db=!!r},t.setLogLevel=function(e){var r=a0[e.toLowerCase()];if(r==null){t.globalLogger().warn("invalid log level - "+e);return}Ob=r},t.from=function(e){return new t(e)},t.errors=On,t.levels=Jb,t}();kn.Logger=I4});var Ub=V(o0=>{"use strict";var wP=A(S());Object.defineProperty(o0,"__esModule",{value:!0});o0.version=void 0;o0.version="bytes/5.8.0"});var at=V(Ze=>{"use strict";var SP=A(S());Object.defineProperty(Ze,"__esModule",{value:!0});Ze.joinSignature=Ze.splitSignature=Ze.hexZeroPad=Ze.hexStripZeros=Ze.hexValue=Ze.hexConcat=Ze.hexDataSlice=Ze.hexDataLength=Ze.hexlify=Ze.isHexString=Ze.zeroPad=Ze.stripZeros=Ze.concat=Ze.arrayify=Ze.isBytes=Ze.isBytesLike=void 0;var O4=Pt(),k4=Ub(),pt=new O4.Logger(k4.version);function qb(t){return!!t.toHexString}function ho(t){return t.slice||(t.slice=function(){var e=Array.prototype.slice.call(arguments);return ho(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Gb(t){return mn(t)&&!(t.length%2)||f0(t)}Ze.isBytesLike=Gb;function Hb(t){return typeof t=="number"&&t==t&&t%1===0}function f0(t){if(t==null)return!1;if(t.constructor===Uint8Array)return!0;if(typeof t=="string"||!Hb(t.length)||t.length<0)return!1;for(var e=0;e<t.length;e++){var r=t[e];if(!Hb(r)||r<0||r>=256)return!1}return!0}Ze.isBytes=f0;function ba(t,e){if(e||(e={}),typeof t=="number"){pt.checkSafeUint53(t,"invalid arrayify value");for(var r=[];t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),ho(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),qb(t)&&(t=t.toHexString()),mn(t)){var n=t.substring(2);n.length%2&&(e.hexPad==="left"?n="0"+n:e.hexPad==="right"?n+="0":pt.throwArgumentError("hex data is odd-length","value",t));for(var r=[],i=0;i<n.length;i+=2)r.push(parseInt(n.substring(i,i+2),16));return ho(new Uint8Array(r))}return f0(t)?ho(new Uint8Array(t)):pt.throwArgumentError("invalid arrayify value","value",t)}Ze.arrayify=ba;function Xb(t){var e=t.map(function(i){return ba(i)}),r=e.reduce(function(i,a){return i+a.length},0),n=new Uint8Array(r);return e.reduce(function(i,a){return n.set(a,i),i+a.length},0),ho(n)}Ze.concat=Xb;function N4(t){var e=ba(t);if(e.length===0)return e;for(var r=0;r<e.length&&e[r]===0;)r++;return r&&(e=e.slice(r)),e}Ze.stripZeros=N4;function zb(t,e){t=ba(t),t.length>e&&pt.throwArgumentError("value out of range","value",arguments[0]);var r=new Uint8Array(e);return r.set(t,e-t.length),ho(r)}Ze.zeroPad=zb;function mn(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}Ze.isHexString=mn;var Ll="0123456789abcdef";function cr(t,e){if(e||(e={}),typeof t=="number"){pt.checkSafeUint53(t,"invalid hexlify value");for(var r="";t;)r=Ll[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),qb(t))return t.toHexString();if(mn(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":pt.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(f0(t)){for(var n="0x",i=0;i<t.length;i++){var a=t[i];n+=Ll[(a&240)>>4]+Ll[a&15]}return n}return pt.throwArgumentError("invalid hexlify value","value",t)}Ze.hexlify=cr;function J4(t){if(typeof t!="string")t=cr(t);else if(!mn(t)||t.length%2)return null;return(t.length-2)/2}Ze.hexDataLength=J4;function U4(t,e,r){return typeof t!="string"?t=cr(t):(!mn(t)||t.length%2)&&pt.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}Ze.hexDataSlice=U4;function H4(t){var e="0x";return t.forEach(function(r){e+=cr(r).substring(2)}),e}Ze.hexConcat=H4;function q4(t){var e=Kb(cr(t,{hexPad:"left"}));return e==="0x"?"0x0":e}Ze.hexValue=q4;function Kb(t){typeof t!="string"&&(t=cr(t)),mn(t)||pt.throwArgumentError("invalid hex string","value",t),t=t.substring(2);for(var e=0;e<t.length&&t[e]==="0";)e++;return"0x"+t.substring(e)}Ze.hexStripZeros=Kb;function s0(t,e){for(typeof t!="string"?t=cr(t):mn(t)||pt.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&pt.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}Ze.hexZeroPad=s0;function Zb(t){var e={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(Gb(t)){var r=ba(t);r.length===64?(e.v=27+(r[32]>>7),r[32]&=127,e.r=cr(r.slice(0,32)),e.s=cr(r.slice(32,64))):r.length===65?(e.r=cr(r.slice(0,32)),e.s=cr(r.slice(32,64)),e.v=r[64]):pt.throwArgumentError("invalid signature string","signature",t),e.v<27&&(e.v===0||e.v===1?e.v+=27:pt.throwArgumentError("signature invalid v byte","signature",t)),e.recoveryParam=1-e.v%2,e.recoveryParam&&(r[32]|=128),e._vs=cr(r.slice(32,64))}else{if(e.r=t.r,e.s=t.s,e.v=t.v,e.recoveryParam=t.recoveryParam,e._vs=t._vs,e._vs!=null){var n=zb(ba(e._vs),32);e._vs=cr(n);var i=n[0]>=128?1:0;e.recoveryParam==null?e.recoveryParam=i:e.recoveryParam!==i&&pt.throwArgumentError("signature recoveryParam mismatch _vs","signature",t),n[0]&=127;var a=cr(n);e.s==null?e.s=a:e.s!==a&&pt.throwArgumentError("signature v mismatch _vs","signature",t)}if(e.recoveryParam==null)e.v==null?pt.throwArgumentError("signature missing v and recoveryParam","signature",t):e.v===0||e.v===1?e.recoveryParam=e.v:e.recoveryParam=1-e.v%2;else if(e.v==null)e.v=27+e.recoveryParam;else{var l=e.v===0||e.v===1?e.v:1-e.v%2;e.recoveryParam!==l&&pt.throwArgumentError("signature recoveryParam mismatch v","signature",t)}e.r==null||!mn(e.r)?pt.throwArgumentError("signature missing or invalid r","signature",t):e.r=s0(e.r,32),e.s==null||!mn(e.s)?pt.throwArgumentError("signature missing or invalid s","signature",t):e.s=s0(e.s,32);var b=ba(e.s);b[0]>=128&&pt.throwArgumentError("signature s out of range","signature",t),e.recoveryParam&&(b[0]|=128);var y=cr(b);e._vs&&(mn(e._vs)||pt.throwArgumentError("signature invalid _vs","signature",t),e._vs=s0(e._vs,32)),e._vs==null?e._vs=y:e._vs!==y&&pt.throwArgumentError("signature _vs mismatch v and s","signature",t)}return e.yParityAndS=e._vs,e.compact=e.r+e.yParityAndS.substring(2),e}Ze.splitSignature=Zb;function G4(t){return t=Zb(t),cr(Xb([t.r,t.s,t.recoveryParam?"0x1c":"0x1b"]))}Ze.joinSignature=G4});var Nn=V(po=>{"use strict";var TP=A(S()),X4=po&&po.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(po,"__esModule",{value:!0});po.keccak256=void 0;var z4=X4(Rb()),K4=at();function Z4(t){return"0x"+z4.default.keccak_256((0,K4.arrayify)(t))}po.keccak256=Z4});var Vb=V(c0=>{"use strict";var _P=A(S());Object.defineProperty(c0,"__esModule",{value:!0});c0.AddressZero=void 0;c0.AddressZero="0x0000000000000000000000000000000000000000"});var Qb=V((jb,Rl)=>{var BP=A(S());(function(t,e){"use strict";function r(d,f){if(!d)throw new Error(f||"Assertion failed")}function n(d,f){d.super_=f;var c=function(){};c.prototype=f.prototype,d.prototype=new c,d.prototype.constructor=d}function i(d,f,c){if(i.isBN(d))return d;this.negative=0,this.words=null,this.length=0,this.red=null,d!==null&&((f==="le"||f==="be")&&(c=f,f=10),this._init(d||0,f||10,c||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=it("buffer").Buffer}catch{}i.isBN=function(f){return f instanceof i?!0:f!==null&&typeof f=="object"&&f.constructor.wordSize===i.wordSize&&Array.isArray(f.words)},i.max=function(f,c){return f.cmp(c)>0?f:c},i.min=function(f,c){return f.cmp(c)<0?f:c},i.prototype._init=function(f,c,v){if(typeof f=="number")return this._initNumber(f,c,v);if(typeof f=="object")return this._initArray(f,c,v);c==="hex"&&(c=16),r(c===(c|0)&&c>=2&&c<=36),f=f.toString().replace(/\s+/g,"");var m=0;f[0]==="-"&&(m++,this.negative=1),m<f.length&&(c===16?this._parseHex(f,m,v):(this._parseBase(f,c,m),v==="le"&&this._initArray(this.toArray(),c,v)))},i.prototype._initNumber=function(f,c,v){f<0&&(this.negative=1,f=-f),f<67108864?(this.words=[f&67108863],this.length=1):f<4503599627370496?(this.words=[f&67108863,f/67108864&67108863],this.length=2):(r(f<9007199254740992),this.words=[f&67108863,f/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),c,v)},i.prototype._initArray=function(f,c,v){if(r(typeof f.length=="number"),f.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(f.length/3),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var h,o,p=0;if(v==="be")for(m=f.length-1,h=0;m>=0;m-=3)o=f[m]|f[m-1]<<8|f[m-2]<<16,this.words[h]|=o<<p&67108863,this.words[h+1]=o>>>26-p&67108863,p+=24,p>=26&&(p-=26,h++);else if(v==="le")for(m=0,h=0;m<f.length;m+=3)o=f[m]|f[m+1]<<8|f[m+2]<<16,this.words[h]|=o<<p&67108863,this.words[h+1]=o>>>26-p&67108863,p+=24,p>=26&&(p-=26,h++);return this._strip()};function l(d,f){var c=d.charCodeAt(f);if(c>=48&&c<=57)return c-48;if(c>=65&&c<=70)return c-55;if(c>=97&&c<=102)return c-87;r(!1,"Invalid character in "+d)}function b(d,f,c){var v=l(d,c);return c-1>=f&&(v|=l(d,c-1)<<4),v}i.prototype._parseHex=function(f,c,v){this.length=Math.ceil((f.length-c)/6),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var h=0,o=0,p;if(v==="be")for(m=f.length-1;m>=c;m-=2)p=b(f,c,m)<<h,this.words[o]|=p&67108863,h>=18?(h-=18,o+=1,this.words[o]|=p>>>26):h+=8;else{var E=f.length-c;for(m=E%2===0?c+1:c;m<f.length;m+=2)p=b(f,c,m)<<h,this.words[o]|=p&67108863,h>=18?(h-=18,o+=1,this.words[o]|=p>>>26):h+=8}this._strip()};function y(d,f,c,v){for(var m=0,h=0,o=Math.min(d.length,c),p=f;p<o;p++){var E=d.charCodeAt(p)-48;m*=v,E>=49?h=E-49+10:E>=17?h=E-17+10:h=E,r(E>=0&&h<v,"Invalid character"),m+=h}return m}i.prototype._parseBase=function(f,c,v){this.words=[0],this.length=1;for(var m=0,h=1;h<=67108863;h*=c)m++;m--,h=h/c|0;for(var o=f.length-v,p=o%m,E=Math.min(o,o-p)+v,g=0,w=v;w<E;w+=m)g=y(f,w,w+m,c),this.imuln(h),this.words[0]+g<67108864?this.words[0]+=g:this._iaddn(g);if(p!==0){var U=1;for(g=y(f,w,f.length,c),w=0;w<p;w++)U*=c;this.imuln(U),this.words[0]+g<67108864?this.words[0]+=g:this._iaddn(g)}this._strip()},i.prototype.copy=function(f){f.words=new Array(this.length);for(var c=0;c<this.length;c++)f.words[c]=this.words[c];f.length=this.length,f.negative=this.negative,f.red=this.red};function x(d,f){d.words=f.words,d.length=f.length,d.negative=f.negative,d.red=f.red}if(i.prototype._move=function(f){x(f,this)},i.prototype.clone=function(){var f=new i(null);return this.copy(f),f},i.prototype._expand=function(f){for(;this.length<f;)this.words[this.length++]=0;return this},i.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{i.prototype[Symbol.for("nodejs.util.inspect.custom")]=_}catch{i.prototype.inspect=_}else i.prototype.inspect=_;function _(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var C=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],D=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],F=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(f,c){f=f||10,c=c|0||1;var v;if(f===16||f==="hex"){v="";for(var m=0,h=0,o=0;o<this.length;o++){var p=this.words[o],E=((p<<m|h)&16777215).toString(16);h=p>>>24-m&16777215,m+=2,m>=26&&(m-=26,o--),h!==0||o!==this.length-1?v=C[6-E.length]+E+v:v=E+v}for(h!==0&&(v=h.toString(16)+v);v.length%c!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(f===(f|0)&&f>=2&&f<=36){var g=D[f],w=F[f];v="";var U=this.clone();for(U.negative=0;!U.isZero();){var M=U.modrn(w).toString(f);U=U.idivn(w),U.isZero()?v=M+v:v=C[g-M.length]+M+v}for(this.isZero()&&(v="0"+v);v.length%c!==0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var f=this.words[0];return this.length===2?f+=this.words[1]*67108864:this.length===3&&this.words[2]===1?f+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-f:f},i.prototype.toJSON=function(){return this.toString(16,2)},a&&(i.prototype.toBuffer=function(f,c){return this.toArrayLike(a,f,c)}),i.prototype.toArray=function(f,c){return this.toArrayLike(Array,f,c)};var P=function(f,c){return f.allocUnsafe?f.allocUnsafe(c):new f(c)};i.prototype.toArrayLike=function(f,c,v){this._strip();var m=this.byteLength(),h=v||Math.max(1,m);r(m<=h,"byte array longer than desired length"),r(h>0,"Requested array length <= 0");var o=P(f,h),p=c==="le"?"LE":"BE";return this["_toArrayLike"+p](o,m),o},i.prototype._toArrayLikeLE=function(f,c){for(var v=0,m=0,h=0,o=0;h<this.length;h++){var p=this.words[h]<<o|m;f[v++]=p&255,v<f.length&&(f[v++]=p>>8&255),v<f.length&&(f[v++]=p>>16&255),o===6?(v<f.length&&(f[v++]=p>>24&255),m=0,o=0):(m=p>>>24,o+=2)}if(v<f.length)for(f[v++]=m;v<f.length;)f[v++]=0},i.prototype._toArrayLikeBE=function(f,c){for(var v=f.length-1,m=0,h=0,o=0;h<this.length;h++){var p=this.words[h]<<o|m;f[v--]=p&255,v>=0&&(f[v--]=p>>8&255),v>=0&&(f[v--]=p>>16&255),o===6?(v>=0&&(f[v--]=p>>24&255),m=0,o=0):(m=p>>>24,o+=2)}if(v>=0)for(f[v--]=m;v>=0;)f[v--]=0},Math.clz32?i.prototype._countBits=function(f){return 32-Math.clz32(f)}:i.prototype._countBits=function(f){var c=f,v=0;return c>=4096&&(v+=13,c>>>=13),c>=64&&(v+=7,c>>>=7),c>=8&&(v+=4,c>>>=4),c>=2&&(v+=2,c>>>=2),v+c},i.prototype._zeroBits=function(f){if(f===0)return 26;var c=f,v=0;return c&8191||(v+=13,c>>>=13),c&127||(v+=7,c>>>=7),c&15||(v+=4,c>>>=4),c&3||(v+=2,c>>>=2),c&1||v++,v},i.prototype.bitLength=function(){var f=this.words[this.length-1],c=this._countBits(f);return(this.length-1)*26+c};function z(d){for(var f=new Array(d.bitLength()),c=0;c<f.length;c++){var v=c/26|0,m=c%26;f[c]=d.words[v]>>>m&1}return f}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var f=0,c=0;c<this.length;c++){var v=this._zeroBits(this.words[c]);if(f+=v,v!==26)break}return f},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(f){return this.negative!==0?this.abs().inotn(f).iaddn(1):this.clone()},i.prototype.fromTwos=function(f){return this.testn(f-1)?this.notn(f).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(f){for(;this.length<f.length;)this.words[this.length++]=0;for(var c=0;c<f.length;c++)this.words[c]=this.words[c]|f.words[c];return this._strip()},i.prototype.ior=function(f){return r((this.negative|f.negative)===0),this.iuor(f)},i.prototype.or=function(f){return this.length>f.length?this.clone().ior(f):f.clone().ior(this)},i.prototype.uor=function(f){return this.length>f.length?this.clone().iuor(f):f.clone().iuor(this)},i.prototype.iuand=function(f){var c;this.length>f.length?c=f:c=this;for(var v=0;v<c.length;v++)this.words[v]=this.words[v]&f.words[v];return this.length=c.length,this._strip()},i.prototype.iand=function(f){return r((this.negative|f.negative)===0),this.iuand(f)},i.prototype.and=function(f){return this.length>f.length?this.clone().iand(f):f.clone().iand(this)},i.prototype.uand=function(f){return this.length>f.length?this.clone().iuand(f):f.clone().iuand(this)},i.prototype.iuxor=function(f){var c,v;this.length>f.length?(c=this,v=f):(c=f,v=this);for(var m=0;m<v.length;m++)this.words[m]=c.words[m]^v.words[m];if(this!==c)for(;m<c.length;m++)this.words[m]=c.words[m];return this.length=c.length,this._strip()},i.prototype.ixor=function(f){return r((this.negative|f.negative)===0),this.iuxor(f)},i.prototype.xor=function(f){return this.length>f.length?this.clone().ixor(f):f.clone().ixor(this)},i.prototype.uxor=function(f){return this.length>f.length?this.clone().iuxor(f):f.clone().iuxor(this)},i.prototype.inotn=function(f){r(typeof f=="number"&&f>=0);var c=Math.ceil(f/26)|0,v=f%26;this._expand(c),v>0&&c--;for(var m=0;m<c;m++)this.words[m]=~this.words[m]&67108863;return v>0&&(this.words[m]=~this.words[m]&67108863>>26-v),this._strip()},i.prototype.notn=function(f){return this.clone().inotn(f)},i.prototype.setn=function(f,c){r(typeof f=="number"&&f>=0);var v=f/26|0,m=f%26;return this._expand(v+1),c?this.words[v]=this.words[v]|1<<m:this.words[v]=this.words[v]&~(1<<m),this._strip()},i.prototype.iadd=function(f){var c;if(this.negative!==0&&f.negative===0)return this.negative=0,c=this.isub(f),this.negative^=1,this._normSign();if(this.negative===0&&f.negative!==0)return f.negative=0,c=this.isub(f),f.negative=1,c._normSign();var v,m;this.length>f.length?(v=this,m=f):(v=f,m=this);for(var h=0,o=0;o<m.length;o++)c=(v.words[o]|0)+(m.words[o]|0)+h,this.words[o]=c&67108863,h=c>>>26;for(;h!==0&&o<v.length;o++)c=(v.words[o]|0)+h,this.words[o]=c&67108863,h=c>>>26;if(this.length=v.length,h!==0)this.words[this.length]=h,this.length++;else if(v!==this)for(;o<v.length;o++)this.words[o]=v.words[o];return this},i.prototype.add=function(f){var c;return f.negative!==0&&this.negative===0?(f.negative=0,c=this.sub(f),f.negative^=1,c):f.negative===0&&this.negative!==0?(this.negative=0,c=f.sub(this),this.negative=1,c):this.length>f.length?this.clone().iadd(f):f.clone().iadd(this)},i.prototype.isub=function(f){if(f.negative!==0){f.negative=0;var c=this.iadd(f);return f.negative=1,c._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(f),this.negative=1,this._normSign();var v=this.cmp(f);if(v===0)return this.negative=0,this.length=1,this.words[0]=0,this;var m,h;v>0?(m=this,h=f):(m=f,h=this);for(var o=0,p=0;p<h.length;p++)c=(m.words[p]|0)-(h.words[p]|0)+o,o=c>>26,this.words[p]=c&67108863;for(;o!==0&&p<m.length;p++)c=(m.words[p]|0)+o,o=c>>26,this.words[p]=c&67108863;if(o===0&&p<m.length&&m!==this)for(;p<m.length;p++)this.words[p]=m.words[p];return this.length=Math.max(this.length,p),m!==this&&(this.negative=1),this._strip()},i.prototype.sub=function(f){return this.clone().isub(f)};function W(d,f,c){c.negative=f.negative^d.negative;var v=d.length+f.length|0;c.length=v,v=v-1|0;var m=d.words[0]|0,h=f.words[0]|0,o=m*h,p=o&67108863,E=o/67108864|0;c.words[0]=p;for(var g=1;g<v;g++){for(var w=E>>>26,U=E&67108863,M=Math.min(g,f.length-1),k=Math.max(0,g-d.length+1);k<=M;k++){var G=g-k|0;m=d.words[G]|0,h=f.words[k]|0,o=m*h+U,w+=o/67108864|0,U=o&67108863}c.words[g]=U|0,E=w|0}return E!==0?c.words[g]=E|0:c.length--,c._strip()}var X=function(f,c,v){var m=f.words,h=c.words,o=v.words,p=0,E,g,w,U=m[0]|0,M=U&8191,k=U>>>13,G=m[1]|0,Z=G&8191,B=G>>>13,R=m[2]|0,L=R&8191,I=R>>>13,q=m[3]|0,O=q&8191,J=q>>>13,K=m[4]|0,N=K&8191,H=K>>>13,Q=m[5]|0,j=Q&8191,re=Q>>>13,De=m[6]|0,se=De&8191,le=De>>>13,He=m[7]|0,oe=He&8191,fe=He>>>13,ze=m[8]|0,ge=ze&8191,ve=ze>>>13,xt=m[9]|0,pe=xt&8191,be=xt>>>13,$e=h[0]|0,de=$e&8191,ue=$e>>>13,Zt=h[1]|0,me=Zt&8191,xe=Zt>>>13,Vt=h[2]|0,ye=Vt&8191,we=Vt>>>13,jt=h[3]|0,Ae=jt&8191,Se=jt>>>13,Qt=h[4]|0,Me=Qt&8191,Te=Qt>>>13,Wt=h[5]|0,Ee=Wt&8191,_e=Wt>>>13,Yt=h[6]|0,Be=Yt&8191,Ce=Yt>>>13,$t=h[7]|0,Pe=$t&8191,Le=$t>>>13,er=h[8]|0,Re=er&8191,Fe=er>>>13,It=h[9]|0,ke=It&8191,Ne=It>>>13;v.negative=f.negative^c.negative,v.length=19,E=Math.imul(M,de),g=Math.imul(M,ue),g=g+Math.imul(k,de)|0,w=Math.imul(k,ue);var Tt=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,E=Math.imul(Z,de),g=Math.imul(Z,ue),g=g+Math.imul(B,de)|0,w=Math.imul(B,ue),E=E+Math.imul(M,me)|0,g=g+Math.imul(M,xe)|0,g=g+Math.imul(k,me)|0,w=w+Math.imul(k,xe)|0;var Et=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Et>>>26)|0,Et&=67108863,E=Math.imul(L,de),g=Math.imul(L,ue),g=g+Math.imul(I,de)|0,w=Math.imul(I,ue),E=E+Math.imul(Z,me)|0,g=g+Math.imul(Z,xe)|0,g=g+Math.imul(B,me)|0,w=w+Math.imul(B,xe)|0,E=E+Math.imul(M,ye)|0,g=g+Math.imul(M,we)|0,g=g+Math.imul(k,ye)|0,w=w+Math.imul(k,we)|0;var _t=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(_t>>>26)|0,_t&=67108863,E=Math.imul(O,de),g=Math.imul(O,ue),g=g+Math.imul(J,de)|0,w=Math.imul(J,ue),E=E+Math.imul(L,me)|0,g=g+Math.imul(L,xe)|0,g=g+Math.imul(I,me)|0,w=w+Math.imul(I,xe)|0,E=E+Math.imul(Z,ye)|0,g=g+Math.imul(Z,we)|0,g=g+Math.imul(B,ye)|0,w=w+Math.imul(B,we)|0,E=E+Math.imul(M,Ae)|0,g=g+Math.imul(M,Se)|0,g=g+Math.imul(k,Ae)|0,w=w+Math.imul(k,Se)|0;var Bt=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,E=Math.imul(N,de),g=Math.imul(N,ue),g=g+Math.imul(H,de)|0,w=Math.imul(H,ue),E=E+Math.imul(O,me)|0,g=g+Math.imul(O,xe)|0,g=g+Math.imul(J,me)|0,w=w+Math.imul(J,xe)|0,E=E+Math.imul(L,ye)|0,g=g+Math.imul(L,we)|0,g=g+Math.imul(I,ye)|0,w=w+Math.imul(I,we)|0,E=E+Math.imul(Z,Ae)|0,g=g+Math.imul(Z,Se)|0,g=g+Math.imul(B,Ae)|0,w=w+Math.imul(B,Se)|0,E=E+Math.imul(M,Me)|0,g=g+Math.imul(M,Te)|0,g=g+Math.imul(k,Me)|0,w=w+Math.imul(k,Te)|0;var Ct=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,E=Math.imul(j,de),g=Math.imul(j,ue),g=g+Math.imul(re,de)|0,w=Math.imul(re,ue),E=E+Math.imul(N,me)|0,g=g+Math.imul(N,xe)|0,g=g+Math.imul(H,me)|0,w=w+Math.imul(H,xe)|0,E=E+Math.imul(O,ye)|0,g=g+Math.imul(O,we)|0,g=g+Math.imul(J,ye)|0,w=w+Math.imul(J,we)|0,E=E+Math.imul(L,Ae)|0,g=g+Math.imul(L,Se)|0,g=g+Math.imul(I,Ae)|0,w=w+Math.imul(I,Se)|0,E=E+Math.imul(Z,Me)|0,g=g+Math.imul(Z,Te)|0,g=g+Math.imul(B,Me)|0,w=w+Math.imul(B,Te)|0,E=E+Math.imul(M,Ee)|0,g=g+Math.imul(M,_e)|0,g=g+Math.imul(k,Ee)|0,w=w+Math.imul(k,_e)|0;var gr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(gr>>>26)|0,gr&=67108863,E=Math.imul(se,de),g=Math.imul(se,ue),g=g+Math.imul(le,de)|0,w=Math.imul(le,ue),E=E+Math.imul(j,me)|0,g=g+Math.imul(j,xe)|0,g=g+Math.imul(re,me)|0,w=w+Math.imul(re,xe)|0,E=E+Math.imul(N,ye)|0,g=g+Math.imul(N,we)|0,g=g+Math.imul(H,ye)|0,w=w+Math.imul(H,we)|0,E=E+Math.imul(O,Ae)|0,g=g+Math.imul(O,Se)|0,g=g+Math.imul(J,Ae)|0,w=w+Math.imul(J,Se)|0,E=E+Math.imul(L,Me)|0,g=g+Math.imul(L,Te)|0,g=g+Math.imul(I,Me)|0,w=w+Math.imul(I,Te)|0,E=E+Math.imul(Z,Ee)|0,g=g+Math.imul(Z,_e)|0,g=g+Math.imul(B,Ee)|0,w=w+Math.imul(B,_e)|0,E=E+Math.imul(M,Be)|0,g=g+Math.imul(M,Ce)|0,g=g+Math.imul(k,Be)|0,w=w+Math.imul(k,Ce)|0;var vr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(vr>>>26)|0,vr&=67108863,E=Math.imul(oe,de),g=Math.imul(oe,ue),g=g+Math.imul(fe,de)|0,w=Math.imul(fe,ue),E=E+Math.imul(se,me)|0,g=g+Math.imul(se,xe)|0,g=g+Math.imul(le,me)|0,w=w+Math.imul(le,xe)|0,E=E+Math.imul(j,ye)|0,g=g+Math.imul(j,we)|0,g=g+Math.imul(re,ye)|0,w=w+Math.imul(re,we)|0,E=E+Math.imul(N,Ae)|0,g=g+Math.imul(N,Se)|0,g=g+Math.imul(H,Ae)|0,w=w+Math.imul(H,Se)|0,E=E+Math.imul(O,Me)|0,g=g+Math.imul(O,Te)|0,g=g+Math.imul(J,Me)|0,w=w+Math.imul(J,Te)|0,E=E+Math.imul(L,Ee)|0,g=g+Math.imul(L,_e)|0,g=g+Math.imul(I,Ee)|0,w=w+Math.imul(I,_e)|0,E=E+Math.imul(Z,Be)|0,g=g+Math.imul(Z,Ce)|0,g=g+Math.imul(B,Be)|0,w=w+Math.imul(B,Ce)|0,E=E+Math.imul(M,Pe)|0,g=g+Math.imul(M,Le)|0,g=g+Math.imul(k,Pe)|0,w=w+Math.imul(k,Le)|0;var mr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(mr>>>26)|0,mr&=67108863,E=Math.imul(ge,de),g=Math.imul(ge,ue),g=g+Math.imul(ve,de)|0,w=Math.imul(ve,ue),E=E+Math.imul(oe,me)|0,g=g+Math.imul(oe,xe)|0,g=g+Math.imul(fe,me)|0,w=w+Math.imul(fe,xe)|0,E=E+Math.imul(se,ye)|0,g=g+Math.imul(se,we)|0,g=g+Math.imul(le,ye)|0,w=w+Math.imul(le,we)|0,E=E+Math.imul(j,Ae)|0,g=g+Math.imul(j,Se)|0,g=g+Math.imul(re,Ae)|0,w=w+Math.imul(re,Se)|0,E=E+Math.imul(N,Me)|0,g=g+Math.imul(N,Te)|0,g=g+Math.imul(H,Me)|0,w=w+Math.imul(H,Te)|0,E=E+Math.imul(O,Ee)|0,g=g+Math.imul(O,_e)|0,g=g+Math.imul(J,Ee)|0,w=w+Math.imul(J,_e)|0,E=E+Math.imul(L,Be)|0,g=g+Math.imul(L,Ce)|0,g=g+Math.imul(I,Be)|0,w=w+Math.imul(I,Ce)|0,E=E+Math.imul(Z,Pe)|0,g=g+Math.imul(Z,Le)|0,g=g+Math.imul(B,Pe)|0,w=w+Math.imul(B,Le)|0,E=E+Math.imul(M,Re)|0,g=g+Math.imul(M,Fe)|0,g=g+Math.imul(k,Re)|0,w=w+Math.imul(k,Fe)|0;var xr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(xr>>>26)|0,xr&=67108863,E=Math.imul(pe,de),g=Math.imul(pe,ue),g=g+Math.imul(be,de)|0,w=Math.imul(be,ue),E=E+Math.imul(ge,me)|0,g=g+Math.imul(ge,xe)|0,g=g+Math.imul(ve,me)|0,w=w+Math.imul(ve,xe)|0,E=E+Math.imul(oe,ye)|0,g=g+Math.imul(oe,we)|0,g=g+Math.imul(fe,ye)|0,w=w+Math.imul(fe,we)|0,E=E+Math.imul(se,Ae)|0,g=g+Math.imul(se,Se)|0,g=g+Math.imul(le,Ae)|0,w=w+Math.imul(le,Se)|0,E=E+Math.imul(j,Me)|0,g=g+Math.imul(j,Te)|0,g=g+Math.imul(re,Me)|0,w=w+Math.imul(re,Te)|0,E=E+Math.imul(N,Ee)|0,g=g+Math.imul(N,_e)|0,g=g+Math.imul(H,Ee)|0,w=w+Math.imul(H,_e)|0,E=E+Math.imul(O,Be)|0,g=g+Math.imul(O,Ce)|0,g=g+Math.imul(J,Be)|0,w=w+Math.imul(J,Ce)|0,E=E+Math.imul(L,Pe)|0,g=g+Math.imul(L,Le)|0,g=g+Math.imul(I,Pe)|0,w=w+Math.imul(I,Le)|0,E=E+Math.imul(Z,Re)|0,g=g+Math.imul(Z,Fe)|0,g=g+Math.imul(B,Re)|0,w=w+Math.imul(B,Fe)|0,E=E+Math.imul(M,ke)|0,g=g+Math.imul(M,Ne)|0,g=g+Math.imul(k,ke)|0,w=w+Math.imul(k,Ne)|0;var yr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(yr>>>26)|0,yr&=67108863,E=Math.imul(pe,me),g=Math.imul(pe,xe),g=g+Math.imul(be,me)|0,w=Math.imul(be,xe),E=E+Math.imul(ge,ye)|0,g=g+Math.imul(ge,we)|0,g=g+Math.imul(ve,ye)|0,w=w+Math.imul(ve,we)|0,E=E+Math.imul(oe,Ae)|0,g=g+Math.imul(oe,Se)|0,g=g+Math.imul(fe,Ae)|0,w=w+Math.imul(fe,Se)|0,E=E+Math.imul(se,Me)|0,g=g+Math.imul(se,Te)|0,g=g+Math.imul(le,Me)|0,w=w+Math.imul(le,Te)|0,E=E+Math.imul(j,Ee)|0,g=g+Math.imul(j,_e)|0,g=g+Math.imul(re,Ee)|0,w=w+Math.imul(re,_e)|0,E=E+Math.imul(N,Be)|0,g=g+Math.imul(N,Ce)|0,g=g+Math.imul(H,Be)|0,w=w+Math.imul(H,Ce)|0,E=E+Math.imul(O,Pe)|0,g=g+Math.imul(O,Le)|0,g=g+Math.imul(J,Pe)|0,w=w+Math.imul(J,Le)|0,E=E+Math.imul(L,Re)|0,g=g+Math.imul(L,Fe)|0,g=g+Math.imul(I,Re)|0,w=w+Math.imul(I,Fe)|0,E=E+Math.imul(Z,ke)|0,g=g+Math.imul(Z,Ne)|0,g=g+Math.imul(B,ke)|0,w=w+Math.imul(B,Ne)|0;var wr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(wr>>>26)|0,wr&=67108863,E=Math.imul(pe,ye),g=Math.imul(pe,we),g=g+Math.imul(be,ye)|0,w=Math.imul(be,we),E=E+Math.imul(ge,Ae)|0,g=g+Math.imul(ge,Se)|0,g=g+Math.imul(ve,Ae)|0,w=w+Math.imul(ve,Se)|0,E=E+Math.imul(oe,Me)|0,g=g+Math.imul(oe,Te)|0,g=g+Math.imul(fe,Me)|0,w=w+Math.imul(fe,Te)|0,E=E+Math.imul(se,Ee)|0,g=g+Math.imul(se,_e)|0,g=g+Math.imul(le,Ee)|0,w=w+Math.imul(le,_e)|0,E=E+Math.imul(j,Be)|0,g=g+Math.imul(j,Ce)|0,g=g+Math.imul(re,Be)|0,w=w+Math.imul(re,Ce)|0,E=E+Math.imul(N,Pe)|0,g=g+Math.imul(N,Le)|0,g=g+Math.imul(H,Pe)|0,w=w+Math.imul(H,Le)|0,E=E+Math.imul(O,Re)|0,g=g+Math.imul(O,Fe)|0,g=g+Math.imul(J,Re)|0,w=w+Math.imul(J,Fe)|0,E=E+Math.imul(L,ke)|0,g=g+Math.imul(L,Ne)|0,g=g+Math.imul(I,ke)|0,w=w+Math.imul(I,Ne)|0;var Ar=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,E=Math.imul(pe,Ae),g=Math.imul(pe,Se),g=g+Math.imul(be,Ae)|0,w=Math.imul(be,Se),E=E+Math.imul(ge,Me)|0,g=g+Math.imul(ge,Te)|0,g=g+Math.imul(ve,Me)|0,w=w+Math.imul(ve,Te)|0,E=E+Math.imul(oe,Ee)|0,g=g+Math.imul(oe,_e)|0,g=g+Math.imul(fe,Ee)|0,w=w+Math.imul(fe,_e)|0,E=E+Math.imul(se,Be)|0,g=g+Math.imul(se,Ce)|0,g=g+Math.imul(le,Be)|0,w=w+Math.imul(le,Ce)|0,E=E+Math.imul(j,Pe)|0,g=g+Math.imul(j,Le)|0,g=g+Math.imul(re,Pe)|0,w=w+Math.imul(re,Le)|0,E=E+Math.imul(N,Re)|0,g=g+Math.imul(N,Fe)|0,g=g+Math.imul(H,Re)|0,w=w+Math.imul(H,Fe)|0,E=E+Math.imul(O,ke)|0,g=g+Math.imul(O,Ne)|0,g=g+Math.imul(J,ke)|0,w=w+Math.imul(J,Ne)|0;var Sr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,E=Math.imul(pe,Me),g=Math.imul(pe,Te),g=g+Math.imul(be,Me)|0,w=Math.imul(be,Te),E=E+Math.imul(ge,Ee)|0,g=g+Math.imul(ge,_e)|0,g=g+Math.imul(ve,Ee)|0,w=w+Math.imul(ve,_e)|0,E=E+Math.imul(oe,Be)|0,g=g+Math.imul(oe,Ce)|0,g=g+Math.imul(fe,Be)|0,w=w+Math.imul(fe,Ce)|0,E=E+Math.imul(se,Pe)|0,g=g+Math.imul(se,Le)|0,g=g+Math.imul(le,Pe)|0,w=w+Math.imul(le,Le)|0,E=E+Math.imul(j,Re)|0,g=g+Math.imul(j,Fe)|0,g=g+Math.imul(re,Re)|0,w=w+Math.imul(re,Fe)|0,E=E+Math.imul(N,ke)|0,g=g+Math.imul(N,Ne)|0,g=g+Math.imul(H,ke)|0,w=w+Math.imul(H,Ne)|0;var Mr=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,E=Math.imul(pe,Ee),g=Math.imul(pe,_e),g=g+Math.imul(be,Ee)|0,w=Math.imul(be,_e),E=E+Math.imul(ge,Be)|0,g=g+Math.imul(ge,Ce)|0,g=g+Math.imul(ve,Be)|0,w=w+Math.imul(ve,Ce)|0,E=E+Math.imul(oe,Pe)|0,g=g+Math.imul(oe,Le)|0,g=g+Math.imul(fe,Pe)|0,w=w+Math.imul(fe,Le)|0,E=E+Math.imul(se,Re)|0,g=g+Math.imul(se,Fe)|0,g=g+Math.imul(le,Re)|0,w=w+Math.imul(le,Fe)|0,E=E+Math.imul(j,ke)|0,g=g+Math.imul(j,Ne)|0,g=g+Math.imul(re,ke)|0,w=w+Math.imul(re,Ne)|0;var pn=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(pn>>>26)|0,pn&=67108863,E=Math.imul(pe,Be),g=Math.imul(pe,Ce),g=g+Math.imul(be,Be)|0,w=Math.imul(be,Ce),E=E+Math.imul(ge,Pe)|0,g=g+Math.imul(ge,Le)|0,g=g+Math.imul(ve,Pe)|0,w=w+Math.imul(ve,Le)|0,E=E+Math.imul(oe,Re)|0,g=g+Math.imul(oe,Fe)|0,g=g+Math.imul(fe,Re)|0,w=w+Math.imul(fe,Fe)|0,E=E+Math.imul(se,ke)|0,g=g+Math.imul(se,Ne)|0,g=g+Math.imul(le,ke)|0,w=w+Math.imul(le,Ne)|0;var bn=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(bn>>>26)|0,bn&=67108863,E=Math.imul(pe,Pe),g=Math.imul(pe,Le),g=g+Math.imul(be,Pe)|0,w=Math.imul(be,Le),E=E+Math.imul(ge,Re)|0,g=g+Math.imul(ge,Fe)|0,g=g+Math.imul(ve,Re)|0,w=w+Math.imul(ve,Fe)|0,E=E+Math.imul(oe,ke)|0,g=g+Math.imul(oe,Ne)|0,g=g+Math.imul(fe,ke)|0,w=w+Math.imul(fe,Ne)|0;var su=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(su>>>26)|0,su&=67108863,E=Math.imul(pe,Re),g=Math.imul(pe,Fe),g=g+Math.imul(be,Re)|0,w=Math.imul(be,Fe),E=E+Math.imul(ge,ke)|0,g=g+Math.imul(ge,Ne)|0,g=g+Math.imul(ve,ke)|0,w=w+Math.imul(ve,Ne)|0;var fu=(p+E|0)+((g&8191)<<13)|0;p=(w+(g>>>13)|0)+(fu>>>26)|0,fu&=67108863,E=Math.imul(pe,ke),g=Math.imul(pe,Ne),g=g+Math.imul(be,ke)|0,w=Math.imul(be,Ne);var cu=(p+E|0)+((g&8191)<<13)|0;return p=(w+(g>>>13)|0)+(cu>>>26)|0,cu&=67108863,o[0]=Tt,o[1]=Et,o[2]=_t,o[3]=Bt,o[4]=Ct,o[5]=gr,o[6]=vr,o[7]=mr,o[8]=xr,o[9]=yr,o[10]=wr,o[11]=Ar,o[12]=Sr,o[13]=Mr,o[14]=pn,o[15]=bn,o[16]=su,o[17]=fu,o[18]=cu,p!==0&&(o[19]=p,v.length++),v};Math.imul||(X=W);function ne(d,f,c){c.negative=f.negative^d.negative,c.length=d.length+f.length;for(var v=0,m=0,h=0;h<c.length-1;h++){var o=m;m=0;for(var p=v&67108863,E=Math.min(h,f.length-1),g=Math.max(0,h-d.length+1);g<=E;g++){var w=h-g,U=d.words[w]|0,M=f.words[g]|0,k=U*M,G=k&67108863;o=o+(k/67108864|0)|0,G=G+p|0,p=G&67108863,o=o+(G>>>26)|0,m+=o>>>26,o&=67108863}c.words[h]=p,v=o,o=m}return v!==0?c.words[h]=v:c.length--,c._strip()}function $(d,f,c){return ne(d,f,c)}i.prototype.mulTo=function(f,c){var v,m=this.length+f.length;return this.length===10&&f.length===10?v=X(this,f,c):m<63?v=W(this,f,c):m<1024?v=ne(this,f,c):v=$(this,f,c),v};function ae(d,f){this.x=d,this.y=f}ae.prototype.makeRBT=function(f){for(var c=new Array(f),v=i.prototype._countBits(f)-1,m=0;m<f;m++)c[m]=this.revBin(m,v,f);return c},ae.prototype.revBin=function(f,c,v){if(f===0||f===v-1)return f;for(var m=0,h=0;h<c;h++)m|=(f&1)<<c-h-1,f>>=1;return m},ae.prototype.permute=function(f,c,v,m,h,o){for(var p=0;p<o;p++)m[p]=c[f[p]],h[p]=v[f[p]]},ae.prototype.transform=function(f,c,v,m,h,o){this.permute(o,f,c,v,m,h);for(var p=1;p<h;p<<=1)for(var E=p<<1,g=Math.cos(2*Math.PI/E),w=Math.sin(2*Math.PI/E),U=0;U<h;U+=E)for(var M=g,k=w,G=0;G<p;G++){var Z=v[U+G],B=m[U+G],R=v[U+G+p],L=m[U+G+p],I=M*R-k*L;L=M*L+k*R,R=I,v[U+G]=Z+R,m[U+G]=B+L,v[U+G+p]=Z-R,m[U+G+p]=B-L,G!==E&&(I=g*M-w*k,k=g*k+w*M,M=I)}},ae.prototype.guessLen13b=function(f,c){var v=Math.max(c,f)|1,m=v&1,h=0;for(v=v/2|0;v;v=v>>>1)h++;return 1<<h+1+m},ae.prototype.conjugate=function(f,c,v){if(!(v<=1))for(var m=0;m<v/2;m++){var h=f[m];f[m]=f[v-m-1],f[v-m-1]=h,h=c[m],c[m]=-c[v-m-1],c[v-m-1]=-h}},ae.prototype.normalize13b=function(f,c){for(var v=0,m=0;m<c/2;m++){var h=Math.round(f[2*m+1]/c)*8192+Math.round(f[2*m]/c)+v;f[m]=h&67108863,h<67108864?v=0:v=h/67108864|0}return f},ae.prototype.convert13b=function(f,c,v,m){for(var h=0,o=0;o<c;o++)h=h+(f[o]|0),v[2*o]=h&8191,h=h>>>13,v[2*o+1]=h&8191,h=h>>>13;for(o=2*c;o<m;++o)v[o]=0;r(h===0),r((h&-8192)===0)},ae.prototype.stub=function(f){for(var c=new Array(f),v=0;v<f;v++)c[v]=0;return c},ae.prototype.mulp=function(f,c,v){var m=2*this.guessLen13b(f.length,c.length),h=this.makeRBT(m),o=this.stub(m),p=new Array(m),E=new Array(m),g=new Array(m),w=new Array(m),U=new Array(m),M=new Array(m),k=v.words;k.length=m,this.convert13b(f.words,f.length,p,m),this.convert13b(c.words,c.length,w,m),this.transform(p,o,E,g,m,h),this.transform(w,o,U,M,m,h);for(var G=0;G<m;G++){var Z=E[G]*U[G]-g[G]*M[G];g[G]=E[G]*M[G]+g[G]*U[G],E[G]=Z}return this.conjugate(E,g,m),this.transform(E,g,k,o,m,h),this.conjugate(k,o,m),this.normalize13b(k,m),v.negative=f.negative^c.negative,v.length=f.length+c.length,v._strip()},i.prototype.mul=function(f){var c=new i(null);return c.words=new Array(this.length+f.length),this.mulTo(f,c)},i.prototype.mulf=function(f){var c=new i(null);return c.words=new Array(this.length+f.length),$(this,f,c)},i.prototype.imul=function(f){return this.clone().mulTo(f,this)},i.prototype.imuln=function(f){var c=f<0;c&&(f=-f),r(typeof f=="number"),r(f<67108864);for(var v=0,m=0;m<this.length;m++){var h=(this.words[m]|0)*f,o=(h&67108863)+(v&67108863);v>>=26,v+=h/67108864|0,v+=o>>>26,this.words[m]=o&67108863}return v!==0&&(this.words[m]=v,this.length++),this.length=f===0?1:this.length,c?this.ineg():this},i.prototype.muln=function(f){return this.clone().imuln(f)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(f){var c=z(f);if(c.length===0)return new i(1);for(var v=this,m=0;m<c.length&&c[m]===0;m++,v=v.sqr());if(++m<c.length)for(var h=v.sqr();m<c.length;m++,h=h.sqr())c[m]!==0&&(v=v.mul(h));return v},i.prototype.iushln=function(f){r(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26,m=67108863>>>26-c<<26-c,h;if(c!==0){var o=0;for(h=0;h<this.length;h++){var p=this.words[h]&m,E=(this.words[h]|0)-p<<c;this.words[h]=E|o,o=p>>>26-c}o&&(this.words[h]=o,this.length++)}if(v!==0){for(h=this.length-1;h>=0;h--)this.words[h+v]=this.words[h];for(h=0;h<v;h++)this.words[h]=0;this.length+=v}return this._strip()},i.prototype.ishln=function(f){return r(this.negative===0),this.iushln(f)},i.prototype.iushrn=function(f,c,v){r(typeof f=="number"&&f>=0);var m;c?m=(c-c%26)/26:m=0;var h=f%26,o=Math.min((f-h)/26,this.length),p=67108863^67108863>>>h<<h,E=v;if(m-=o,m=Math.max(0,m),E){for(var g=0;g<o;g++)E.words[g]=this.words[g];E.length=o}if(o!==0)if(this.length>o)for(this.length-=o,g=0;g<this.length;g++)this.words[g]=this.words[g+o];else this.words[0]=0,this.length=1;var w=0;for(g=this.length-1;g>=0&&(w!==0||g>=m);g--){var U=this.words[g]|0;this.words[g]=w<<26-h|U>>>h,w=U&p}return E&&w!==0&&(E.words[E.length++]=w),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},i.prototype.ishrn=function(f,c,v){return r(this.negative===0),this.iushrn(f,c,v)},i.prototype.shln=function(f){return this.clone().ishln(f)},i.prototype.ushln=function(f){return this.clone().iushln(f)},i.prototype.shrn=function(f){return this.clone().ishrn(f)},i.prototype.ushrn=function(f){return this.clone().iushrn(f)},i.prototype.testn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26,m=1<<c;if(this.length<=v)return!1;var h=this.words[v];return!!(h&m)},i.prototype.imaskn=function(f){r(typeof f=="number"&&f>=0);var c=f%26,v=(f-c)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(c!==0&&v++,this.length=Math.min(v,this.length),c!==0){var m=67108863^67108863>>>c<<c;this.words[this.length-1]&=m}return this._strip()},i.prototype.maskn=function(f){return this.clone().imaskn(f)},i.prototype.iaddn=function(f){return r(typeof f=="number"),r(f<67108864),f<0?this.isubn(-f):this.negative!==0?this.length===1&&(this.words[0]|0)<=f?(this.words[0]=f-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(f),this.negative=1,this):this._iaddn(f)},i.prototype._iaddn=function(f){this.words[0]+=f;for(var c=0;c<this.length&&this.words[c]>=67108864;c++)this.words[c]-=67108864,c===this.length-1?this.words[c+1]=1:this.words[c+1]++;return this.length=Math.max(this.length,c+1),this},i.prototype.isubn=function(f){if(r(typeof f=="number"),r(f<67108864),f<0)return this.iaddn(-f);if(this.negative!==0)return this.negative=0,this.iaddn(f),this.negative=1,this;if(this.words[0]-=f,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var c=0;c<this.length&&this.words[c]<0;c++)this.words[c]+=67108864,this.words[c+1]-=1;return this._strip()},i.prototype.addn=function(f){return this.clone().iaddn(f)},i.prototype.subn=function(f){return this.clone().isubn(f)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(f,c,v){var m=f.length+v,h;this._expand(m);var o,p=0;for(h=0;h<f.length;h++){o=(this.words[h+v]|0)+p;var E=(f.words[h]|0)*c;o-=E&67108863,p=(o>>26)-(E/67108864|0),this.words[h+v]=o&67108863}for(;h<this.length-v;h++)o=(this.words[h+v]|0)+p,p=o>>26,this.words[h+v]=o&67108863;if(p===0)return this._strip();for(r(p===-1),p=0,h=0;h<this.length;h++)o=-(this.words[h]|0)+p,p=o>>26,this.words[h]=o&67108863;return this.negative=1,this._strip()},i.prototype._wordDiv=function(f,c){var v=this.length-f.length,m=this.clone(),h=f,o=h.words[h.length-1]|0,p=this._countBits(o);v=26-p,v!==0&&(h=h.ushln(v),m.iushln(v),o=h.words[h.length-1]|0);var E=m.length-h.length,g;if(c!=="mod"){g=new i(null),g.length=E+1,g.words=new Array(g.length);for(var w=0;w<g.length;w++)g.words[w]=0}var U=m.clone()._ishlnsubmul(h,1,E);U.negative===0&&(m=U,g&&(g.words[E]=1));for(var M=E-1;M>=0;M--){var k=(m.words[h.length+M]|0)*67108864+(m.words[h.length+M-1]|0);for(k=Math.min(k/o|0,67108863),m._ishlnsubmul(h,k,M);m.negative!==0;)k--,m.negative=0,m._ishlnsubmul(h,1,M),m.isZero()||(m.negative^=1);g&&(g.words[M]=k)}return g&&g._strip(),m._strip(),c!=="div"&&v!==0&&m.iushrn(v),{div:g||null,mod:m}},i.prototype.divmod=function(f,c,v){if(r(!f.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var m,h,o;return this.negative!==0&&f.negative===0?(o=this.neg().divmod(f,c),c!=="mod"&&(m=o.div.neg()),c!=="div"&&(h=o.mod.neg(),v&&h.negative!==0&&h.iadd(f)),{div:m,mod:h}):this.negative===0&&f.negative!==0?(o=this.divmod(f.neg(),c),c!=="mod"&&(m=o.div.neg()),{div:m,mod:o.mod}):this.negative&f.negative?(o=this.neg().divmod(f.neg(),c),c!=="div"&&(h=o.mod.neg(),v&&h.negative!==0&&h.isub(f)),{div:o.div,mod:h}):f.length>this.length||this.cmp(f)<0?{div:new i(0),mod:this}:f.length===1?c==="div"?{div:this.divn(f.words[0]),mod:null}:c==="mod"?{div:null,mod:new i(this.modrn(f.words[0]))}:{div:this.divn(f.words[0]),mod:new i(this.modrn(f.words[0]))}:this._wordDiv(f,c)},i.prototype.div=function(f){return this.divmod(f,"div",!1).div},i.prototype.mod=function(f){return this.divmod(f,"mod",!1).mod},i.prototype.umod=function(f){return this.divmod(f,"mod",!0).mod},i.prototype.divRound=function(f){var c=this.divmod(f);if(c.mod.isZero())return c.div;var v=c.div.negative!==0?c.mod.isub(f):c.mod,m=f.ushrn(1),h=f.andln(1),o=v.cmp(m);return o<0||h===1&&o===0?c.div:c.div.negative!==0?c.div.isubn(1):c.div.iaddn(1)},i.prototype.modrn=function(f){var c=f<0;c&&(f=-f),r(f<=67108863);for(var v=(1<<26)%f,m=0,h=this.length-1;h>=0;h--)m=(v*m+(this.words[h]|0))%f;return c?-m:m},i.prototype.modn=function(f){return this.modrn(f)},i.prototype.idivn=function(f){var c=f<0;c&&(f=-f),r(f<=67108863);for(var v=0,m=this.length-1;m>=0;m--){var h=(this.words[m]|0)+v*67108864;this.words[m]=h/f|0,v=h%f}return this._strip(),c?this.ineg():this},i.prototype.divn=function(f){return this.clone().idivn(f)},i.prototype.egcd=function(f){r(f.negative===0),r(!f.isZero());var c=this,v=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var m=new i(1),h=new i(0),o=new i(0),p=new i(1),E=0;c.isEven()&&v.isEven();)c.iushrn(1),v.iushrn(1),++E;for(var g=v.clone(),w=c.clone();!c.isZero();){for(var U=0,M=1;!(c.words[0]&M)&&U<26;++U,M<<=1);if(U>0)for(c.iushrn(U);U-- >0;)(m.isOdd()||h.isOdd())&&(m.iadd(g),h.isub(w)),m.iushrn(1),h.iushrn(1);for(var k=0,G=1;!(v.words[0]&G)&&k<26;++k,G<<=1);if(k>0)for(v.iushrn(k);k-- >0;)(o.isOdd()||p.isOdd())&&(o.iadd(g),p.isub(w)),o.iushrn(1),p.iushrn(1);c.cmp(v)>=0?(c.isub(v),m.isub(o),h.isub(p)):(v.isub(c),o.isub(m),p.isub(h))}return{a:o,b:p,gcd:v.iushln(E)}},i.prototype._invmp=function(f){r(f.negative===0),r(!f.isZero());var c=this,v=f.clone();c.negative!==0?c=c.umod(f):c=c.clone();for(var m=new i(1),h=new i(0),o=v.clone();c.cmpn(1)>0&&v.cmpn(1)>0;){for(var p=0,E=1;!(c.words[0]&E)&&p<26;++p,E<<=1);if(p>0)for(c.iushrn(p);p-- >0;)m.isOdd()&&m.iadd(o),m.iushrn(1);for(var g=0,w=1;!(v.words[0]&w)&&g<26;++g,w<<=1);if(g>0)for(v.iushrn(g);g-- >0;)h.isOdd()&&h.iadd(o),h.iushrn(1);c.cmp(v)>=0?(c.isub(v),m.isub(h)):(v.isub(c),h.isub(m))}var U;return c.cmpn(1)===0?U=m:U=h,U.cmpn(0)<0&&U.iadd(f),U},i.prototype.gcd=function(f){if(this.isZero())return f.abs();if(f.isZero())return this.abs();var c=this.clone(),v=f.clone();c.negative=0,v.negative=0;for(var m=0;c.isEven()&&v.isEven();m++)c.iushrn(1),v.iushrn(1);do{for(;c.isEven();)c.iushrn(1);for(;v.isEven();)v.iushrn(1);var h=c.cmp(v);if(h<0){var o=c;c=v,v=o}else if(h===0||v.cmpn(1)===0)break;c.isub(v)}while(!0);return v.iushln(m)},i.prototype.invm=function(f){return this.egcd(f).a.umod(f)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(f){return this.words[0]&f},i.prototype.bincn=function(f){r(typeof f=="number");var c=f%26,v=(f-c)/26,m=1<<c;if(this.length<=v)return this._expand(v+1),this.words[v]|=m,this;for(var h=m,o=v;h!==0&&o<this.length;o++){var p=this.words[o]|0;p+=h,h=p>>>26,p&=67108863,this.words[o]=p}return h!==0&&(this.words[o]=h,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(f){var c=f<0;if(this.negative!==0&&!c)return-1;if(this.negative===0&&c)return 1;this._strip();var v;if(this.length>1)v=1;else{c&&(f=-f),r(f<=67108863,"Number is too big");var m=this.words[0]|0;v=m===f?0:m<f?-1:1}return this.negative!==0?-v|0:v},i.prototype.cmp=function(f){if(this.negative!==0&&f.negative===0)return-1;if(this.negative===0&&f.negative!==0)return 1;var c=this.ucmp(f);return this.negative!==0?-c|0:c},i.prototype.ucmp=function(f){if(this.length>f.length)return 1;if(this.length<f.length)return-1;for(var c=0,v=this.length-1;v>=0;v--){var m=this.words[v]|0,h=f.words[v]|0;if(m!==h){m<h?c=-1:m>h&&(c=1);break}}return c},i.prototype.gtn=function(f){return this.cmpn(f)===1},i.prototype.gt=function(f){return this.cmp(f)===1},i.prototype.gten=function(f){return this.cmpn(f)>=0},i.prototype.gte=function(f){return this.cmp(f)>=0},i.prototype.ltn=function(f){return this.cmpn(f)===-1},i.prototype.lt=function(f){return this.cmp(f)===-1},i.prototype.lten=function(f){return this.cmpn(f)<=0},i.prototype.lte=function(f){return this.cmp(f)<=0},i.prototype.eqn=function(f){return this.cmpn(f)===0},i.prototype.eq=function(f){return this.cmp(f)===0},i.red=function(f){return new s(f)},i.prototype.toRed=function(f){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),f.convertTo(this)._forceRed(f)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(f){return this.red=f,this},i.prototype.forceRed=function(f){return r(!this.red,"Already a number in reduction context"),this._forceRed(f)},i.prototype.redAdd=function(f){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,f)},i.prototype.redIAdd=function(f){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,f)},i.prototype.redSub=function(f){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,f)},i.prototype.redISub=function(f){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,f)},i.prototype.redShl=function(f){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,f)},i.prototype.redMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.mul(this,f)},i.prototype.redIMul=function(f){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,f),this.red.imul(this,f)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(f){return r(this.red&&!f.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,f)};var ie={k256:null,p224:null,p192:null,p25519:null};function ee(d,f){this.name=d,this.p=new i(f,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}ee.prototype._tmp=function(){var f=new i(null);return f.words=new Array(Math.ceil(this.n/13)),f},ee.prototype.ireduce=function(f){var c=f,v;do this.split(c,this.tmp),c=this.imulK(c),c=c.iadd(this.tmp),v=c.bitLength();while(v>this.n);var m=v<this.n?-1:c.ucmp(this.p);return m===0?(c.words[0]=0,c.length=1):m>0?c.isub(this.p):c.strip!==void 0?c.strip():c._strip(),c},ee.prototype.split=function(f,c){f.iushrn(this.n,0,c)},ee.prototype.imulK=function(f){return f.imul(this.k)};function ce(){ee.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(ce,ee),ce.prototype.split=function(f,c){for(var v=4194303,m=Math.min(f.length,9),h=0;h<m;h++)c.words[h]=f.words[h];if(c.length=m,f.length<=9){f.words[0]=0,f.length=1;return}var o=f.words[9];for(c.words[c.length++]=o&v,h=10;h<f.length;h++){var p=f.words[h]|0;f.words[h-10]=(p&v)<<4|o>>>22,o=p}o>>>=22,f.words[h-10]=o,o===0&&f.length>10?f.length-=10:f.length-=9},ce.prototype.imulK=function(f){f.words[f.length]=0,f.words[f.length+1]=0,f.length+=2;for(var c=0,v=0;v<f.length;v++){var m=f.words[v]|0;c+=m*977,f.words[v]=c&67108863,c=m*64+(c/67108864|0)}return f.words[f.length-1]===0&&(f.length--,f.words[f.length-1]===0&&f.length--),f};function te(){ee.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(te,ee);function Y(){ee.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(Y,ee);function T(){ee.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(T,ee),T.prototype.imulK=function(f){for(var c=0,v=0;v<f.length;v++){var m=(f.words[v]|0)*19+c,h=m&67108863;m>>>=26,f.words[v]=h,c=m}return c!==0&&(f.words[f.length++]=c),f},i._prime=function(f){if(ie[f])return ie[f];var c;if(f==="k256")c=new ce;else if(f==="p224")c=new te;else if(f==="p192")c=new Y;else if(f==="p25519")c=new T;else throw new Error("Unknown prime "+f);return ie[f]=c,c};function s(d){if(typeof d=="string"){var f=i._prime(d);this.m=f.p,this.prime=f}else r(d.gtn(1),"modulus must be greater than 1"),this.m=d,this.prime=null}s.prototype._verify1=function(f){r(f.negative===0,"red works only with positives"),r(f.red,"red works only with red numbers")},s.prototype._verify2=function(f,c){r((f.negative|c.negative)===0,"red works only with positives"),r(f.red&&f.red===c.red,"red works only with red numbers")},s.prototype.imod=function(f){return this.prime?this.prime.ireduce(f)._forceRed(this):(x(f,f.umod(this.m)._forceRed(this)),f)},s.prototype.neg=function(f){return f.isZero()?f.clone():this.m.sub(f)._forceRed(this)},s.prototype.add=function(f,c){this._verify2(f,c);var v=f.add(c);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},s.prototype.iadd=function(f,c){this._verify2(f,c);var v=f.iadd(c);return v.cmp(this.m)>=0&&v.isub(this.m),v},s.prototype.sub=function(f,c){this._verify2(f,c);var v=f.sub(c);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},s.prototype.isub=function(f,c){this._verify2(f,c);var v=f.isub(c);return v.cmpn(0)<0&&v.iadd(this.m),v},s.prototype.shl=function(f,c){return this._verify1(f),this.imod(f.ushln(c))},s.prototype.imul=function(f,c){return this._verify2(f,c),this.imod(f.imul(c))},s.prototype.mul=function(f,c){return this._verify2(f,c),this.imod(f.mul(c))},s.prototype.isqr=function(f){return this.imul(f,f.clone())},s.prototype.sqr=function(f){return this.mul(f,f)},s.prototype.sqrt=function(f){if(f.isZero())return f.clone();var c=this.m.andln(3);if(r(c%2===1),c===3){var v=this.m.add(new i(1)).iushrn(2);return this.pow(f,v)}for(var m=this.m.subn(1),h=0;!m.isZero()&&m.andln(1)===0;)h++,m.iushrn(1);r(!m.isZero());var o=new i(1).toRed(this),p=o.redNeg(),E=this.m.subn(1).iushrn(1),g=this.m.bitLength();for(g=new i(2*g*g).toRed(this);this.pow(g,E).cmp(p)!==0;)g.redIAdd(p);for(var w=this.pow(g,m),U=this.pow(f,m.addn(1).iushrn(1)),M=this.pow(f,m),k=h;M.cmp(o)!==0;){for(var G=M,Z=0;G.cmp(o)!==0;Z++)G=G.redSqr();r(Z<k);var B=this.pow(w,new i(1).iushln(k-Z-1));U=U.redMul(B),w=B.redSqr(),M=M.redMul(w),k=Z}return U},s.prototype.invm=function(f){var c=f._invmp(this.m);return c.negative!==0?(c.negative=0,this.imod(c).redNeg()):this.imod(c)},s.prototype.pow=function(f,c){if(c.isZero())return new i(1).toRed(this);if(c.cmpn(1)===0)return f.clone();var v=4,m=new Array(1<<v);m[0]=new i(1).toRed(this),m[1]=f;for(var h=2;h<m.length;h++)m[h]=this.mul(m[h-1],f);var o=m[0],p=0,E=0,g=c.bitLength()%26;for(g===0&&(g=26),h=c.length-1;h>=0;h--){for(var w=c.words[h],U=g-1;U>=0;U--){var M=w>>U&1;if(o!==m[0]&&(o=this.sqr(o)),M===0&&p===0){E=0;continue}p<<=1,p|=M,E++,!(E!==v&&(h!==0||U!==0))&&(o=this.mul(o,m[p]),E=0,p=0)}g=26}return o},s.prototype.convertTo=function(f){var c=f.umod(this.m);return c===f?c.clone():c},s.prototype.convertFrom=function(f){var c=f.clone();return c.red=null,c},i.mont=function(f){return new u(f)};function u(d){s.call(this,d),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(u,s),u.prototype.convertTo=function(f){return this.imod(f.ushln(this.shift))},u.prototype.convertFrom=function(f){var c=this.imod(f.mul(this.rinv));return c.red=null,c},u.prototype.imul=function(f,c){if(f.isZero()||c.isZero())return f.words[0]=0,f.length=1,f;var v=f.imul(c),m=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=v.isub(m).iushrn(this.shift),o=h;return h.cmp(this.m)>=0?o=h.isub(this.m):h.cmpn(0)<0&&(o=h.iadd(this.m)),o._forceRed(this)},u.prototype.mul=function(f,c){if(f.isZero()||c.isZero())return new i(0)._forceRed(this);var v=f.mul(c),m=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),h=v.isub(m).iushrn(this.shift),o=h;return h.cmp(this.m)>=0?o=h.isub(this.m):h.cmpn(0)<0&&(o=h.iadd(this.m)),o._forceRed(this)},u.prototype.invm=function(f){var c=this.imod(f._invmp(this.m).mul(this.r2));return c._forceRed(this)}})(typeof Rl>"u"||Rl,jb)});var Fl=V(u0=>{"use strict";var PP=A(S());Object.defineProperty(u0,"__esModule",{value:!0});u0.version=void 0;u0.version="bignumber/5.8.0"});var d0=V(Qr=>{"use strict";var RP=A(S()),V4=Qr&&Qr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Qr,"__esModule",{value:!0});Qr._base16To36=Qr._base36To16=Qr.BigNumber=Qr.isBigNumberish=void 0;var j4=V4(Qb()),Ms=j4.default.BN,bo=at(),go=Pt(),Q4=Fl(),bi=new go.Logger(Q4.version),Dl={},Wb=9007199254740991;function W4(t){return t!=null&&(l0.isBigNumber(t)||typeof t=="number"&&t%1===0||typeof t=="string"&&!!t.match(/^-?[0-9]+$/)||(0,bo.isHexString)(t)||typeof t=="bigint"||(0,bo.isBytes)(t))}Qr.isBigNumberish=W4;var Yb=!1,l0=function(){function t(e,r){e!==Dl&&bi.throwError("cannot call constructor directly; use BigNumber.from",go.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this)}return t.prototype.fromTwos=function(e){return Cr(qe(this).fromTwos(e))},t.prototype.toTwos=function(e){return Cr(qe(this).toTwos(e))},t.prototype.abs=function(){return this._hex[0]==="-"?t.from(this._hex.substring(1)):this},t.prototype.add=function(e){return Cr(qe(this).add(qe(e)))},t.prototype.sub=function(e){return Cr(qe(this).sub(qe(e)))},t.prototype.div=function(e){var r=t.from(e);return r.isZero()&&jr("division-by-zero","div"),Cr(qe(this).div(qe(e)))},t.prototype.mul=function(e){return Cr(qe(this).mul(qe(e)))},t.prototype.mod=function(e){var r=qe(e);return r.isNeg()&&jr("division-by-zero","mod"),Cr(qe(this).umod(r))},t.prototype.pow=function(e){var r=qe(e);return r.isNeg()&&jr("negative-power","pow"),Cr(qe(this).pow(r))},t.prototype.and=function(e){var r=qe(e);return(this.isNegative()||r.isNeg())&&jr("unbound-bitwise-result","and"),Cr(qe(this).and(r))},t.prototype.or=function(e){var r=qe(e);return(this.isNegative()||r.isNeg())&&jr("unbound-bitwise-result","or"),Cr(qe(this).or(r))},t.prototype.xor=function(e){var r=qe(e);return(this.isNegative()||r.isNeg())&&jr("unbound-bitwise-result","xor"),Cr(qe(this).xor(r))},t.prototype.mask=function(e){return(this.isNegative()||e<0)&&jr("negative-width","mask"),Cr(qe(this).maskn(e))},t.prototype.shl=function(e){return(this.isNegative()||e<0)&&jr("negative-width","shl"),Cr(qe(this).shln(e))},t.prototype.shr=function(e){return(this.isNegative()||e<0)&&jr("negative-width","shr"),Cr(qe(this).shrn(e))},t.prototype.eq=function(e){return qe(this).eq(qe(e))},t.prototype.lt=function(e){return qe(this).lt(qe(e))},t.prototype.lte=function(e){return qe(this).lte(qe(e))},t.prototype.gt=function(e){return qe(this).gt(qe(e))},t.prototype.gte=function(e){return qe(this).gte(qe(e))},t.prototype.isNegative=function(){return this._hex[0]==="-"},t.prototype.isZero=function(){return qe(this).isZero()},t.prototype.toNumber=function(){try{return qe(this).toNumber()}catch{jr("overflow","toNumber",this.toString())}return null},t.prototype.toBigInt=function(){try{return BigInt(this.toString())}catch{}return bi.throwError("this platform does not support BigInt",go.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})},t.prototype.toString=function(){return arguments.length>0&&(arguments[0]===10?Yb||(Yb=!0,bi.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?bi.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",go.Logger.errors.UNEXPECTED_ARGUMENT,{}):bi.throwError("BigNumber.toString does not accept parameters",go.Logger.errors.UNEXPECTED_ARGUMENT,{})),qe(this).toString(10)},t.prototype.toHexString=function(){return this._hex},t.prototype.toJSON=function(e){return{type:"BigNumber",hex:this.toHexString()}},t.from=function(e){if(e instanceof t)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new t(Dl,Ts(e)):e.match(/^-?[0-9]+$/)?new t(Dl,Ts(new Ms(e))):bi.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&jr("underflow","BigNumber.from",e),(e>=Wb||e<=-Wb)&&jr("overflow","BigNumber.from",e),t.from(String(e));var r=e;if(typeof r=="bigint")return t.from(r.toString());if((0,bo.isBytes)(r))return t.from((0,bo.hexlify)(r));if(r)if(r.toHexString){var n=r.toHexString();if(typeof n=="string")return t.from(n)}else{var n=r._hex;if(n==null&&r.type==="BigNumber"&&(n=r.hex),typeof n=="string"&&((0,bo.isHexString)(n)||n[0]==="-"&&(0,bo.isHexString)(n.substring(1))))return t.from(n)}return bi.throwArgumentError("invalid BigNumber value","value",e)},t.isBigNumber=function(e){return!!(e&&e._isBigNumber)},t}();Qr.BigNumber=l0;function Ts(t){if(typeof t!="string")return Ts(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&bi.throwArgumentError("invalid hex","value",t),t=Ts(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return"0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function Cr(t){return l0.from(Ts(t))}function qe(t){var e=l0.from(t).toHexString();return e[0]==="-"?new Ms("-"+e.substring(3),16):new Ms(e.substring(2),16)}function jr(t,e,r){var n={fault:t,operation:e};return r!=null&&(n.value=r),bi.throwError(t,go.Logger.errors.NUMERIC_FAULT,n)}function Y4(t){return new Ms(t,36).toString(16)}Qr._base36To16=Y4;function $4(t){return new Ms(t,16).toString(36)}Qr._base16To36=$4});var ng=V(Un=>{"use strict";var DP=A(S());Object.defineProperty(Un,"__esModule",{value:!0});Un.FixedNumber=Un.FixedFormat=Un.parseFixed=Un.formatFixed=void 0;var h0=at(),Bs=Pt(),e5=Fl(),Er=new Bs.Logger(e5.version),gi=d0(),Es={},eg=gi.BigNumber.from(0),tg=gi.BigNumber.from(-1);function rg(t,e,r,n){var i={fault:e,operation:r};return n!==void 0&&(i.value=n),Er.throwError(t,Bs.Logger.errors.NUMERIC_FAULT,i)}var _s="0";for(;_s.length<256;)_s+=_s;function Il(t){if(typeof t!="number")try{t=gi.BigNumber.from(t).toNumber()}catch{}return typeof t=="number"&&t>=0&&t<=256&&!(t%1)?"1"+_s.substring(0,t):Er.throwArgumentError("invalid decimal size","decimals",t)}function p0(t,e){e==null&&(e=0);var r=Il(e);t=gi.BigNumber.from(t);var n=t.lt(eg);n&&(t=t.mul(tg));for(var i=t.mod(r).toString();i.length<r.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];var a=t.div(r).toString();return r.length===1?t=a:t=a+"."+i,n&&(t="-"+t),t}Un.formatFixed=p0;function Jn(t,e){e==null&&(e=0);var r=Il(e);(typeof t!="string"||!t.match(/^-?[0-9.]+$/))&&Er.throwArgumentError("invalid decimal value","value",t);var n=t.substring(0,1)==="-";n&&(t=t.substring(1)),t==="."&&Er.throwArgumentError("missing value","value",t);var i=t.split(".");i.length>2&&Er.throwArgumentError("too many decimal points","value",t);var a=i[0],l=i[1];for(a||(a="0"),l||(l="0");l[l.length-1]==="0";)l=l.substring(0,l.length-1);for(l.length>r.length-1&&rg("fractional component exceeds decimals","underflow","parseFixed"),l===""&&(l="0");l.length<r.length-1;)l+="0";var b=gi.BigNumber.from(a),y=gi.BigNumber.from(l),x=b.mul(r).add(y);return n&&(x=x.mul(tg)),x}Un.parseFixed=Jn;var b0=function(){function t(e,r,n,i){e!==Es&&Er.throwError("cannot use FixedFormat constructor; use FixedFormat.from",Bs.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=r,this.width=n,this.decimals=i,this.name=(r?"":"u")+"fixed"+String(n)+"x"+String(i),this._multiplier=Il(i),Object.freeze(this)}return t.from=function(e){if(e instanceof t)return e;typeof e=="number"&&(e="fixed128x"+e);var r=!0,n=128,i=18;if(typeof e=="string"){if(e!=="fixed")if(e==="ufixed")r=!1;else{var a=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);a||Er.throwArgumentError("invalid fixed format","format",e),r=a[1]!=="u",n=parseInt(a[2]),i=parseInt(a[3])}}else if(e){var l=function(b,y,x){return e[b]==null?x:(typeof e[b]!==y&&Er.throwArgumentError("invalid fixed format ("+b+" not "+y+")","format."+b,e[b]),e[b])};r=l("signed","boolean",r),n=l("width","number",n),i=l("decimals","number",i)}return n%8&&Er.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",n),i>80&&Er.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",i),new t(Es,r,n,i)},t}();Un.FixedFormat=b0;var Ol=function(){function t(e,r,n,i){e!==Es&&Er.throwError("cannot use FixedNumber constructor; use FixedNumber.from",Bs.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=i,this._hex=r,this._value=n,this._isFixedNumber=!0,Object.freeze(this)}return t.prototype._checkFormat=function(e){this.format.name!==e.format.name&&Er.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)},t.prototype.addUnsafe=function(e){this._checkFormat(e);var r=Jn(this._value,this.format.decimals),n=Jn(e._value,e.format.decimals);return t.fromValue(r.add(n),this.format.decimals,this.format)},t.prototype.subUnsafe=function(e){this._checkFormat(e);var r=Jn(this._value,this.format.decimals),n=Jn(e._value,e.format.decimals);return t.fromValue(r.sub(n),this.format.decimals,this.format)},t.prototype.mulUnsafe=function(e){this._checkFormat(e);var r=Jn(this._value,this.format.decimals),n=Jn(e._value,e.format.decimals);return t.fromValue(r.mul(n).div(this.format._multiplier),this.format.decimals,this.format)},t.prototype.divUnsafe=function(e){this._checkFormat(e);var r=Jn(this._value,this.format.decimals),n=Jn(e._value,e.format.decimals);return t.fromValue(r.mul(this.format._multiplier).div(n),this.format.decimals,this.format)},t.prototype.floor=function(){var e=this.toString().split(".");e.length===1&&e.push("0");var r=t.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return this.isNegative()&&n&&(r=r.subUnsafe($b.toFormat(r.format))),r},t.prototype.ceiling=function(){var e=this.toString().split(".");e.length===1&&e.push("0");var r=t.from(e[0],this.format),n=!e[1].match(/^(0*)$/);return!this.isNegative()&&n&&(r=r.addUnsafe($b.toFormat(r.format))),r},t.prototype.round=function(e){e==null&&(e=0);var r=this.toString().split(".");if(r.length===1&&r.push("0"),(e<0||e>80||e%1)&&Er.throwArgumentError("invalid decimal count","decimals",e),r[1].length<=e)return this;var n=t.from("1"+_s.substring(0,e),this.format),i=t5.toFormat(this.format);return this.mulUnsafe(n).addUnsafe(i).floor().divUnsafe(n)},t.prototype.isZero=function(){return this._value==="0.0"||this._value==="0"},t.prototype.isNegative=function(){return this._value[0]==="-"},t.prototype.toString=function(){return this._value},t.prototype.toHexString=function(e){if(e==null)return this._hex;e%8&&Er.throwArgumentError("invalid byte width","width",e);var r=gi.BigNumber.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,h0.hexZeroPad)(r,e/8)},t.prototype.toUnsafeFloat=function(){return parseFloat(this.toString())},t.prototype.toFormat=function(e){return t.fromString(this._value,e)},t.fromValue=function(e,r,n){return n==null&&r!=null&&!(0,gi.isBigNumberish)(r)&&(n=r,r=null),r==null&&(r=0),n==null&&(n="fixed"),t.fromString(p0(e,r),b0.from(n))},t.fromString=function(e,r){r==null&&(r="fixed");var n=b0.from(r),i=Jn(e,n.decimals);!n.signed&&i.lt(eg)&&rg("unsigned value cannot be negative","overflow","value",e);var a=null;n.signed?a=i.toTwos(n.width).toHexString():(a=i.toHexString(),a=(0,h0.hexZeroPad)(a,n.width/8));var l=p0(i,n.decimals);return new t(Es,a,l,n)},t.fromBytes=function(e,r){r==null&&(r="fixed");var n=b0.from(r);if((0,h0.arrayify)(e).length>n.width/8)throw new Error("overflow");var i=gi.BigNumber.from(e);n.signed&&(i=i.fromTwos(n.width));var a=i.toTwos((n.signed?0:1)+n.width).toHexString(),l=p0(i,n.decimals);return new t(Es,a,l,n)},t.from=function(e,r){if(typeof e=="string")return t.fromString(e,r);if((0,h0.isBytes)(e))return t.fromBytes(e,r);try{return t.fromValue(e,0,r)}catch(n){if(n.code!==Bs.Logger.errors.INVALID_ARGUMENT)throw n}return Er.throwArgumentError("invalid FixedNumber value","value",e)},t.isFixedNumber=function(e){return!!(e&&e._isFixedNumber)},t}();Un.FixedNumber=Ol;var $b=Ol.from(1),t5=Ol.from("0.5")});var ga=V(ur=>{"use strict";var OP=A(S());Object.defineProperty(ur,"__esModule",{value:!0});ur._base36To16=ur._base16To36=ur.parseFixed=ur.FixedNumber=ur.FixedFormat=ur.formatFixed=ur.BigNumber=void 0;var r5=d0();Object.defineProperty(ur,"BigNumber",{enumerable:!0,get:function(){return r5.BigNumber}});var g0=ng();Object.defineProperty(ur,"formatFixed",{enumerable:!0,get:function(){return g0.formatFixed}});Object.defineProperty(ur,"FixedFormat",{enumerable:!0,get:function(){return g0.FixedFormat}});Object.defineProperty(ur,"FixedNumber",{enumerable:!0,get:function(){return g0.FixedNumber}});Object.defineProperty(ur,"parseFixed",{enumerable:!0,get:function(){return g0.parseFixed}});var ig=d0();Object.defineProperty(ur,"_base16To36",{enumerable:!0,get:function(){return ig._base16To36}});Object.defineProperty(ur,"_base36To16",{enumerable:!0,get:function(){return ig._base36To16}})});var ag=V(Jt=>{"use strict";var NP=A(S());Object.defineProperty(Jt,"__esModule",{value:!0});Jt.MaxInt256=Jt.MinInt256=Jt.MaxUint256=Jt.WeiPerEther=Jt.Two=Jt.One=Jt.Zero=Jt.NegativeOne=void 0;var ki=ga(),n5=ki.BigNumber.from(-1);Jt.NegativeOne=n5;var i5=ki.BigNumber.from(0);Jt.Zero=i5;var a5=ki.BigNumber.from(1);Jt.One=a5;var o5=ki.BigNumber.from(2);Jt.Two=o5;var s5=ki.BigNumber.from("1000000000000000000");Jt.WeiPerEther=s5;var f5=ki.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");Jt.MaxUint256=f5;var c5=ki.BigNumber.from("-0x8000000000000000000000000000000000000000000000000000000000000000");Jt.MinInt256=c5;var u5=ki.BigNumber.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");Jt.MaxInt256=u5});var og=V(v0=>{"use strict";var UP=A(S());Object.defineProperty(v0,"__esModule",{value:!0});v0.HashZero=void 0;v0.HashZero="0x0000000000000000000000000000000000000000000000000000000000000000"});var sg=V(m0=>{"use strict";var qP=A(S());Object.defineProperty(m0,"__esModule",{value:!0});m0.EtherSymbol=void 0;m0.EtherSymbol="\u039E"});var kl=V(lt=>{"use strict";var XP=A(S());Object.defineProperty(lt,"__esModule",{value:!0});lt.EtherSymbol=lt.HashZero=lt.MaxInt256=lt.MinInt256=lt.MaxUint256=lt.WeiPerEther=lt.Two=lt.One=lt.Zero=lt.NegativeOne=lt.AddressZero=void 0;var l5=Vb();Object.defineProperty(lt,"AddressZero",{enumerable:!0,get:function(){return l5.AddressZero}});var Ni=ag();Object.defineProperty(lt,"NegativeOne",{enumerable:!0,get:function(){return Ni.NegativeOne}});Object.defineProperty(lt,"Zero",{enumerable:!0,get:function(){return Ni.Zero}});Object.defineProperty(lt,"One",{enumerable:!0,get:function(){return Ni.One}});Object.defineProperty(lt,"Two",{enumerable:!0,get:function(){return Ni.Two}});Object.defineProperty(lt,"WeiPerEther",{enumerable:!0,get:function(){return Ni.WeiPerEther}});Object.defineProperty(lt,"MaxUint256",{enumerable:!0,get:function(){return Ni.MaxUint256}});Object.defineProperty(lt,"MinInt256",{enumerable:!0,get:function(){return Ni.MinInt256}});Object.defineProperty(lt,"MaxInt256",{enumerable:!0,get:function(){return Ni.MaxInt256}});var d5=og();Object.defineProperty(lt,"HashZero",{enumerable:!0,get:function(){return d5.HashZero}});var h5=sg();Object.defineProperty(lt,"EtherSymbol",{enumerable:!0,get:function(){return h5.EtherSymbol}})});var fg=V(x0=>{"use strict";var KP=A(S());Object.defineProperty(x0,"__esModule",{value:!0});x0.version=void 0;x0.version="strings/5.8.0"});var w0=V(St=>{"use strict";var VP=A(S());Object.defineProperty(St,"__esModule",{value:!0});St.toUtf8CodePoints=St.toUtf8String=St._toUtf8String=St._toEscapedUtf8String=St.toUtf8Bytes=St.Utf8ErrorFuncs=St.Utf8ErrorReason=St.UnicodeNormalizationForm=void 0;var cg=at(),p5=Pt(),b5=fg(),ug=new p5.Logger(b5.version),y0;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD"})(y0=St.UnicodeNormalizationForm||(St.UnicodeNormalizationForm={}));var Wr;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation"})(Wr=St.Utf8ErrorReason||(St.Utf8ErrorReason={}));function g5(t,e,r,n,i){return ug.throwArgumentError("invalid codepoint at offset "+e+"; "+t,"bytes",r)}function lg(t,e,r,n,i){if(t===Wr.BAD_PREFIX||t===Wr.UNEXPECTED_CONTINUE){for(var a=0,l=e+1;l<r.length&&r[l]>>6===2;l++)a++;return a}return t===Wr.OVERRUN?r.length-e-1:0}function v5(t,e,r,n,i){return t===Wr.OVERLONG?(n.push(i),0):(n.push(65533),lg(t,e,r,n,i))}St.Utf8ErrorFuncs=Object.freeze({error:g5,ignore:lg,replace:v5});function Jl(t,e){e==null&&(e=St.Utf8ErrorFuncs.error),t=(0,cg.arrayify)(t);for(var r=[],n=0;n<t.length;){var i=t[n++];if(!(i>>7)){r.push(i);continue}var a=null,l=null;if((i&224)===192)a=1,l=127;else if((i&240)===224)a=2,l=2047;else if((i&248)===240)a=3,l=65535;else{(i&192)===128?n+=e(Wr.UNEXPECTED_CONTINUE,n-1,t,r):n+=e(Wr.BAD_PREFIX,n-1,t,r);continue}if(n-1+a>=t.length){n+=e(Wr.OVERRUN,n-1,t,r);continue}for(var b=i&(1<<8-a-1)-1,y=0;y<a;y++){var x=t[n];if((x&192)!=128){n+=e(Wr.MISSING_CONTINUE,n,t,r),b=null;break}b=b<<6|x&63,n++}if(b!==null){if(b>1114111){n+=e(Wr.OUT_OF_RANGE,n-1-a,t,r,b);continue}if(b>=55296&&b<=57343){n+=e(Wr.UTF16_SURROGATE,n-1-a,t,r,b);continue}if(b<=l){n+=e(Wr.OVERLONG,n-1-a,t,r,b);continue}r.push(b)}}return r}function dg(t,e){e===void 0&&(e=y0.current),e!=y0.current&&(ug.checkNormalize(),t=t.normalize(e));for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);if(i<128)r.push(i);else if(i<2048)r.push(i>>6|192),r.push(i&63|128);else if((i&64512)==55296){n++;var a=t.charCodeAt(n);if(n>=t.length||(a&64512)!==56320)throw new Error("invalid utf-8 string");var l=65536+((i&1023)<<10)+(a&1023);r.push(l>>18|240),r.push(l>>12&63|128),r.push(l>>6&63|128),r.push(l&63|128)}else r.push(i>>12|224),r.push(i>>6&63|128),r.push(i&63|128)}return(0,cg.arrayify)(r)}St.toUtf8Bytes=dg;function Nl(t){var e="0000"+t.toString(16);return"\\u"+e.substring(e.length-4)}function m5(t,e){return'"'+Jl(t,e).map(function(r){if(r<256){switch(r){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(r>=32&&r<127)return String.fromCharCode(r)}return r<=65535?Nl(r):(r-=65536,Nl((r>>10&1023)+55296)+Nl((r&1023)+56320))}).join("")+'"'}St._toEscapedUtf8String=m5;function hg(t){return t.map(function(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))}).join("")}St._toUtf8String=hg;function x5(t,e){return hg(Jl(t,e))}St.toUtf8String=x5;function y5(t,e){return e===void 0&&(e=y0.current),Jl(dg(t,e))}St.toUtf8CodePoints=y5});var bg=V(vo=>{"use strict";var QP=A(S());Object.defineProperty(vo,"__esModule",{value:!0});vo.parseBytes32String=vo.formatBytes32String=void 0;var w5=kl(),Ul=at(),pg=w0();function A5(t){var e=(0,pg.toUtf8Bytes)(t);if(e.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,Ul.hexlify)((0,Ul.concat)([e,w5.HashZero]).slice(0,32))}vo.formatBytes32String=A5;function S5(t){var e=(0,Ul.arrayify)(t);if(e.length!==32)throw new Error("invalid bytes32 - not 32 bytes long");if(e[31]!==0)throw new Error("invalid bytes32 string - no null terminator");for(var r=31;e[r-1]===0;)r--;return(0,pg.toUtf8String)(e.slice(0,r))}vo.parseBytes32String=S5});var yg=V(Hn=>{"use strict";var YP=A(S());Object.defineProperty(Hn,"__esModule",{value:!0});Hn.nameprep=Hn._nameprepTableC=Hn._nameprepTableB2=Hn._nameprepTableA1=void 0;var Cs=w0();function M5(t){if(t.length%4!==0)throw new Error("bad data");for(var e=[],r=0;r<t.length;r+=4)e.push(parseInt(t.substring(r,r+4),16));return e}function Hl(t,e){e||(e=function(i){return[parseInt(i,16)]});var r=0,n={};return t.split(",").forEach(function(i){var a=i.split(":");r+=parseInt(a[0],16),n[r]=e(a[1])}),n}function gg(t){var e=0;return t.split(",").map(function(r){var n=r.split("-");n.length===1?n[1]="0":n[1]===""&&(n[1]="1");var i=e+parseInt(n[0],16);return e=parseInt(n[1],16),{l:i,h:e}})}function ql(t,e){for(var r=0,n=0;n<e.length;n++){var i=e[n];if(r+=i.l,t>=r&&t<=r+i.h&&(t-r)%(i.d||1)===0){if(i.e&&i.e.indexOf(t-r)!==-1)continue;return i}}return null}var T5=gg("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),E5="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(function(t){return parseInt(t,16)}),_5=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],B5=Hl("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),C5=Hl("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),P5=Hl("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",M5),L5=gg("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function R5(t){return t.reduce(function(e,r){return r.forEach(function(n){e.push(n)}),e},[])}function vg(t){return!!ql(t,T5)}Hn._nameprepTableA1=vg;function mg(t){var e=ql(t,_5);if(e)return[t+e.s];var r=B5[t];if(r)return r;var n=C5[t];if(n)return[t+n[0]];var i=P5[t];return i||null}Hn._nameprepTableB2=mg;function xg(t){return!!ql(t,L5)}Hn._nameprepTableC=xg;function F5(t){if(t.match(/^[a-z0-9-]*$/i)&&t.length<=59)return t.toLowerCase();var e=(0,Cs.toUtf8CodePoints)(t);e=R5(e.map(function(n){if(E5.indexOf(n)>=0)return[];if(n>=65024&&n<=65039)return[];var i=mg(n);return i||[n]})),e=(0,Cs.toUtf8CodePoints)((0,Cs._toUtf8String)(e),Cs.UnicodeNormalizationForm.NFKC),e.forEach(function(n){if(xg(n))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")}),e.forEach(function(n){if(vg(n))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")});var r=(0,Cs._toUtf8String)(e);if(r.substring(0,1)==="-"||r.substring(2,4)==="--"||r.substring(r.length-1)==="-")throw new Error("invalid hyphen");return r}Hn.nameprep=F5});var Or=V(bt=>{"use strict";var eL=A(S());Object.defineProperty(bt,"__esModule",{value:!0});bt.nameprep=bt.parseBytes32String=bt.formatBytes32String=bt.UnicodeNormalizationForm=bt.Utf8ErrorReason=bt.Utf8ErrorFuncs=bt.toUtf8String=bt.toUtf8CodePoints=bt.toUtf8Bytes=bt._toEscapedUtf8String=void 0;var wg=bg();Object.defineProperty(bt,"formatBytes32String",{enumerable:!0,get:function(){return wg.formatBytes32String}});Object.defineProperty(bt,"parseBytes32String",{enumerable:!0,get:function(){return wg.parseBytes32String}});var D5=yg();Object.defineProperty(bt,"nameprep",{enumerable:!0,get:function(){return D5.nameprep}});var va=w0();Object.defineProperty(bt,"_toEscapedUtf8String",{enumerable:!0,get:function(){return va._toEscapedUtf8String}});Object.defineProperty(bt,"toUtf8Bytes",{enumerable:!0,get:function(){return va.toUtf8Bytes}});Object.defineProperty(bt,"toUtf8CodePoints",{enumerable:!0,get:function(){return va.toUtf8CodePoints}});Object.defineProperty(bt,"toUtf8String",{enumerable:!0,get:function(){return va.toUtf8String}});Object.defineProperty(bt,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return va.UnicodeNormalizationForm}});Object.defineProperty(bt,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return va.Utf8ErrorFuncs}});Object.defineProperty(bt,"Utf8ErrorReason",{enumerable:!0,get:function(){return va.Utf8ErrorReason}})});var Gl=V(A0=>{"use strict";var rL=A(S());Object.defineProperty(A0,"__esModule",{value:!0});A0.id=void 0;var I5=Nn(),O5=Or();function k5(t){return(0,I5.keccak256)((0,O5.toUtf8Bytes)(t))}A0.id=k5});var Xl=V(S0=>{"use strict";var iL=A(S());Object.defineProperty(S0,"__esModule",{value:!0});S0.version=void 0;S0.version="hash/5.8.0"});var Sg=V(mo=>{"use strict";var oL=A(S());Object.defineProperty(mo,"__esModule",{value:!0});mo.encode=mo.decode=void 0;var Ag=at();function N5(t){return(0,Ag.arrayify)(new Uint8Array(Buffer.from(t,"base64")))}mo.decode=N5;function J5(t){return Buffer.from((0,Ag.arrayify)(t)).toString("base64")}mo.encode=J5});var Tg=V(xo=>{"use strict";var fL=A(S());Object.defineProperty(xo,"__esModule",{value:!0});xo.encode=xo.decode=void 0;var Mg=Sg();Object.defineProperty(xo,"decode",{enumerable:!0,get:function(){return Mg.decode}});Object.defineProperty(xo,"encode",{enumerable:!0,get:function(){return Mg.encode}})});var Kl=V(Ut=>{"use strict";var uL=A(S());Object.defineProperty(Ut,"__esModule",{value:!0});Ut.read_emoji_trie=Ut.read_zero_terminated_array=Ut.read_mapped_map=Ut.read_member_array=Ut.signed=Ut.read_compressed_payload=Ut.read_payload=Ut.decode_arithmetic=void 0;function _g(t,e){e==null&&(e=1);var r=[],n=r.forEach,i=function(a,l){n.call(a,function(b){l>0&&Array.isArray(b)?i(b,l-1):r.push(b)})};return i(t,e),r}function U5(t){for(var e={},r=0;r<t.length;r++){var n=t[r];e[n[0]]=n[1]}return e}function Bg(t){var e=0;function r(){return t[e++]<<8|t[e++]}for(var n=r(),i=1,a=[0,1],l=1;l<n;l++)a.push(i+=r());var b=r(),y=e;e+=b;var x=0,_=0;function C(){return x==0&&(_=_<<8|t[e++],x=8),_>>--x&1}for(var D=31,F=Math.pow(2,D),P=F>>>1,z=P>>1,W=F-1,X=0,l=0;l<D;l++)X=X<<1|C();for(var ne=[],$=0,ae=F;;){for(var ie=Math.floor(((X-$+1)*i-1)/ae),ee=0,ce=n;ce-ee>1;){var te=ee+ce>>>1;ie<a[te]?ce=te:ee=te}if(ee==0)break;ne.push(ee);for(var Y=$+Math.floor(ae*a[ee]/i),T=$+Math.floor(ae*a[ee+1]/i)-1;!((Y^T)&P);)X=X<<1&W|C(),Y=Y<<1&W,T=T<<1&W|1;for(;Y&~T&z;)X=X&P|X<<1&W>>>1|C(),Y=Y<<1^P,T=(T^P)<<1|P|1;$=Y,ae=1+T-Y}var s=n-4;return ne.map(function(u){switch(u-s){case 3:return s+65792+(t[y++]<<16|t[y++]<<8|t[y++]);case 2:return s+256+(t[y++]<<8|t[y++]);case 1:return s+t[y++];default:return u-1}})}Ut.decode_arithmetic=Bg;function Cg(t){var e=0;return function(){return t[e++]}}Ut.read_payload=Cg;function H5(t){return Cg(Bg(t))}Ut.read_compressed_payload=H5;function Pg(t){return t&1?~t>>1:t>>1}Ut.signed=Pg;function q5(t,e){for(var r=Array(t),n=0;n<t;n++)r[n]=1+e();return r}function Eg(t,e){for(var r=Array(t),n=0,i=-1;n<t;n++)r[n]=i+=1+e();return r}function G5(t,e){for(var r=Array(t),n=0,i=0;n<t;n++)r[n]=i+=Pg(e());return r}function zl(t,e){for(var r=Eg(t(),t),n=t(),i=Eg(n,t),a=q5(n,t),l=0;l<n;l++)for(var b=0;b<a[l];b++)r.push(i[l]+b);return e?r.map(function(y){return e[y]}):r}Ut.read_member_array=zl;function X5(t){for(var e=[];;){var r=t();if(r==0)break;e.push(z5(r,t))}for(;;){var r=t()-1;if(r<0)break;e.push(K5(r,t))}return U5(_g(e))}Ut.read_mapped_map=X5;function Lg(t){for(var e=[];;){var r=t();if(r==0)break;e.push(r)}return e}Ut.read_zero_terminated_array=Lg;function Rg(t,e,r){for(var n=Array(t).fill(void 0).map(function(){return[]}),i=0;i<e;i++)G5(t,r).forEach(function(a,l){return n[l].push(a)});return n}function z5(t,e){var r=1+e(),n=e(),i=Lg(e),a=Rg(i.length,1+t,e);return _g(a.map(function(l,b){var y=l[0],x=l.slice(1);return Array(i[b]).fill(void 0).map(function(_,C){var D=C*n;return[y+C*r,x.map(function(F){return F+D})]})}))}function K5(t,e){var r=1+e(),n=Rg(r,1+t,e);return n.map(function(i){return[i[0],i.slice(1)]})}function Z5(t){var e=zl(t).sort(function(n,i){return n-i});return r();function r(){for(var n=[];;){var i=zl(t,e);if(i.length==0)break;n.push({set:new Set(i),node:r()})}n.sort(function(_,C){return C.set.size-_.set.size});var a=t(),l=a%3;a=a/3|0;var b=!!(a&1);a>>=1;var y=a==1,x=a==2;return{branches:n,valid:l,fe0f:b,save:y,check:x}}}Ut.read_emoji_trie=Z5});var Fg=V(M0=>{"use strict";var dL=A(S());Object.defineProperty(M0,"__esModule",{value:!0});M0.getData=void 0;var V5=Tg(),j5=Kl();function Q5(){return(0,j5.read_compressed_payload)((0,V5.decode)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}M0.getData=Q5});var kg=V(yo=>{"use strict";var pL=A(S());Object.defineProperty(yo,"__esModule",{value:!0});yo.ens_normalize=yo.ens_normalize_post_check=void 0;var W5=Or(),Y5=Fg(),T0=(0,Y5.getData)(),E0=Kl(),$5=new Set((0,E0.read_member_array)(T0)),ew=new Set((0,E0.read_member_array)(T0)),tw=(0,E0.read_mapped_map)(T0),rw=(0,E0.read_emoji_trie)(T0),Dg=45,Ig=95;function Og(t){return(0,W5.toUtf8CodePoints)(t)}function nw(t){return t.filter(function(e){return e!=65039})}function Zl(t){for(var e=0,r=t.split(".");e<r.length;e++){var n=r[e],i=Og(n);try{for(var a=i.lastIndexOf(Ig)-1;a>=0;a--)if(i[a]!==Ig)throw new Error("underscore only allowed at start");if(i.length>=4&&i.every(function(l){return l<128})&&i[2]===Dg&&i[3]===Dg)throw new Error("invalid label extension")}catch(l){throw new Error('Invalid label "'+n+'": '+l.message)}}return t}yo.ens_normalize_post_check=Zl;function iw(t){return Zl(aw(t,nw))}yo.ens_normalize=iw;function aw(t,e){for(var r=Og(t).reverse(),n=[];r.length;){var i=sw(r);if(i){n.push.apply(n,e(i));continue}var a=r.pop();if($5.has(a)){n.push(a);continue}if(!ew.has(a)){var l=tw[a];if(l){n.push.apply(n,l);continue}throw new Error("Disallowed codepoint: 0x"+a.toString(16).toUpperCase())}}return Zl(ow(String.fromCodePoint.apply(String,n)))}function ow(t){return t.normalize("NFC")}function sw(t,e){var r,n=rw,i,a,l=[],b=t.length;e&&(e.length=0);for(var y=function(){var _=t[--b];if(n=(r=n.branches.find(function(C){return C.set.has(_)}))===null||r===void 0?void 0:r.node,!n)return"break";if(n.save)a=_;else if(n.check&&_===a)return"break";l.push(_),n.fe0f&&(l.push(65039),b>0&&t[b-1]==65039&&b--),n.valid&&(i=l.slice(),n.valid==2&&i.splice(1,1),e&&e.push.apply(e,t.slice(b).reverse()),t.length=b)};b;){var x=y();if(x==="break")break}return i}});var Vl=V(qn=>{"use strict";var gL=A(S());Object.defineProperty(qn,"__esModule",{value:!0});qn.dnsEncode=qn.namehash=qn.isValidName=qn.ensNormalize=void 0;var _0=at(),Ug=Or(),Ng=Nn(),fw=Pt(),cw=Xl(),uw=new fw.Logger(cw.version),lw=kg(),Hg=new Uint8Array(32);Hg.fill(0);function Jg(t){if(t.length===0)throw new Error("invalid ENS name; empty component");return t}function B0(t){var e=(0,Ug.toUtf8Bytes)((0,lw.ens_normalize)(t)),r=[];if(t.length===0)return r;for(var n=0,i=0;i<e.length;i++){var a=e[i];a===46&&(r.push(Jg(e.slice(n,i))),n=i+1)}if(n>=e.length)throw new Error("invalid ENS name; empty component");return r.push(Jg(e.slice(n))),r}function dw(t){return B0(t).map(function(e){return(0,Ug.toUtf8String)(e)}).join(".")}qn.ensNormalize=dw;function hw(t){try{return B0(t).length!==0}catch{}return!1}qn.isValidName=hw;function pw(t){typeof t!="string"&&uw.throwArgumentError("invalid ENS name; not a string","name",t);for(var e=Hg,r=B0(t);r.length;)e=(0,Ng.keccak256)((0,_0.concat)([e,(0,Ng.keccak256)(r.pop())]));return(0,_0.hexlify)(e)}qn.namehash=pw;function bw(t){return(0,_0.hexlify)((0,_0.concat)(B0(t).map(function(e){if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");var r=new Uint8Array(e.length+1);return r.set(e,1),r[0]=r.length-1,r})))+"00"}qn.dnsEncode=bw});var qg=V(ma=>{"use strict";var mL=A(S());Object.defineProperty(ma,"__esModule",{value:!0});ma.hashMessage=ma.messagePrefix=void 0;var gw=at(),vw=Nn(),jl=Or();ma.messagePrefix=`Ethereum Signed Message:
10
+ `;function mw(t){return typeof t=="string"&&(t=(0,jl.toUtf8Bytes)(t)),(0,vw.keccak256)((0,gw.concat)([(0,jl.toUtf8Bytes)(ma.messagePrefix),(0,jl.toUtf8Bytes)(String(t.length)),t]))}ma.hashMessage=mw});var Gg=V(C0=>{"use strict";var yL=A(S());Object.defineProperty(C0,"__esModule",{value:!0});C0.version=void 0;C0.version="rlp/5.8.0"});var Ql=V(wo=>{"use strict";var AL=A(S());Object.defineProperty(wo,"__esModule",{value:!0});wo.decode=wo.encode=void 0;var xa=at(),vi=Pt(),xw=Gg(),Gn=new vi.Logger(xw.version);function Xg(t){for(var e=[];t;)e.unshift(t&255),t>>=8;return e}function zg(t,e,r){for(var n=0,i=0;i<r;i++)n=n*256+t[e+i];return n}function Zg(t){if(Array.isArray(t)){var e=[];if(t.forEach(function(a){e=e.concat(Zg(a))}),e.length<=55)return e.unshift(192+e.length),e;var r=Xg(e.length);return r.unshift(247+r.length),r.concat(e)}(0,xa.isBytesLike)(t)||Gn.throwArgumentError("RLP object must be BytesLike","object",t);var n=Array.prototype.slice.call((0,xa.arrayify)(t));if(n.length===1&&n[0]<=127)return n;if(n.length<=55)return n.unshift(128+n.length),n;var i=Xg(n.length);return i.unshift(183+i.length),i.concat(n)}function yw(t){return(0,xa.hexlify)(Zg(t))}wo.encode=yw;function Kg(t,e,r,n){for(var i=[];r<e+1+n;){var a=Vg(t,r);i.push(a.result),r+=a.consumed,r>e+1+n&&Gn.throwError("child data too short",vi.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:i}}function Vg(t,e){if(t.length===0&&Gn.throwError("data too short",vi.Logger.errors.BUFFER_OVERRUN,{}),t[e]>=248){var r=t[e]-247;e+1+r>t.length&&Gn.throwError("data short segment too short",vi.Logger.errors.BUFFER_OVERRUN,{});var n=zg(t,e+1,r);return e+1+r+n>t.length&&Gn.throwError("data long segment too short",vi.Logger.errors.BUFFER_OVERRUN,{}),Kg(t,e,e+1+r,r+n)}else if(t[e]>=192){var i=t[e]-192;return e+1+i>t.length&&Gn.throwError("data array too short",vi.Logger.errors.BUFFER_OVERRUN,{}),Kg(t,e,e+1,i)}else if(t[e]>=184){var r=t[e]-183;e+1+r>t.length&&Gn.throwError("data array too short",vi.Logger.errors.BUFFER_OVERRUN,{});var a=zg(t,e+1,r);e+1+r+a>t.length&&Gn.throwError("data array too short",vi.Logger.errors.BUFFER_OVERRUN,{});var l=(0,xa.hexlify)(t.slice(e+1+r,e+1+r+a));return{consumed:1+r+a,result:l}}else if(t[e]>=128){var b=t[e]-128;e+1+b>t.length&&Gn.throwError("data too short",vi.Logger.errors.BUFFER_OVERRUN,{});var l=(0,xa.hexlify)(t.slice(e+1,e+1+b));return{consumed:1+b,result:l}}return{consumed:1,result:(0,xa.hexlify)(t[e])}}function ww(t){var e=(0,xa.arrayify)(t),r=Vg(e,0);return r.consumed!==e.length&&Gn.throwArgumentError("invalid rlp data","data",t),r.result}wo.decode=ww});var jg=V(P0=>{"use strict";var ML=A(S());Object.defineProperty(P0,"__esModule",{value:!0});P0.version=void 0;P0.version="address/5.8.0"});var wa=V(Yr=>{"use strict";var EL=A(S());Object.defineProperty(Yr,"__esModule",{value:!0});Yr.getCreate2Address=Yr.getContractAddress=Yr.getIcapAddress=Yr.isAddress=Yr.getAddress=void 0;var mi=at(),Wl=ga(),Yl=Nn(),Aw=Ql(),Sw=Pt(),Mw=jg(),Ji=new Sw.Logger(Mw.version);function Qg(t){(0,mi.isHexString)(t,20)||Ji.throwArgumentError("invalid address","address",t),t=t.toLowerCase();for(var e=t.substring(2).split(""),r=new Uint8Array(40),n=0;n<40;n++)r[n]=e[n].charCodeAt(0);for(var i=(0,mi.arrayify)((0,Yl.keccak256)(r)),n=0;n<40;n+=2)i[n>>1]>>4>=8&&(e[n]=e[n].toUpperCase()),(i[n>>1]&15)>=8&&(e[n+1]=e[n+1].toUpperCase());return"0x"+e.join("")}var Tw=9007199254740991;function Ew(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}var $l={};for(xn=0;xn<10;xn++)$l[String(xn)]=String(xn);var xn;for(xn=0;xn<26;xn++)$l[String.fromCharCode(65+xn)]=String(10+xn);var xn,Wg=Math.floor(Ew(Tw));function Yg(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";for(var e=t.split("").map(function(i){return $l[i]}).join("");e.length>=Wg;){var r=e.substring(0,Wg);e=parseInt(r,10)%97+e.substring(r.length)}for(var n=String(98-parseInt(e,10)%97);n.length<2;)n="0"+n;return n}function ya(t){var e=null;if(typeof t!="string"&&Ji.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Qg(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Ji.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==Yg(t)&&Ji.throwArgumentError("bad icap checksum","address",t),e=(0,Wl._base36To16)(t.substring(4));e.length<40;)e="0"+e;e=Qg("0x"+e)}else Ji.throwArgumentError("invalid address","address",t);return e}Yr.getAddress=ya;function _w(t){try{return ya(t),!0}catch{}return!1}Yr.isAddress=_w;function Bw(t){for(var e=(0,Wl._base16To36)(ya(t).substring(2)).toUpperCase();e.length<30;)e="0"+e;return"XE"+Yg("XE00"+e)+e}Yr.getIcapAddress=Bw;function Cw(t){var e=null;try{e=ya(t.from)}catch{Ji.throwArgumentError("missing from address","transaction",t)}var r=(0,mi.stripZeros)((0,mi.arrayify)(Wl.BigNumber.from(t.nonce).toHexString()));return ya((0,mi.hexDataSlice)((0,Yl.keccak256)((0,Aw.encode)([e,r])),12))}Yr.getContractAddress=Cw;function Pw(t,e,r){return(0,mi.hexDataLength)(e)!==32&&Ji.throwArgumentError("salt must be 32 bytes","salt",e),(0,mi.hexDataLength)(r)!==32&&Ji.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),ya((0,mi.hexDataSlice)((0,Yl.keccak256)((0,mi.concat)(["0xff",ya(t),e,r])),12))}Yr.getCreate2Address=Pw});var $g=V(L0=>{"use strict";var BL=A(S());Object.defineProperty(L0,"__esModule",{value:!0});L0.version=void 0;L0.version="properties/5.8.0"});var $r=V(Lt=>{"use strict";var PL=A(S()),Lw=Lt&&Lt.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},Rw=Lt&&Lt.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(Lt,"__esModule",{value:!0});Lt.Description=Lt.deepCopy=Lt.shallowCopy=Lt.checkProperties=Lt.resolveProperties=Lt.getStatic=Lt.defineReadOnly=void 0;var Fw=Pt(),Dw=$g(),R0=new Fw.Logger(Dw.version);function ev(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1})}Lt.defineReadOnly=ev;function Iw(t,e){for(var r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor}return null}Lt.getStatic=Iw;function Ow(t){return Lw(this,void 0,void 0,function(){var e,r;return Rw(this,function(n){switch(n.label){case 0:return e=Object.keys(t).map(function(i){var a=t[i];return Promise.resolve(a).then(function(l){return{key:i,value:l}})}),[4,Promise.all(e)];case 1:return r=n.sent(),[2,r.reduce(function(i,a){return i[a.key]=a.value,i},{})]}})})}Lt.resolveProperties=Ow;function kw(t,e){(!t||typeof t!="object")&&R0.throwArgumentError("invalid object","object",t),Object.keys(t).forEach(function(r){e[r]||R0.throwArgumentError("invalid object key - "+r,"transaction:"+r,t)})}Lt.checkProperties=kw;function Nw(t){var e={};for(var r in t)e[r]=t[r];return e}Lt.shallowCopy=Nw;var Jw={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function tv(t){if(t==null||Jw[typeof t])return!0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return!1;for(var e=Object.keys(t),r=0;r<e.length;r++){var n=null;try{n=t[e[r]]}catch{continue}if(!tv(n))return!1}return!0}return R0.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function Uw(t){if(tv(t))return t;if(Array.isArray(t))return Object.freeze(t.map(function(i){return F0(i)}));if(typeof t=="object"){var e={};for(var r in t){var n=t[r];n!==void 0&&ev(e,r,F0(n))}return e}return R0.throwArgumentError("Cannot deepCopy "+typeof t,"object",t)}function F0(t){return Uw(t)}Lt.deepCopy=F0;var Hw=function(){function t(e){for(var r in e)this[r]=F0(e[r])}return t}();Lt.Description=Hw});var uv=V(Ui=>{"use strict";var RL=A(S()),qw=Ui&&Ui.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},Gw=Ui&&Ui.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(Ui,"__esModule",{value:!0});Ui.TypedDataEncoder=void 0;var av=wa(),Sa=ga(),ir=at(),Ao=Nn(),Aa=$r(),Xw=Pt(),zw=Xl(),ht=new Xw.Logger(zw.version),ov=Gl(),sv=new Uint8Array(32);sv.fill(0);var Kw=Sa.BigNumber.from(-1),fv=Sa.BigNumber.from(0),cv=Sa.BigNumber.from(1),Zw=Sa.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Vw(t){var e=(0,ir.arrayify)(t),r=e.length%32;return r?(0,ir.hexConcat)([e,sv.slice(r)]):(0,ir.hexlify)(e)}var jw=(0,ir.hexZeroPad)(cv.toHexString(),32),Qw=(0,ir.hexZeroPad)(fv.toHexString(),32),rv={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},ed=["name","version","chainId","verifyingContract","salt"];function nv(t){return function(e){return typeof e!="string"&&ht.throwArgumentError("invalid domain value for "+JSON.stringify(t),"domain."+t,e),e}}var Ww={name:nv("name"),version:nv("version"),chainId:function(t){try{return Sa.BigNumber.from(t).toString()}catch{}return ht.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",t)},verifyingContract:function(t){try{return(0,av.getAddress)(t).toLowerCase()}catch{}return ht.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",t)},salt:function(t){try{var e=(0,ir.arrayify)(t);if(e.length!==32)throw new Error("bad length");return(0,ir.hexlify)(e)}catch{}return ht.throwArgumentError('invalid domain value "salt"',"domain.salt",t)}};function td(t){{var e=t.match(/^(u?)int(\d*)$/);if(e){var r=e[1]==="",n=parseInt(e[2]||"256");(n%8!==0||n>256||e[2]&&e[2]!==String(n))&&ht.throwArgumentError("invalid numeric width","type",t);var i=Zw.mask(r?n-1:n),a=r?i.add(cv).mul(Kw):fv;return function(b){var y=Sa.BigNumber.from(b);return(y.lt(a)||y.gt(i))&&ht.throwArgumentError("value out-of-bounds for "+t,"value",b),(0,ir.hexZeroPad)(y.toTwos(256).toHexString(),32)}}}{var e=t.match(/^bytes(\d+)$/);if(e){var l=parseInt(e[1]);return(l===0||l>32||e[1]!==String(l))&&ht.throwArgumentError("invalid bytes width","type",t),function(y){var x=(0,ir.arrayify)(y);return x.length!==l&&ht.throwArgumentError("invalid length for "+t,"value",y),Vw(y)}}}switch(t){case"address":return function(b){return(0,ir.hexZeroPad)((0,av.getAddress)(b),32)};case"bool":return function(b){return b?jw:Qw};case"bytes":return function(b){return(0,Ao.keccak256)(b)};case"string":return function(b){return(0,ov.id)(b)}}return null}function iv(t,e){return t+"("+e.map(function(r){var n=r.name,i=r.type;return i+" "+n}).join(",")+")"}var Yw=function(){function t(e){(0,Aa.defineReadOnly)(this,"types",Object.freeze((0,Aa.deepCopy)(e))),(0,Aa.defineReadOnly)(this,"_encoderCache",{}),(0,Aa.defineReadOnly)(this,"_types",{});var r={},n={},i={};Object.keys(e).forEach(function(C){r[C]={},n[C]=[],i[C]={}});var a=function(C){var D={};e[C].forEach(function(F){D[F.name]&&ht.throwArgumentError("duplicate variable name "+JSON.stringify(F.name)+" in "+JSON.stringify(C),"types",e),D[F.name]=!0;var P=F.type.match(/^([^\x5b]*)(\x5b|$)/)[1];P===C&&ht.throwArgumentError("circular type reference to "+JSON.stringify(P),"types",e);var z=td(P);z||(n[P]||ht.throwArgumentError("unknown type "+JSON.stringify(P),"types",e),n[P].push(C),r[C][P]=!0)})};for(var l in e)a(l);var b=Object.keys(n).filter(function(C){return n[C].length===0});b.length===0?ht.throwArgumentError("missing primary type","types",e):b.length>1&&ht.throwArgumentError("ambiguous primary types or unused types: "+b.map(function(C){return JSON.stringify(C)}).join(", "),"types",e),(0,Aa.defineReadOnly)(this,"primaryType",b[0]);function y(C,D){D[C]&&ht.throwArgumentError("circular type reference to "+JSON.stringify(C),"types",e),D[C]=!0,Object.keys(r[C]).forEach(function(F){n[F]&&(y(F,D),Object.keys(D).forEach(function(P){i[P][F]=!0}))}),delete D[C]}y(this.primaryType,{});for(var x in i){var _=Object.keys(i[x]);_.sort(),this._types[x]=iv(x,e[x])+_.map(function(C){return iv(C,e[C])}).join("")}}return t.prototype.getEncoder=function(e){var r=this._encoderCache[e];return r||(r=this._encoderCache[e]=this._getEncoder(e)),r},t.prototype._getEncoder=function(e){var r=this;{var n=td(e);if(n)return n}var i=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(i){var a=i[1],l=this.getEncoder(a),b=parseInt(i[3]);return function(_){b>=0&&_.length!==b&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",_);var C=_.map(l);return r._types[a]&&(C=C.map(Ao.keccak256)),(0,Ao.keccak256)((0,ir.hexConcat)(C))}}var y=this.types[e];if(y){var x=(0,ov.id)(this._types[e]);return function(_){var C=y.map(function(D){var F=D.name,P=D.type,z=r.getEncoder(P)(_[F]);return r._types[P]?(0,Ao.keccak256)(z):z});return C.unshift(x),(0,ir.hexConcat)(C)}}return ht.throwArgumentError("unknown type: "+e,"type",e)},t.prototype.encodeType=function(e){var r=this._types[e];return r||ht.throwArgumentError("unknown type: "+JSON.stringify(e),"name",e),r},t.prototype.encodeData=function(e,r){return this.getEncoder(e)(r)},t.prototype.hashStruct=function(e,r){return(0,Ao.keccak256)(this.encodeData(e,r))},t.prototype.encode=function(e){return this.encodeData(this.primaryType,e)},t.prototype.hash=function(e){return this.hashStruct(this.primaryType,e)},t.prototype._visit=function(e,r,n){var i=this;{var a=td(e);if(a)return n(e,r)}var l=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(l){var b=l[1],y=parseInt(l[3]);return y>=0&&r.length!==y&&ht.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",r),r.map(function(_){return i._visit(b,_,n)})}var x=this.types[e];return x?x.reduce(function(_,C){var D=C.name,F=C.type;return _[D]=i._visit(F,r[D],n),_},{}):ht.throwArgumentError("unknown type: "+e,"type",e)},t.prototype.visit=function(e,r){return this._visit(this.primaryType,e,r)},t.from=function(e){return new t(e)},t.getPrimaryType=function(e){return t.from(e).primaryType},t.hashStruct=function(e,r,n){return t.from(r).hashStruct(e,n)},t.hashDomain=function(e){var r=[];for(var n in e){var i=rv[n];i||ht.throwArgumentError("invalid typed-data domain key: "+JSON.stringify(n),"domain",e),r.push({name:n,type:i})}return r.sort(function(a,l){return ed.indexOf(a.name)-ed.indexOf(l.name)}),t.hashStruct("EIP712Domain",{EIP712Domain:r},e)},t.encode=function(e,r,n){return(0,ir.hexConcat)(["0x1901",t.hashDomain(e),t.from(r).hash(n)])},t.hash=function(e,r,n){return(0,Ao.keccak256)(t.encode(e,r,n))},t.resolveNames=function(e,r,n,i){return qw(this,void 0,void 0,function(){var a,l,b,y,x,_,C,D;return Gw(this,function(F){switch(F.label){case 0:e=(0,Aa.shallowCopy)(e),a={},e.verifyingContract&&!(0,ir.isHexString)(e.verifyingContract,20)&&(a[e.verifyingContract]="0x"),l=t.from(r),l.visit(n,function(P,z){return P==="address"&&!(0,ir.isHexString)(z,20)&&(a[z]="0x"),z}),b=[];for(y in a)b.push(y);x=0,F.label=1;case 1:return x<b.length?(_=b[x],C=a,D=_,[4,i(_)]):[3,4];case 2:C[D]=F.sent(),F.label=3;case 3:return x++,[3,1];case 4:return e.verifyingContract&&a[e.verifyingContract]&&(e.verifyingContract=a[e.verifyingContract]),n=l.visit(n,function(P,z){return P==="address"&&a[z]?a[z]:z}),[2,{domain:e,value:n}]}})})},t.getPayload=function(e,r,n){t.hashDomain(e);var i={},a=[];ed.forEach(function(y){var x=e[y];x!=null&&(i[y]=Ww[y](x),a.push({name:y,type:rv[y]}))});var l=t.from(r),b=(0,Aa.shallowCopy)(r);return b.EIP712Domain?ht.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",r):b.EIP712Domain=a,l.encode(n),{types:b,domain:i,primaryType:l.primaryType,message:l.visit(n,function(y,x){if(y.match(/^bytes(\d*)/))return(0,ir.hexlify)((0,ir.arrayify)(x));if(y.match(/^u?int/))return Sa.BigNumber.from(x).toString();switch(y){case"address":return x.toLowerCase();case"bool":return!!x;case"string":return typeof x!="string"&&ht.throwArgumentError("invalid string","value",x),x}return ht.throwArgumentError("unsupported type","type",y)})}},t}();Ui.TypedDataEncoder=Yw});var Ps=V(Ht=>{"use strict";var DL=A(S());Object.defineProperty(Ht,"__esModule",{value:!0});Ht._TypedDataEncoder=Ht.hashMessage=Ht.messagePrefix=Ht.ensNormalize=Ht.isValidName=Ht.namehash=Ht.dnsEncode=Ht.id=void 0;var $w=Gl();Object.defineProperty(Ht,"id",{enumerable:!0,get:function(){return $w.id}});var rd=Vl();Object.defineProperty(Ht,"dnsEncode",{enumerable:!0,get:function(){return rd.dnsEncode}});Object.defineProperty(Ht,"isValidName",{enumerable:!0,get:function(){return rd.isValidName}});Object.defineProperty(Ht,"namehash",{enumerable:!0,get:function(){return rd.namehash}});var lv=qg();Object.defineProperty(Ht,"hashMessage",{enumerable:!0,get:function(){return lv.hashMessage}});Object.defineProperty(Ht,"messagePrefix",{enumerable:!0,get:function(){return lv.messagePrefix}});var e7=Vl();Object.defineProperty(Ht,"ensNormalize",{enumerable:!0,get:function(){return e7.ensNormalize}});var t7=uv();Object.defineProperty(Ht,"_TypedDataEncoder",{enumerable:!0,get:function(){return t7.TypedDataEncoder}})});var dv=V((IL,r7)=>{r7.exports={name:"elliptic",version:"6.6.1",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}});var Xn=V((hv,nd)=>{var OL=A(S());(function(t,e){"use strict";function r(T,s){if(!T)throw new Error(s||"Assertion failed")}function n(T,s){T.super_=s;var u=function(){};u.prototype=s.prototype,T.prototype=new u,T.prototype.constructor=T}function i(T,s,u){if(i.isBN(T))return T;this.negative=0,this.words=null,this.length=0,this.red=null,T!==null&&((s==="le"||s==="be")&&(u=s,s=10),this._init(T||0,s||10,u||"be"))}typeof t=="object"?t.exports=i:e.BN=i,i.BN=i,i.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=it("buffer").Buffer}catch{}i.isBN=function(s){return s instanceof i?!0:s!==null&&typeof s=="object"&&s.constructor.wordSize===i.wordSize&&Array.isArray(s.words)},i.max=function(s,u){return s.cmp(u)>0?s:u},i.min=function(s,u){return s.cmp(u)<0?s:u},i.prototype._init=function(s,u,d){if(typeof s=="number")return this._initNumber(s,u,d);if(typeof s=="object")return this._initArray(s,u,d);u==="hex"&&(u=16),r(u===(u|0)&&u>=2&&u<=36),s=s.toString().replace(/\s+/g,"");var f=0;s[0]==="-"&&(f++,this.negative=1),f<s.length&&(u===16?this._parseHex(s,f,d):(this._parseBase(s,u,f),d==="le"&&this._initArray(this.toArray(),u,d)))},i.prototype._initNumber=function(s,u,d){s<0&&(this.negative=1,s=-s),s<67108864?(this.words=[s&67108863],this.length=1):s<4503599627370496?(this.words=[s&67108863,s/67108864&67108863],this.length=2):(r(s<9007199254740992),this.words=[s&67108863,s/67108864&67108863,1],this.length=3),d==="le"&&this._initArray(this.toArray(),u,d)},i.prototype._initArray=function(s,u,d){if(r(typeof s.length=="number"),s.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(s.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var c,v,m=0;if(d==="be")for(f=s.length-1,c=0;f>=0;f-=3)v=s[f]|s[f-1]<<8|s[f-2]<<16,this.words[c]|=v<<m&67108863,this.words[c+1]=v>>>26-m&67108863,m+=24,m>=26&&(m-=26,c++);else if(d==="le")for(f=0,c=0;f<s.length;f+=3)v=s[f]|s[f+1]<<8|s[f+2]<<16,this.words[c]|=v<<m&67108863,this.words[c+1]=v>>>26-m&67108863,m+=24,m>=26&&(m-=26,c++);return this.strip()};function l(T,s){var u=T.charCodeAt(s);return u>=65&&u<=70?u-55:u>=97&&u<=102?u-87:u-48&15}function b(T,s,u){var d=l(T,u);return u-1>=s&&(d|=l(T,u-1)<<4),d}i.prototype._parseHex=function(s,u,d){this.length=Math.ceil((s.length-u)/6),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var c=0,v=0,m;if(d==="be")for(f=s.length-1;f>=u;f-=2)m=b(s,u,f)<<c,this.words[v]|=m&67108863,c>=18?(c-=18,v+=1,this.words[v]|=m>>>26):c+=8;else{var h=s.length-u;for(f=h%2===0?u+1:u;f<s.length;f+=2)m=b(s,u,f)<<c,this.words[v]|=m&67108863,c>=18?(c-=18,v+=1,this.words[v]|=m>>>26):c+=8}this.strip()};function y(T,s,u,d){for(var f=0,c=Math.min(T.length,u),v=s;v<c;v++){var m=T.charCodeAt(v)-48;f*=d,m>=49?f+=m-49+10:m>=17?f+=m-17+10:f+=m}return f}i.prototype._parseBase=function(s,u,d){this.words=[0],this.length=1;for(var f=0,c=1;c<=67108863;c*=u)f++;f--,c=c/u|0;for(var v=s.length-d,m=v%f,h=Math.min(v,v-m)+d,o=0,p=d;p<h;p+=f)o=y(s,p,p+f,u),this.imuln(c),this.words[0]+o<67108864?this.words[0]+=o:this._iaddn(o);if(m!==0){var E=1;for(o=y(s,p,s.length,u),p=0;p<m;p++)E*=u;this.imuln(E),this.words[0]+o<67108864?this.words[0]+=o:this._iaddn(o)}this.strip()},i.prototype.copy=function(s){s.words=new Array(this.length);for(var u=0;u<this.length;u++)s.words[u]=this.words[u];s.length=this.length,s.negative=this.negative,s.red=this.red},i.prototype.clone=function(){var s=new i(null);return this.copy(s),s},i.prototype._expand=function(s){for(;this.length<s;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},i.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],_=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],C=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];i.prototype.toString=function(s,u){s=s||10,u=u|0||1;var d;if(s===16||s==="hex"){d="";for(var f=0,c=0,v=0;v<this.length;v++){var m=this.words[v],h=((m<<f|c)&16777215).toString(16);c=m>>>24-f&16777215,f+=2,f>=26&&(f-=26,v--),c!==0||v!==this.length-1?d=x[6-h.length]+h+d:d=h+d}for(c!==0&&(d=c.toString(16)+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(s===(s|0)&&s>=2&&s<=36){var o=_[s],p=C[s];d="";var E=this.clone();for(E.negative=0;!E.isZero();){var g=E.modn(p).toString(s);E=E.idivn(p),E.isZero()?d=g+d:d=x[o-g.length]+g+d}for(this.isZero()&&(d="0"+d);d.length%u!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var s=this.words[0];return this.length===2?s+=this.words[1]*67108864:this.length===3&&this.words[2]===1?s+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-s:s},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(s,u){return r(typeof a<"u"),this.toArrayLike(a,s,u)},i.prototype.toArray=function(s,u){return this.toArrayLike(Array,s,u)},i.prototype.toArrayLike=function(s,u,d){var f=this.byteLength(),c=d||Math.max(1,f);r(f<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0"),this.strip();var v=u==="le",m=new s(c),h,o,p=this.clone();if(v){for(o=0;!p.isZero();o++)h=p.andln(255),p.iushrn(8),m[o]=h;for(;o<c;o++)m[o]=0}else{for(o=0;o<c-f;o++)m[o]=0;for(o=0;!p.isZero();o++)h=p.andln(255),p.iushrn(8),m[c-o-1]=h}return m},Math.clz32?i.prototype._countBits=function(s){return 32-Math.clz32(s)}:i.prototype._countBits=function(s){var u=s,d=0;return u>=4096&&(d+=13,u>>>=13),u>=64&&(d+=7,u>>>=7),u>=8&&(d+=4,u>>>=4),u>=2&&(d+=2,u>>>=2),d+u},i.prototype._zeroBits=function(s){if(s===0)return 26;var u=s,d=0;return u&8191||(d+=13,u>>>=13),u&127||(d+=7,u>>>=7),u&15||(d+=4,u>>>=4),u&3||(d+=2,u>>>=2),u&1||d++,d},i.prototype.bitLength=function(){var s=this.words[this.length-1],u=this._countBits(s);return(this.length-1)*26+u};function D(T){for(var s=new Array(T.bitLength()),u=0;u<s.length;u++){var d=u/26|0,f=u%26;s[u]=(T.words[d]&1<<f)>>>f}return s}i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var s=0,u=0;u<this.length;u++){var d=this._zeroBits(this.words[u]);if(s+=d,d!==26)break}return s},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(s){return this.negative!==0?this.abs().inotn(s).iaddn(1):this.clone()},i.prototype.fromTwos=function(s){return this.testn(s-1)?this.notn(s).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return this.negative!==0},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(s){for(;this.length<s.length;)this.words[this.length++]=0;for(var u=0;u<s.length;u++)this.words[u]=this.words[u]|s.words[u];return this.strip()},i.prototype.ior=function(s){return r((this.negative|s.negative)===0),this.iuor(s)},i.prototype.or=function(s){return this.length>s.length?this.clone().ior(s):s.clone().ior(this)},i.prototype.uor=function(s){return this.length>s.length?this.clone().iuor(s):s.clone().iuor(this)},i.prototype.iuand=function(s){var u;this.length>s.length?u=s:u=this;for(var d=0;d<u.length;d++)this.words[d]=this.words[d]&s.words[d];return this.length=u.length,this.strip()},i.prototype.iand=function(s){return r((this.negative|s.negative)===0),this.iuand(s)},i.prototype.and=function(s){return this.length>s.length?this.clone().iand(s):s.clone().iand(this)},i.prototype.uand=function(s){return this.length>s.length?this.clone().iuand(s):s.clone().iuand(this)},i.prototype.iuxor=function(s){var u,d;this.length>s.length?(u=this,d=s):(u=s,d=this);for(var f=0;f<d.length;f++)this.words[f]=u.words[f]^d.words[f];if(this!==u)for(;f<u.length;f++)this.words[f]=u.words[f];return this.length=u.length,this.strip()},i.prototype.ixor=function(s){return r((this.negative|s.negative)===0),this.iuxor(s)},i.prototype.xor=function(s){return this.length>s.length?this.clone().ixor(s):s.clone().ixor(this)},i.prototype.uxor=function(s){return this.length>s.length?this.clone().iuxor(s):s.clone().iuxor(this)},i.prototype.inotn=function(s){r(typeof s=="number"&&s>=0);var u=Math.ceil(s/26)|0,d=s%26;this._expand(u),d>0&&u--;for(var f=0;f<u;f++)this.words[f]=~this.words[f]&67108863;return d>0&&(this.words[f]=~this.words[f]&67108863>>26-d),this.strip()},i.prototype.notn=function(s){return this.clone().inotn(s)},i.prototype.setn=function(s,u){r(typeof s=="number"&&s>=0);var d=s/26|0,f=s%26;return this._expand(d+1),u?this.words[d]=this.words[d]|1<<f:this.words[d]=this.words[d]&~(1<<f),this.strip()},i.prototype.iadd=function(s){var u;if(this.negative!==0&&s.negative===0)return this.negative=0,u=this.isub(s),this.negative^=1,this._normSign();if(this.negative===0&&s.negative!==0)return s.negative=0,u=this.isub(s),s.negative=1,u._normSign();var d,f;this.length>s.length?(d=this,f=s):(d=s,f=this);for(var c=0,v=0;v<f.length;v++)u=(d.words[v]|0)+(f.words[v]|0)+c,this.words[v]=u&67108863,c=u>>>26;for(;c!==0&&v<d.length;v++)u=(d.words[v]|0)+c,this.words[v]=u&67108863,c=u>>>26;if(this.length=d.length,c!==0)this.words[this.length]=c,this.length++;else if(d!==this)for(;v<d.length;v++)this.words[v]=d.words[v];return this},i.prototype.add=function(s){var u;return s.negative!==0&&this.negative===0?(s.negative=0,u=this.sub(s),s.negative^=1,u):s.negative===0&&this.negative!==0?(this.negative=0,u=s.sub(this),this.negative=1,u):this.length>s.length?this.clone().iadd(s):s.clone().iadd(this)},i.prototype.isub=function(s){if(s.negative!==0){s.negative=0;var u=this.iadd(s);return s.negative=1,u._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(s),this.negative=1,this._normSign();var d=this.cmp(s);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var f,c;d>0?(f=this,c=s):(f=s,c=this);for(var v=0,m=0;m<c.length;m++)u=(f.words[m]|0)-(c.words[m]|0)+v,v=u>>26,this.words[m]=u&67108863;for(;v!==0&&m<f.length;m++)u=(f.words[m]|0)+v,v=u>>26,this.words[m]=u&67108863;if(v===0&&m<f.length&&f!==this)for(;m<f.length;m++)this.words[m]=f.words[m];return this.length=Math.max(this.length,m),f!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(s){return this.clone().isub(s)};function F(T,s,u){u.negative=s.negative^T.negative;var d=T.length+s.length|0;u.length=d,d=d-1|0;var f=T.words[0]|0,c=s.words[0]|0,v=f*c,m=v&67108863,h=v/67108864|0;u.words[0]=m;for(var o=1;o<d;o++){for(var p=h>>>26,E=h&67108863,g=Math.min(o,s.length-1),w=Math.max(0,o-T.length+1);w<=g;w++){var U=o-w|0;f=T.words[U]|0,c=s.words[w]|0,v=f*c+E,p+=v/67108864|0,E=v&67108863}u.words[o]=E|0,h=p|0}return h!==0?u.words[o]=h|0:u.length--,u.strip()}var P=function(s,u,d){var f=s.words,c=u.words,v=d.words,m=0,h,o,p,E=f[0]|0,g=E&8191,w=E>>>13,U=f[1]|0,M=U&8191,k=U>>>13,G=f[2]|0,Z=G&8191,B=G>>>13,R=f[3]|0,L=R&8191,I=R>>>13,q=f[4]|0,O=q&8191,J=q>>>13,K=f[5]|0,N=K&8191,H=K>>>13,Q=f[6]|0,j=Q&8191,re=Q>>>13,De=f[7]|0,se=De&8191,le=De>>>13,He=f[8]|0,oe=He&8191,fe=He>>>13,ze=f[9]|0,ge=ze&8191,ve=ze>>>13,xt=c[0]|0,pe=xt&8191,be=xt>>>13,$e=c[1]|0,de=$e&8191,ue=$e>>>13,Zt=c[2]|0,me=Zt&8191,xe=Zt>>>13,Vt=c[3]|0,ye=Vt&8191,we=Vt>>>13,jt=c[4]|0,Ae=jt&8191,Se=jt>>>13,Qt=c[5]|0,Me=Qt&8191,Te=Qt>>>13,Wt=c[6]|0,Ee=Wt&8191,_e=Wt>>>13,Yt=c[7]|0,Be=Yt&8191,Ce=Yt>>>13,$t=c[8]|0,Pe=$t&8191,Le=$t>>>13,er=c[9]|0,Re=er&8191,Fe=er>>>13;d.negative=s.negative^u.negative,d.length=19,h=Math.imul(g,pe),o=Math.imul(g,be),o=o+Math.imul(w,pe)|0,p=Math.imul(w,be);var It=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(It>>>26)|0,It&=67108863,h=Math.imul(M,pe),o=Math.imul(M,be),o=o+Math.imul(k,pe)|0,p=Math.imul(k,be),h=h+Math.imul(g,de)|0,o=o+Math.imul(g,ue)|0,o=o+Math.imul(w,de)|0,p=p+Math.imul(w,ue)|0;var ke=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,h=Math.imul(Z,pe),o=Math.imul(Z,be),o=o+Math.imul(B,pe)|0,p=Math.imul(B,be),h=h+Math.imul(M,de)|0,o=o+Math.imul(M,ue)|0,o=o+Math.imul(k,de)|0,p=p+Math.imul(k,ue)|0,h=h+Math.imul(g,me)|0,o=o+Math.imul(g,xe)|0,o=o+Math.imul(w,me)|0,p=p+Math.imul(w,xe)|0;var Ne=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,h=Math.imul(L,pe),o=Math.imul(L,be),o=o+Math.imul(I,pe)|0,p=Math.imul(I,be),h=h+Math.imul(Z,de)|0,o=o+Math.imul(Z,ue)|0,o=o+Math.imul(B,de)|0,p=p+Math.imul(B,ue)|0,h=h+Math.imul(M,me)|0,o=o+Math.imul(M,xe)|0,o=o+Math.imul(k,me)|0,p=p+Math.imul(k,xe)|0,h=h+Math.imul(g,ye)|0,o=o+Math.imul(g,we)|0,o=o+Math.imul(w,ye)|0,p=p+Math.imul(w,we)|0;var Tt=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,h=Math.imul(O,pe),o=Math.imul(O,be),o=o+Math.imul(J,pe)|0,p=Math.imul(J,be),h=h+Math.imul(L,de)|0,o=o+Math.imul(L,ue)|0,o=o+Math.imul(I,de)|0,p=p+Math.imul(I,ue)|0,h=h+Math.imul(Z,me)|0,o=o+Math.imul(Z,xe)|0,o=o+Math.imul(B,me)|0,p=p+Math.imul(B,xe)|0,h=h+Math.imul(M,ye)|0,o=o+Math.imul(M,we)|0,o=o+Math.imul(k,ye)|0,p=p+Math.imul(k,we)|0,h=h+Math.imul(g,Ae)|0,o=o+Math.imul(g,Se)|0,o=o+Math.imul(w,Ae)|0,p=p+Math.imul(w,Se)|0;var Et=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,h=Math.imul(N,pe),o=Math.imul(N,be),o=o+Math.imul(H,pe)|0,p=Math.imul(H,be),h=h+Math.imul(O,de)|0,o=o+Math.imul(O,ue)|0,o=o+Math.imul(J,de)|0,p=p+Math.imul(J,ue)|0,h=h+Math.imul(L,me)|0,o=o+Math.imul(L,xe)|0,o=o+Math.imul(I,me)|0,p=p+Math.imul(I,xe)|0,h=h+Math.imul(Z,ye)|0,o=o+Math.imul(Z,we)|0,o=o+Math.imul(B,ye)|0,p=p+Math.imul(B,we)|0,h=h+Math.imul(M,Ae)|0,o=o+Math.imul(M,Se)|0,o=o+Math.imul(k,Ae)|0,p=p+Math.imul(k,Se)|0,h=h+Math.imul(g,Me)|0,o=o+Math.imul(g,Te)|0,o=o+Math.imul(w,Me)|0,p=p+Math.imul(w,Te)|0;var _t=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,h=Math.imul(j,pe),o=Math.imul(j,be),o=o+Math.imul(re,pe)|0,p=Math.imul(re,be),h=h+Math.imul(N,de)|0,o=o+Math.imul(N,ue)|0,o=o+Math.imul(H,de)|0,p=p+Math.imul(H,ue)|0,h=h+Math.imul(O,me)|0,o=o+Math.imul(O,xe)|0,o=o+Math.imul(J,me)|0,p=p+Math.imul(J,xe)|0,h=h+Math.imul(L,ye)|0,o=o+Math.imul(L,we)|0,o=o+Math.imul(I,ye)|0,p=p+Math.imul(I,we)|0,h=h+Math.imul(Z,Ae)|0,o=o+Math.imul(Z,Se)|0,o=o+Math.imul(B,Ae)|0,p=p+Math.imul(B,Se)|0,h=h+Math.imul(M,Me)|0,o=o+Math.imul(M,Te)|0,o=o+Math.imul(k,Me)|0,p=p+Math.imul(k,Te)|0,h=h+Math.imul(g,Ee)|0,o=o+Math.imul(g,_e)|0,o=o+Math.imul(w,Ee)|0,p=p+Math.imul(w,_e)|0;var Bt=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,h=Math.imul(se,pe),o=Math.imul(se,be),o=o+Math.imul(le,pe)|0,p=Math.imul(le,be),h=h+Math.imul(j,de)|0,o=o+Math.imul(j,ue)|0,o=o+Math.imul(re,de)|0,p=p+Math.imul(re,ue)|0,h=h+Math.imul(N,me)|0,o=o+Math.imul(N,xe)|0,o=o+Math.imul(H,me)|0,p=p+Math.imul(H,xe)|0,h=h+Math.imul(O,ye)|0,o=o+Math.imul(O,we)|0,o=o+Math.imul(J,ye)|0,p=p+Math.imul(J,we)|0,h=h+Math.imul(L,Ae)|0,o=o+Math.imul(L,Se)|0,o=o+Math.imul(I,Ae)|0,p=p+Math.imul(I,Se)|0,h=h+Math.imul(Z,Me)|0,o=o+Math.imul(Z,Te)|0,o=o+Math.imul(B,Me)|0,p=p+Math.imul(B,Te)|0,h=h+Math.imul(M,Ee)|0,o=o+Math.imul(M,_e)|0,o=o+Math.imul(k,Ee)|0,p=p+Math.imul(k,_e)|0,h=h+Math.imul(g,Be)|0,o=o+Math.imul(g,Ce)|0,o=o+Math.imul(w,Be)|0,p=p+Math.imul(w,Ce)|0;var Ct=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,h=Math.imul(oe,pe),o=Math.imul(oe,be),o=o+Math.imul(fe,pe)|0,p=Math.imul(fe,be),h=h+Math.imul(se,de)|0,o=o+Math.imul(se,ue)|0,o=o+Math.imul(le,de)|0,p=p+Math.imul(le,ue)|0,h=h+Math.imul(j,me)|0,o=o+Math.imul(j,xe)|0,o=o+Math.imul(re,me)|0,p=p+Math.imul(re,xe)|0,h=h+Math.imul(N,ye)|0,o=o+Math.imul(N,we)|0,o=o+Math.imul(H,ye)|0,p=p+Math.imul(H,we)|0,h=h+Math.imul(O,Ae)|0,o=o+Math.imul(O,Se)|0,o=o+Math.imul(J,Ae)|0,p=p+Math.imul(J,Se)|0,h=h+Math.imul(L,Me)|0,o=o+Math.imul(L,Te)|0,o=o+Math.imul(I,Me)|0,p=p+Math.imul(I,Te)|0,h=h+Math.imul(Z,Ee)|0,o=o+Math.imul(Z,_e)|0,o=o+Math.imul(B,Ee)|0,p=p+Math.imul(B,_e)|0,h=h+Math.imul(M,Be)|0,o=o+Math.imul(M,Ce)|0,o=o+Math.imul(k,Be)|0,p=p+Math.imul(k,Ce)|0,h=h+Math.imul(g,Pe)|0,o=o+Math.imul(g,Le)|0,o=o+Math.imul(w,Pe)|0,p=p+Math.imul(w,Le)|0;var gr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(gr>>>26)|0,gr&=67108863,h=Math.imul(ge,pe),o=Math.imul(ge,be),o=o+Math.imul(ve,pe)|0,p=Math.imul(ve,be),h=h+Math.imul(oe,de)|0,o=o+Math.imul(oe,ue)|0,o=o+Math.imul(fe,de)|0,p=p+Math.imul(fe,ue)|0,h=h+Math.imul(se,me)|0,o=o+Math.imul(se,xe)|0,o=o+Math.imul(le,me)|0,p=p+Math.imul(le,xe)|0,h=h+Math.imul(j,ye)|0,o=o+Math.imul(j,we)|0,o=o+Math.imul(re,ye)|0,p=p+Math.imul(re,we)|0,h=h+Math.imul(N,Ae)|0,o=o+Math.imul(N,Se)|0,o=o+Math.imul(H,Ae)|0,p=p+Math.imul(H,Se)|0,h=h+Math.imul(O,Me)|0,o=o+Math.imul(O,Te)|0,o=o+Math.imul(J,Me)|0,p=p+Math.imul(J,Te)|0,h=h+Math.imul(L,Ee)|0,o=o+Math.imul(L,_e)|0,o=o+Math.imul(I,Ee)|0,p=p+Math.imul(I,_e)|0,h=h+Math.imul(Z,Be)|0,o=o+Math.imul(Z,Ce)|0,o=o+Math.imul(B,Be)|0,p=p+Math.imul(B,Ce)|0,h=h+Math.imul(M,Pe)|0,o=o+Math.imul(M,Le)|0,o=o+Math.imul(k,Pe)|0,p=p+Math.imul(k,Le)|0,h=h+Math.imul(g,Re)|0,o=o+Math.imul(g,Fe)|0,o=o+Math.imul(w,Re)|0,p=p+Math.imul(w,Fe)|0;var vr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(vr>>>26)|0,vr&=67108863,h=Math.imul(ge,de),o=Math.imul(ge,ue),o=o+Math.imul(ve,de)|0,p=Math.imul(ve,ue),h=h+Math.imul(oe,me)|0,o=o+Math.imul(oe,xe)|0,o=o+Math.imul(fe,me)|0,p=p+Math.imul(fe,xe)|0,h=h+Math.imul(se,ye)|0,o=o+Math.imul(se,we)|0,o=o+Math.imul(le,ye)|0,p=p+Math.imul(le,we)|0,h=h+Math.imul(j,Ae)|0,o=o+Math.imul(j,Se)|0,o=o+Math.imul(re,Ae)|0,p=p+Math.imul(re,Se)|0,h=h+Math.imul(N,Me)|0,o=o+Math.imul(N,Te)|0,o=o+Math.imul(H,Me)|0,p=p+Math.imul(H,Te)|0,h=h+Math.imul(O,Ee)|0,o=o+Math.imul(O,_e)|0,o=o+Math.imul(J,Ee)|0,p=p+Math.imul(J,_e)|0,h=h+Math.imul(L,Be)|0,o=o+Math.imul(L,Ce)|0,o=o+Math.imul(I,Be)|0,p=p+Math.imul(I,Ce)|0,h=h+Math.imul(Z,Pe)|0,o=o+Math.imul(Z,Le)|0,o=o+Math.imul(B,Pe)|0,p=p+Math.imul(B,Le)|0,h=h+Math.imul(M,Re)|0,o=o+Math.imul(M,Fe)|0,o=o+Math.imul(k,Re)|0,p=p+Math.imul(k,Fe)|0;var mr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(mr>>>26)|0,mr&=67108863,h=Math.imul(ge,me),o=Math.imul(ge,xe),o=o+Math.imul(ve,me)|0,p=Math.imul(ve,xe),h=h+Math.imul(oe,ye)|0,o=o+Math.imul(oe,we)|0,o=o+Math.imul(fe,ye)|0,p=p+Math.imul(fe,we)|0,h=h+Math.imul(se,Ae)|0,o=o+Math.imul(se,Se)|0,o=o+Math.imul(le,Ae)|0,p=p+Math.imul(le,Se)|0,h=h+Math.imul(j,Me)|0,o=o+Math.imul(j,Te)|0,o=o+Math.imul(re,Me)|0,p=p+Math.imul(re,Te)|0,h=h+Math.imul(N,Ee)|0,o=o+Math.imul(N,_e)|0,o=o+Math.imul(H,Ee)|0,p=p+Math.imul(H,_e)|0,h=h+Math.imul(O,Be)|0,o=o+Math.imul(O,Ce)|0,o=o+Math.imul(J,Be)|0,p=p+Math.imul(J,Ce)|0,h=h+Math.imul(L,Pe)|0,o=o+Math.imul(L,Le)|0,o=o+Math.imul(I,Pe)|0,p=p+Math.imul(I,Le)|0,h=h+Math.imul(Z,Re)|0,o=o+Math.imul(Z,Fe)|0,o=o+Math.imul(B,Re)|0,p=p+Math.imul(B,Fe)|0;var xr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(xr>>>26)|0,xr&=67108863,h=Math.imul(ge,ye),o=Math.imul(ge,we),o=o+Math.imul(ve,ye)|0,p=Math.imul(ve,we),h=h+Math.imul(oe,Ae)|0,o=o+Math.imul(oe,Se)|0,o=o+Math.imul(fe,Ae)|0,p=p+Math.imul(fe,Se)|0,h=h+Math.imul(se,Me)|0,o=o+Math.imul(se,Te)|0,o=o+Math.imul(le,Me)|0,p=p+Math.imul(le,Te)|0,h=h+Math.imul(j,Ee)|0,o=o+Math.imul(j,_e)|0,o=o+Math.imul(re,Ee)|0,p=p+Math.imul(re,_e)|0,h=h+Math.imul(N,Be)|0,o=o+Math.imul(N,Ce)|0,o=o+Math.imul(H,Be)|0,p=p+Math.imul(H,Ce)|0,h=h+Math.imul(O,Pe)|0,o=o+Math.imul(O,Le)|0,o=o+Math.imul(J,Pe)|0,p=p+Math.imul(J,Le)|0,h=h+Math.imul(L,Re)|0,o=o+Math.imul(L,Fe)|0,o=o+Math.imul(I,Re)|0,p=p+Math.imul(I,Fe)|0;var yr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(yr>>>26)|0,yr&=67108863,h=Math.imul(ge,Ae),o=Math.imul(ge,Se),o=o+Math.imul(ve,Ae)|0,p=Math.imul(ve,Se),h=h+Math.imul(oe,Me)|0,o=o+Math.imul(oe,Te)|0,o=o+Math.imul(fe,Me)|0,p=p+Math.imul(fe,Te)|0,h=h+Math.imul(se,Ee)|0,o=o+Math.imul(se,_e)|0,o=o+Math.imul(le,Ee)|0,p=p+Math.imul(le,_e)|0,h=h+Math.imul(j,Be)|0,o=o+Math.imul(j,Ce)|0,o=o+Math.imul(re,Be)|0,p=p+Math.imul(re,Ce)|0,h=h+Math.imul(N,Pe)|0,o=o+Math.imul(N,Le)|0,o=o+Math.imul(H,Pe)|0,p=p+Math.imul(H,Le)|0,h=h+Math.imul(O,Re)|0,o=o+Math.imul(O,Fe)|0,o=o+Math.imul(J,Re)|0,p=p+Math.imul(J,Fe)|0;var wr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(wr>>>26)|0,wr&=67108863,h=Math.imul(ge,Me),o=Math.imul(ge,Te),o=o+Math.imul(ve,Me)|0,p=Math.imul(ve,Te),h=h+Math.imul(oe,Ee)|0,o=o+Math.imul(oe,_e)|0,o=o+Math.imul(fe,Ee)|0,p=p+Math.imul(fe,_e)|0,h=h+Math.imul(se,Be)|0,o=o+Math.imul(se,Ce)|0,o=o+Math.imul(le,Be)|0,p=p+Math.imul(le,Ce)|0,h=h+Math.imul(j,Pe)|0,o=o+Math.imul(j,Le)|0,o=o+Math.imul(re,Pe)|0,p=p+Math.imul(re,Le)|0,h=h+Math.imul(N,Re)|0,o=o+Math.imul(N,Fe)|0,o=o+Math.imul(H,Re)|0,p=p+Math.imul(H,Fe)|0;var Ar=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Ar>>>26)|0,Ar&=67108863,h=Math.imul(ge,Ee),o=Math.imul(ge,_e),o=o+Math.imul(ve,Ee)|0,p=Math.imul(ve,_e),h=h+Math.imul(oe,Be)|0,o=o+Math.imul(oe,Ce)|0,o=o+Math.imul(fe,Be)|0,p=p+Math.imul(fe,Ce)|0,h=h+Math.imul(se,Pe)|0,o=o+Math.imul(se,Le)|0,o=o+Math.imul(le,Pe)|0,p=p+Math.imul(le,Le)|0,h=h+Math.imul(j,Re)|0,o=o+Math.imul(j,Fe)|0,o=o+Math.imul(re,Re)|0,p=p+Math.imul(re,Fe)|0;var Sr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Sr>>>26)|0,Sr&=67108863,h=Math.imul(ge,Be),o=Math.imul(ge,Ce),o=o+Math.imul(ve,Be)|0,p=Math.imul(ve,Ce),h=h+Math.imul(oe,Pe)|0,o=o+Math.imul(oe,Le)|0,o=o+Math.imul(fe,Pe)|0,p=p+Math.imul(fe,Le)|0,h=h+Math.imul(se,Re)|0,o=o+Math.imul(se,Fe)|0,o=o+Math.imul(le,Re)|0,p=p+Math.imul(le,Fe)|0;var Mr=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(Mr>>>26)|0,Mr&=67108863,h=Math.imul(ge,Pe),o=Math.imul(ge,Le),o=o+Math.imul(ve,Pe)|0,p=Math.imul(ve,Le),h=h+Math.imul(oe,Re)|0,o=o+Math.imul(oe,Fe)|0,o=o+Math.imul(fe,Re)|0,p=p+Math.imul(fe,Fe)|0;var pn=(m+h|0)+((o&8191)<<13)|0;m=(p+(o>>>13)|0)+(pn>>>26)|0,pn&=67108863,h=Math.imul(ge,Re),o=Math.imul(ge,Fe),o=o+Math.imul(ve,Re)|0,p=Math.imul(ve,Fe);var bn=(m+h|0)+((o&8191)<<13)|0;return m=(p+(o>>>13)|0)+(bn>>>26)|0,bn&=67108863,v[0]=It,v[1]=ke,v[2]=Ne,v[3]=Tt,v[4]=Et,v[5]=_t,v[6]=Bt,v[7]=Ct,v[8]=gr,v[9]=vr,v[10]=mr,v[11]=xr,v[12]=yr,v[13]=wr,v[14]=Ar,v[15]=Sr,v[16]=Mr,v[17]=pn,v[18]=bn,m!==0&&(v[19]=m,d.length++),d};Math.imul||(P=F);function z(T,s,u){u.negative=s.negative^T.negative,u.length=T.length+s.length;for(var d=0,f=0,c=0;c<u.length-1;c++){var v=f;f=0;for(var m=d&67108863,h=Math.min(c,s.length-1),o=Math.max(0,c-T.length+1);o<=h;o++){var p=c-o,E=T.words[p]|0,g=s.words[o]|0,w=E*g,U=w&67108863;v=v+(w/67108864|0)|0,U=U+m|0,m=U&67108863,v=v+(U>>>26)|0,f+=v>>>26,v&=67108863}u.words[c]=m,d=v,v=f}return d!==0?u.words[c]=d:u.length--,u.strip()}function W(T,s,u){var d=new X;return d.mulp(T,s,u)}i.prototype.mulTo=function(s,u){var d,f=this.length+s.length;return this.length===10&&s.length===10?d=P(this,s,u):f<63?d=F(this,s,u):f<1024?d=z(this,s,u):d=W(this,s,u),d};function X(T,s){this.x=T,this.y=s}X.prototype.makeRBT=function(s){for(var u=new Array(s),d=i.prototype._countBits(s)-1,f=0;f<s;f++)u[f]=this.revBin(f,d,s);return u},X.prototype.revBin=function(s,u,d){if(s===0||s===d-1)return s;for(var f=0,c=0;c<u;c++)f|=(s&1)<<u-c-1,s>>=1;return f},X.prototype.permute=function(s,u,d,f,c,v){for(var m=0;m<v;m++)f[m]=u[s[m]],c[m]=d[s[m]]},X.prototype.transform=function(s,u,d,f,c,v){this.permute(v,s,u,d,f,c);for(var m=1;m<c;m<<=1)for(var h=m<<1,o=Math.cos(2*Math.PI/h),p=Math.sin(2*Math.PI/h),E=0;E<c;E+=h)for(var g=o,w=p,U=0;U<m;U++){var M=d[E+U],k=f[E+U],G=d[E+U+m],Z=f[E+U+m],B=g*G-w*Z;Z=g*Z+w*G,G=B,d[E+U]=M+G,f[E+U]=k+Z,d[E+U+m]=M-G,f[E+U+m]=k-Z,U!==h&&(B=o*g-p*w,w=o*w+p*g,g=B)}},X.prototype.guessLen13b=function(s,u){var d=Math.max(u,s)|1,f=d&1,c=0;for(d=d/2|0;d;d=d>>>1)c++;return 1<<c+1+f},X.prototype.conjugate=function(s,u,d){if(!(d<=1))for(var f=0;f<d/2;f++){var c=s[f];s[f]=s[d-f-1],s[d-f-1]=c,c=u[f],u[f]=-u[d-f-1],u[d-f-1]=-c}},X.prototype.normalize13b=function(s,u){for(var d=0,f=0;f<u/2;f++){var c=Math.round(s[2*f+1]/u)*8192+Math.round(s[2*f]/u)+d;s[f]=c&67108863,c<67108864?d=0:d=c/67108864|0}return s},X.prototype.convert13b=function(s,u,d,f){for(var c=0,v=0;v<u;v++)c=c+(s[v]|0),d[2*v]=c&8191,c=c>>>13,d[2*v+1]=c&8191,c=c>>>13;for(v=2*u;v<f;++v)d[v]=0;r(c===0),r((c&-8192)===0)},X.prototype.stub=function(s){for(var u=new Array(s),d=0;d<s;d++)u[d]=0;return u},X.prototype.mulp=function(s,u,d){var f=2*this.guessLen13b(s.length,u.length),c=this.makeRBT(f),v=this.stub(f),m=new Array(f),h=new Array(f),o=new Array(f),p=new Array(f),E=new Array(f),g=new Array(f),w=d.words;w.length=f,this.convert13b(s.words,s.length,m,f),this.convert13b(u.words,u.length,p,f),this.transform(m,v,h,o,f,c),this.transform(p,v,E,g,f,c);for(var U=0;U<f;U++){var M=h[U]*E[U]-o[U]*g[U];o[U]=h[U]*g[U]+o[U]*E[U],h[U]=M}return this.conjugate(h,o,f),this.transform(h,o,w,v,f,c),this.conjugate(w,v,f),this.normalize13b(w,f),d.negative=s.negative^u.negative,d.length=s.length+u.length,d.strip()},i.prototype.mul=function(s){var u=new i(null);return u.words=new Array(this.length+s.length),this.mulTo(s,u)},i.prototype.mulf=function(s){var u=new i(null);return u.words=new Array(this.length+s.length),W(this,s,u)},i.prototype.imul=function(s){return this.clone().mulTo(s,this)},i.prototype.imuln=function(s){r(typeof s=="number"),r(s<67108864);for(var u=0,d=0;d<this.length;d++){var f=(this.words[d]|0)*s,c=(f&67108863)+(u&67108863);u>>=26,u+=f/67108864|0,u+=c>>>26,this.words[d]=c&67108863}return u!==0&&(this.words[d]=u,this.length++),this.length=s===0?1:this.length,this},i.prototype.muln=function(s){return this.clone().imuln(s)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(s){var u=D(s);if(u.length===0)return new i(1);for(var d=this,f=0;f<u.length&&u[f]===0;f++,d=d.sqr());if(++f<u.length)for(var c=d.sqr();f<u.length;f++,c=c.sqr())u[f]!==0&&(d=d.mul(c));return d},i.prototype.iushln=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26,f=67108863>>>26-u<<26-u,c;if(u!==0){var v=0;for(c=0;c<this.length;c++){var m=this.words[c]&f,h=(this.words[c]|0)-m<<u;this.words[c]=h|v,v=m>>>26-u}v&&(this.words[c]=v,this.length++)}if(d!==0){for(c=this.length-1;c>=0;c--)this.words[c+d]=this.words[c];for(c=0;c<d;c++)this.words[c]=0;this.length+=d}return this.strip()},i.prototype.ishln=function(s){return r(this.negative===0),this.iushln(s)},i.prototype.iushrn=function(s,u,d){r(typeof s=="number"&&s>=0);var f;u?f=(u-u%26)/26:f=0;var c=s%26,v=Math.min((s-c)/26,this.length),m=67108863^67108863>>>c<<c,h=d;if(f-=v,f=Math.max(0,f),h){for(var o=0;o<v;o++)h.words[o]=this.words[o];h.length=v}if(v!==0)if(this.length>v)for(this.length-=v,o=0;o<this.length;o++)this.words[o]=this.words[o+v];else this.words[0]=0,this.length=1;var p=0;for(o=this.length-1;o>=0&&(p!==0||o>=f);o--){var E=this.words[o]|0;this.words[o]=p<<26-c|E>>>c,p=E&m}return h&&p!==0&&(h.words[h.length++]=p),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(s,u,d){return r(this.negative===0),this.iushrn(s,u,d)},i.prototype.shln=function(s){return this.clone().ishln(s)},i.prototype.ushln=function(s){return this.clone().iushln(s)},i.prototype.shrn=function(s){return this.clone().ishrn(s)},i.prototype.ushrn=function(s){return this.clone().iushrn(s)},i.prototype.testn=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26,f=1<<u;if(this.length<=d)return!1;var c=this.words[d];return!!(c&f)},i.prototype.imaskn=function(s){r(typeof s=="number"&&s>=0);var u=s%26,d=(s-u)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(u!==0&&d++,this.length=Math.min(d,this.length),u!==0){var f=67108863^67108863>>>u<<u;this.words[this.length-1]&=f}return this.strip()},i.prototype.maskn=function(s){return this.clone().imaskn(s)},i.prototype.iaddn=function(s){return r(typeof s=="number"),r(s<67108864),s<0?this.isubn(-s):this.negative!==0?this.length===1&&(this.words[0]|0)<s?(this.words[0]=s-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(s),this.negative=1,this):this._iaddn(s)},i.prototype._iaddn=function(s){this.words[0]+=s;for(var u=0;u<this.length&&this.words[u]>=67108864;u++)this.words[u]-=67108864,u===this.length-1?this.words[u+1]=1:this.words[u+1]++;return this.length=Math.max(this.length,u+1),this},i.prototype.isubn=function(s){if(r(typeof s=="number"),r(s<67108864),s<0)return this.iaddn(-s);if(this.negative!==0)return this.negative=0,this.iaddn(s),this.negative=1,this;if(this.words[0]-=s,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var u=0;u<this.length&&this.words[u]<0;u++)this.words[u]+=67108864,this.words[u+1]-=1;return this.strip()},i.prototype.addn=function(s){return this.clone().iaddn(s)},i.prototype.subn=function(s){return this.clone().isubn(s)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(s,u,d){var f=s.length+d,c;this._expand(f);var v,m=0;for(c=0;c<s.length;c++){v=(this.words[c+d]|0)+m;var h=(s.words[c]|0)*u;v-=h&67108863,m=(v>>26)-(h/67108864|0),this.words[c+d]=v&67108863}for(;c<this.length-d;c++)v=(this.words[c+d]|0)+m,m=v>>26,this.words[c+d]=v&67108863;if(m===0)return this.strip();for(r(m===-1),m=0,c=0;c<this.length;c++)v=-(this.words[c]|0)+m,m=v>>26,this.words[c]=v&67108863;return this.negative=1,this.strip()},i.prototype._wordDiv=function(s,u){var d=this.length-s.length,f=this.clone(),c=s,v=c.words[c.length-1]|0,m=this._countBits(v);d=26-m,d!==0&&(c=c.ushln(d),f.iushln(d),v=c.words[c.length-1]|0);var h=f.length-c.length,o;if(u!=="mod"){o=new i(null),o.length=h+1,o.words=new Array(o.length);for(var p=0;p<o.length;p++)o.words[p]=0}var E=f.clone()._ishlnsubmul(c,1,h);E.negative===0&&(f=E,o&&(o.words[h]=1));for(var g=h-1;g>=0;g--){var w=(f.words[c.length+g]|0)*67108864+(f.words[c.length+g-1]|0);for(w=Math.min(w/v|0,67108863),f._ishlnsubmul(c,w,g);f.negative!==0;)w--,f.negative=0,f._ishlnsubmul(c,1,g),f.isZero()||(f.negative^=1);o&&(o.words[g]=w)}return o&&o.strip(),f.strip(),u!=="div"&&d!==0&&f.iushrn(d),{div:o||null,mod:f}},i.prototype.divmod=function(s,u,d){if(r(!s.isZero()),this.isZero())return{div:new i(0),mod:new i(0)};var f,c,v;return this.negative!==0&&s.negative===0?(v=this.neg().divmod(s,u),u!=="mod"&&(f=v.div.neg()),u!=="div"&&(c=v.mod.neg(),d&&c.negative!==0&&c.iadd(s)),{div:f,mod:c}):this.negative===0&&s.negative!==0?(v=this.divmod(s.neg(),u),u!=="mod"&&(f=v.div.neg()),{div:f,mod:v.mod}):this.negative&s.negative?(v=this.neg().divmod(s.neg(),u),u!=="div"&&(c=v.mod.neg(),d&&c.negative!==0&&c.isub(s)),{div:v.div,mod:c}):s.length>this.length||this.cmp(s)<0?{div:new i(0),mod:this}:s.length===1?u==="div"?{div:this.divn(s.words[0]),mod:null}:u==="mod"?{div:null,mod:new i(this.modn(s.words[0]))}:{div:this.divn(s.words[0]),mod:new i(this.modn(s.words[0]))}:this._wordDiv(s,u)},i.prototype.div=function(s){return this.divmod(s,"div",!1).div},i.prototype.mod=function(s){return this.divmod(s,"mod",!1).mod},i.prototype.umod=function(s){return this.divmod(s,"mod",!0).mod},i.prototype.divRound=function(s){var u=this.divmod(s);if(u.mod.isZero())return u.div;var d=u.div.negative!==0?u.mod.isub(s):u.mod,f=s.ushrn(1),c=s.andln(1),v=d.cmp(f);return v<0||c===1&&v===0?u.div:u.div.negative!==0?u.div.isubn(1):u.div.iaddn(1)},i.prototype.modn=function(s){r(s<=67108863);for(var u=(1<<26)%s,d=0,f=this.length-1;f>=0;f--)d=(u*d+(this.words[f]|0))%s;return d},i.prototype.idivn=function(s){r(s<=67108863);for(var u=0,d=this.length-1;d>=0;d--){var f=(this.words[d]|0)+u*67108864;this.words[d]=f/s|0,u=f%s}return this.strip()},i.prototype.divn=function(s){return this.clone().idivn(s)},i.prototype.egcd=function(s){r(s.negative===0),r(!s.isZero());var u=this,d=s.clone();u.negative!==0?u=u.umod(s):u=u.clone();for(var f=new i(1),c=new i(0),v=new i(0),m=new i(1),h=0;u.isEven()&&d.isEven();)u.iushrn(1),d.iushrn(1),++h;for(var o=d.clone(),p=u.clone();!u.isZero();){for(var E=0,g=1;!(u.words[0]&g)&&E<26;++E,g<<=1);if(E>0)for(u.iushrn(E);E-- >0;)(f.isOdd()||c.isOdd())&&(f.iadd(o),c.isub(p)),f.iushrn(1),c.iushrn(1);for(var w=0,U=1;!(d.words[0]&U)&&w<26;++w,U<<=1);if(w>0)for(d.iushrn(w);w-- >0;)(v.isOdd()||m.isOdd())&&(v.iadd(o),m.isub(p)),v.iushrn(1),m.iushrn(1);u.cmp(d)>=0?(u.isub(d),f.isub(v),c.isub(m)):(d.isub(u),v.isub(f),m.isub(c))}return{a:v,b:m,gcd:d.iushln(h)}},i.prototype._invmp=function(s){r(s.negative===0),r(!s.isZero());var u=this,d=s.clone();u.negative!==0?u=u.umod(s):u=u.clone();for(var f=new i(1),c=new i(0),v=d.clone();u.cmpn(1)>0&&d.cmpn(1)>0;){for(var m=0,h=1;!(u.words[0]&h)&&m<26;++m,h<<=1);if(m>0)for(u.iushrn(m);m-- >0;)f.isOdd()&&f.iadd(v),f.iushrn(1);for(var o=0,p=1;!(d.words[0]&p)&&o<26;++o,p<<=1);if(o>0)for(d.iushrn(o);o-- >0;)c.isOdd()&&c.iadd(v),c.iushrn(1);u.cmp(d)>=0?(u.isub(d),f.isub(c)):(d.isub(u),c.isub(f))}var E;return u.cmpn(1)===0?E=f:E=c,E.cmpn(0)<0&&E.iadd(s),E},i.prototype.gcd=function(s){if(this.isZero())return s.abs();if(s.isZero())return this.abs();var u=this.clone(),d=s.clone();u.negative=0,d.negative=0;for(var f=0;u.isEven()&&d.isEven();f++)u.iushrn(1),d.iushrn(1);do{for(;u.isEven();)u.iushrn(1);for(;d.isEven();)d.iushrn(1);var c=u.cmp(d);if(c<0){var v=u;u=d,d=v}else if(c===0||d.cmpn(1)===0)break;u.isub(d)}while(!0);return d.iushln(f)},i.prototype.invm=function(s){return this.egcd(s).a.umod(s)},i.prototype.isEven=function(){return(this.words[0]&1)===0},i.prototype.isOdd=function(){return(this.words[0]&1)===1},i.prototype.andln=function(s){return this.words[0]&s},i.prototype.bincn=function(s){r(typeof s=="number");var u=s%26,d=(s-u)/26,f=1<<u;if(this.length<=d)return this._expand(d+1),this.words[d]|=f,this;for(var c=f,v=d;c!==0&&v<this.length;v++){var m=this.words[v]|0;m+=c,c=m>>>26,m&=67108863,this.words[v]=m}return c!==0&&(this.words[v]=c,this.length++),this},i.prototype.isZero=function(){return this.length===1&&this.words[0]===0},i.prototype.cmpn=function(s){var u=s<0;if(this.negative!==0&&!u)return-1;if(this.negative===0&&u)return 1;this.strip();var d;if(this.length>1)d=1;else{u&&(s=-s),r(s<=67108863,"Number is too big");var f=this.words[0]|0;d=f===s?0:f<s?-1:1}return this.negative!==0?-d|0:d},i.prototype.cmp=function(s){if(this.negative!==0&&s.negative===0)return-1;if(this.negative===0&&s.negative!==0)return 1;var u=this.ucmp(s);return this.negative!==0?-u|0:u},i.prototype.ucmp=function(s){if(this.length>s.length)return 1;if(this.length<s.length)return-1;for(var u=0,d=this.length-1;d>=0;d--){var f=this.words[d]|0,c=s.words[d]|0;if(f!==c){f<c?u=-1:f>c&&(u=1);break}}return u},i.prototype.gtn=function(s){return this.cmpn(s)===1},i.prototype.gt=function(s){return this.cmp(s)===1},i.prototype.gten=function(s){return this.cmpn(s)>=0},i.prototype.gte=function(s){return this.cmp(s)>=0},i.prototype.ltn=function(s){return this.cmpn(s)===-1},i.prototype.lt=function(s){return this.cmp(s)===-1},i.prototype.lten=function(s){return this.cmpn(s)<=0},i.prototype.lte=function(s){return this.cmp(s)<=0},i.prototype.eqn=function(s){return this.cmpn(s)===0},i.prototype.eq=function(s){return this.cmp(s)===0},i.red=function(s){return new te(s)},i.prototype.toRed=function(s){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),s.convertTo(this)._forceRed(s)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(s){return this.red=s,this},i.prototype.forceRed=function(s){return r(!this.red,"Already a number in reduction context"),this._forceRed(s)},i.prototype.redAdd=function(s){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,s)},i.prototype.redIAdd=function(s){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,s)},i.prototype.redSub=function(s){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,s)},i.prototype.redISub=function(s){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,s)},i.prototype.redShl=function(s){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,s)},i.prototype.redMul=function(s){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.mul(this,s)},i.prototype.redIMul=function(s){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,s),this.red.imul(this,s)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(s){return r(this.red&&!s.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,s)};var ne={k256:null,p224:null,p192:null,p25519:null};function $(T,s){this.name=T,this.p=new i(s,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}$.prototype._tmp=function(){var s=new i(null);return s.words=new Array(Math.ceil(this.n/13)),s},$.prototype.ireduce=function(s){var u=s,d;do this.split(u,this.tmp),u=this.imulK(u),u=u.iadd(this.tmp),d=u.bitLength();while(d>this.n);var f=d<this.n?-1:u.ucmp(this.p);return f===0?(u.words[0]=0,u.length=1):f>0?u.isub(this.p):u.strip!==void 0?u.strip():u._strip(),u},$.prototype.split=function(s,u){s.iushrn(this.n,0,u)},$.prototype.imulK=function(s){return s.imul(this.k)};function ae(){$.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}n(ae,$),ae.prototype.split=function(s,u){for(var d=4194303,f=Math.min(s.length,9),c=0;c<f;c++)u.words[c]=s.words[c];if(u.length=f,s.length<=9){s.words[0]=0,s.length=1;return}var v=s.words[9];for(u.words[u.length++]=v&d,c=10;c<s.length;c++){var m=s.words[c]|0;s.words[c-10]=(m&d)<<4|v>>>22,v=m}v>>>=22,s.words[c-10]=v,v===0&&s.length>10?s.length-=10:s.length-=9},ae.prototype.imulK=function(s){s.words[s.length]=0,s.words[s.length+1]=0,s.length+=2;for(var u=0,d=0;d<s.length;d++){var f=s.words[d]|0;u+=f*977,s.words[d]=u&67108863,u=f*64+(u/67108864|0)}return s.words[s.length-1]===0&&(s.length--,s.words[s.length-1]===0&&s.length--),s};function ie(){$.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}n(ie,$);function ee(){$.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}n(ee,$);function ce(){$.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}n(ce,$),ce.prototype.imulK=function(s){for(var u=0,d=0;d<s.length;d++){var f=(s.words[d]|0)*19+u,c=f&67108863;f>>>=26,s.words[d]=c,u=f}return u!==0&&(s.words[s.length++]=u),s},i._prime=function(s){if(ne[s])return ne[s];var u;if(s==="k256")u=new ae;else if(s==="p224")u=new ie;else if(s==="p192")u=new ee;else if(s==="p25519")u=new ce;else throw new Error("Unknown prime "+s);return ne[s]=u,u};function te(T){if(typeof T=="string"){var s=i._prime(T);this.m=s.p,this.prime=s}else r(T.gtn(1),"modulus must be greater than 1"),this.m=T,this.prime=null}te.prototype._verify1=function(s){r(s.negative===0,"red works only with positives"),r(s.red,"red works only with red numbers")},te.prototype._verify2=function(s,u){r((s.negative|u.negative)===0,"red works only with positives"),r(s.red&&s.red===u.red,"red works only with red numbers")},te.prototype.imod=function(s){return this.prime?this.prime.ireduce(s)._forceRed(this):s.umod(this.m)._forceRed(this)},te.prototype.neg=function(s){return s.isZero()?s.clone():this.m.sub(s)._forceRed(this)},te.prototype.add=function(s,u){this._verify2(s,u);var d=s.add(u);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},te.prototype.iadd=function(s,u){this._verify2(s,u);var d=s.iadd(u);return d.cmp(this.m)>=0&&d.isub(this.m),d},te.prototype.sub=function(s,u){this._verify2(s,u);var d=s.sub(u);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},te.prototype.isub=function(s,u){this._verify2(s,u);var d=s.isub(u);return d.cmpn(0)<0&&d.iadd(this.m),d},te.prototype.shl=function(s,u){return this._verify1(s),this.imod(s.ushln(u))},te.prototype.imul=function(s,u){return this._verify2(s,u),this.imod(s.imul(u))},te.prototype.mul=function(s,u){return this._verify2(s,u),this.imod(s.mul(u))},te.prototype.isqr=function(s){return this.imul(s,s.clone())},te.prototype.sqr=function(s){return this.mul(s,s)},te.prototype.sqrt=function(s){if(s.isZero())return s.clone();var u=this.m.andln(3);if(r(u%2===1),u===3){var d=this.m.add(new i(1)).iushrn(2);return this.pow(s,d)}for(var f=this.m.subn(1),c=0;!f.isZero()&&f.andln(1)===0;)c++,f.iushrn(1);r(!f.isZero());var v=new i(1).toRed(this),m=v.redNeg(),h=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new i(2*o*o).toRed(this);this.pow(o,h).cmp(m)!==0;)o.redIAdd(m);for(var p=this.pow(o,f),E=this.pow(s,f.addn(1).iushrn(1)),g=this.pow(s,f),w=c;g.cmp(v)!==0;){for(var U=g,M=0;U.cmp(v)!==0;M++)U=U.redSqr();r(M<w);var k=this.pow(p,new i(1).iushln(w-M-1));E=E.redMul(k),p=k.redSqr(),g=g.redMul(p),w=M}return E},te.prototype.invm=function(s){var u=s._invmp(this.m);return u.negative!==0?(u.negative=0,this.imod(u).redNeg()):this.imod(u)},te.prototype.pow=function(s,u){if(u.isZero())return new i(1).toRed(this);if(u.cmpn(1)===0)return s.clone();var d=4,f=new Array(1<<d);f[0]=new i(1).toRed(this),f[1]=s;for(var c=2;c<f.length;c++)f[c]=this.mul(f[c-1],s);var v=f[0],m=0,h=0,o=u.bitLength()%26;for(o===0&&(o=26),c=u.length-1;c>=0;c--){for(var p=u.words[c],E=o-1;E>=0;E--){var g=p>>E&1;if(v!==f[0]&&(v=this.sqr(v)),g===0&&m===0){h=0;continue}m<<=1,m|=g,h++,!(h!==d&&(c!==0||E!==0))&&(v=this.mul(v,f[m]),h=0,m=0)}o=26}return v},te.prototype.convertTo=function(s){var u=s.umod(this.m);return u===s?u.clone():u},te.prototype.convertFrom=function(s){var u=s.clone();return u.red=null,u},i.mont=function(s){return new Y(s)};function Y(T){te.call(this,T),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}n(Y,te),Y.prototype.convertTo=function(s){return this.imod(s.ushln(this.shift))},Y.prototype.convertFrom=function(s){var u=this.imod(s.mul(this.rinv));return u.red=null,u},Y.prototype.imul=function(s,u){if(s.isZero()||u.isZero())return s.words[0]=0,s.length=1,s;var d=s.imul(u),f=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=d.isub(f).iushrn(this.shift),v=c;return c.cmp(this.m)>=0?v=c.isub(this.m):c.cmpn(0)<0&&(v=c.iadd(this.m)),v._forceRed(this)},Y.prototype.mul=function(s,u){if(s.isZero()||u.isZero())return new i(0)._forceRed(this);var d=s.mul(u),f=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),c=d.isub(f).iushrn(this.shift),v=c;return c.cmp(this.m)>=0?v=c.isub(this.m):c.cmpn(0)<0&&(v=c.iadd(this.m)),v._forceRed(this)},Y.prototype.invm=function(s){var u=this.imod(s._invmp(this.m).mul(this.r2));return u._forceRed(this)}})(typeof nd>"u"||nd,hv)});var id=V(gv=>{"use strict";var NL=A(S()),D0=gv;function n7(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t!="string"){for(var n=0;n<t.length;n++)r[n]=t[n]|0;return r}if(e==="hex"){t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t);for(var n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var n=0;n<t.length;n++){var i=t.charCodeAt(n),a=i>>8,l=i&255;a?r.push(a,l):r.push(l)}return r}D0.toArray=n7;function pv(t){return t.length===1?"0"+t:t}D0.zero2=pv;function bv(t){for(var e="",r=0;r<t.length;r++)e+=pv(t[r].toString(16));return e}D0.toHex=bv;D0.encode=function(e,r){return r==="hex"?bv(e):e}});var kr=V(vv=>{"use strict";var UL=A(S()),yn=vv,i7=Xn(),a7=di(),I0=id();yn.assert=a7;yn.toArray=I0.toArray;yn.zero2=I0.zero2;yn.toHex=I0.toHex;yn.encode=I0.encode;function o7(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1),i;for(i=0;i<n.length;i+=1)n[i]=0;var a=1<<e+1,l=t.clone();for(i=0;i<n.length;i++){var b,y=l.andln(a-1);l.isOdd()?(y>(a>>1)-1?b=(a>>1)-y:b=y,l.isubn(b)):b=0,n[i]=b,l.iushrn(1)}return n}yn.getNAF=o7;function s7(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0,a;t.cmpn(-n)>0||e.cmpn(-i)>0;){var l=t.andln(3)+n&3,b=e.andln(3)+i&3;l===3&&(l=-1),b===3&&(b=-1);var y;l&1?(a=t.andln(7)+n&7,(a===3||a===5)&&b===2?y=-l:y=l):y=0,r[0].push(y);var x;b&1?(a=e.andln(7)+i&7,(a===3||a===5)&&l===2?x=-b:x=b):x=0,r[1].push(x),2*n===y+1&&(n=1-n),2*i===x+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r}yn.getJSF=s7;function f7(t,e,r){var n="_"+e;t.prototype[e]=function(){return this[n]!==void 0?this[n]:this[n]=r.call(this)}}yn.cachedProperty=f7;function c7(t){return typeof t=="string"?yn.toArray(t,"hex"):t}yn.parseBytes=c7;function u7(t){return new i7(t,"hex","le")}yn.intFromLE=u7});var fd=V((HL,sd)=>{var qL=A(S()),ad;sd.exports=function(e){return ad||(ad=new Hi(null)),ad.generate(e)};function Hi(t){this.rand=t}sd.exports.Rand=Hi;Hi.prototype.generate=function(e){return this._rand(e)};Hi.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),n=0;n<r.length;n++)r[n]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Hi.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Hi.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Hi.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(od=it("crypto"),typeof od.randomBytes!="function")throw new Error("Not supported");Hi.prototype._rand=function(e){return od.randomBytes(e)}}catch{}var od});var Rs=V((GL,mv)=>{"use strict";var XL=A(S()),Ma=Xn(),Ls=kr(),O0=Ls.getNAF,l7=Ls.getJSF,k0=Ls.assert;function qi(t,e){this.type=t,this.p=new Ma(e.p,16),this.red=e.prime?Ma.red(e.prime):Ma.mont(this.p),this.zero=new Ma(0).toRed(this.red),this.one=new Ma(1).toRed(this.red),this.two=new Ma(2).toRed(this.red),this.n=e.n&&new Ma(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}mv.exports=qi;qi.prototype.point=function(){throw new Error("Not implemented")};qi.prototype.validate=function(){throw new Error("Not implemented")};qi.prototype._fixedNafMul=function(e,r){k0(e.precomputed);var n=e._getDoubles(),i=O0(r,1,this._bitLength),a=(1<<n.step+1)-(n.step%2===0?2:1);a/=3;var l=[],b,y;for(b=0;b<i.length;b+=n.step){y=0;for(var x=b+n.step-1;x>=b;x--)y=(y<<1)+i[x];l.push(y)}for(var _=this.jpoint(null,null,null),C=this.jpoint(null,null,null),D=a;D>0;D--){for(b=0;b<l.length;b++)y=l[b],y===D?C=C.mixedAdd(n.points[b]):y===-D&&(C=C.mixedAdd(n.points[b].neg()));_=_.add(C)}return _.toP()};qi.prototype._wnafMul=function(e,r){var n=4,i=e._getNAFPoints(n);n=i.wnd;for(var a=i.points,l=O0(r,n,this._bitLength),b=this.jpoint(null,null,null),y=l.length-1;y>=0;y--){for(var x=0;y>=0&&l[y]===0;y--)x++;if(y>=0&&x++,b=b.dblp(x),y<0)break;var _=l[y];k0(_!==0),e.type==="affine"?_>0?b=b.mixedAdd(a[_-1>>1]):b=b.mixedAdd(a[-_-1>>1].neg()):_>0?b=b.add(a[_-1>>1]):b=b.add(a[-_-1>>1].neg())}return e.type==="affine"?b.toP():b};qi.prototype._wnafMulAdd=function(e,r,n,i,a){var l=this._wnafT1,b=this._wnafT2,y=this._wnafT3,x=0,_,C,D;for(_=0;_<i;_++){D=r[_];var F=D._getNAFPoints(e);l[_]=F.wnd,b[_]=F.points}for(_=i-1;_>=1;_-=2){var P=_-1,z=_;if(l[P]!==1||l[z]!==1){y[P]=O0(n[P],l[P],this._bitLength),y[z]=O0(n[z],l[z],this._bitLength),x=Math.max(y[P].length,x),x=Math.max(y[z].length,x);continue}var W=[r[P],null,null,r[z]];r[P].y.cmp(r[z].y)===0?(W[1]=r[P].add(r[z]),W[2]=r[P].toJ().mixedAdd(r[z].neg())):r[P].y.cmp(r[z].y.redNeg())===0?(W[1]=r[P].toJ().mixedAdd(r[z]),W[2]=r[P].add(r[z].neg())):(W[1]=r[P].toJ().mixedAdd(r[z]),W[2]=r[P].toJ().mixedAdd(r[z].neg()));var X=[-3,-1,-5,-7,0,7,5,1,3],ne=l7(n[P],n[z]);for(x=Math.max(ne[0].length,x),y[P]=new Array(x),y[z]=new Array(x),C=0;C<x;C++){var $=ne[0][C]|0,ae=ne[1][C]|0;y[P][C]=X[($+1)*3+(ae+1)],y[z][C]=0,b[P]=W}}var ie=this.jpoint(null,null,null),ee=this._wnafT4;for(_=x;_>=0;_--){for(var ce=0;_>=0;){var te=!0;for(C=0;C<i;C++)ee[C]=y[C][_]|0,ee[C]!==0&&(te=!1);if(!te)break;ce++,_--}if(_>=0&&ce++,ie=ie.dblp(ce),_<0)break;for(C=0;C<i;C++){var Y=ee[C];Y!==0&&(Y>0?D=b[C][Y-1>>1]:Y<0&&(D=b[C][-Y-1>>1].neg()),D.type==="affine"?ie=ie.mixedAdd(D):ie=ie.add(D))}}for(_=0;_<i;_++)b[_]=null;return a?ie:ie.toP()};function en(t,e){this.curve=t,this.type=e,this.precomputed=null}qi.BasePoint=en;en.prototype.eq=function(){throw new Error("Not implemented")};en.prototype.validate=function(){return this.curve.validate(this)};qi.prototype.decodePoint=function(e,r){e=Ls.toArray(e,r);var n=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*n){e[0]===6?k0(e[e.length-1]%2===0):e[0]===7&&k0(e[e.length-1]%2===1);var i=this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));return i}else if((e[0]===2||e[0]===3)&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),e[0]===3);throw new Error("Unknown point format")};en.prototype.encodeCompressed=function(e){return this.encode(e,!0)};en.prototype._encode=function(e){var r=this.curve.p.byteLength(),n=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",r))};en.prototype.encode=function(e,r){return Ls.encode(this._encode(r),e)};en.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this};en.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1};en.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,a=0;a<r;a+=e){for(var l=0;l<e;l++)i=i.dbl();n.push(i)}return{step:e,points:n}};en.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],n=(1<<e)-1,i=n===1?null:this.dbl(),a=1;a<n;a++)r[a]=r[a-1].add(i);return{wnd:e,points:r}};en.prototype._getBeta=function(){return null};en.prototype.dblp=function(e){for(var r=this,n=0;n<e;n++)r=r.dbl();return r}});var yv=V((zL,xv)=>{"use strict";var KL=A(S()),d7=kr(),gt=Xn(),cd=nr(),So=Rs(),h7=d7.assert;function tn(t){So.call(this,"short",t),this.a=new gt(t.a,16).toRed(this.red),this.b=new gt(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}cd(tn,So);xv.exports=tn;tn.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,n;if(e.beta)r=new gt(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);r=i[0].cmp(i[1])<0?i[0]:i[1],r=r.toRed(this.red)}if(e.lambda)n=new gt(e.lambda,16);else{var a=this._getEndoRoots(this.n);this.g.mul(a[0]).x.cmp(this.g.x.redMul(r))===0?n=a[0]:(n=a[1],h7(this.g.mul(n).x.cmp(this.g.x.redMul(r))===0))}var l;return e.basis?l=e.basis.map(function(b){return{a:new gt(b.a,16),b:new gt(b.b,16)}}):l=this._getEndoBasis(n),{beta:r,lambda:n,basis:l}}};tn.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:gt.mont(e),n=new gt(2).toRed(r).redInvm(),i=n.redNeg(),a=new gt(3).toRed(r).redNeg().redSqrt().redMul(n),l=i.redAdd(a).fromRed(),b=i.redSub(a).fromRed();return[l,b]};tn.prototype._getEndoBasis=function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),n=e,i=this.n.clone(),a=new gt(1),l=new gt(0),b=new gt(0),y=new gt(1),x,_,C,D,F,P,z,W=0,X,ne;n.cmpn(0)!==0;){var $=i.div(n);X=i.sub($.mul(n)),ne=b.sub($.mul(a));var ae=y.sub($.mul(l));if(!C&&X.cmp(r)<0)x=z.neg(),_=a,C=X.neg(),D=ne;else if(C&&++W===2)break;z=X,i=n,n=X,b=a,a=ne,y=l,l=ae}F=X.neg(),P=ne;var ie=C.sqr().add(D.sqr()),ee=F.sqr().add(P.sqr());return ee.cmp(ie)>=0&&(F=x,P=_),C.negative&&(C=C.neg(),D=D.neg()),F.negative&&(F=F.neg(),P=P.neg()),[{a:C,b:D},{a:F,b:P}]};tn.prototype._endoSplit=function(e){var r=this.endo.basis,n=r[0],i=r[1],a=i.b.mul(e).divRound(this.n),l=n.b.neg().mul(e).divRound(this.n),b=a.mul(n.a),y=l.mul(i.a),x=a.mul(n.b),_=l.mul(i.b),C=e.sub(b).sub(y),D=x.add(_).neg();return{k1:C,k2:D}};tn.prototype.pointFromX=function(e,r){e=new gt(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(i.redSqr().redSub(n).cmp(this.zero)!==0)throw new Error("invalid point");var a=i.fromRed().isOdd();return(r&&!a||!r&&a)&&(i=i.redNeg()),this.point(e,i)};tn.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,n=e.y,i=this.a.redMul(r),a=r.redSqr().redMul(r).redIAdd(i).redIAdd(this.b);return n.redSqr().redISub(a).cmpn(0)===0};tn.prototype._endoWnafMulAdd=function(e,r,n){for(var i=this._endoWnafT1,a=this._endoWnafT2,l=0;l<e.length;l++){var b=this._endoSplit(r[l]),y=e[l],x=y._getBeta();b.k1.negative&&(b.k1.ineg(),y=y.neg(!0)),b.k2.negative&&(b.k2.ineg(),x=x.neg(!0)),i[l*2]=y,i[l*2+1]=x,a[l*2]=b.k1,a[l*2+1]=b.k2}for(var _=this._wnafMulAdd(1,i,a,l*2,n),C=0;C<l*2;C++)i[C]=null,a[C]=null;return _};function qt(t,e,r,n){So.BasePoint.call(this,t,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new gt(e,16),this.y=new gt(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}cd(qt,So.BasePoint);tn.prototype.point=function(e,r,n){return new qt(this,e,r,n)};tn.prototype.pointFromJSON=function(e,r){return qt.fromJSON(this,e,r)};qt.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var n=this.curve,i=function(a){return n.point(a.x.redMul(n.endo.beta),a.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(i)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(i)}}}return r}};qt.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};qt.fromJSON=function(e,r,n){typeof r=="string"&&(r=JSON.parse(r));var i=e.point(r[0],r[1],n);if(!r[2])return i;function a(b){return e.point(b[0],b[1],n)}var l=r[2];return i.precomputed={beta:null,doubles:l.doubles&&{step:l.doubles.step,points:[i].concat(l.doubles.points.map(a))},naf:l.naf&&{wnd:l.naf.wnd,points:[i].concat(l.naf.points.map(a))}},i};qt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};qt.prototype.isInfinity=function(){return this.inf};qt.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var n=r.redSqr().redISub(this.x).redISub(e.x),i=r.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)};qt.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),a=n.redAdd(n).redIAdd(n).redIAdd(r).redMul(i),l=a.redSqr().redISub(this.x.redAdd(this.x)),b=a.redMul(this.x.redSub(l)).redISub(this.y);return this.curve.point(l,b)};qt.prototype.getX=function(){return this.x.fromRed()};qt.prototype.getY=function(){return this.y.fromRed()};qt.prototype.mul=function(e){return e=new gt(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};qt.prototype.mulAdd=function(e,r,n){var i=[this,r],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,a):this.curve._wnafMulAdd(1,i,a,2)};qt.prototype.jmulAdd=function(e,r,n){var i=[this,r],a=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,a,!0):this.curve._wnafMulAdd(1,i,a,2,!0)};qt.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};qt.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(a){return a.neg()};r.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return r};qt.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function ar(t,e,r,n){So.BasePoint.call(this,t,"jacobian"),e===null&&r===null&&n===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new gt(0)):(this.x=new gt(e,16),this.y=new gt(r,16),this.z=new gt(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}cd(ar,So.BasePoint);tn.prototype.jpoint=function(e,r,n){return new ar(this,e,r,n)};ar.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),n=this.x.redMul(r),i=this.y.redMul(r).redMul(e);return this.curve.point(n,i)};ar.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};ar.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(r),a=e.x.redMul(n),l=this.y.redMul(r.redMul(e.z)),b=e.y.redMul(n.redMul(this.z)),y=i.redSub(a),x=l.redSub(b);if(y.cmpn(0)===0)return x.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var _=y.redSqr(),C=_.redMul(y),D=i.redMul(_),F=x.redSqr().redIAdd(C).redISub(D).redISub(D),P=x.redMul(D.redISub(F)).redISub(l.redMul(C)),z=this.z.redMul(e.z).redMul(y);return this.curve.jpoint(F,P,z)};ar.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),n=this.x,i=e.x.redMul(r),a=this.y,l=e.y.redMul(r).redMul(this.z),b=n.redSub(i),y=a.redSub(l);if(b.cmpn(0)===0)return y.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var x=b.redSqr(),_=x.redMul(b),C=n.redMul(x),D=y.redSqr().redIAdd(_).redISub(C).redISub(C),F=y.redMul(C.redISub(D)).redISub(a.redMul(_)),P=this.z.redMul(b);return this.curve.jpoint(D,F,P)};ar.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var n=this;for(r=0;r<e;r++)n=n.dbl();return n}var i=this.curve.a,a=this.curve.tinv,l=this.x,b=this.y,y=this.z,x=y.redSqr().redSqr(),_=b.redAdd(b);for(r=0;r<e;r++){var C=l.redSqr(),D=_.redSqr(),F=D.redSqr(),P=C.redAdd(C).redIAdd(C).redIAdd(i.redMul(x)),z=l.redMul(D),W=P.redSqr().redISub(z.redAdd(z)),X=z.redISub(W),ne=P.redMul(X);ne=ne.redIAdd(ne).redISub(F);var $=_.redMul(y);r+1<e&&(x=x.redMul(F)),l=W,y=$,_=ne}return this.curve.jpoint(l,_.redMul(a),y)};ar.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};ar.prototype._zeroDbl=function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),a=this.y.redSqr(),l=a.redSqr(),b=this.x.redAdd(a).redSqr().redISub(i).redISub(l);b=b.redIAdd(b);var y=i.redAdd(i).redIAdd(i),x=y.redSqr().redISub(b).redISub(b),_=l.redIAdd(l);_=_.redIAdd(_),_=_.redIAdd(_),e=x,r=y.redMul(b.redISub(x)).redISub(_),n=this.y.redAdd(this.y)}else{var C=this.x.redSqr(),D=this.y.redSqr(),F=D.redSqr(),P=this.x.redAdd(D).redSqr().redISub(C).redISub(F);P=P.redIAdd(P);var z=C.redAdd(C).redIAdd(C),W=z.redSqr(),X=F.redIAdd(F);X=X.redIAdd(X),X=X.redIAdd(X),e=W.redISub(P).redISub(P),r=z.redMul(P.redISub(e)).redISub(X),n=this.y.redMul(this.z),n=n.redIAdd(n)}return this.curve.jpoint(e,r,n)};ar.prototype._threeDbl=function(){var e,r,n;if(this.zOne){var i=this.x.redSqr(),a=this.y.redSqr(),l=a.redSqr(),b=this.x.redAdd(a).redSqr().redISub(i).redISub(l);b=b.redIAdd(b);var y=i.redAdd(i).redIAdd(i).redIAdd(this.curve.a),x=y.redSqr().redISub(b).redISub(b);e=x;var _=l.redIAdd(l);_=_.redIAdd(_),_=_.redIAdd(_),r=y.redMul(b.redISub(x)).redISub(_),n=this.y.redAdd(this.y)}else{var C=this.z.redSqr(),D=this.y.redSqr(),F=this.x.redMul(D),P=this.x.redSub(C).redMul(this.x.redAdd(C));P=P.redAdd(P).redIAdd(P);var z=F.redIAdd(F);z=z.redIAdd(z);var W=z.redAdd(z);e=P.redSqr().redISub(W),n=this.y.redAdd(this.z).redSqr().redISub(D).redISub(C);var X=D.redSqr();X=X.redIAdd(X),X=X.redIAdd(X),X=X.redIAdd(X),r=P.redMul(z.redISub(e)).redISub(X)}return this.curve.jpoint(e,r,n)};ar.prototype._dbl=function(){var e=this.curve.a,r=this.x,n=this.y,i=this.z,a=i.redSqr().redSqr(),l=r.redSqr(),b=n.redSqr(),y=l.redAdd(l).redIAdd(l).redIAdd(e.redMul(a)),x=r.redAdd(r);x=x.redIAdd(x);var _=x.redMul(b),C=y.redSqr().redISub(_.redAdd(_)),D=_.redISub(C),F=b.redSqr();F=F.redIAdd(F),F=F.redIAdd(F),F=F.redIAdd(F);var P=y.redMul(D).redISub(F),z=n.redAdd(n).redMul(i);return this.curve.jpoint(C,P,z)};ar.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr(),i=r.redSqr(),a=e.redAdd(e).redIAdd(e),l=a.redSqr(),b=this.x.redAdd(r).redSqr().redISub(e).redISub(i);b=b.redIAdd(b),b=b.redAdd(b).redIAdd(b),b=b.redISub(l);var y=b.redSqr(),x=i.redIAdd(i);x=x.redIAdd(x),x=x.redIAdd(x),x=x.redIAdd(x);var _=a.redIAdd(b).redSqr().redISub(l).redISub(y).redISub(x),C=r.redMul(_);C=C.redIAdd(C),C=C.redIAdd(C);var D=this.x.redMul(y).redISub(C);D=D.redIAdd(D),D=D.redIAdd(D);var F=this.y.redMul(_.redMul(x.redISub(_)).redISub(b.redMul(y)));F=F.redIAdd(F),F=F.redIAdd(F),F=F.redIAdd(F);var P=this.z.redAdd(b).redSqr().redISub(n).redISub(y);return this.curve.jpoint(D,F,P)};ar.prototype.mul=function(e,r){return e=new gt(e,r),this.curve._wnafMul(this,e)};ar.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),n=e.z.redSqr();if(this.x.redMul(n).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var i=r.redMul(this.z),a=n.redMul(e.z);return this.y.redMul(a).redISub(e.y.redMul(i)).cmpn(0)===0};ar.prototype.eqXToP=function(e){var r=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(n)===0)return!0;for(var i=e.clone(),a=this.curve.redN.redMul(r);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(a),this.x.cmp(n)===0)return!0}};ar.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};ar.prototype.isInfinity=function(){return this.z.cmpn(0)===0}});var Sv=V((ZL,Av)=>{"use strict";var VL=A(S()),Mo=Xn(),wv=nr(),N0=Rs(),p7=kr();function To(t){N0.call(this,"mont",t),this.a=new Mo(t.a,16).toRed(this.red),this.b=new Mo(t.b,16).toRed(this.red),this.i4=new Mo(4).toRed(this.red).redInvm(),this.two=new Mo(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}wv(To,N0);Av.exports=To;To.prototype.validate=function(e){var r=e.normalize().x,n=r.redSqr(),i=n.redMul(r).redAdd(n.redMul(this.a)).redAdd(r),a=i.redSqrt();return a.redSqr().cmp(i)===0};function Gt(t,e,r){N0.BasePoint.call(this,t,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new Mo(e,16),this.z=new Mo(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}wv(Gt,N0.BasePoint);To.prototype.decodePoint=function(e,r){return this.point(p7.toArray(e,r),1)};To.prototype.point=function(e,r){return new Gt(this,e,r)};To.prototype.pointFromJSON=function(e){return Gt.fromJSON(this,e)};Gt.prototype.precompute=function(){};Gt.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};Gt.fromJSON=function(e,r){return new Gt(e,r[0],r[1]||e.one)};Gt.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Gt.prototype.isInfinity=function(){return this.z.cmpn(0)===0};Gt.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),n=this.x.redSub(this.z),i=n.redSqr(),a=r.redSub(i),l=r.redMul(i),b=a.redMul(i.redAdd(this.curve.a24.redMul(a)));return this.curve.point(l,b)};Gt.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};Gt.prototype.diffAdd=function(e,r){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),a=e.x.redAdd(e.z),l=e.x.redSub(e.z),b=l.redMul(n),y=a.redMul(i),x=r.z.redMul(b.redAdd(y).redSqr()),_=r.x.redMul(b.redISub(y).redSqr());return this.curve.point(x,_)};Gt.prototype.mul=function(e){for(var r=e.clone(),n=this,i=this.curve.point(null,null),a=this,l=[];r.cmpn(0)!==0;r.iushrn(1))l.push(r.andln(1));for(var b=l.length-1;b>=0;b--)l[b]===0?(n=n.diffAdd(i,a),i=i.dbl()):(i=n.diffAdd(i,a),n=n.dbl());return i};Gt.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};Gt.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};Gt.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};Gt.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};Gt.prototype.getX=function(){return this.normalize(),this.x.fromRed()}});var Ev=V((jL,Tv)=>{"use strict";var QL=A(S()),b7=kr(),xi=Xn(),Mv=nr(),J0=Rs(),g7=b7.assert;function zn(t){this.twisted=(t.a|0)!==1,this.mOneA=this.twisted&&(t.a|0)===-1,this.extended=this.mOneA,J0.call(this,"edwards",t),this.a=new xi(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new xi(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new xi(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),g7(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(t.c|0)===1}Mv(zn,J0);Tv.exports=zn;zn.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};zn.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};zn.prototype.jpoint=function(e,r,n,i){return this.point(e,r,n,i)};zn.prototype.pointFromX=function(e,r){e=new xi(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=this.c2.redSub(this.a.redMul(n)),a=this.one.redSub(this.c2.redMul(this.d).redMul(n)),l=i.redMul(a.redInvm()),b=l.redSqrt();if(b.redSqr().redSub(l).cmp(this.zero)!==0)throw new Error("invalid point");var y=b.fromRed().isOdd();return(r&&!y||!r&&y)&&(b=b.redNeg()),this.point(e,b)};zn.prototype.pointFromY=function(e,r){e=new xi(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr(),i=n.redSub(this.c2),a=n.redMul(this.d).redMul(this.c2).redSub(this.a),l=i.redMul(a.redInvm());if(l.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var b=l.redSqrt();if(b.redSqr().redSub(l).cmp(this.zero)!==0)throw new Error("invalid point");return b.fromRed().isOdd()!==r&&(b=b.redNeg()),this.point(b,e)};zn.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),n=e.y.redSqr(),i=r.redMul(this.a).redAdd(n),a=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(n)));return i.cmp(a)===0};function ut(t,e,r,n,i){J0.BasePoint.call(this,t,"projective"),e===null&&r===null&&n===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new xi(e,16),this.y=new xi(r,16),this.z=n?new xi(n,16):this.curve.one,this.t=i&&new xi(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}Mv(ut,J0.BasePoint);zn.prototype.pointFromJSON=function(e){return ut.fromJSON(this,e)};zn.prototype.point=function(e,r,n,i){return new ut(this,e,r,n,i)};ut.fromJSON=function(e,r){return new ut(e,r[0],r[1],r[2])};ut.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};ut.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};ut.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),a=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),l=i.redAdd(r),b=l.redSub(n),y=i.redSub(r),x=a.redMul(b),_=l.redMul(y),C=a.redMul(y),D=b.redMul(l);return this.curve.point(x,_,D,C)};ut.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),n=this.y.redSqr(),i,a,l,b,y,x;if(this.curve.twisted){b=this.curve._mulA(r);var _=b.redAdd(n);this.zOne?(i=e.redSub(r).redSub(n).redMul(_.redSub(this.curve.two)),a=_.redMul(b.redSub(n)),l=_.redSqr().redSub(_).redSub(_)):(y=this.z.redSqr(),x=_.redSub(y).redISub(y),i=e.redSub(r).redISub(n).redMul(x),a=_.redMul(b.redSub(n)),l=_.redMul(x))}else b=r.redAdd(n),y=this.curve._mulC(this.z).redSqr(),x=b.redSub(y).redSub(y),i=this.curve._mulC(e.redISub(b)).redMul(x),a=this.curve._mulC(b).redMul(r.redISub(n)),l=b.redMul(x);return this.curve.point(i,a,l)};ut.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};ut.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),a=this.z.redMul(e.z.redAdd(e.z)),l=n.redSub(r),b=a.redSub(i),y=a.redAdd(i),x=n.redAdd(r),_=l.redMul(b),C=y.redMul(x),D=l.redMul(x),F=b.redMul(y);return this.curve.point(_,C,F,D)};ut.prototype._projAdd=function(e){var r=this.z.redMul(e.z),n=r.redSqr(),i=this.x.redMul(e.x),a=this.y.redMul(e.y),l=this.curve.d.redMul(i).redMul(a),b=n.redSub(l),y=n.redAdd(l),x=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(a),_=r.redMul(b).redMul(x),C,D;return this.curve.twisted?(C=r.redMul(y).redMul(a.redSub(this.curve._mulA(i))),D=b.redMul(y)):(C=r.redMul(y).redMul(a.redSub(i)),D=this.curve._mulC(b).redMul(y)),this.curve.point(_,C,D)};ut.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};ut.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};ut.prototype.mulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!1)};ut.prototype.jmulAdd=function(e,r,n){return this.curve._wnafMulAdd(1,[this,r],[e,n],2,!0)};ut.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};ut.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};ut.prototype.getX=function(){return this.normalize(),this.x.fromRed()};ut.prototype.getY=function(){return this.normalize(),this.y.fromRed()};ut.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};ut.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),this.x.cmp(r)===0)return!0}};ut.prototype.toP=ut.prototype.normalize;ut.prototype.mixedAdd=ut.prototype.add});var ud=V(_v=>{"use strict";var YL=A(S()),U0=_v;U0.base=Rs();U0.short=yv();U0.mont=Sv();U0.edwards=Ev()});var wn=V(ot=>{"use strict";var eR=A(S()),v7=di(),m7=nr();ot.inherits=m7;function x7(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function y7(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var a=t.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=a&63|128):x7(t,i)?(a=65536+((a&1023)<<10)+(t.charCodeAt(++i)&1023),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=a&63|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=a&63|128)}else for(i=0;i<t.length;i++)r[i]=t[i]|0;return r}ot.toArray=y7;function w7(t){for(var e="",r=0;r<t.length;r++)e+=Cv(t[r].toString(16));return e}ot.toHex=w7;function Bv(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}ot.htonl=Bv;function A7(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];e==="little"&&(i=Bv(i)),r+=Pv(i.toString(16))}return r}ot.toHex32=A7;function Cv(t){return t.length===1?"0"+t:t}ot.zero2=Cv;function Pv(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}ot.zero8=Pv;function S7(t,e,r,n){var i=r-e;v7(i%4===0);for(var a=new Array(i/4),l=0,b=e;l<a.length;l++,b+=4){var y;n==="big"?y=t[b]<<24|t[b+1]<<16|t[b+2]<<8|t[b+3]:y=t[b+3]<<24|t[b+2]<<16|t[b+1]<<8|t[b],a[l]=y>>>0}return a}ot.join32=S7;function M7(t,e){for(var r=new Array(t.length*4),n=0,i=0;n<t.length;n++,i+=4){var a=t[n];e==="big"?(r[i]=a>>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=a&255):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=a&255)}return r}ot.split32=M7;function T7(t,e){return t>>>e|t<<32-e}ot.rotr32=T7;function E7(t,e){return t<<e|t>>>32-e}ot.rotl32=E7;function _7(t,e){return t+e>>>0}ot.sum32=_7;function B7(t,e,r){return t+e+r>>>0}ot.sum32_3=B7;function C7(t,e,r,n){return t+e+r+n>>>0}ot.sum32_4=C7;function P7(t,e,r,n,i){return t+e+r+n+i>>>0}ot.sum32_5=P7;function L7(t,e,r,n){var i=t[e],a=t[e+1],l=n+a>>>0,b=(l<n?1:0)+r+i;t[e]=b>>>0,t[e+1]=l}ot.sum64=L7;function R7(t,e,r,n){var i=e+n>>>0,a=(i<e?1:0)+t+r;return a>>>0}ot.sum64_hi=R7;function F7(t,e,r,n){var i=e+n;return i>>>0}ot.sum64_lo=F7;function D7(t,e,r,n,i,a,l,b){var y=0,x=e;x=x+n>>>0,y+=x<e?1:0,x=x+a>>>0,y+=x<a?1:0,x=x+b>>>0,y+=x<b?1:0;var _=t+r+i+l+y;return _>>>0}ot.sum64_4_hi=D7;function I7(t,e,r,n,i,a,l,b){var y=e+n+a+b;return y>>>0}ot.sum64_4_lo=I7;function O7(t,e,r,n,i,a,l,b,y,x){var _=0,C=e;C=C+n>>>0,_+=C<e?1:0,C=C+a>>>0,_+=C<a?1:0,C=C+b>>>0,_+=C<b?1:0,C=C+x>>>0,_+=C<x?1:0;var D=t+r+i+l+y+_;return D>>>0}ot.sum64_5_hi=O7;function k7(t,e,r,n,i,a,l,b,y,x){var _=e+n+a+b+x;return _>>>0}ot.sum64_5_lo=k7;function N7(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}ot.rotr64_hi=N7;function J7(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}ot.rotr64_lo=J7;function U7(t,e,r){return t>>>r}ot.shr64_hi=U7;function H7(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}ot.shr64_lo=H7});var Eo=V(Rv=>{"use strict";var rR=A(S()),Lv=wn(),q7=di();function H0(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Rv.BlockHash=H0;H0.prototype.update=function(e,r){if(e=Lv.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=Lv.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this};H0.prototype.digest=function(e){return this.update(this._pad()),q7(this.pending===null),this._digest(e)};H0.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,n=r-(e+this.padLength)%r,i=new Array(n+this.padLength);i[0]=128;for(var a=1;a<n;a++)i[a]=0;if(e<<=3,this.endian==="big"){for(var l=8;l<this.padLength;l++)i[a++]=0;i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=e>>>24&255,i[a++]=e>>>16&255,i[a++]=e>>>8&255,i[a++]=e&255}else for(i[a++]=e&255,i[a++]=e>>>8&255,i[a++]=e>>>16&255,i[a++]=e>>>24&255,i[a++]=0,i[a++]=0,i[a++]=0,i[a++]=0,l=8;l<this.padLength;l++)i[a++]=0;return i}});var ld=V(yi=>{"use strict";var iR=A(S()),G7=wn(),Kn=G7.rotr32;function X7(t,e,r,n){if(t===0)return Fv(e,r,n);if(t===1||t===3)return Iv(e,r,n);if(t===2)return Dv(e,r,n)}yi.ft_1=X7;function Fv(t,e,r){return t&e^~t&r}yi.ch32=Fv;function Dv(t,e,r){return t&e^t&r^e&r}yi.maj32=Dv;function Iv(t,e,r){return t^e^r}yi.p32=Iv;function z7(t){return Kn(t,2)^Kn(t,13)^Kn(t,22)}yi.s0_256=z7;function K7(t){return Kn(t,6)^Kn(t,11)^Kn(t,25)}yi.s1_256=K7;function Z7(t){return Kn(t,7)^Kn(t,18)^t>>>3}yi.g0_256=Z7;function V7(t){return Kn(t,17)^Kn(t,19)^t>>>10}yi.g1_256=V7});var Nv=V((aR,kv)=>{"use strict";var oR=A(S()),_o=wn(),j7=Eo(),Q7=ld(),dd=_o.rotl32,Fs=_o.sum32,W7=_o.sum32_5,Y7=Q7.ft_1,Ov=j7.BlockHash,$7=[1518500249,1859775393,2400959708,3395469782];function Zn(){if(!(this instanceof Zn))return new Zn;Ov.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}_o.inherits(Zn,Ov);kv.exports=Zn;Zn.blockSize=512;Zn.outSize=160;Zn.hmacStrength=80;Zn.padLength=64;Zn.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=dd(n[i-3]^n[i-8]^n[i-14]^n[i-16],1);var a=this.h[0],l=this.h[1],b=this.h[2],y=this.h[3],x=this.h[4];for(i=0;i<n.length;i++){var _=~~(i/20),C=W7(dd(a,5),Y7(_,l,b,y),x,n[i],$7[_]);x=y,y=b,b=dd(l,30),l=a,a=C}this.h[0]=Fs(this.h[0],a),this.h[1]=Fs(this.h[1],l),this.h[2]=Fs(this.h[2],b),this.h[3]=Fs(this.h[3],y),this.h[4]=Fs(this.h[4],x)};Zn.prototype._digest=function(e){return e==="hex"?_o.toHex32(this.h,"big"):_o.split32(this.h,"big")}});var hd=V((sR,Uv)=>{"use strict";var fR=A(S()),Bo=wn(),e9=Eo(),Co=ld(),t9=di(),An=Bo.sum32,r9=Bo.sum32_4,n9=Bo.sum32_5,i9=Co.ch32,a9=Co.maj32,o9=Co.s0_256,s9=Co.s1_256,f9=Co.g0_256,c9=Co.g1_256,Jv=e9.BlockHash,u9=[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 Vn(){if(!(this instanceof Vn))return new Vn;Jv.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=u9,this.W=new Array(64)}Bo.inherits(Vn,Jv);Uv.exports=Vn;Vn.blockSize=512;Vn.outSize=256;Vn.hmacStrength=192;Vn.padLength=64;Vn.prototype._update=function(e,r){for(var n=this.W,i=0;i<16;i++)n[i]=e[r+i];for(;i<n.length;i++)n[i]=r9(c9(n[i-2]),n[i-7],f9(n[i-15]),n[i-16]);var a=this.h[0],l=this.h[1],b=this.h[2],y=this.h[3],x=this.h[4],_=this.h[5],C=this.h[6],D=this.h[7];for(t9(this.k.length===n.length),i=0;i<n.length;i++){var F=n9(D,s9(x),i9(x,_,C),this.k[i],n[i]),P=An(o9(a),a9(a,l,b));D=C,C=_,_=x,x=An(y,F),y=b,b=l,l=a,a=An(F,P)}this.h[0]=An(this.h[0],a),this.h[1]=An(this.h[1],l),this.h[2]=An(this.h[2],b),this.h[3]=An(this.h[3],y),this.h[4]=An(this.h[4],x),this.h[5]=An(this.h[5],_),this.h[6]=An(this.h[6],C),this.h[7]=An(this.h[7],D)};Vn.prototype._digest=function(e){return e==="hex"?Bo.toHex32(this.h,"big"):Bo.split32(this.h,"big")}});var Gv=V((cR,qv)=>{"use strict";var uR=A(S()),pd=wn(),Hv=hd();function wi(){if(!(this instanceof wi))return new wi;Hv.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}pd.inherits(wi,Hv);qv.exports=wi;wi.blockSize=512;wi.outSize=224;wi.hmacStrength=192;wi.padLength=64;wi.prototype._digest=function(e){return e==="hex"?pd.toHex32(this.h.slice(0,7),"big"):pd.split32(this.h.slice(0,7),"big")}});var vd=V((lR,Zv)=>{"use strict";var dR=A(S()),Pr=wn(),l9=Eo(),d9=di(),jn=Pr.rotr64_hi,Qn=Pr.rotr64_lo,Xv=Pr.shr64_hi,zv=Pr.shr64_lo,Gi=Pr.sum64,bd=Pr.sum64_hi,gd=Pr.sum64_lo,h9=Pr.sum64_4_hi,p9=Pr.sum64_4_lo,b9=Pr.sum64_5_hi,g9=Pr.sum64_5_lo,Kv=l9.BlockHash,v9=[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 Sn(){if(!(this instanceof Sn))return new Sn;Kv.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v9,this.W=new Array(160)}Pr.inherits(Sn,Kv);Zv.exports=Sn;Sn.blockSize=1024;Sn.outSize=512;Sn.hmacStrength=192;Sn.padLength=128;Sn.prototype._prepareBlock=function(e,r){for(var n=this.W,i=0;i<32;i++)n[i]=e[r+i];for(;i<n.length;i+=2){var a=B9(n[i-4],n[i-3]),l=C9(n[i-4],n[i-3]),b=n[i-14],y=n[i-13],x=E9(n[i-30],n[i-29]),_=_9(n[i-30],n[i-29]),C=n[i-32],D=n[i-31];n[i]=h9(a,l,b,y,x,_,C,D),n[i+1]=p9(a,l,b,y,x,_,C,D)}};Sn.prototype._update=function(e,r){this._prepareBlock(e,r);var n=this.W,i=this.h[0],a=this.h[1],l=this.h[2],b=this.h[3],y=this.h[4],x=this.h[5],_=this.h[6],C=this.h[7],D=this.h[8],F=this.h[9],P=this.h[10],z=this.h[11],W=this.h[12],X=this.h[13],ne=this.h[14],$=this.h[15];d9(this.k.length===n.length);for(var ae=0;ae<n.length;ae+=2){var ie=ne,ee=$,ce=M9(D,F),te=T9(D,F),Y=m9(D,F,P,z,W,X),T=x9(D,F,P,z,W,X),s=this.k[ae],u=this.k[ae+1],d=n[ae],f=n[ae+1],c=b9(ie,ee,ce,te,Y,T,s,u,d,f),v=g9(ie,ee,ce,te,Y,T,s,u,d,f);ie=A9(i,a),ee=S9(i,a),ce=y9(i,a,l,b,y,x),te=w9(i,a,l,b,y,x);var m=bd(ie,ee,ce,te),h=gd(ie,ee,ce,te);ne=W,$=X,W=P,X=z,P=D,z=F,D=bd(_,C,c,v),F=gd(C,C,c,v),_=y,C=x,y=l,x=b,l=i,b=a,i=bd(c,v,m,h),a=gd(c,v,m,h)}Gi(this.h,0,i,a),Gi(this.h,2,l,b),Gi(this.h,4,y,x),Gi(this.h,6,_,C),Gi(this.h,8,D,F),Gi(this.h,10,P,z),Gi(this.h,12,W,X),Gi(this.h,14,ne,$)};Sn.prototype._digest=function(e){return e==="hex"?Pr.toHex32(this.h,"big"):Pr.split32(this.h,"big")};function m9(t,e,r,n,i){var a=t&r^~t&i;return a<0&&(a+=4294967296),a}function x9(t,e,r,n,i,a){var l=e&n^~e&a;return l<0&&(l+=4294967296),l}function y9(t,e,r,n,i){var a=t&r^t&i^r&i;return a<0&&(a+=4294967296),a}function w9(t,e,r,n,i,a){var l=e&n^e&a^n&a;return l<0&&(l+=4294967296),l}function A9(t,e){var r=jn(t,e,28),n=jn(e,t,2),i=jn(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function S9(t,e){var r=Qn(t,e,28),n=Qn(e,t,2),i=Qn(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function M9(t,e){var r=jn(t,e,14),n=jn(t,e,18),i=jn(e,t,9),a=r^n^i;return a<0&&(a+=4294967296),a}function T9(t,e){var r=Qn(t,e,14),n=Qn(t,e,18),i=Qn(e,t,9),a=r^n^i;return a<0&&(a+=4294967296),a}function E9(t,e){var r=jn(t,e,1),n=jn(t,e,8),i=Xv(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function _9(t,e){var r=Qn(t,e,1),n=Qn(t,e,8),i=zv(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function B9(t,e){var r=jn(t,e,19),n=jn(e,t,29),i=Xv(t,e,6),a=r^n^i;return a<0&&(a+=4294967296),a}function C9(t,e){var r=Qn(t,e,19),n=Qn(e,t,29),i=zv(t,e,6),a=r^n^i;return a<0&&(a+=4294967296),a}});var Qv=V((hR,jv)=>{"use strict";var pR=A(S()),md=wn(),Vv=vd();function Ai(){if(!(this instanceof Ai))return new Ai;Vv.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}md.inherits(Ai,Vv);jv.exports=Ai;Ai.blockSize=1024;Ai.outSize=384;Ai.hmacStrength=192;Ai.padLength=128;Ai.prototype._digest=function(e){return e==="hex"?md.toHex32(this.h.slice(0,12),"big"):md.split32(this.h.slice(0,12),"big")}});var Wv=V(Po=>{"use strict";var gR=A(S());Po.sha1=Nv();Po.sha224=Gv();Po.sha256=hd();Po.sha384=Qv();Po.sha512=vd()});var nm=V(rm=>{"use strict";var mR=A(S()),Ta=wn(),P9=Eo(),q0=Ta.rotl32,Yv=Ta.sum32,Ds=Ta.sum32_3,$v=Ta.sum32_4,tm=P9.BlockHash;function Wn(){if(!(this instanceof Wn))return new Wn;tm.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Ta.inherits(Wn,tm);rm.ripemd160=Wn;Wn.blockSize=512;Wn.outSize=160;Wn.hmacStrength=192;Wn.padLength=64;Wn.prototype._update=function(e,r){for(var n=this.h[0],i=this.h[1],a=this.h[2],l=this.h[3],b=this.h[4],y=n,x=i,_=a,C=l,D=b,F=0;F<80;F++){var P=Yv(q0($v(n,em(F,i,a,l),e[F9[F]+r],L9(F)),I9[F]),b);n=b,b=l,l=q0(a,10),a=i,i=P,P=Yv(q0($v(y,em(79-F,x,_,C),e[D9[F]+r],R9(F)),O9[F]),D),y=D,D=C,C=q0(_,10),_=x,x=P}P=Ds(this.h[1],a,C),this.h[1]=Ds(this.h[2],l,D),this.h[2]=Ds(this.h[3],b,y),this.h[3]=Ds(this.h[4],n,x),this.h[4]=Ds(this.h[0],i,_),this.h[0]=P};Wn.prototype._digest=function(e){return e==="hex"?Ta.toHex32(this.h,"little"):Ta.split32(this.h,"little")};function em(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function L9(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function R9(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var F9=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],D9=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],I9=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],O9=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]});var am=V((xR,im)=>{"use strict";var yR=A(S()),k9=wn(),N9=di();function Lo(t,e,r){if(!(this instanceof Lo))return new Lo(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(k9.toArray(e,r))}im.exports=Lo;Lo.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),N9(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};Lo.prototype.update=function(e,r){return this.inner.update(e,r),this};Lo.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}});var Is=V(om=>{var AR=A(S()),or=om;or.utils=wn();or.common=Eo();or.sha=Wv();or.ripemd=nm();or.hmac=am();or.sha1=or.sha.sha1;or.sha256=or.sha.sha256;or.sha224=or.sha.sha224;or.sha384=or.sha.sha384;or.sha512=or.sha.sha512;or.ripemd160=or.ripemd.ripemd160});var fm=V((SR,sm)=>{var MR=A(S());sm.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}});var G0=V(lm=>{"use strict";var ER=A(S()),yd=lm,Xi=Is(),xd=ud(),J9=kr(),cm=J9.assert;function um(t){t.type==="short"?this.curve=new xd.short(t):t.type==="edwards"?this.curve=new xd.edwards(t):this.curve=new xd.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,cm(this.g.validate(),"Invalid curve"),cm(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}yd.PresetCurve=um;function zi(t,e){Object.defineProperty(yd,t,{configurable:!0,enumerable:!0,get:function(){var r=new um(e);return Object.defineProperty(yd,t,{configurable:!0,enumerable:!0,value:r}),r}})}zi("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:Xi.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]});zi("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:Xi.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]});zi("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:Xi.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]});zi("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:Xi.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]});zi("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:Xi.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]});zi("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Xi.sha256,gRed:!1,g:["9"]});zi("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:Xi.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var wd;try{wd=fm()}catch{wd=void 0}zi("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:Xi.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",wd]})});var pm=V((_R,hm)=>{"use strict";var BR=A(S()),U9=Is(),Ea=id(),dm=di();function Ki(t){if(!(this instanceof Ki))return new Ki(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=Ea.toArray(t.entropy,t.entropyEnc||"hex"),r=Ea.toArray(t.nonce,t.nonceEnc||"hex"),n=Ea.toArray(t.pers,t.persEnc||"hex");dm(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}hm.exports=Ki;Ki.prototype._init=function(e,r,n){var i=e.concat(r).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var a=0;a<this.V.length;a++)this.K[a]=0,this.V[a]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656};Ki.prototype._hmac=function(){return new U9.hmac(this.hash,this.K)};Ki.prototype._update=function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};Ki.prototype.reseed=function(e,r,n,i){typeof r!="string"&&(i=n,n=r,r=null),e=Ea.toArray(e,r),n=Ea.toArray(n,i),dm(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1};Ki.prototype.generate=function(e,r,n,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(i=n,n=r,r=null),n&&(n=Ea.toArray(n,i||"hex"),this._update(n));for(var a=[];a.length<e;)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var l=a.slice(0,e);return this._update(n),this._reseed++,Ea.encode(l,r)}});var gm=V((CR,bm)=>{"use strict";var PR=A(S()),H9=Xn(),q9=kr(),Ad=q9.assert;function lr(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}bm.exports=lr;lr.fromPublic=function(e,r,n){return r instanceof lr?r:new lr(e,{pub:r,pubEnc:n})};lr.fromPrivate=function(e,r,n){return r instanceof lr?r:new lr(e,{priv:r,privEnc:n})};lr.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};lr.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub};lr.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};lr.prototype._importPrivate=function(e,r){this.priv=new H9(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)};lr.prototype._importPublic=function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?Ad(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&Ad(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)};lr.prototype.derive=function(e){return e.validate()||Ad(e.validate(),"public point not validated"),e.mul(this.priv).getX()};lr.prototype.sign=function(e,r,n){return this.ec.sign(e,this,r,n)};lr.prototype.verify=function(e,r,n){return this.ec.verify(e,r,this,void 0,n)};lr.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}});var xm=V((LR,mm)=>{"use strict";var RR=A(S()),X0=Xn(),Td=kr(),G9=Td.assert;function z0(t,e){if(t instanceof z0)return t;this._importDER(t,e)||(G9(t.r&&t.s,"Signature without r or s"),this.r=new X0(t.r,16),this.s=new X0(t.s,16),t.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}mm.exports=z0;function X9(){this.place=0}function Sd(t,e){var r=t[e.place++];if(!(r&128))return r;var n=r&15;if(n===0||n>4||t[e.place]===0)return!1;for(var i=0,a=0,l=e.place;a<n;a++,l++)i<<=8,i|=t[l],i>>>=0;return i<=127?!1:(e.place=l,i)}function vm(t){for(var e=0,r=t.length-1;!t[e]&&!(t[e+1]&128)&&e<r;)e++;return e===0?t:t.slice(e)}z0.prototype._importDER=function(e,r){e=Td.toArray(e,r);var n=new X9;if(e[n.place++]!==48)return!1;var i=Sd(e,n);if(i===!1||i+n.place!==e.length||e[n.place++]!==2)return!1;var a=Sd(e,n);if(a===!1||e[n.place]&128)return!1;var l=e.slice(n.place,a+n.place);if(n.place+=a,e[n.place++]!==2)return!1;var b=Sd(e,n);if(b===!1||e.length!==b+n.place||e[n.place]&128)return!1;var y=e.slice(n.place,b+n.place);if(l[0]===0)if(l[1]&128)l=l.slice(1);else return!1;if(y[0]===0)if(y[1]&128)y=y.slice(1);else return!1;return this.r=new X0(l),this.s=new X0(y),this.recoveryParam=null,!0};function Md(t,e){if(e<128){t.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(r|128);--r;)t.push(e>>>(r<<3)&255);t.push(e)}z0.prototype.toDER=function(e){var r=this.r.toArray(),n=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),n[0]&128&&(n=[0].concat(n)),r=vm(r),n=vm(n);!n[0]&&!(n[1]&128);)n=n.slice(1);var i=[2];Md(i,r.length),i=i.concat(r),i.push(2),Md(i,n.length);var a=i.concat(n),l=[48];return Md(l,a.length),l=l.concat(a),Td.encode(l,e)}});var Am=V((FR,wm)=>{"use strict";var DR=A(S()),Mn=Xn(),ym=pm(),z9=kr(),Ed=G0(),K9=fd(),_a=z9.assert,_d=gm(),K0=xm();function rn(t){if(!(this instanceof rn))return new rn(t);typeof t=="string"&&(_a(Object.prototype.hasOwnProperty.call(Ed,t),"Unknown curve "+t),t=Ed[t]),t instanceof Ed.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}wm.exports=rn;rn.prototype.keyPair=function(e){return new _d(this,e)};rn.prototype.keyFromPrivate=function(e,r){return _d.fromPrivate(this,e,r)};rn.prototype.keyFromPublic=function(e,r){return _d.fromPublic(this,e,r)};rn.prototype.genKeyPair=function(e){e||(e={});for(var r=new ym({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||K9(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new Mn(2));;){var a=new Mn(r.generate(n));if(!(a.cmp(i)>0))return a.iaddn(1),this.keyFromPrivate(a)}};rn.prototype._truncateToN=function(e,r,n){var i;if(Mn.isBN(e)||typeof e=="number")e=new Mn(e,16),i=e.byteLength();else if(typeof e=="object")i=e.length,e=new Mn(e,16);else{var a=e.toString();i=a.length+1>>>1,e=new Mn(a,16)}typeof n!="number"&&(n=i*8);var l=n-this.n.bitLength();return l>0&&(e=e.ushrn(l)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};rn.prototype.sign=function(e,r,n,i){if(typeof n=="object"&&(i=n,n=null),i||(i={}),typeof e!="string"&&typeof e!="number"&&!Mn.isBN(e)){_a(typeof e=="object"&&e&&typeof e.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),_a(e.length>>>0===e.length);for(var a=0;a<e.length;a++)_a((e[a]&255)===e[a])}r=this.keyFromPrivate(r,n),e=this._truncateToN(e,!1,i.msgBitLength),_a(!e.isNeg(),"Can not sign a negative message");var l=this.n.byteLength(),b=r.getPrivate().toArray("be",l),y=e.toArray("be",l);_a(new Mn(y).eq(e),"Can not sign message");for(var x=new ym({hash:this.hash,entropy:b,nonce:y,pers:i.pers,persEnc:i.persEnc||"utf8"}),_=this.n.sub(new Mn(1)),C=0;;C++){var D=i.k?i.k(C):new Mn(x.generate(this.n.byteLength()));if(D=this._truncateToN(D,!0),!(D.cmpn(1)<=0||D.cmp(_)>=0)){var F=this.g.mul(D);if(!F.isInfinity()){var P=F.getX(),z=P.umod(this.n);if(z.cmpn(0)!==0){var W=D.invm(this.n).mul(z.mul(r.getPrivate()).iadd(e));if(W=W.umod(this.n),W.cmpn(0)!==0){var X=(F.getY().isOdd()?1:0)|(P.cmp(z)!==0?2:0);return i.canonical&&W.cmp(this.nh)>0&&(W=this.n.sub(W),X^=1),new K0({r:z,s:W,recoveryParam:X})}}}}}};rn.prototype.verify=function(e,r,n,i,a){a||(a={}),e=this._truncateToN(e,!1,a.msgBitLength),n=this.keyFromPublic(n,i),r=new K0(r,"hex");var l=r.r,b=r.s;if(l.cmpn(1)<0||l.cmp(this.n)>=0||b.cmpn(1)<0||b.cmp(this.n)>=0)return!1;var y=b.invm(this.n),x=y.mul(e).umod(this.n),_=y.mul(l).umod(this.n),C;return this.curve._maxwellTrick?(C=this.g.jmulAdd(x,n.getPublic(),_),C.isInfinity()?!1:C.eqXToP(l)):(C=this.g.mulAdd(x,n.getPublic(),_),C.isInfinity()?!1:C.getX().umod(this.n).cmp(l)===0)};rn.prototype.recoverPubKey=function(t,e,r,n){_a((3&r)===r,"The recovery param is more than two bits"),e=new K0(e,n);var i=this.n,a=new Mn(t),l=e.r,b=e.s,y=r&1,x=r>>1;if(l.cmp(this.curve.p.umod(this.curve.n))>=0&&x)throw new Error("Unable to find sencond key candinate");x?l=this.curve.pointFromX(l.add(this.curve.n),y):l=this.curve.pointFromX(l,y);var _=e.r.invm(i),C=i.sub(a).mul(_).umod(i),D=b.mul(_).umod(i);return this.g.mulAdd(C,l,D)};rn.prototype.getKeyRecoveryParam=function(t,e,r,n){if(e=new K0(e,n),e.recoveryParam!==null)return e.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(t,e,i)}catch{continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}});var Em=V((IR,Tm)=>{"use strict";var OR=A(S()),Os=kr(),Mm=Os.assert,Sm=Os.parseBytes,Ro=Os.cachedProperty;function Xt(t,e){this.eddsa=t,this._secret=Sm(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Sm(e.pub)}Xt.fromPublic=function(e,r){return r instanceof Xt?r:new Xt(e,{pub:r})};Xt.fromSecret=function(e,r){return r instanceof Xt?r:new Xt(e,{secret:r})};Xt.prototype.secret=function(){return this._secret};Ro(Xt,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});Ro(Xt,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});Ro(Xt,"privBytes",function(){var e=this.eddsa,r=this.hash(),n=e.encodingLength-1,i=r.slice(0,e.encodingLength);return i[0]&=248,i[n]&=127,i[n]|=64,i});Ro(Xt,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});Ro(Xt,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});Ro(Xt,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});Xt.prototype.sign=function(e){return Mm(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};Xt.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};Xt.prototype.getSecret=function(e){return Mm(this._secret,"KeyPair is public only"),Os.encode(this.secret(),e)};Xt.prototype.getPublic=function(e){return Os.encode(this.pubBytes(),e)};Tm.exports=Xt});var Cm=V((kR,Bm)=>{"use strict";var NR=A(S()),Z9=Xn(),Z0=kr(),_m=Z0.assert,V0=Z0.cachedProperty,V9=Z0.parseBytes;function Ba(t,e){this.eddsa=t,typeof e!="object"&&(e=V9(e)),Array.isArray(e)&&(_m(e.length===t.encodingLength*2,"Signature has invalid size"),e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),_m(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof Z9&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}V0(Ba,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});V0(Ba,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});V0(Ba,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});V0(Ba,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});Ba.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};Ba.prototype.toHex=function(){return Z0.encode(this.toBytes(),"hex").toUpperCase()};Bm.exports=Ba});var Dm=V((JR,Fm)=>{"use strict";var UR=A(S()),j9=Is(),Q9=G0(),Fo=kr(),W9=Fo.assert,Lm=Fo.parseBytes,Rm=Em(),Pm=Cm();function Lr(t){if(W9(t==="ed25519","only tested with ed25519 so far"),!(this instanceof Lr))return new Lr(t);t=Q9[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=j9.sha512}Fm.exports=Lr;Lr.prototype.sign=function(e,r){e=Lm(e);var n=this.keyFromSecret(r),i=this.hashInt(n.messagePrefix(),e),a=this.g.mul(i),l=this.encodePoint(a),b=this.hashInt(l,n.pubBytes(),e).mul(n.priv()),y=i.add(b).umod(this.curve.n);return this.makeSignature({R:a,S:y,Rencoded:l})};Lr.prototype.verify=function(e,r,n){if(e=Lm(e),r=this.makeSignature(r),r.S().gte(r.eddsa.curve.n)||r.S().isNeg())return!1;var i=this.keyFromPublic(n),a=this.hashInt(r.Rencoded(),i.pubBytes(),e),l=this.g.mul(r.S()),b=r.R().add(i.pub().mul(a));return b.eq(l)};Lr.prototype.hashInt=function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return Fo.intFromLE(e.digest()).umod(this.curve.n)};Lr.prototype.keyFromPublic=function(e){return Rm.fromPublic(this,e)};Lr.prototype.keyFromSecret=function(e){return Rm.fromSecret(this,e)};Lr.prototype.makeSignature=function(e){return e instanceof Pm?e:new Pm(this,e)};Lr.prototype.encodePoint=function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r};Lr.prototype.decodePoint=function(e){e=Fo.parseBytes(e);var r=e.length-1,n=e.slice(0,r).concat(e[r]&-129),i=(e[r]&128)!==0,a=Fo.intFromLE(n);return this.curve.pointFromY(a,i)};Lr.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};Lr.prototype.decodeInt=function(e){return Fo.intFromLE(e)};Lr.prototype.isPoint=function(e){return e instanceof this.pointClass}});var Bd=V(Im=>{"use strict";var qR=A(S()),Ca=Im;Ca.version=dv().version;Ca.utils=kr();Ca.rand=fd();Ca.curve=ud();Ca.curves=G0();Ca.ec=Am();Ca.eddsa=Dm()});var Om=V(Do=>{"use strict";var XR=A(S()),Y9=Do&&Do.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Do,"__esModule",{value:!0});Do.EC=void 0;var $9=Y9(Bd()),eA=$9.default.ec;Do.EC=eA});var km=V(j0=>{"use strict";var KR=A(S());Object.defineProperty(j0,"__esModule",{value:!0});j0.version=void 0;j0.version="signing-key/5.8.0"});var Ns=V(Zi=>{"use strict";var VR=A(S());Object.defineProperty(Zi,"__esModule",{value:!0});Zi.computePublicKey=Zi.recoverPublicKey=Zi.SigningKey=void 0;var tA=Om(),Rt=at(),ks=$r(),rA=Pt(),nA=km(),Pd=new rA.Logger(nA.version),Cd=null;function Yn(){return Cd||(Cd=new tA.EC("secp256k1")),Cd}var Nm=function(){function t(e){(0,ks.defineReadOnly)(this,"curve","secp256k1"),(0,ks.defineReadOnly)(this,"privateKey",(0,Rt.hexlify)(e)),(0,Rt.hexDataLength)(this.privateKey)!==32&&Pd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");var r=Yn().keyFromPrivate((0,Rt.arrayify)(this.privateKey));(0,ks.defineReadOnly)(this,"publicKey","0x"+r.getPublic(!1,"hex")),(0,ks.defineReadOnly)(this,"compressedPublicKey","0x"+r.getPublic(!0,"hex")),(0,ks.defineReadOnly)(this,"_isSigningKey",!0)}return t.prototype._addPoint=function(e){var r=Yn().keyFromPublic((0,Rt.arrayify)(this.publicKey)),n=Yn().keyFromPublic((0,Rt.arrayify)(e));return"0x"+r.pub.add(n.pub).encodeCompressed("hex")},t.prototype.signDigest=function(e){var r=Yn().keyFromPrivate((0,Rt.arrayify)(this.privateKey)),n=(0,Rt.arrayify)(e);n.length!==32&&Pd.throwArgumentError("bad digest length","digest",e);var i=r.sign(n,{canonical:!0});return(0,Rt.splitSignature)({recoveryParam:i.recoveryParam,r:(0,Rt.hexZeroPad)("0x"+i.r.toString(16),32),s:(0,Rt.hexZeroPad)("0x"+i.s.toString(16),32)})},t.prototype.computeSharedSecret=function(e){var r=Yn().keyFromPrivate((0,Rt.arrayify)(this.privateKey)),n=Yn().keyFromPublic((0,Rt.arrayify)(Jm(e)));return(0,Rt.hexZeroPad)("0x"+r.derive(n.getPublic()).toString(16),32)},t.isSigningKey=function(e){return!!(e&&e._isSigningKey)},t}();Zi.SigningKey=Nm;function iA(t,e){var r=(0,Rt.splitSignature)(e),n={r:(0,Rt.arrayify)(r.r),s:(0,Rt.arrayify)(r.s)};return"0x"+Yn().recoverPubKey((0,Rt.arrayify)(t),n,r.recoveryParam).encode("hex",!1)}Zi.recoverPublicKey=iA;function Jm(t,e){var r=(0,Rt.arrayify)(t);if(r.length===32){var n=new Nm(r);return e?"0x"+Yn().keyFromPrivate(r).getPublic(!0,"hex"):n.publicKey}else{if(r.length===33)return e?(0,Rt.hexlify)(r):"0x"+Yn().keyFromPublic(r).getPublic(!1,"hex");if(r.length===65)return e?"0x"+Yn().keyFromPublic(r).getPublic(!0,"hex"):(0,Rt.hexlify)(r)}return Pd.throwArgumentError("invalid public or private key","key","[REDACTED]")}Zi.computePublicKey=Jm});var Um=V(Q0=>{"use strict";var QR=A(S());Object.defineProperty(Q0,"__esModule",{value:!0});Q0.version=void 0;Q0.version="transactions/5.8.0"});var Us=V(Mt=>{"use strict";var YR=A(S()),aA=Mt&&Mt.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),oA=Mt&&Mt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),sA=Mt&&Mt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&aA(e,t,r);return oA(e,t),e};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.parse=Mt.serialize=Mt.accessListify=Mt.recoverAddress=Mt.computeAddress=Mt.TransactionTypes=void 0;var Js=wa(),Pa=ga(),Xe=at(),fA=kl(),Io=Nn(),cA=$r(),Vi=sA(Ql()),Hm=Ns(),Rd=Pt(),uA=Um(),hr=new Rd.Logger(uA.version),lA;(function(t){t[t.legacy=0]="legacy",t[t.eip2930=1]="eip2930",t[t.eip1559=2]="eip1559"})(lA=Mt.TransactionTypes||(Mt.TransactionTypes={}));function Fd(t){return t==="0x"?null:(0,Js.getAddress)(t)}function dr(t){return t==="0x"?fA.Zero:Pa.BigNumber.from(t)}var dA=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],hA={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function qm(t){var e=(0,Hm.computePublicKey)(t);return(0,Js.getAddress)((0,Xe.hexDataSlice)((0,Io.keccak256)((0,Xe.hexDataSlice)(e,1)),12))}Mt.computeAddress=qm;function Dd(t,e){return qm((0,Hm.recoverPublicKey)((0,Xe.arrayify)(t),e))}Mt.recoverAddress=Dd;function Nr(t,e){var r=(0,Xe.stripZeros)(Pa.BigNumber.from(t).toHexString());return r.length>32&&hr.throwArgumentError("invalid length for "+e,"transaction:"+e,t),r}function Ld(t,e){return{address:(0,Js.getAddress)(t),storageKeys:(e||[]).map(function(r,n){return(0,Xe.hexDataLength)(r)!==32&&hr.throwArgumentError("invalid access list storageKey","accessList["+t+":"+n+"]",r),r.toLowerCase()})}}function W0(t){if(Array.isArray(t))return t.map(function(r,n){return Array.isArray(r)?(r.length>2&&hr.throwArgumentError("access list expected to be [ address, storageKeys[] ]","value["+n+"]",r),Ld(r[0],r[1])):Ld(r.address,r.storageKeys)});var e=Object.keys(t).map(function(r){var n=t[r].reduce(function(i,a){return i[a]=!0,i},{});return Ld(r,Object.keys(n).sort())});return e.sort(function(r,n){return r.address.localeCompare(n.address)}),e}Mt.accessListify=W0;function Gm(t){return W0(t).map(function(e){return[e.address,e.storageKeys]})}function Xm(t,e){if(t.gasPrice!=null){var r=Pa.BigNumber.from(t.gasPrice),n=Pa.BigNumber.from(t.maxFeePerGas||0);r.eq(n)||hr.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:r,maxFeePerGas:n})}var i=[Nr(t.chainId||0,"chainId"),Nr(t.nonce||0,"nonce"),Nr(t.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nr(t.maxFeePerGas||0,"maxFeePerGas"),Nr(t.gasLimit||0,"gasLimit"),t.to!=null?(0,Js.getAddress)(t.to):"0x",Nr(t.value||0,"value"),t.data||"0x",Gm(t.accessList||[])];if(e){var a=(0,Xe.splitSignature)(e);i.push(Nr(a.recoveryParam,"recoveryParam")),i.push((0,Xe.stripZeros)(a.r)),i.push((0,Xe.stripZeros)(a.s))}return(0,Xe.hexConcat)(["0x02",Vi.encode(i)])}function zm(t,e){var r=[Nr(t.chainId||0,"chainId"),Nr(t.nonce||0,"nonce"),Nr(t.gasPrice||0,"gasPrice"),Nr(t.gasLimit||0,"gasLimit"),t.to!=null?(0,Js.getAddress)(t.to):"0x",Nr(t.value||0,"value"),t.data||"0x",Gm(t.accessList||[])];if(e){var n=(0,Xe.splitSignature)(e);r.push(Nr(n.recoveryParam,"recoveryParam")),r.push((0,Xe.stripZeros)(n.r)),r.push((0,Xe.stripZeros)(n.s))}return(0,Xe.hexConcat)(["0x01",Vi.encode(r)])}function pA(t,e){(0,cA.checkProperties)(t,hA);var r=[];dA.forEach(function(l){var b=t[l.name]||[],y={};l.numeric&&(y.hexPad="left"),b=(0,Xe.arrayify)((0,Xe.hexlify)(b,y)),l.length&&b.length!==l.length&&b.length>0&&hr.throwArgumentError("invalid length for "+l.name,"transaction:"+l.name,b),l.maxLength&&(b=(0,Xe.stripZeros)(b),b.length>l.maxLength&&hr.throwArgumentError("invalid length for "+l.name,"transaction:"+l.name,b)),r.push((0,Xe.hexlify)(b))});var n=0;if(t.chainId!=null?(n=t.chainId,typeof n!="number"&&hr.throwArgumentError("invalid transaction.chainId","transaction",t)):e&&!(0,Xe.isBytesLike)(e)&&e.v>28&&(n=Math.floor((e.v-35)/2)),n!==0&&(r.push((0,Xe.hexlify)(n)),r.push("0x"),r.push("0x")),!e)return Vi.encode(r);var i=(0,Xe.splitSignature)(e),a=27+i.recoveryParam;return n!==0?(r.pop(),r.pop(),r.pop(),a+=n*2+8,i.v>28&&i.v!==a&&hr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e)):i.v!==a&&hr.throwArgumentError("transaction.chainId/signature.v mismatch","signature",e),r.push((0,Xe.hexlify)(a)),r.push((0,Xe.stripZeros)((0,Xe.arrayify)(i.r))),r.push((0,Xe.stripZeros)((0,Xe.arrayify)(i.s))),Vi.encode(r)}function bA(t,e){if(t.type==null||t.type===0)return t.accessList!=null&&hr.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",t),pA(t,e);switch(t.type){case 1:return zm(t,e);case 2:return Xm(t,e);default:break}return hr.throwError("unsupported transaction type: "+t.type,Rd.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:t.type})}Mt.serialize=bA;function Km(t,e,r){try{var n=dr(e[0]).toNumber();if(n!==0&&n!==1)throw new Error("bad recid");t.v=n}catch{hr.throwArgumentError("invalid v for transaction type: 1","v",e[0])}t.r=(0,Xe.hexZeroPad)(e[1],32),t.s=(0,Xe.hexZeroPad)(e[2],32);try{var i=(0,Io.keccak256)(r(t));t.from=Dd(i,{r:t.r,s:t.s,recoveryParam:t.v})}catch{}}function gA(t){var e=Vi.decode(t.slice(1));e.length!==9&&e.length!==12&&hr.throwArgumentError("invalid component count for transaction type: 2","payload",(0,Xe.hexlify)(t));var r=dr(e[2]),n=dr(e[3]),i={type:2,chainId:dr(e[0]).toNumber(),nonce:dr(e[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:dr(e[4]),to:Fd(e[5]),value:dr(e[6]),data:e[7],accessList:W0(e[8])};return e.length===9||(i.hash=(0,Io.keccak256)(t),Km(i,e.slice(9),Xm)),i}function vA(t){var e=Vi.decode(t.slice(1));e.length!==8&&e.length!==11&&hr.throwArgumentError("invalid component count for transaction type: 1","payload",(0,Xe.hexlify)(t));var r={type:1,chainId:dr(e[0]).toNumber(),nonce:dr(e[1]).toNumber(),gasPrice:dr(e[2]),gasLimit:dr(e[3]),to:Fd(e[4]),value:dr(e[5]),data:e[6],accessList:W0(e[7])};return e.length===8||(r.hash=(0,Io.keccak256)(t),Km(r,e.slice(8),zm)),r}function mA(t){var e=Vi.decode(t);e.length!==9&&e.length!==6&&hr.throwArgumentError("invalid raw transaction","rawTransaction",t);var r={nonce:dr(e[0]).toNumber(),gasPrice:dr(e[1]),gasLimit:dr(e[2]),to:Fd(e[3]),value:dr(e[4]),data:e[5],chainId:0};if(e.length===6)return r;try{r.v=Pa.BigNumber.from(e[6]).toNumber()}catch{return r}if(r.r=(0,Xe.hexZeroPad)(e[7],32),r.s=(0,Xe.hexZeroPad)(e[8],32),Pa.BigNumber.from(r.r).isZero()&&Pa.BigNumber.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);var n=r.v-27,i=e.slice(0,6);r.chainId!==0&&(i.push((0,Xe.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=r.chainId*2+8);var a=(0,Io.keccak256)(Vi.encode(i));try{r.from=Dd(a,{r:(0,Xe.hexlify)(r.r),s:(0,Xe.hexlify)(r.s),recoveryParam:n})}catch{}r.hash=(0,Io.keccak256)(t)}return r.type=null,r}function xA(t){var e=(0,Xe.arrayify)(t);if(e[0]>127)return mA(e);switch(e[0]){case 1:return vA(e);case 2:return gA(e);default:break}return hr.throwError("unsupported transaction type: "+e[0],Rd.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:e[0]})}Mt.parse=xA});var Zm=V(Y0=>{"use strict";var eF=A(S());Object.defineProperty(Y0,"__esModule",{value:!0});Y0.version=void 0;Y0.version="abstract-provider/5.8.0"});var Vm=V(zt=>{"use strict";var rF=A(S()),ec=zt&&zt.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),yA=zt&&zt.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},wA=zt&&zt.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(zt,"__esModule",{value:!0});zt.Provider=zt.TransactionOrderForkEvent=zt.TransactionForkEvent=zt.BlockForkEvent=zt.ForkEvent=void 0;var AA=ga(),$0=at(),Id=$r(),SA=Pt(),MA=Zm(),Hs=new SA.Logger(MA.version),tc=function(t){ec(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.isForkEvent=function(r){return!!(r&&r._isForkEvent)},e}(Id.Description);zt.ForkEvent=tc;var TA=function(t){ec(e,t);function e(r,n){var i=this;return(0,$0.isHexString)(r,32)||Hs.throwArgumentError("invalid blockHash","blockHash",r),i=t.call(this,{_isForkEvent:!0,_isBlockForkEvent:!0,expiry:n||0,blockHash:r})||this,i}return e}(tc);zt.BlockForkEvent=TA;var EA=function(t){ec(e,t);function e(r,n){var i=this;return(0,$0.isHexString)(r,32)||Hs.throwArgumentError("invalid transaction hash","hash",r),i=t.call(this,{_isForkEvent:!0,_isTransactionForkEvent:!0,expiry:n||0,hash:r})||this,i}return e}(tc);zt.TransactionForkEvent=EA;var _A=function(t){ec(e,t);function e(r,n,i){var a=this;return(0,$0.isHexString)(r,32)||Hs.throwArgumentError("invalid transaction hash","beforeHash",r),(0,$0.isHexString)(n,32)||Hs.throwArgumentError("invalid transaction hash","afterHash",n),a=t.call(this,{_isForkEvent:!0,_isTransactionOrderForkEvent:!0,expiry:i||0,beforeHash:r,afterHash:n})||this,a}return e}(tc);zt.TransactionOrderForkEvent=_A;var BA=function(){function t(){var e=this.constructor;Hs.checkAbstract(e,t),(0,Id.defineReadOnly)(this,"_isProvider",!0)}return t.prototype.getFeeData=function(){return yA(this,void 0,void 0,function(){var e,r,n,i,a,l;return wA(this,function(b){switch(b.label){case 0:return[4,(0,Id.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(function(y){return null})})];case 1:return e=b.sent(),r=e.block,n=e.gasPrice,i=null,a=null,l=null,r&&r.baseFeePerGas&&(i=r.baseFeePerGas,l=AA.BigNumber.from("1500000000"),a=r.baseFeePerGas.mul(2).add(l)),[2,{lastBaseFeePerGas:i,maxFeePerGas:a,maxPriorityFeePerGas:l,gasPrice:n}]}})})},t.prototype.addListener=function(e,r){return this.on(e,r)},t.prototype.removeListener=function(e,r){return this.off(e,r)},t.isProvider=function(e){return!!(e&&e._isProvider)},t}();zt.Provider=BA});var jm=V(rc=>{"use strict";var iF=A(S());Object.defineProperty(rc,"__esModule",{value:!0});rc.version=void 0;rc.version="abstract-signer/5.8.0"});var Wm=V(an=>{"use strict";var oF=A(S()),CA=an&&an.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tn=an&&an.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},En=an&&an.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(an,"__esModule",{value:!0});an.VoidSigner=an.Signer=void 0;var ji=$r(),Si=Pt(),PA=jm(),nn=new Si.Logger(PA.version),LA=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],RA=[Si.Logger.errors.INSUFFICIENT_FUNDS,Si.Logger.errors.NONCE_EXPIRED,Si.Logger.errors.REPLACEMENT_UNDERPRICED],Qm=function(){function t(){var e=this.constructor;nn.checkAbstract(e,t),(0,ji.defineReadOnly)(this,"_isSigner",!0)}return t.prototype.getBalance=function(e){return Tn(this,void 0,void 0,function(){return En(this,function(r){switch(r.label){case 0:return this._checkProvider("getBalance"),[4,this.provider.getBalance(this.getAddress(),e)];case 1:return[2,r.sent()]}})})},t.prototype.getTransactionCount=function(e){return Tn(this,void 0,void 0,function(){return En(this,function(r){switch(r.label){case 0:return this._checkProvider("getTransactionCount"),[4,this.provider.getTransactionCount(this.getAddress(),e)];case 1:return[2,r.sent()]}})})},t.prototype.estimateGas=function(e){return Tn(this,void 0,void 0,function(){var r;return En(this,function(n){switch(n.label){case 0:return this._checkProvider("estimateGas"),[4,(0,ji.resolveProperties)(this.checkTransaction(e))];case 1:return r=n.sent(),[4,this.provider.estimateGas(r)];case 2:return[2,n.sent()]}})})},t.prototype.call=function(e,r){return Tn(this,void 0,void 0,function(){var n;return En(this,function(i){switch(i.label){case 0:return this._checkProvider("call"),[4,(0,ji.resolveProperties)(this.checkTransaction(e))];case 1:return n=i.sent(),[4,this.provider.call(n,r)];case 2:return[2,i.sent()]}})})},t.prototype.sendTransaction=function(e){return Tn(this,void 0,void 0,function(){var r,n;return En(this,function(i){switch(i.label){case 0:return this._checkProvider("sendTransaction"),[4,this.populateTransaction(e)];case 1:return r=i.sent(),[4,this.signTransaction(r)];case 2:return n=i.sent(),[4,this.provider.sendTransaction(n)];case 3:return[2,i.sent()]}})})},t.prototype.getChainId=function(){return Tn(this,void 0,void 0,function(){var e;return En(this,function(r){switch(r.label){case 0:return this._checkProvider("getChainId"),[4,this.provider.getNetwork()];case 1:return e=r.sent(),[2,e.chainId]}})})},t.prototype.getGasPrice=function(){return Tn(this,void 0,void 0,function(){return En(this,function(e){switch(e.label){case 0:return this._checkProvider("getGasPrice"),[4,this.provider.getGasPrice()];case 1:return[2,e.sent()]}})})},t.prototype.getFeeData=function(){return Tn(this,void 0,void 0,function(){return En(this,function(e){switch(e.label){case 0:return this._checkProvider("getFeeData"),[4,this.provider.getFeeData()];case 1:return[2,e.sent()]}})})},t.prototype.resolveName=function(e){return Tn(this,void 0,void 0,function(){return En(this,function(r){switch(r.label){case 0:return this._checkProvider("resolveName"),[4,this.provider.resolveName(e)];case 1:return[2,r.sent()]}})})},t.prototype.checkTransaction=function(e){for(var r in e)LA.indexOf(r)===-1&&nn.throwArgumentError("invalid transaction key: "+r,"transaction",e);var n=(0,ji.shallowCopy)(e);return n.from==null?n.from=this.getAddress():n.from=Promise.all([Promise.resolve(n.from),this.getAddress()]).then(function(i){return i[0].toLowerCase()!==i[1].toLowerCase()&&nn.throwArgumentError("from address mismatch","transaction",e),i[0]}),n},t.prototype.populateTransaction=function(e){return Tn(this,void 0,void 0,function(){var r,n,i,a,l=this;return En(this,function(b){switch(b.label){case 0:return[4,(0,ji.resolveProperties)(this.checkTransaction(e))];case 1:return r=b.sent(),r.to!=null&&(r.to=Promise.resolve(r.to).then(function(y){return Tn(l,void 0,void 0,function(){var x;return En(this,function(_){switch(_.label){case 0:return y==null?[2,null]:[4,this.resolveName(y)];case 1:return x=_.sent(),x==null&&nn.throwArgumentError("provided ENS name resolves to null","tx.to",y),[2,x]}})})}),r.to.catch(function(y){})),n=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null,r.gasPrice!=null&&(r.type===2||n)?nn.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(r.type===0||r.type===1)&&n&&nn.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null?(r.type=2,[3,5]):[3,2];case 2:return r.type===0||r.type===1?(r.gasPrice==null&&(r.gasPrice=this.getGasPrice()),[3,5]):[3,3];case 3:return[4,this.getFeeData()];case 4:i=b.sent(),r.type==null?i.maxFeePerGas!=null&&i.maxPriorityFeePerGas!=null?(r.type=2,r.gasPrice!=null?(a=r.gasPrice,delete r.gasPrice,r.maxFeePerGas=a,r.maxPriorityFeePerGas=a):(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas))):i.gasPrice!=null?(n&&nn.throwError("network does not support EIP-1559",Si.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=i.gasPrice),r.type=0):nn.throwError("failed to get consistent fee data",Si.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"}):r.type===2&&(r.maxFeePerGas==null&&(r.maxFeePerGas=i.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=i.maxPriorityFeePerGas)),b.label=5;case 5:return r.nonce==null&&(r.nonce=this.getTransactionCount("pending")),r.gasLimit==null&&(r.gasLimit=this.estimateGas(r).catch(function(y){if(RA.indexOf(y.code)>=0)throw y;return nn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",Si.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:y,tx:r})})),r.chainId==null?r.chainId=this.getChainId():r.chainId=Promise.all([Promise.resolve(r.chainId),this.getChainId()]).then(function(y){return y[1]!==0&&y[0]!==y[1]&&nn.throwArgumentError("chainId address mismatch","transaction",e),y[0]}),[4,(0,ji.resolveProperties)(r)];case 6:return[2,b.sent()]}})})},t.prototype._checkProvider=function(e){this.provider||nn.throwError("missing provider",Si.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})},t.isSigner=function(e){return!!(e&&e._isSigner)},t}();an.Signer=Qm;var FA=function(t){CA(e,t);function e(r,n){var i=t.call(this)||this;return(0,ji.defineReadOnly)(i,"address",r),(0,ji.defineReadOnly)(i,"provider",n||null),i}return e.prototype.getAddress=function(){return Promise.resolve(this.address)},e.prototype._fail=function(r,n){return Promise.resolve().then(function(){nn.throwError(r,Si.Logger.errors.UNSUPPORTED_OPERATION,{operation:n})})},e.prototype.signMessage=function(r){return this._fail("VoidSigner cannot sign messages","signMessage")},e.prototype.signTransaction=function(r){return this._fail("VoidSigner cannot sign transactions","signTransaction")},e.prototype._signTypedData=function(r,n,i){return this._fail("VoidSigner cannot sign typed data","signTypedData")},e.prototype.connect=function(r){return new e(this.address,r)},e}(Qm);an.VoidSigner=FA});var $m=V(Qi=>{"use strict";var fF=A(S());Object.defineProperty(Qi,"__esModule",{value:!0});Qi.Base58=Qi.Base32=Qi.BaseX=void 0;var Ym=at(),nc=$r(),Od=function(){function t(e){(0,nc.defineReadOnly)(this,"alphabet",e),(0,nc.defineReadOnly)(this,"base",e.length),(0,nc.defineReadOnly)(this,"_alphabetMap",{}),(0,nc.defineReadOnly)(this,"_leader",e.charAt(0));for(var r=0;r<e.length;r++)this._alphabetMap[e.charAt(r)]=r}return t.prototype.encode=function(e){var r=(0,Ym.arrayify)(e);if(r.length===0)return"";for(var n=[0],i=0;i<r.length;++i){for(var a=r[i],l=0;l<n.length;++l)a+=n[l]<<8,n[l]=a%this.base,a=a/this.base|0;for(;a>0;)n.push(a%this.base),a=a/this.base|0}for(var b="",y=0;r[y]===0&&y<r.length-1;++y)b+=this._leader;for(var x=n.length-1;x>=0;--x)b+=this.alphabet[n[x]];return b},t.prototype.decode=function(e){if(typeof e!="string")throw new TypeError("Expected String");var r=[];if(e.length===0)return new Uint8Array(r);r.push(0);for(var n=0;n<e.length;n++){var i=this._alphabetMap[e[n]];if(i===void 0)throw new Error("Non-base"+this.base+" character");for(var a=i,l=0;l<r.length;++l)a+=r[l]*this.base,r[l]=a&255,a>>=8;for(;a>0;)r.push(a&255),a>>=8}for(var b=0;e[b]===this._leader&&b<e.length-1;++b)r.push(0);return(0,Ym.arrayify)(new Uint8Array(r.reverse()))},t}();Qi.BaseX=Od;var DA=new Od("abcdefghijklmnopqrstuvwxyz234567");Qi.Base32=DA;var IA=new Od("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");Qi.Base58=IA});var rx=V(ic=>{"use strict";var uF=A(S());Object.defineProperty(ic,"__esModule",{value:!0});ic.pbkdf2=void 0;var OA=it("crypto"),tx=at();function ex(t){return Buffer.from((0,tx.arrayify)(t))}function kA(t,e,r,n,i){return(0,tx.hexlify)((0,OA.pbkdf2Sync)(ex(t),ex(e),r,n,i))}ic.pbkdf2=kA});var oc=V(ac=>{"use strict";var dF=A(S());Object.defineProperty(ac,"__esModule",{value:!0});ac.pbkdf2=void 0;var NA=rx();Object.defineProperty(ac,"pbkdf2",{enumerable:!0,get:function(){return NA.pbkdf2}})});var kd=V(qs=>{"use strict";var pF=A(S());Object.defineProperty(qs,"__esModule",{value:!0});qs.SupportedAlgorithm=void 0;var JA;(function(t){t.sha256="sha256",t.sha512="sha512"})(JA=qs.SupportedAlgorithm||(qs.SupportedAlgorithm={}))});var nx=V(sc=>{"use strict";var gF=A(S());Object.defineProperty(sc,"__esModule",{value:!0});sc.version=void 0;sc.version="sha2/5.8.0"});var ax=V(on=>{"use strict";var mF=A(S()),UA=on&&on.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(on,"__esModule",{value:!0});on.computeHmac=on.sha512=on.sha256=on.ripemd160=void 0;var Nd=it("crypto"),HA=UA(Is()),Gs=at(),qA=kd(),ix=Pt(),GA=nx(),XA=new ix.Logger(GA.version);function zA(t){return"0x"+HA.default.ripemd160().update((0,Gs.arrayify)(t)).digest("hex")}on.ripemd160=zA;function KA(t){return"0x"+(0,Nd.createHash)("sha256").update(Buffer.from((0,Gs.arrayify)(t))).digest("hex")}on.sha256=KA;function ZA(t){return"0x"+(0,Nd.createHash)("sha512").update(Buffer.from((0,Gs.arrayify)(t))).digest("hex")}on.sha512=ZA;function VA(t,e,r){return qA.SupportedAlgorithm[t]||XA.throwError("unsupported algorithm - "+t,ix.Logger.errors.UNSUPPORTED_OPERATION,{operation:"computeHmac",algorithm:t}),"0x"+(0,Nd.createHmac)(t,Buffer.from((0,Gs.arrayify)(e))).update(Buffer.from((0,Gs.arrayify)(r))).digest("hex")}on.computeHmac=VA});var ox=V(sn=>{"use strict";var yF=A(S());Object.defineProperty(sn,"__esModule",{value:!0});sn.SupportedAlgorithm=sn.sha512=sn.sha256=sn.ripemd160=sn.computeHmac=void 0;var fc=ax();Object.defineProperty(sn,"computeHmac",{enumerable:!0,get:function(){return fc.computeHmac}});Object.defineProperty(sn,"ripemd160",{enumerable:!0,get:function(){return fc.ripemd160}});Object.defineProperty(sn,"sha256",{enumerable:!0,get:function(){return fc.sha256}});Object.defineProperty(sn,"sha512",{enumerable:!0,get:function(){return fc.sha512}});var jA=kd();Object.defineProperty(sn,"SupportedAlgorithm",{enumerable:!0,get:function(){return jA.SupportedAlgorithm}})});var sx=V(cc=>{"use strict";var AF=A(S());Object.defineProperty(cc,"__esModule",{value:!0});cc.version=void 0;cc.version="wordlists/5.8.0"});var $n=V(La=>{"use strict";var MF=A(S());Object.defineProperty(La,"__esModule",{value:!0});La.Wordlist=La.logger=void 0;var QA=!1,WA=Ps(),fx=$r(),YA=Pt(),$A=sx();La.logger=new YA.Logger($A.version);var eS=function(){function t(e){var r=this.constructor;La.logger.checkAbstract(r,t),(0,fx.defineReadOnly)(this,"locale",e)}return t.prototype.split=function(e){return e.toLowerCase().split(/ +/g)},t.prototype.join=function(e){return e.join(" ")},t.check=function(e){for(var r=[],n=0;n<2048;n++){var i=e.getWord(n);if(n!==e.getWordIndex(i))return"0x";r.push(i)}return(0,WA.id)(r.join(`
11
11
  `)+`
12
- `)},t.register=function(e,r){if(r||(r=e.locale),jA)try{var n=window;n._ethers&&n._ethers.wordlists&&(n._ethers.wordlists[r]||(0,sx.defineReadOnly)(n._ethers.wordlists,r,e))}catch{}},t}();Pa.Wordlist=$A});var ux=V(Oo=>{"use strict";var TF=A(S()),eS=Oo&&Oo.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Oo,"__esModule",{value:!0});Oo.langCz=void 0;var Jd=$n(),tS="AbdikaceAbecedaAdresaAgreseAkceAktovkaAlejAlkoholAmputaceAnanasAndulkaAnekdotaAnketaAntikaAnulovatArchaAroganceAsfaltAsistentAspiraceAstmaAstronomAtlasAtletikaAtolAutobusAzylBabkaBachorBacilBaculkaBadatelBagetaBagrBahnoBakterieBaladaBaletkaBalkonBalonekBalvanBalzaBambusBankomatBarbarBaretBarmanBarokoBarvaBaterkaBatohBavlnaBazalkaBazilikaBazukaBednaBeranBesedaBestieBetonBezinkaBezmocBeztakBicyklBidloBiftekBikinyBilanceBiografBiologBitvaBizonBlahobytBlatouchBlechaBleduleBleskBlikatBliznaBlokovatBlouditBludBobekBobrBodlinaBodnoutBohatostBojkotBojovatBokorysBolestBorecBoroviceBotaBoubelBouchatBoudaBouleBouratBoxerBradavkaBramboraBrankaBratrBreptaBriketaBrkoBrlohBronzBroskevBrunetkaBrusinkaBrzdaBrzyBublinaBubnovatBuchtaBuditelBudkaBudovaBufetBujarostBukviceBuldokBulvaBundaBunkrBurzaButikBuvolBuzolaBydletBylinaBytovkaBzukotCapartCarevnaCedrCeduleCejchCejnCelaCelerCelkemCelniceCeninaCennostCenovkaCentrumCenzorCestopisCetkaChalupaChapadloCharitaChataChechtatChemieChichotChirurgChladChlebaChlubitChmelChmuraChobotChocholChodbaCholeraChomoutChopitChorobaChovChrapotChrlitChrtChrupChtivostChudinaChutnatChvatChvilkaChvostChybaChystatChytitCibuleCigaretaCihelnaCihlaCinkotCirkusCisternaCitaceCitrusCizinecCizostClonaCokolivCouvatCtitelCtnostCudnostCuketaCukrCupotCvaknoutCvalCvikCvrkotCyklistaDalekoDarebaDatelDatumDceraDebataDechovkaDecibelDeficitDeflaceDeklDekretDemokratDepreseDerbyDeskaDetektivDikobrazDiktovatDiodaDiplomDiskDisplejDivadloDivochDlahaDlouhoDluhopisDnesDobroDobytekDocentDochutitDodnesDohledDohodaDohraDojemDojniceDokladDokolaDoktorDokumentDolarDolevaDolinaDomaDominantDomluvitDomovDonutitDopadDopisDoplnitDoposudDoprovodDopustitDorazitDorostDortDosahDoslovDostatekDosudDosytaDotazDotekDotknoutDoufatDoutnatDovozceDozaduDoznatDozorceDrahotaDrakDramatikDravecDrazeDrdolDrobnostDrogerieDrozdDrsnostDrtitDrzostDubenDuchovnoDudekDuhaDuhovkaDusitDusnoDutostDvojiceDvorecDynamitEkologEkonomieElektronElipsaEmailEmiseEmoceEmpatieEpizodaEpochaEpopejEposEsejEsenceEskortaEskymoEtiketaEuforieEvoluceExekuceExkurzeExpediceExplozeExportExtraktFackaFajfkaFakultaFanatikFantazieFarmacieFavoritFazoleFederaceFejetonFenkaFialkaFigurantFilozofFiltrFinanceFintaFixaceFjordFlanelFlirtFlotilaFondFosforFotbalFotkaFotonFrakceFreskaFrontaFukarFunkceFyzikaGalejeGarantGenetikaGeologGilotinaGlazuraGlejtGolemGolfistaGotikaGrafGramofonGranuleGrepGrilGrogGroteskaGumaHadiceHadrHalaHalenkaHanbaHanopisHarfaHarpunaHavranHebkostHejkalHejnoHejtmanHektarHelmaHematomHerecHernaHesloHezkyHistorikHladovkaHlasivkyHlavaHledatHlenHlodavecHlohHloupostHltatHlubinaHluchotaHmatHmotaHmyzHnisHnojivoHnoutHoblinaHobojHochHodinyHodlatHodnotaHodovatHojnostHokejHolinkaHolkaHolubHomoleHonitbaHonoraceHoralHordaHorizontHorkoHorlivecHormonHorninaHoroskopHorstvoHospodaHostinaHotovostHoubaHoufHoupatHouskaHovorHradbaHraniceHravostHrazdaHrbolekHrdinaHrdloHrdostHrnekHrobkaHromadaHrotHroudaHrozenHrstkaHrubostHryzatHubenostHubnoutHudbaHukotHumrHusitaHustotaHvozdHybnostHydrantHygienaHymnaHysterikIdylkaIhnedIkonaIluzeImunitaInfekceInflaceInkasoInovaceInspekceInternetInvalidaInvestorInzerceIronieJablkoJachtaJahodaJakmileJakostJalovecJantarJarmarkJaroJasanJasnoJatkaJavorJazykJedinecJedleJednatelJehlanJekotJelenJelitoJemnostJenomJepiceJeseterJevitJezdecJezeroJinakJindyJinochJiskraJistotaJitrniceJizvaJmenovatJogurtJurtaKabaretKabelKabinetKachnaKadetKadidloKahanKajakKajutaKakaoKaktusKalamitaKalhotyKalibrKalnostKameraKamkolivKamnaKanibalKanoeKantorKapalinaKapelaKapitolaKapkaKapleKapotaKaprKapustaKapybaraKaramelKarotkaKartonKasaKatalogKatedraKauceKauzaKavalecKazajkaKazetaKazivostKdekolivKdesiKedlubenKempKeramikaKinoKlacekKladivoKlamKlapotKlasikaKlaunKlecKlenbaKlepatKlesnoutKlidKlimaKlisnaKloboukKlokanKlopaKloubKlubovnaKlusatKluzkostKmenKmitatKmotrKnihaKnotKoaliceKoberecKobkaKoblihaKobylaKocourKohoutKojenecKokosKoktejlKolapsKoledaKolizeKoloKomandoKometaKomikKomnataKomoraKompasKomunitaKonatKonceptKondiceKonecKonfeseKongresKoninaKonkursKontaktKonzervaKopanecKopieKopnoutKoprovkaKorbelKorektorKormidloKoroptevKorpusKorunaKorytoKorzetKosatecKostkaKotelKotletaKotoulKoukatKoupelnaKousekKouzloKovbojKozaKozorohKrabiceKrachKrajinaKralovatKrasopisKravataKreditKrejcarKresbaKrevetaKriketKritikKrizeKrkavecKrmelecKrmivoKrocanKrokKronikaKropitKroupaKrovkaKrtekKruhadloKrupiceKrutostKrvinkaKrychleKryptaKrystalKrytKudlankaKufrKujnostKuklaKulajdaKulichKulkaKulometKulturaKunaKupodivuKurtKurzorKutilKvalitaKvasinkaKvestorKynologKyselinaKytaraKyticeKytkaKytovecKyvadloLabradorLachtanLadnostLaikLakomecLamelaLampaLanovkaLasiceLasoLasturaLatinkaLavinaLebkaLeckdyLedenLedniceLedovkaLedvinaLegendaLegieLegraceLehceLehkostLehnoutLektvarLenochodLentilkaLepenkaLepidloLetadloLetecLetmoLetokruhLevhartLevitaceLevobokLibraLichotkaLidojedLidskostLihovinaLijavecLilekLimetkaLinieLinkaLinoleumListopadLitinaLitovatLobistaLodivodLogikaLogopedLokalitaLoketLomcovatLopataLopuchLordLososLotrLoudalLouhLoukaLouskatLovecLstivostLucernaLuciferLumpLuskLustraceLviceLyraLyrikaLysinaMadamMadloMagistrMahagonMajetekMajitelMajoritaMakakMakoviceMakrelaMalbaMalinaMalovatMalviceMaminkaMandleMankoMarnostMasakrMaskotMasopustMaticeMatrikaMaturitaMazanecMazivoMazlitMazurkaMdlobaMechanikMeditaceMedovinaMelasaMelounMentolkaMetlaMetodaMetrMezeraMigraceMihnoutMihuleMikinaMikrofonMilenecMilimetrMilostMimikaMincovnaMinibarMinometMinulostMiskaMistrMixovatMladostMlhaMlhovinaMlokMlsatMluvitMnichMnohemMobilMocnostModelkaModlitbaMohylaMokroMolekulaMomentkaMonarchaMonoklMonstrumMontovatMonzunMosazMoskytMostMotivaceMotorkaMotykaMouchaMoudrostMozaikaMozekMozolMramorMravenecMrkevMrtvolaMrzetMrzutostMstitelMudrcMuflonMulatMumieMuniceMusetMutaceMuzeumMuzikantMyslivecMzdaNabouratNachytatNadaceNadbytekNadhozNadobroNadpisNahlasNahnatNahodileNahraditNaivitaNajednouNajistoNajmoutNaklonitNakonecNakrmitNalevoNamazatNamluvitNanometrNaokoNaopakNaostroNapadatNapevnoNaplnitNapnoutNaposledNaprostoNaroditNarubyNarychloNasaditNasekatNaslepoNastatNatolikNavenekNavrchNavzdoryNazvatNebeNechatNeckyNedalekoNedbatNeduhNegaceNehetNehodaNejenNejprveNeklidNelibostNemilostNemocNeochotaNeonkaNepokojNerostNervNesmyslNesouladNetvorNeuronNevinaNezvykleNicotaNijakNikamNikdyNiklNikterakNitroNoclehNohaviceNominaceNoraNorekNositelNosnostNouzeNovinyNovotaNozdraNudaNudleNugetNutitNutnostNutrieNymfaObalObarvitObavaObdivObecObehnatObejmoutObezitaObhajobaObilniceObjasnitObjektObklopitOblastOblekOblibaOblohaObludaObnosObohatitObojekOboutObrazecObrnaObrubaObrysObsahObsluhaObstaratObuvObvazObvinitObvodObvykleObyvatelObzorOcasOcelOcenitOchladitOchotaOchranaOcitnoutOdbojOdbytOdchodOdcizitOdebratOdeslatOdevzdatOdezvaOdhadceOdhoditOdjetOdjinudOdkazOdkoupitOdlivOdlukaOdmlkaOdolnostOdpadOdpisOdploutOdporOdpustitOdpykatOdrazkaOdsouditOdstupOdsunOdtokOdtudOdvahaOdvetaOdvolatOdvracetOdznakOfinaOfsajdOhlasOhniskoOhradaOhrozitOhryzekOkapOkeniceOklikaOknoOkouzlitOkovyOkrasaOkresOkrsekOkruhOkupantOkurkaOkusitOlejninaOlizovatOmakOmeletaOmezitOmladinaOmlouvatOmluvaOmylOnehdyOpakovatOpasekOperaceOpiceOpilostOpisovatOporaOpoziceOpravduOprotiOrbitalOrchestrOrgieOrliceOrlojOrtelOsadaOschnoutOsikaOsivoOslavaOslepitOslnitOslovitOsnovaOsobaOsolitOspalecOstenOstrahaOstudaOstychOsvojitOteplitOtiskOtopOtrhatOtrlostOtrokOtrubyOtvorOvanoutOvarOvesOvlivnitOvoceOxidOzdobaPachatelPacientPadouchPahorekPaktPalandaPalecPalivoPalubaPamfletPamlsekPanenkaPanikaPannaPanovatPanstvoPantoflePaprikaParketaParodiePartaParukaParybaPasekaPasivitaPastelkaPatentPatronaPavoukPaznehtPazourekPeckaPedagogPejsekPekloPelotonPenaltaPendrekPenzePeriskopPeroPestrostPetardaPeticePetrolejPevninaPexesoPianistaPihaPijavicePiklePiknikPilinaPilnostPilulkaPinzetaPipetaPisatelPistolePitevnaPivnicePivovarPlacentaPlakatPlamenPlanetaPlastikaPlatitPlavidloPlazPlechPlemenoPlentaPlesPletivoPlevelPlivatPlnitPlnoPlochaPlodinaPlombaPloutPlukPlynPobavitPobytPochodPocitPoctivecPodatPodcenitPodepsatPodhledPodivitPodkladPodmanitPodnikPodobaPodporaPodrazPodstataPodvodPodzimPoeziePohankaPohnutkaPohovorPohromaPohybPointaPojistkaPojmoutPokazitPoklesPokojPokrokPokutaPokynPolednePolibekPolknoutPolohaPolynomPomaluPominoutPomlkaPomocPomstaPomysletPonechatPonorkaPonurostPopadatPopelPopisekPoplachPoprositPopsatPopudPoradcePorcePorodPoruchaPoryvPosaditPosedPosilaPoskokPoslanecPosouditPospoluPostavaPosudekPosypPotahPotkanPotleskPotomekPotravaPotupaPotvoraPoukazPoutoPouzdroPovahaPovidlaPovlakPovozPovrchPovstatPovykPovzdechPozdravPozemekPoznatekPozorPozvatPracovatPrahoryPraktikaPralesPraotecPraporekPrasePravdaPrincipPrknoProbuditProcentoProdejProfeseProhraProjektProlomitPromilePronikatPropadProrokProsbaProtonProutekProvazPrskavkaPrstenPrudkostPrutPrvekPrvohoryPsanecPsovodPstruhPtactvoPubertaPuchPudlPukavecPuklinaPukrlePultPumpaPuncPupenPusaPusinkaPustinaPutovatPutykaPyramidaPyskPytelRacekRachotRadiaceRadniceRadonRaftRagbyRaketaRakovinaRamenoRampouchRandeRarachRaritaRasovnaRastrRatolestRazanceRazidloReagovatReakceReceptRedaktorReferentReflexRejnokReklamaRekordRekrutRektorReputaceRevizeRevmaRevolverRezervaRiskovatRizikoRobotikaRodokmenRohovkaRokleRokokoRomanetoRopovodRopuchaRorejsRosolRostlinaRotmistrRotopedRotundaRoubenkaRouchoRoupRouraRovinaRovniceRozborRozchodRozdatRozeznatRozhodceRozinkaRozjezdRozkazRozlohaRozmarRozpadRozruchRozsahRoztokRozumRozvodRubrikaRuchadloRukaviceRukopisRybaRybolovRychlostRydloRypadloRytinaRyzostSadistaSahatSakoSamecSamizdatSamotaSanitkaSardinkaSasankaSatelitSazbaSazeniceSborSchovatSebrankaSeceseSedadloSedimentSedloSehnatSejmoutSekeraSektaSekundaSekvojeSemenoSenoServisSesaditSeshoraSeskokSeslatSestraSesuvSesypatSetbaSetinaSetkatSetnoutSetrvatSeverSeznamShodaShrnoutSifonSilniceSirkaSirotekSirupSituaceSkafandrSkaliskoSkanzenSkautSkeptikSkicaSkladbaSkleniceSkloSkluzSkobaSkokanSkoroSkriptaSkrzSkupinaSkvostSkvrnaSlabikaSladidloSlaninaSlastSlavnostSledovatSlepecSlevaSlezinaSlibSlinaSlizniceSlonSloupekSlovoSluchSluhaSlunceSlupkaSlzaSmaragdSmetanaSmilstvoSmlouvaSmogSmradSmrkSmrtkaSmutekSmyslSnadSnahaSnobSobotaSochaSodovkaSokolSopkaSotvaSoubojSoucitSoudceSouhlasSouladSoumrakSoupravaSousedSoutokSouvisetSpalovnaSpasitelSpisSplavSpodekSpojenecSpoluSponzorSpornostSpoustaSprchaSpustitSrandaSrazSrdceSrnaSrnecSrovnatSrpenSrstSrubStaniceStarostaStatikaStavbaStehnoStezkaStodolaStolekStopaStornoStoupatStrachStresStrhnoutStromStrunaStudnaStupniceStvolStykSubjektSubtropySucharSudostSuknoSundatSunoutSurikataSurovinaSvahSvalstvoSvetrSvatbaSvazekSvisleSvitekSvobodaSvodidloSvorkaSvrabSykavkaSykotSynekSynovecSypatSypkostSyrovostSyselSytostTabletkaTabuleTahounTajemnoTajfunTajgaTajitTajnostTaktikaTamhleTamponTancovatTanecTankerTapetaTaveninaTazatelTechnikaTehdyTekutinaTelefonTemnotaTendenceTenistaTenorTeplotaTepnaTeprveTerapieTermoskaTextilTichoTiskopisTitulekTkadlecTkaninaTlapkaTleskatTlukotTlupaTmelToaletaTopinkaTopolTorzoTouhaToulecTradiceTraktorTrampTrasaTraverzaTrefitTrestTrezorTrhavinaTrhlinaTrochuTrojiceTroskaTroubaTrpceTrpitelTrpkostTrubecTruchlitTruhliceTrusTrvatTudyTuhnoutTuhostTundraTuristaTurnajTuzemskoTvarohTvorbaTvrdostTvrzTygrTykevUbohostUbozeUbratUbrousekUbrusUbytovnaUchoUctivostUdivitUhraditUjednatUjistitUjmoutUkazatelUklidnitUklonitUkotvitUkrojitUliceUlitaUlovitUmyvadloUnavitUniformaUniknoutUpadnoutUplatnitUplynoutUpoutatUpravitUranUrazitUsednoutUsilovatUsmrtitUsnadnitUsnoutUsouditUstlatUstrnoutUtahovatUtkatUtlumitUtonoutUtopenecUtrousitUvalitUvolnitUvozovkaUzdravitUzelUzeninaUzlinaUznatVagonValchaValounVanaVandalVanilkaVaranVarhanyVarovatVcelkuVchodVdovaVedroVegetaceVejceVelbloudVeletrhVelitelVelmocVelrybaVenkovVerandaVerzeVeselkaVeskrzeVesniceVespoduVestaVeterinaVeverkaVibraceVichrVideohraVidinaVidleVilaViniceVisetVitalitaVizeVizitkaVjezdVkladVkusVlajkaVlakVlasecVlevoVlhkostVlivVlnovkaVloupatVnucovatVnukVodaVodivostVodoznakVodstvoVojenskyVojnaVojskoVolantVolbaVolitVolnoVoskovkaVozidloVozovnaVpravoVrabecVracetVrahVrataVrbaVrcholekVrhatVrstvaVrtuleVsaditVstoupitVstupVtipVybavitVybratVychovatVydatVydraVyfotitVyhledatVyhnoutVyhoditVyhraditVyhubitVyjasnitVyjetVyjmoutVyklopitVykonatVylekatVymazatVymezitVymizetVymysletVynechatVynikatVynutitVypadatVyplatitVypravitVypustitVyrazitVyrovnatVyrvatVyslovitVysokoVystavitVysunoutVysypatVytasitVytesatVytratitVyvinoutVyvolatVyvrhelVyzdobitVyznatVzaduVzbuditVzchopitVzdorVzduchVzdychatVzestupVzhledemVzkazVzlykatVznikVzorekVzpouraVztahVztekXylofonZabratZabydletZachovatZadarmoZadusitZafoukatZahltitZahoditZahradaZahynoutZajatecZajetZajistitZaklepatZakoupitZalepitZamezitZamotatZamysletZanechatZanikatZaplatitZapojitZapsatZarazitZastavitZasunoutZatajitZatemnitZatknoutZaujmoutZavalitZaveletZavinitZavolatZavrtatZazvonitZbavitZbrusuZbudovatZbytekZdalekaZdarmaZdatnostZdivoZdobitZdrojZdvihZdymadloZeleninaZemanZeminaZeptatZezaduZezdolaZhatitZhltnoutZhlubokaZhotovitZhrubaZimaZimniceZjemnitZklamatZkoumatZkratkaZkumavkaZlatoZlehkaZlobaZlomZlostZlozvykZmapovatZmarZmatekZmijeZmizetZmocnitZmodratZmrzlinaZmutovatZnakZnalostZnamenatZnovuZobrazitZotavitZoubekZoufaleZploditZpomalitZpravaZprostitZprudkaZprvuZradaZranitZrcadloZrnitostZrnoZrovnaZrychlitZrzavostZtichaZtratitZubovinaZubrZvednoutZvenkuZveselaZvonZvratZvukovodZvyk",Gs=null;function fx(t){if(Gs==null&&(Gs=tS.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Jd.Wordlist.check(t)!=="0x25f44555f4af25b51a711136e1c7d6e50ce9f8917d39d6b1f076b2bb4d2fac1a"))throw Gs=null,new Error("BIP39 Wordlist for en (English) FAILED")}var rS=function(t){eS(e,t);function e(){return t.call(this,"cz")||this}return e.prototype.getWord=function(r){return fx(this),Gs[r]},e.prototype.getWordIndex=function(r){return fx(this),Gs.indexOf(r)},e}(Jd.Wordlist),cx=new rS;Oo.langCz=cx;Jd.Wordlist.register(cx)});var hx=V(ko=>{"use strict";var _F=A(S()),nS=ko&&ko.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ko,"__esModule",{value:!0});ko.langEn=void 0;var Ud=$n(),iS="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",Xs=null;function lx(t){if(Xs==null&&(Xs=iS.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Ud.Wordlist.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw Xs=null,new Error("BIP39 Wordlist for en (English) FAILED")}var aS=function(t){nS(e,t);function e(){return t.call(this,"en")||this}return e.prototype.getWord=function(r){return lx(this),Xs[r]},e.prototype.getWordIndex=function(r){return lx(this),Xs.indexOf(r)},e}(Ud.Wordlist),dx=new aS;ko.langEn=dx;Ud.Wordlist.register(dx)});var mx=V(No=>{"use strict";var CF=A(S()),oS=No&&No.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(No,"__esModule",{value:!0});No.langEs=void 0;var uc=Or(),lc=$n(),sS="A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo",bx={},zs=null;function gx(t){return lc.logger.checkNormalize(),(0,uc.toUtf8String)(Array.prototype.filter.call((0,uc.toUtf8Bytes)(t.normalize("NFD").toLowerCase()),function(e){return e>=65&&e<=90||e>=97&&e<=123}))}function fS(t){var e=[];return Array.prototype.forEach.call((0,uc.toUtf8Bytes)(t),function(r){r===47?(e.push(204),e.push(129)):r===126?(e.push(110),e.push(204),e.push(131)):e.push(r)}),(0,uc.toUtf8String)(e)}function px(t){if(zs==null&&(zs=sS.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(function(e){return fS(e)}),zs.forEach(function(e,r){bx[gx(e)]=r}),lc.Wordlist.check(t)!=="0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300"))throw zs=null,new Error("BIP39 Wordlist for es (Spanish) FAILED")}var cS=function(t){oS(e,t);function e(){return t.call(this,"es")||this}return e.prototype.getWord=function(r){return px(this),zs[r]},e.prototype.getWordIndex=function(r){return px(this),bx[gx(r)]},e}(lc.Wordlist),vx=new cS;No.langEs=vx;lc.Wordlist.register(vx)});var Sx=V(Jo=>{"use strict";var LF=A(S()),uS=Jo&&Jo.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Jo,"__esModule",{value:!0});Jo.langFr=void 0;var dc=Or(),hc=$n(),lS="AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie",Ks=null,yx={};function wx(t){return hc.logger.checkNormalize(),(0,dc.toUtf8String)(Array.prototype.filter.call((0,dc.toUtf8Bytes)(t.normalize("NFD").toLowerCase()),function(e){return e>=65&&e<=90||e>=97&&e<=123}))}function dS(t){var e=[];return Array.prototype.forEach.call((0,dc.toUtf8Bytes)(t),function(r){r===47?(e.push(204),e.push(129)):r===45?(e.push(204),e.push(128)):e.push(r)}),(0,dc.toUtf8String)(e)}function xx(t){if(Ks==null&&(Ks=lS.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(function(e){return dS(e)}),Ks.forEach(function(e,r){yx[wx(e)]=r}),hc.Wordlist.check(t)!=="0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045"))throw Ks=null,new Error("BIP39 Wordlist for fr (French) FAILED")}var hS=function(t){uS(e,t);function e(){return t.call(this,"fr")||this}return e.prototype.getWord=function(r){return xx(this),Ks[r]},e.prototype.getWordIndex=function(r){return xx(this),yx[wx(r)]},e}(hc.Wordlist),Ax=new hS;Jo.langFr=Ax;hc.Wordlist.register(Ax)});var _x=V(Uo=>{"use strict";var FF=A(S()),pS=Uo&&Uo.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Uo,"__esModule",{value:!0});Uo.langJa=void 0;var bS=at(),fn=Or(),pc=$n(),gS=["AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR","ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR","AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm","ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC","BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD","QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD","IJBEJqXZJ"],vS="~~AzB~X~a~KN~Q~D~S~C~G~E~Y~p~L~I~O~eH~g~V~hxyumi~~U~~Z~~v~~s~~dkoblPjfnqwMcRTr~W~~~F~~~~~Jt",Jr=null;function Mx(t){return(0,bS.hexlify)((0,fn.toUtf8Bytes)(t))}var mS="0xe3818de38284e3818f",xS="0xe3818de38283e3818f";function Tx(t){if(Jr!==null)return;Jr=[];var e={};e[(0,fn.toUtf8String)([227,130,154])]=!1,e[(0,fn.toUtf8String)([227,130,153])]=!1,e[(0,fn.toUtf8String)([227,130,133])]=(0,fn.toUtf8String)([227,130,134]),e[(0,fn.toUtf8String)([227,129,163])]=(0,fn.toUtf8String)([227,129,164]),e[(0,fn.toUtf8String)([227,130,131])]=(0,fn.toUtf8String)([227,130,132]),e[(0,fn.toUtf8String)([227,130,135])]=(0,fn.toUtf8String)([227,130,136]);function r(C){for(var D="",F=0;F<C.length;F++){var P=C[F],z=e[P];z!==!1&&(z&&(P=z),D+=P)}return D}function n(C,D){return C=r(C),D=r(D),C<D?-1:C>D?1:0}for(var i=3;i<=9;i++)for(var a=gS[i-3],l=0;l<a.length;l+=i){for(var b=[],y=0;y<i;y++){var x=vS.indexOf(a[l+y]);b.push(227),b.push(x&64?130:129),b.push((x&63)+128)}Jr.push((0,fn.toUtf8String)(b))}if(Jr.sort(n),Mx(Jr[442])===mS&&Mx(Jr[443])===xS){var _=Jr[442];Jr[442]=Jr[443],Jr[443]=_}if(pc.Wordlist.check(t)!=="0xcb36b09e6baa935787fd762ce65e80b0c6a8dabdfbc3a7f86ac0e2c4fd111600")throw Jr=null,new Error("BIP39 Wordlist for ja (Japanese) FAILED")}var yS=function(t){pS(e,t);function e(){return t.call(this,"ja")||this}return e.prototype.getWord=function(r){return Tx(this),Jr[r]},e.prototype.getWordIndex=function(r){return Tx(this),Jr.indexOf(r)},e.prototype.split=function(r){return pc.logger.checkNormalize(),r.split(/(?:\u3000| )+/g)},e.prototype.join=function(r){return r.join("\u3000")},e}(pc.Wordlist),Ex=new yS;Uo.langJa=Ex;pc.Wordlist.register(Ex)});var Px=V(Ho=>{"use strict";var IF=A(S()),wS=Ho&&Ho.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.langKo=void 0;var AS=Or(),Hd=$n(),SS=["OYAa","ATAZoATBl3ATCTrATCl8ATDloATGg3ATHT8ATJT8ATJl3ATLlvATLn4ATMT8ATMX8ATMboATMgoAToLbAToMTATrHgATvHnAT3AnAT3JbAT3MTAT8DbAT8JTAT8LmAT8MYAT8MbAT#LnAUHT8AUHZvAUJXrAUJX8AULnrAXJnvAXLUoAXLgvAXMn6AXRg3AXrMbAX3JTAX3QbAYLn3AZLgvAZrSUAZvAcAZ8AaAZ8AbAZ8AnAZ8HnAZ8LgAZ8MYAZ8MgAZ8OnAaAboAaDTrAaFTrAaJTrAaJboAaLVoAaMXvAaOl8AaSeoAbAUoAbAg8AbAl4AbGnrAbMT8AbMXrAbMn4AbQb8AbSV8AbvRlAb8AUAb8AnAb8HgAb8JTAb8NTAb8RbAcGboAcLnvAcMT8AcMX8AcSToAcrAaAcrFnAc8AbAc8MgAfGgrAfHboAfJnvAfLV8AfLkoAfMT8AfMnoAfQb8AfScrAfSgrAgAZ8AgFl3AgGX8AgHZvAgHgrAgJXoAgJX8AgJboAgLZoAgLn4AgOX8AgoATAgoAnAgoCUAgoJgAgoLXAgoMYAgoSeAgrDUAgrJTAhrFnAhrLjAhrQgAjAgoAjJnrAkMX8AkOnoAlCTvAlCV8AlClvAlFg4AlFl6AlFn3AloSnAlrAXAlrAfAlrFUAlrFbAlrGgAlrOXAlvKnAlvMTAl3AbAl3MnAnATrAnAcrAnCZ3AnCl8AnDg8AnFboAnFl3AnHX4AnHbrAnHgrAnIl3AnJgvAnLXoAnLX4AnLbrAnLgrAnLhrAnMXoAnMgrAnOn3AnSbrAnSeoAnvLnAn3OnCTGgvCTSlvCTvAUCTvKnCTvNTCT3CZCT3GUCT3MTCT8HnCUCZrCULf8CULnvCU3HnCU3JUCY6NUCbDb8CbFZoCbLnrCboOTCboScCbrFnCbvLnCb8AgCb8HgCb$LnCkLfoClBn3CloDUDTHT8DTLl3DTSU8DTrAaDTrLXDTrLjDTrOYDTrOgDTvFXDTvFnDT3HUDT3LfDUCT9DUDT4DUFVoDUFV8DUFkoDUGgrDUJnrDULl8DUMT8DUMXrDUMX4DUMg8DUOUoDUOgvDUOg8DUSToDUSZ8DbDXoDbDgoDbGT8DbJn3DbLg3DbLn4DbMXrDbMg8DbOToDboJXGTClvGTDT8GTFZrGTLVoGTLlvGTLl3GTMg8GTOTvGTSlrGToCUGTrDgGTrJYGTrScGTtLnGTvAnGTvQgGUCZrGUDTvGUFZoGUHXrGULnvGUMT8GUoMgGXoLnGXrMXGXrMnGXvFnGYLnvGZOnvGZvOnGZ8LaGZ8LmGbAl3GbDYvGbDlrGbHX3GbJl4GbLV8GbLn3GbMn4GboJTGboRfGbvFUGb3GUGb4JnGgDX3GgFl$GgJlrGgLX6GgLZoGgLf8GgOXoGgrAgGgrJXGgrMYGgrScGgvATGgvOYGnAgoGnJgvGnLZoGnLg3GnLnrGnQn8GnSbrGnrMgHTClvHTDToHTFT3HTQT8HToJTHToJgHTrDUHTrMnHTvFYHTvRfHT8MnHT8SUHUAZ8HUBb4HUDTvHUoMYHXFl6HXJX6HXQlrHXrAUHXrMnHXrSbHXvFYHXvKXHX3LjHX3MeHYvQlHZrScHZvDbHbAcrHbFT3HbFl3HbJT8HbLTrHbMT8HbMXrHbMbrHbQb8HbSX3HboDbHboJTHbrFUHbrHgHbrJTHb8JTHb8MnHb8QgHgAlrHgDT3HgGgrHgHgrHgJTrHgJT8HgLX@HgLnrHgMT8HgMX8HgMboHgOnrHgQToHgRg3HgoHgHgrCbHgrFnHgrLVHgvAcHgvAfHnAloHnCTrHnCnvHnGTrHnGZ8HnGnvHnJT8HnLf8HnLkvHnMg8HnRTrITvFUITvFnJTAXrJTCV8JTFT3JTFT8JTFn4JTGgvJTHT8JTJT8JTJXvJTJl3JTJnvJTLX4JTLf8JTLhvJTMT8JTMXrJTMnrJTObrJTQT8JTSlvJT8DUJT8FkJT8MTJT8OXJT8OgJT8QUJT8RfJUHZoJXFT4JXFlrJXGZ8JXGnrJXLV8JXLgvJXMXoJXMX3JXNboJXPlvJXoJTJXoLkJXrAXJXrHUJXrJgJXvJTJXvOnJX4KnJYAl3JYJT8JYLhvJYQToJYrQXJY6NUJbAl3JbCZrJbDloJbGT8JbGgrJbJXvJbJboJbLf8JbLhrJbLl3JbMnvJbRg8JbSZ8JboDbJbrCZJbrSUJb3KnJb8LnJfRn8JgAXrJgCZrJgDTrJgGZrJgGZ8JgHToJgJT8JgJXoJgJgvJgLX4JgLZ3JgLZ8JgLn4JgMgrJgMn4JgOgvJgPX6JgRnvJgSToJgoCZJgoJbJgoMYJgrJXJgrJgJgrLjJg6MTJlCn3JlGgvJlJl8Jl4AnJl8FnJl8HgJnAToJnATrJnAbvJnDUoJnGnrJnJXrJnJXvJnLhvJnLnrJnLnvJnMToJnMT8JnMXvJnMX3JnMg8JnMlrJnMn4JnOX8JnST4JnSX3JnoAgJnoAnJnoJTJnoObJnrAbJnrAkJnrHnJnrJTJnrJYJnrOYJnrScJnvCUJnvFaJnvJgJnvJnJnvOYJnvQUJnvRUJn3FnJn3JTKnFl3KnLT6LTDlvLTMnoLTOn3LTRl3LTSb4LTSlrLToAnLToJgLTrAULTrAcLTrCULTrHgLTrMgLT3JnLULnrLUMX8LUoJgLVATrLVDTrLVLb8LVoJgLV8MgLV8RTLXDg3LXFlrLXrCnLXrLXLX3GTLX4GgLX4OYLZAXrLZAcrLZAgrLZAhrLZDXyLZDlrLZFbrLZFl3LZJX6LZJX8LZLc8LZLnrLZSU8LZoJTLZoJnLZrAgLZrAnLZrJYLZrLULZrMgLZrSkLZvAnLZvGULZvJeLZvOTLZ3FZLZ4JXLZ8STLZ8ScLaAT3LaAl3LaHT8LaJTrLaJT8LaJXrLaJgvLaJl4LaLVoLaMXrLaMXvLaMX8LbClvLbFToLbHlrLbJn4LbLZ3LbLhvLbMXrLbMnoLbvSULcLnrLc8HnLc8MTLdrMnLeAgoLeOgvLeOn3LfAl3LfLnvLfMl3LfOX8Lf8AnLf8JXLf8LXLgJTrLgJXrLgJl8LgMX8LgRZrLhCToLhrAbLhrFULhrJXLhvJYLjHTrLjHX4LjJX8LjLhrLjSX3LjSZ4LkFX4LkGZ8LkGgvLkJTrLkMXoLkSToLkSU8LkSZ8LkoOYLl3FfLl3MgLmAZrLmCbrLmGgrLmHboLmJnoLmJn3LmLfoLmLhrLmSToLnAX6LnAb6LnCZ3LnCb3LnDTvLnDb8LnFl3LnGnrLnHZvLnHgvLnITvLnJT8LnJX8LnJlvLnLf8LnLg6LnLhvLnLnoLnMXrLnMg8LnQlvLnSbrLnrAgLnrAnLnrDbLnrFkLnrJdLnrMULnrOYLnrSTLnvAnLnvDULnvHgLnvOYLnvOnLn3GgLn4DULn4JTLn4JnMTAZoMTAloMTDb8MTFT8MTJnoMTJnrMTLZrMTLhrMTLkvMTMX8MTRTrMToATMTrDnMTrOnMT3JnMT4MnMT8FUMT8FaMT8FlMT8GTMT8GbMT8GnMT8HnMT8JTMT8JbMT8OTMUCl8MUJTrMUJU8MUMX8MURTrMUSToMXAX6MXAb6MXCZoMXFXrMXHXrMXLgvMXOgoMXrAUMXrAnMXrHgMXrJYMXrJnMXrMTMXrMgMXrOYMXrSZMXrSgMXvDUMXvOTMX3JgMX3OTMX4JnMX8DbMX8FnMX8HbMX8HgMX8HnMX8LbMX8MnMX8OnMYAb8MYGboMYHTvMYHX4MYLTrMYLnvMYMToMYOgvMYRg3MYSTrMbAToMbAXrMbAl3MbAn8MbGZ8MbJT8MbJXrMbMXvMbMX8MbMnoMbrMUMb8AfMb8FbMb8FkMcJXoMeLnrMgFl3MgGTvMgGXoMgGgrMgGnrMgHT8MgHZrMgJnoMgLnrMgLnvMgMT8MgQUoMgrHnMgvAnMg8HgMg8JYMg8LfMloJnMl8ATMl8AXMl8JYMnAToMnAT4MnAZ8MnAl3MnAl4MnCl8MnHT8MnHg8MnJnoMnLZoMnLhrMnMXoMnMX3MnMnrMnOgvMnrFbMnrFfMnrFnMnrNTMnvJXNTMl8OTCT3OTFV8OTFn3OTHZvOTJXrOTOl3OT3ATOT3JUOT3LZOT3LeOT3MbOT8ATOT8AbOT8AgOT8MbOUCXvOUMX3OXHXvOXLl3OXrMUOXvDbOX6NUOX8JbOYFZoOYLbrOYLkoOYMg8OYSX3ObHTrObHT4ObJgrObLhrObMX3ObOX8Ob8FnOeAlrOeJT8OeJXrOeJnrOeLToOeMb8OgJXoOgLXoOgMnrOgOXrOgOloOgoAgOgoJbOgoMYOgoSTOg8AbOjLX4OjMnoOjSV8OnLVoOnrAgOn3DUPXQlrPXvFXPbvFTPdAT3PlFn3PnvFbQTLn4QToAgQToMTQULV8QURg8QUoJnQXCXvQbFbrQb8AaQb8AcQb8FbQb8MYQb8ScQeAlrQeLhrQjAn3QlFXoQloJgQloSnRTLnvRTrGURTrJTRUJZrRUoJlRUrQnRZrLmRZrMnRZrSnRZ8ATRZ8JbRZ8ScRbMT8RbST3RfGZrRfMX8RfMgrRfSZrRnAbrRnGT8RnvJgRnvLfRnvMTRn8AaSTClvSTJgrSTOXrSTRg3STRnvSToAcSToAfSToAnSToHnSToLjSToMTSTrAaSTrEUST3BYST8AgST8LmSUAZvSUAgrSUDT4SUDT8SUGgvSUJXoSUJXvSULTrSU8JTSU8LjSV8AnSV8JgSXFToSXLf8SYvAnSZrDUSZrMUSZrMnSZ8HgSZ8JTSZ8JgSZ8MYSZ8QUSaQUoSbCT3SbHToSbQYvSbSl4SboJnSbvFbSb8HbSb8JgSb8OTScGZrScHgrScJTvScMT8ScSToScoHbScrMTScvAnSeAZrSeAcrSeHboSeJUoSeLhrSeMT8SeMXrSe6JgSgHTrSkJnoSkLnvSk8CUSlFl3SlrSnSl8GnSmAboSmGT8SmJU8","ATLnDlATrAZoATrJX4ATrMT8ATrMX4ATrRTrATvDl8ATvJUoATvMl8AT3AToAT3MX8AT8CT3AT8DT8AT8HZrAT8HgoAUAgFnAUCTFnAXoMX8AXrAT8AXrGgvAXrJXvAXrOgoAXvLl3AZvAgoAZvFbrAZvJXoAZvJl8AZvJn3AZvMX8AZvSbrAZ8FZoAZ8LZ8AZ8MU8AZ8OTvAZ8SV8AZ8SX3AbAgFZAboJnoAbvGboAb8ATrAb8AZoAb8AgrAb8Al4Ab8Db8Ab8JnoAb8LX4Ab8LZrAb8LhrAb8MT8Ab8OUoAb8Qb8Ab8ST8AcrAUoAcrAc8AcrCZ3AcrFT3AcrFZrAcrJl4AcrJn3AcrMX3AcrOTvAc8AZ8Ac8MT8AfAcJXAgoFn4AgoGgvAgoGnrAgoLc8AgoMXoAgrLnrAkrSZ8AlFXCTAloHboAlrHbrAlrLhrAlrLkoAl3CZrAl3LUoAl3LZrAnrAl4AnrMT8An3HT4BT3IToBX4MnvBb!Ln$CTGXMnCToLZ4CTrHT8CT3JTrCT3RZrCT#GTvCU6GgvCU8Db8CU8GZrCU8HT8CboLl3CbrGgrCbrMU8Cb8DT3Cb8GnrCb8LX4Cb8MT8Cb8ObrCgrGgvCgrKX4Cl8FZoDTrAbvDTrDboDTrGT6DTrJgrDTrMX3DTrRZrDTrRg8DTvAVvDTvFZoDT3DT8DT3Ln3DT4HZrDT4MT8DT8AlrDT8MT8DUAkGbDUDbJnDYLnQlDbDUOYDbMTAnDbMXSnDboAT3DboFn4DboLnvDj6JTrGTCgFTGTGgFnGTJTMnGTLnPlGToJT8GTrCT3GTrLVoGTrLnvGTrMX3GTrMboGTvKl3GZClFnGZrDT3GZ8DTrGZ8FZ8GZ8MXvGZ8On8GZ8ST3GbCnQXGbMbFnGboFboGboJg3GboMXoGb3JTvGb3JboGb3Mn6Gb3Qb8GgDXLjGgMnAUGgrDloGgrHX4GgrSToGgvAXrGgvAZvGgvFbrGgvLl3GgvMnvGnDnLXGnrATrGnrMboGnuLl3HTATMnHTAgCnHTCTCTHTrGTvHTrHTvHTrJX8HTrLl8HTrMT8HTrMgoHTrOTrHTuOn3HTvAZrHTvDTvHTvGboHTvJU8HTvLl3HTvMXrHTvQb4HT4GT6HT4JT8HT4Jb#HT8Al3HT8GZrHT8GgrHT8HX4HT8Jb8HT8JnoHT8LTrHT8LgvHT8SToHT8SV8HUoJUoHUoJX8HUoLnrHXrLZoHXvAl3HX3LnrHX4FkvHX4LhrHX4MXoHX4OnoHZrAZ8HZrDb8HZrGZ8HZrJnrHZvGZ8HZvLnvHZ8JnvHZ8LhrHbCXJlHbMTAnHboJl4HbpLl3HbrJX8HbrLnrHbrMnvHbvRYrHgoSTrHgrFV8HgrGZ8HgrJXoHgrRnvHgvBb!HgvGTrHgvHX4HgvHn!HgvLTrHgvSU8HnDnLbHnFbJbHnvDn8Hn6GgvHn!BTvJTCTLnJTQgFnJTrAnvJTrLX4JTrOUoJTvFn3JTvLnrJTvNToJT3AgoJT3Jn4JT3LhvJT3ObrJT8AcrJT8Al3JT8JT8JT8JnoJT8LX4JT8LnrJT8MX3JT8Rg3JT8Sc8JUoBTvJU8AToJU8GZ8JU8GgvJU8JTrJU8JXrJU8JnrJU8LnvJU8ScvJXHnJlJXrGgvJXrJU8JXrLhrJXrMT8JXrMXrJXrQUoJXvCTvJXvGZ8JXvGgrJXvQT8JX8Ab8JX8DT8JX8GZ8JX8HZvJX8LnrJX8MT8JX8MXoJX8MnvJX8ST3JYGnCTJbAkGbJbCTAnJbLTAcJboDT3JboLb6JbrAnvJbrCn3JbrDl8JbrGboJbrIZoJbrJnvJbrMnvJbrQb4Jb8RZrJeAbAnJgJnFbJgScAnJgrATrJgvHZ8JgvMn4JlJlFbJlLiQXJlLjOnJlRbOlJlvNXoJlvRl3Jl4AcrJl8AUoJl8MnrJnFnMlJnHgGbJnoDT8JnoFV8JnoGgvJnoIT8JnoQToJnoRg3JnrCZ3JnrGgrJnrHTvJnrLf8JnrOX8JnvAT3JnvFZoJnvGT8JnvJl4JnvMT8JnvMX8JnvOXrJnvPX6JnvSX3JnvSZrJn3MT8Jn3MX8Jn3RTrLTATKnLTJnLTLTMXKnLTRTQlLToGb8LTrAZ8LTrCZ8LTrDb8LTrHT8LT3PX6LT4FZoLT$CTvLT$GgrLUvHX3LVoATrLVoAgoLVoJboLVoMX3LVoRg3LV8CZ3LV8FZoLV8GTvLXrDXoLXrFbrLXvAgvLXvFlrLXvLl3LXvRn6LX4Mb8LX8GT8LYCXMnLYrMnrLZoSTvLZrAZvLZrAloLZrFToLZrJXvLZrJboLZrJl4LZrLnrLZrMT8LZrOgvLZrRnvLZrST4LZvMX8LZvSlvLZ8AgoLZ8CT3LZ8JT8LZ8LV8LZ8LZoLZ8Lg8LZ8SV8LZ8SbrLZ$HT8LZ$Mn4La6CTvLbFbMnLbRYFTLbSnFZLboJT8LbrAT9LbrGb3LbrQb8LcrJX8LcrMXrLerHTvLerJbrLerNboLgrDb8LgrGZ8LgrHTrLgrMXrLgrSU8LgvJTrLgvLl3Lg6Ll3LhrLnrLhrMT8LhvAl4LiLnQXLkoAgrLkoJT8LkoJn4LlrSU8Ll3FZoLl3HTrLl3JX8Ll3JnoLl3LToLmLeFbLnDUFbLnLVAnLnrATrLnrAZoLnrAb8LnrAlrLnrGgvLnrJU8LnrLZrLnrLhrLnrMb8LnrOXrLnrSZ8LnvAb4LnvDTrLnvDl8LnvHTrLnvHbrLnvJT8LnvJU8LnvJbrLnvLhvLnvMX8LnvMb8LnvNnoLnvSU8Ln3Al3Ln4FZoLn4GT6Ln4JgvLn4LhrLn4MT8Ln4SToMToCZrMToJX8MToLX4MToLf8MToRg3MTrEloMTvGb6MT3BTrMT3Lb6MT8AcrMT8AgrMT8GZrMT8JnoMT8LnrMT8MX3MUOUAnMXAbFnMXoAloMXoJX8MXoLf8MXoLl8MXrAb8MXrDTvMXrGT8MXrGgrMXrHTrMXrLf8MXrMU8MXrOXvMXrQb8MXvGT8MXvHTrMXvLVoMX3AX3MX3Jn3MX3LhrMX3MX3MX4AlrMX4OboMX8GTvMX8GZrMX8GgrMX8JT8MX8JX8MX8LhrMX8MT8MYDUFbMYMgDbMbGnFfMbvLX4MbvLl3Mb8Mb8Mb8ST4MgGXCnMg8ATrMg8AgoMg8CZrMg8DTrMg8DboMg8HTrMg8JgrMg8LT8MloJXoMl8AhrMl8JT8MnLgAUMnoJXrMnoLX4MnoLhrMnoMT8MnrAl4MnrDb8MnrOTvMnrOgvMnrQb8MnrSU8MnvGgrMnvHZ8Mn3MToMn4DTrMn4LTrMn4Mg8NnBXAnOTFTFnOToAToOTrGgvOTrJX8OT3JXoOT6MTrOT8GgrOT8HTpOT8MToOUoHT8OUoJT8OUoLn3OXrAgoOXrDg8OXrMT8OXvSToOX6CTvOX8CZrOX8OgrOb6HgvOb8AToOb8MT8OcvLZ8OgvAlrOgvHTvOgvJTrOgvJnrOgvLZrOgvLn4OgvMT8OgvRTrOg8AZoOg8DbvOnrOXoOnvJn4OnvLhvOnvRTrOn3GgoOn3JnvOn6JbvOn8OTrPTGYFTPbBnFnPbGnDnPgDYQTPlrAnvPlrETvPlrLnvPlrMXvPlvFX4QTMTAnQTrJU8QYCnJlQYJlQlQbGTQbQb8JnrQb8LZoQb8LnvQb8MT8Qb8Ml8Qb8ST4QloAl4QloHZvQloJX8QloMn8QnJZOlRTrAZvRTrDTrRTvJn4RTvLhvRT4Jb8RZrAZrRZ8AkrRZ8JU8RZ8LV8RZ8LnvRbJlQXRg3GboRg3MnvRg8AZ8Rg8JboRg8Jl4RnLTCbRnvFl3RnvQb8SToAl4SToCZrSToFZoSToHXrSToJU8SToJgvSToJl4SToLhrSToMX3STrAlvSTrCT9STrCgrSTrGgrSTrHXrSTrHboSTrJnoSTrNboSTvLnrST4AZoST8Ab8ST8JT8SUoJn3SU6HZ#SU6JTvSU8Db8SU8HboSU8LgrSV8JT8SZrAcrSZrAl3SZrJT8SZrJnvSZrMT8SZvLUoSZ4FZoSZ8JnoSZ8RZrScoLnrScoMT8ScoMX8ScrAT4ScrAZ8ScrLZ8ScrLkvScvDb8ScvLf8ScvNToSgrFZrShvKnrSloHUoSloLnrSlrMXoSl8HgrSmrJUoSn3BX6","ATFlOn3ATLgrDYAT4MTAnAT8LTMnAYJnRTrAbGgJnrAbLV8LnAbvNTAnAeFbLg3AgOYMXoAlQbFboAnDboAfAnJgoJTBToDgAnBUJbAl3BboDUAnCTDlvLnCTFTrSnCYoQTLnDTwAbAnDUDTrSnDUHgHgrDX8LXFnDbJXAcrETvLTLnGTFTQbrGTMnGToGT3DUFbGUJlPX3GbQg8LnGboJbFnGb3GgAYGgAg8ScGgMbAXrGgvAbAnGnJTLnvGnvATFgHTDT6ATHTrDlJnHYLnMn8HZrSbJTHZ8LTFnHbFTJUoHgSeMT8HgrLjAnHgvAbAnHlFUrDlHnDgvAnHnHTFT3HnQTGnrJTAaMXvJTGbCn3JTOgrAnJXvAXMnJbMg8SnJbMnRg3Jb8LTMnJnAl3OnJnGYrQlJnJlQY3LTDlCn3LTJjLg3LTLgvFXLTMg3GTLV8HUOgLXFZLg3LXNXrMnLX8QXFnLX9AlMYLYLXPXrLZAbJU8LZDUJU8LZMXrSnLZ$AgFnLaPXrDULbFYrMnLbMn8LXLboJgJgLeFbLg3LgLZrSnLgOYAgoLhrRnJlLkCTrSnLkOnLhrLnFX%AYLnFZoJXLnHTvJbLnLloAbMTATLf8MTHgJn3MTMXrAXMT3MTFnMUITvFnMXFX%AYMXMXvFbMXrFTDbMYAcMX3MbLf8SnMb8JbFnMgMXrMTMgvAXFnMgvGgCmMnAloSnMnFnJTrOXvMXSnOX8HTMnObJT8ScObLZFl3ObMXCZoPTLgrQXPUFnoQXPU3RXJlPX3RkQXPbrJXQlPlrJbFnQUAhrDbQXGnCXvQYLnHlvQbLfLnvRTOgvJbRXJYrQlRYLnrQlRbLnrQlRlFT8JlRlFnrQXSTClCn3STHTrAnSTLZQlrSTMnGTrSToHgGbSTrGTDnSTvGXCnST3HgFbSU3HXAXSbAnJn3SbFT8LnScLfLnv","AT3JgJX8AT8FZoSnAT8JgFV8AT8LhrDbAZ8JT8DbAb8GgLhrAb8SkLnvAe8MT8SnAlMYJXLVAl3GYDTvAl3LfLnvBUDTvLl3CTOn3HTrCT3DUGgrCU8MT8AbCbFTrJUoCgrDb8MTDTLV8JX8DTLnLXQlDT8LZrSnDUQb8FZ8DUST4JnvDb8ScOUoDj6GbJl4GTLfCYMlGToAXvFnGboAXvLnGgAcrJn3GgvFnSToGnLf8JnvGn#HTDToHTLnFXJlHTvATFToHTvHTDToHTvMTAgoHT3STClvHT4AlFl6HT8HTDToHUoDgJTrHUoScMX3HbRZrMXoHboJg8LTHgDb8JTrHgMToLf8HgvLnLnoHnHn3HT4Hn6MgvAnJTJU8ScvJT3AaQT8JT8HTrAnJXrRg8AnJbAloMXoJbrATFToJbvMnoSnJgDb6GgvJgDb8MXoJgSX3JU8JguATFToJlPYLnQlJlQkDnLbJlQlFYJlJl8Lf8OTJnCTFnLbJnLTHXMnJnLXGXCnJnoFfRg3JnrMYRg3Jn3HgFl3KT8Dg8LnLTRlFnPTLTvPbLbvLVoSbrCZLXMY6HT3LXNU7DlrLXNXDTATLX8DX8LnLZDb8JU8LZMnoLhrLZSToJU8LZrLaLnrLZvJn3SnLZ8LhrSnLaJnoMT8LbFlrHTvLbrFTLnrLbvATLlvLb6OTFn3LcLnJZOlLeAT6Mn4LeJT3ObrLg6LXFlrLhrJg8LnLhvDlPX4LhvLfLnvLj6JTFT3LnFbrMXoLnQluCTvLnrQXCY6LnvLfLnvLnvMgLnvLnvSeLf8MTMbrJn3MT3JgST3MT8AnATrMT8LULnrMUMToCZrMUScvLf8MXoDT8SnMX6ATFToMX8AXMT8MX8FkMT8MX8HTrDUMX8ScoSnMYJT6CTvMgAcrMXoMg8SToAfMlvAXLg3MnFl3AnvOT3AnFl3OUoATHT8OU3RnLXrOXrOXrSnObPbvFn6Og8HgrSnOg8OX8DbPTvAgoJgPU3RYLnrPXrDnJZrPb8CTGgvPlrLTDlvPlvFUJnoQUvFXrQlQeMnoAl3QlrQlrSnRTFTrJUoSTDlLiLXSTFg6HT3STJgoMn4STrFTJTrSTrLZFl3ST4FnMXoSUrDlHUoScvHTvSnSfLkvMXo","AUoAcrMXoAZ8HboAg8AbOg6ATFgAg8AloMXoAl3AT8JTrAl8MX8MXoCT3SToJU8Cl8Db8MXoDT8HgrATrDboOT8MXoGTOTrATMnGT8LhrAZ8GnvFnGnQXHToGgvAcrHTvAXvLl3HbrAZoMXoHgBlFXLg3HgMnFXrSnHgrSb8JUoHn6HT8LgvITvATrJUoJUoLZrRnvJU8HT8Jb8JXvFX8QT8JXvLToJTrJYrQnGnQXJgrJnoATrJnoJU8ScvJnvMnvMXoLTCTLgrJXLTJlRTvQlLbRnJlQYvLbrMb8LnvLbvFn3RnoLdCVSTGZrLeSTvGXCnLg3MnoLn3MToLlrETvMT8SToAl3MbrDU6GTvMb8LX4LhrPlrLXGXCnSToLf8Rg3STrDb8LTrSTvLTHXMnSb3RYLnMnSgOg6ATFg","HUDlGnrQXrJTrHgLnrAcJYMb8DULc8LTvFgGnCk3Mg8JbAnLX4QYvFYHnMXrRUoJnGnvFnRlvFTJlQnoSTrBXHXrLYSUJgLfoMT8Se8DTrHbDb","AbDl8SToJU8An3RbAb8ST8DUSTrGnrAgoLbFU6Db8LTrMg8AaHT8Jb8ObDl8SToJU8Pb3RlvFYoJl"],MS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*";function TS(t){return t>=40?t=t+168-40:t>=19&&(t=t+97-19),(0,AS.toUtf8String)([225,(t>>6)+132,(t&63)+128])}var La=null;function Bx(t){if(La==null&&(La=[],SS.forEach(function(e,r){r+=4;for(var n=0;n<e.length;n+=r){for(var i="",a=0;a<r;a++)i+=TS(MS.indexOf(e[n+a]));La.push(i)}}),La.sort(),Hd.Wordlist.check(t)!=="0xf9eddeace9c5d3da9c93cf7d3cd38f6a13ed3affb933259ae865714e8a3ae71a"))throw La=null,new Error("BIP39 Wordlist for ko (Korean) FAILED")}var ES=function(t){wS(e,t);function e(){return t.call(this,"ko")||this}return e.prototype.getWord=function(r){return Bx(this),La[r]},e.prototype.getWordIndex=function(r){return Bx(this),La.indexOf(r)},e}(Hd.Wordlist),Cx=new ES;Ho.langKo=Cx;Hd.Wordlist.register(Cx)});var Fx=V(qo=>{"use strict";var kF=A(S()),_S=qo&&qo.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qo,"__esModule",{value:!0});qo.langIt=void 0;var qd=$n(),BS="AbacoAbbaglioAbbinatoAbeteAbissoAbolireAbrasivoAbrogatoAccadereAccennoAccusatoAcetoneAchilleAcidoAcquaAcreAcrilicoAcrobataAcutoAdagioAddebitoAddomeAdeguatoAderireAdipeAdottareAdulareAffabileAffettoAffissoAffrantoAforismaAfosoAfricanoAgaveAgenteAgevoleAggancioAgireAgitareAgonismoAgricoloAgrumetoAguzzoAlabardaAlatoAlbatroAlberatoAlboAlbumeAlceAlcolicoAlettoneAlfaAlgebraAlianteAlibiAlimentoAllagatoAllegroAllievoAllodolaAllusivoAlmenoAlogenoAlpacaAlpestreAltalenaAlternoAlticcioAltroveAlunnoAlveoloAlzareAmalgamaAmanitaAmarenaAmbitoAmbratoAmebaAmericaAmetistaAmicoAmmassoAmmendaAmmirareAmmonitoAmoreAmpioAmpliareAmuletoAnacardoAnagrafeAnalistaAnarchiaAnatraAncaAncellaAncoraAndareAndreaAnelloAngeloAngolareAngustoAnimaAnnegareAnnidatoAnnoAnnuncioAnonimoAnticipoAnziApaticoAperturaApodeApparireAppetitoAppoggioApprodoAppuntoAprileArabicaArachideAragostaAraldicaArancioAraturaArazzoArbitroArchivioArditoArenileArgentoArgineArgutoAriaArmoniaArneseArredatoArringaArrostoArsenicoArsoArteficeArzilloAsciuttoAscoltoAsepsiAsetticoAsfaltoAsinoAsolaAspiratoAsproAssaggioAsseAssolutoAssurdoAstaAstenutoAsticeAstrattoAtavicoAteismoAtomicoAtonoAttesaAttivareAttornoAttritoAttualeAusilioAustriaAutistaAutonomoAutunnoAvanzatoAvereAvvenireAvvisoAvvolgereAzioneAzotoAzzimoAzzurroBabeleBaccanoBacinoBacoBadessaBadilataBagnatoBaitaBalconeBaldoBalenaBallataBalzanoBambinoBandireBaraondaBarbaroBarcaBaritonoBarlumeBaroccoBasilicoBassoBatostaBattutoBauleBavaBavosaBeccoBeffaBelgioBelvaBendaBenevoleBenignoBenzinaBereBerlinaBetaBibitaBiciBidoneBifidoBigaBilanciaBimboBinocoloBiologoBipedeBipolareBirbanteBirraBiscottoBisestoBisnonnoBisonteBisturiBizzarroBlandoBlattaBollitoBonificoBordoBoscoBotanicoBottinoBozzoloBraccioBradipoBramaBrancaBravuraBretellaBrevettoBrezzaBrigliaBrillanteBrindareBroccoloBrodoBronzinaBrulloBrunoBubboneBucaBudinoBuffoneBuioBulboBuonoBurloneBurrascaBussolaBustaCadettoCaducoCalamaroCalcoloCalesseCalibroCalmoCaloriaCambusaCamerataCamiciaCamminoCamolaCampaleCanapaCandelaCaneCaninoCanottoCantinaCapaceCapelloCapitoloCapogiroCapperoCapraCapsulaCarapaceCarcassaCardoCarismaCarovanaCarrettoCartolinaCasaccioCascataCasermaCasoCassoneCastelloCasualeCatastaCatenaCatrameCautoCavilloCedibileCedrataCefaloCelebreCellulareCenaCenoneCentesimoCeramicaCercareCertoCerumeCervelloCesoiaCespoCetoChelaChiaroChiccaChiedereChimeraChinaChirurgoChitarraCiaoCiclismoCifrareCignoCilindroCiottoloCircaCirrosiCitricoCittadinoCiuffoCivettaCivileClassicoClinicaCloroCoccoCodardoCodiceCoerenteCognomeCollareColmatoColoreColposoColtivatoColzaComaCometaCommandoComodoComputerComuneConcisoCondurreConfermaCongelareConiugeConnessoConoscereConsumoContinuoConvegnoCopertoCopioneCoppiaCopricapoCorazzaCordataCoricatoCorniceCorollaCorpoCorredoCorsiaCorteseCosmicoCostanteCotturaCovatoCratereCravattaCreatoCredereCremosoCrescitaCretaCricetoCrinaleCrisiCriticoCroceCronacaCrostataCrucialeCruscaCucireCuculoCuginoCullatoCupolaCuratoreCursoreCurvoCuscinoCustodeDadoDainoDalmataDamerinoDanielaDannosoDanzareDatatoDavantiDavveroDebuttoDecennioDecisoDeclinoDecolloDecretoDedicatoDefinitoDeformeDegnoDelegareDelfinoDelirioDeltaDemenzaDenotatoDentroDepositoDerapataDerivareDerogaDescrittoDesertoDesiderioDesumereDetersivoDevotoDiametroDicembreDiedroDifesoDiffusoDigerireDigitaleDiluvioDinamicoDinnanziDipintoDiplomaDipoloDiradareDireDirottoDirupoDisagioDiscretoDisfareDisgeloDispostoDistanzaDisumanoDitoDivanoDiveltoDividereDivoratoDobloneDocenteDoganaleDogmaDolceDomatoDomenicaDominareDondoloDonoDormireDoteDottoreDovutoDozzinaDragoDruidoDubbioDubitareDucaleDunaDuomoDupliceDuraturoEbanoEccessoEccoEclissiEconomiaEderaEdicolaEdileEditoriaEducareEgemoniaEgliEgoismoEgregioElaboratoElargireEleganteElencatoElettoElevareElficoElicaElmoElsaElusoEmanatoEmblemaEmessoEmiroEmotivoEmozioneEmpiricoEmuloEndemicoEnduroEnergiaEnfasiEnotecaEntrareEnzimaEpatiteEpilogoEpisodioEpocaleEppureEquatoreErarioErbaErbosoEredeEremitaErigereErmeticoEroeErosivoErranteEsagonoEsameEsanimeEsaudireEscaEsempioEsercitoEsibitoEsigenteEsistereEsitoEsofagoEsortatoEsosoEspansoEspressoEssenzaEssoEstesoEstimareEstoniaEstrosoEsultareEtilicoEtnicoEtruscoEttoEuclideoEuropaEvasoEvidenzaEvitatoEvolutoEvvivaFabbricaFaccendaFachiroFalcoFamigliaFanaleFanfaraFangoFantasmaFareFarfallaFarinosoFarmacoFasciaFastosoFasulloFaticareFatoFavolosoFebbreFecolaFedeFegatoFelpaFeltroFemminaFendereFenomenoFermentoFerroFertileFessuraFestivoFettaFeudoFiabaFiduciaFifaFiguratoFiloFinanzaFinestraFinireFioreFiscaleFisicoFiumeFlaconeFlamencoFleboFlemmaFloridoFluenteFluoroFobicoFocacciaFocosoFoderatoFoglioFolataFolcloreFolgoreFondenteFoneticoFoniaFontanaForbitoForchettaForestaFormicaFornaioForoFortezzaForzareFosfatoFossoFracassoFranaFrassinoFratelloFreccettaFrenataFrescoFrigoFrollinoFrondeFrugaleFruttaFucilataFucsiaFuggenteFulmineFulvoFumanteFumettoFumosoFuneFunzioneFuocoFurboFurgoneFuroreFusoFutileGabbianoGaffeGalateoGallinaGaloppoGamberoGammaGaranziaGarboGarofanoGarzoneGasdottoGasolioGastricoGattoGaudioGazeboGazzellaGecoGelatinaGelsoGemelloGemmatoGeneGenitoreGennaioGenotipoGergoGhepardoGhiaccioGhisaGialloGildaGineproGiocareGioielloGiornoGioveGiratoGironeGittataGiudizioGiuratoGiustoGlobuloGlutineGnomoGobbaGolfGomitoGommoneGonfioGonnaGovernoGracileGradoGraficoGrammoGrandeGrattareGravosoGraziaGrecaGreggeGrifoneGrigioGrinzaGrottaGruppoGuadagnoGuaioGuantoGuardareGufoGuidareIbernatoIconaIdenticoIdillioIdoloIdraIdricoIdrogenoIgieneIgnaroIgnoratoIlareIllesoIllogicoIlludereImballoImbevutoImboccoImbutoImmaneImmersoImmolatoImpaccoImpetoImpiegoImportoImprontaInalareInarcareInattivoIncantoIncendioInchinoIncisivoInclusoIncontroIncrocioIncuboIndagineIndiaIndoleIneditoInfattiInfilareInflittoIngaggioIngegnoIngleseIngordoIngrossoInnescoInodoreInoltrareInondatoInsanoInsettoInsiemeInsonniaInsulinaIntasatoInteroIntonacoIntuitoInumidireInvalidoInveceInvitoIperboleIpnoticoIpotesiIppicaIrideIrlandaIronicoIrrigatoIrrorareIsolatoIsotopoIstericoIstitutoIstriceItaliaIterareLabbroLabirintoLaccaLaceratoLacrimaLacunaLaddoveLagoLampoLancettaLanternaLardosoLargaLaringeLastraLatenzaLatinoLattugaLavagnaLavoroLegaleLeggeroLemboLentezzaLenzaLeoneLepreLesivoLessatoLestoLetteraleLevaLevigatoLiberoLidoLievitoLillaLimaturaLimitareLimpidoLineareLinguaLiquidoLiraLiricaLiscaLiteLitigioLivreaLocandaLodeLogicaLombareLondraLongevoLoquaceLorenzoLotoLotteriaLuceLucidatoLumacaLuminosoLungoLupoLuppoloLusingaLussoLuttoMacabroMacchinaMaceroMacinatoMadamaMagicoMagliaMagneteMagroMaiolicaMalafedeMalgradoMalintesoMalsanoMaltoMalumoreManaManciaMandorlaMangiareManifestoMannaroManovraMansardaMantideManubrioMappaMaratonaMarcireMarettaMarmoMarsupioMascheraMassaiaMastinoMaterassoMatricolaMattoneMaturoMazurcaMeandroMeccanicoMecenateMedesimoMeditareMegaMelassaMelisMelodiaMeningeMenoMensolaMercurioMerendaMerloMeschinoMeseMessereMestoloMetalloMetodoMettereMiagolareMicaMicelioMicheleMicroboMidolloMieleMiglioreMilanoMiliteMimosaMineraleMiniMinoreMirinoMirtilloMiscelaMissivaMistoMisurareMitezzaMitigareMitraMittenteMnemonicoModelloModificaModuloMoganoMogioMoleMolossoMonasteroMoncoMondinaMonetarioMonileMonotonoMonsoneMontatoMonvisoMoraMordereMorsicatoMostroMotivatoMotosegaMottoMovenzaMovimentoMozzoMuccaMucosaMuffaMughettoMugnaioMulattoMulinelloMultiploMummiaMuntoMuovereMuraleMusaMuscoloMusicaMutevoleMutoNababboNaftaNanometroNarcisoNariceNarratoNascereNastrareNaturaleNauticaNaviglioNebulosaNecrosiNegativoNegozioNemmenoNeofitaNerettoNervoNessunoNettunoNeutraleNeveNevroticoNicchiaNinfaNitidoNobileNocivoNodoNomeNominaNordicoNormaleNorvegeseNostranoNotareNotiziaNotturnoNovellaNucleoNullaNumeroNuovoNutrireNuvolaNuzialeOasiObbedireObbligoObeliscoOblioOboloObsoletoOccasioneOcchioOccidenteOccorrereOccultareOcraOculatoOdiernoOdorareOffertaOffrireOffuscatoOggettoOggiOgnunoOlandeseOlfattoOliatoOlivaOlogrammaOltreOmaggioOmbelicoOmbraOmegaOmissioneOndosoOnereOniceOnnivoroOnorevoleOntaOperatoOpinioneOppostoOracoloOrafoOrdineOrecchinoOreficeOrfanoOrganicoOrigineOrizzonteOrmaOrmeggioOrnativoOrologioOrrendoOrribileOrtensiaOrticaOrzataOrzoOsareOscurareOsmosiOspedaleOspiteOssaOssidareOstacoloOsteOtiteOtreOttagonoOttimoOttobreOvaleOvestOvinoOviparoOvocitoOvunqueOvviareOzioPacchettoPacePacificoPadellaPadronePaesePagaPaginaPalazzinaPalesarePallidoPaloPaludePandoroPannelloPaoloPaonazzoPapricaParabolaParcellaParerePargoloPariParlatoParolaPartireParvenzaParzialePassivoPasticcaPataccaPatologiaPattumePavonePeccatoPedalarePedonalePeggioPelosoPenarePendicePenisolaPennutoPenombraPensarePentolaPepePepitaPerbenePercorsoPerdonatoPerforarePergamenaPeriodoPermessoPernoPerplessoPersuasoPertugioPervasoPesatorePesistaPesoPestiferoPetaloPettinePetulantePezzoPiacerePiantaPiattinoPiccinoPicozzaPiegaPietraPifferoPigiamaPigolioPigroPilaPiliferoPillolaPilotaPimpantePinetaPinnaPinoloPioggiaPiomboPiramidePireticoPiritePirolisiPitonePizzicoPlaceboPlanarePlasmaPlatanoPlenarioPochezzaPoderosoPodismoPoesiaPoggiarePolentaPoligonoPollicePolmonitePolpettaPolsoPoltronaPolverePomicePomodoroPontePopolosoPorfidoPorosoPorporaPorrePortataPosaPositivoPossessoPostulatoPotassioPoterePranzoPrassiPraticaPreclusoPredicaPrefissoPregiatoPrelievoPremerePrenotarePreparatoPresenzaPretestoPrevalsoPrimaPrincipePrivatoProblemaProcuraProdurreProfumoProgettoProlungaPromessaPronomePropostaProrogaProtesoProvaPrudentePrugnaPruritoPsichePubblicoPudicaPugilatoPugnoPulcePulitoPulsantePuntarePupazzoPupillaPuroQuadroQualcosaQuasiQuerelaQuotaRaccoltoRaddoppioRadicaleRadunatoRafficaRagazzoRagioneRagnoRamarroRamingoRamoRandagioRantolareRapatoRapinaRappresoRasaturaRaschiatoRasenteRassegnaRastrelloRataRavvedutoRealeRecepireRecintoReclutaReconditoRecuperoRedditoRedimereRegalatoRegistroRegolaRegressoRelazioneRemareRemotoRennaReplicaReprimereReputareResaResidenteResponsoRestauroReteRetinaRetoricaRettificaRevocatoRiassuntoRibadireRibelleRibrezzoRicaricaRiccoRicevereRiciclatoRicordoRicredutoRidicoloRidurreRifasareRiflessoRiformaRifugioRigareRigettatoRighelloRilassatoRilevatoRimanereRimbalzoRimedioRimorchioRinascitaRincaroRinforzoRinnovoRinomatoRinsavitoRintoccoRinunciaRinvenireRiparatoRipetutoRipienoRiportareRipresaRipulireRisataRischioRiservaRisibileRisoRispettoRistoroRisultatoRisvoltoRitardoRitegnoRitmicoRitrovoRiunioneRivaRiversoRivincitaRivoltoRizomaRobaRoboticoRobustoRocciaRocoRodaggioRodereRoditoreRogitoRollioRomanticoRompereRonzioRosolareRospoRotanteRotondoRotulaRovescioRubizzoRubricaRugaRullinoRumineRumorosoRuoloRupeRussareRusticoSabatoSabbiareSabotatoSagomaSalassoSaldaturaSalgemmaSalivareSalmoneSaloneSaltareSalutoSalvoSapereSapidoSaporitoSaracenoSarcasmoSartoSassosoSatelliteSatiraSatolloSaturnoSavanaSavioSaziatoSbadiglioSbalzoSbancatoSbarraSbattereSbavareSbendareSbirciareSbloccatoSbocciatoSbrinareSbruffoneSbuffareScabrosoScadenzaScalaScambiareScandaloScapolaScarsoScatenareScavatoSceltoScenicoScettroSchedaSchienaSciarpaScienzaScindereScippoSciroppoScivoloSclerareScodellaScolpitoScompartoSconfortoScoprireScortaScossoneScozzeseScribaScrollareScrutinioScuderiaScultoreScuolaScuroScusareSdebitareSdoganareSeccaturaSecondoSedanoSeggiolaSegnalatoSegregatoSeguitoSelciatoSelettivoSellaSelvaggioSemaforoSembrareSemeSeminatoSempreSensoSentireSepoltoSequenzaSerataSerbatoSerenoSerioSerpenteSerraglioServireSestinaSetolaSettimanaSfaceloSfaldareSfamatoSfarzosoSfaticatoSferaSfidaSfilatoSfingeSfocatoSfoderareSfogoSfoltireSforzatoSfrattoSfruttatoSfuggitoSfumareSfusoSgabelloSgarbatoSgonfiareSgorbioSgrassatoSguardoSibiloSiccomeSierraSiglaSignoreSilenzioSillabaSimboloSimpaticoSimulatoSinfoniaSingoloSinistroSinoSintesiSinusoideSiparioSismaSistoleSituatoSlittaSlogaturaSlovenoSmarritoSmemoratoSmentitoSmeraldoSmilzoSmontareSmottatoSmussatoSnellireSnervatoSnodoSobbalzoSobrioSoccorsoSocialeSodaleSoffittoSognoSoldatoSolenneSolidoSollazzoSoloSolubileSolventeSomaticoSommaSondaSonettoSonniferoSopireSoppesoSopraSorgereSorpassoSorrisoSorsoSorteggioSorvolatoSospiroSostaSottileSpadaSpallaSpargereSpatolaSpaventoSpazzolaSpecieSpedireSpegnereSpelaturaSperanzaSpessoreSpettraleSpezzatoSpiaSpigolosoSpillatoSpinosoSpiraleSplendidoSportivoSposoSprangaSprecareSpronatoSpruzzoSpuntinoSquilloSradicareSrotolatoStabileStaccoStaffaStagnareStampatoStantioStarnutoStaseraStatutoSteloSteppaSterzoStilettoStimaStirpeStivaleStizzosoStonatoStoricoStrappoStregatoStriduloStrozzareStruttoStuccareStufoStupendoSubentroSuccosoSudoreSuggeritoSugoSultanoSuonareSuperboSupportoSurgelatoSurrogatoSussurroSuturaSvagareSvedeseSveglioSvelareSvenutoSveziaSviluppoSvistaSvizzeraSvoltaSvuotareTabaccoTabulatoTacciareTaciturnoTaleTalismanoTamponeTanninoTaraTardivoTargatoTariffaTarpareTartarugaTastoTatticoTavernaTavolataTazzaTecaTecnicoTelefonoTemerarioTempoTemutoTendoneTeneroTensioneTentacoloTeoremaTermeTerrazzoTerzettoTesiTesseratoTestatoTetroTettoiaTifareTigellaTimbroTintoTipicoTipografoTiraggioTiroTitanioTitoloTitubanteTizioTizzoneToccareTollerareToltoTombolaTomoTonfoTonsillaTopazioTopologiaToppaTorbaTornareTorroneTortoraToscanoTossireTostaturaTotanoTraboccoTracheaTrafilaTragediaTralcioTramontoTransitoTrapanoTrarreTraslocoTrattatoTraveTrecciaTremolioTrespoloTributoTrichecoTrifoglioTrilloTrinceaTrioTristezzaTrituratoTrivellaTrombaTronoTroppoTrottolaTrovareTruccatoTubaturaTuffatoTulipanoTumultoTunisiaTurbareTurchinoTutaTutelaUbicatoUccelloUccisoreUdireUditivoUffaUfficioUgualeUlisseUltimatoUmanoUmileUmorismoUncinettoUngereUnghereseUnicornoUnificatoUnisonoUnitarioUnteUovoUpupaUraganoUrgenzaUrloUsanzaUsatoUscitoUsignoloUsuraioUtensileUtilizzoUtopiaVacanteVaccinatoVagabondoVagliatoValangaValgoValicoVallettaValorosoValutareValvolaVampataVangareVanitosoVanoVantaggioVanveraVaporeVaranoVarcatoVarianteVascaVedettaVedovaVedutoVegetaleVeicoloVelcroVelinaVellutoVeloceVenatoVendemmiaVentoVeraceVerbaleVergognaVerificaVeroVerrucaVerticaleVescicaVessilloVestaleVeteranoVetrinaVetustoViandanteVibranteVicendaVichingoVicinanzaVidimareVigiliaVignetoVigoreVileVillanoViminiVincitoreViolaViperaVirgolaVirologoVirulentoViscosoVisioneVispoVissutoVisuraVitaVitelloVittimaVivandaVividoViziareVoceVogaVolatileVolereVolpeVoragineVulcanoZampognaZannaZappatoZatteraZavorraZefiroZelanteZeloZenzeroZerbinoZibettoZincoZirconeZittoZollaZoticoZuccheroZufoloZuluZuppa",Zs=null;function Lx(t){if(Zs==null&&(Zs=BS.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),qd.Wordlist.check(t)!=="0x5c1362d88fd4cf614a96f3234941d29f7d37c08c5292fde03bf62c2db6ff7620"))throw Zs=null,new Error("BIP39 Wordlist for it (Italian) FAILED")}var CS=function(t){_S(e,t);function e(){return t.call(this,"it")||this}return e.prototype.getWord=function(r){return Lx(this),Zs[r]},e.prototype.getWordIndex=function(r){return Lx(this),Zs.indexOf(r)},e}(qd.Wordlist),Rx=new CS;qo.langIt=Rx;qd.Wordlist.register(Rx)});var kx=V(Wi=>{"use strict";var JF=A(S()),PS=Wi&&Wi.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Wi,"__esModule",{value:!0});Wi.langZhTw=Wi.langZhCn=void 0;var LS=Or(),Vs=$n(),Gd="}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN<di,AM=W5%QO&ka&ua,hM^tm=zV=JA=wR&+X]7P&NB#4J#5L|/b[dA}tJ<Do&6m&u2[U1&Kb.HM&mC=w0&MW<rY,Hq#6M}QG,13&wP}Jp]Ow%ue&Kg<HP<D9~4k~9T&I2_c6$9T#9/[C5~7O~4a=cs&O7=KK=An&l9$6U$8A&uD&QI|/Y&bg}Ux&F2#6b}E2&JN&kW&kp=U/&bb=Xl<Cj}k+~5J#6L&5z&9i}b4&Fo,ho(X0_g3~4O$Fz&QE<HN=Ww]6/%GF-Vw=tj&/D&PN#9g=YO}cL&Of&PI~5I&Ip=vU=IW#9G;0o-wU}ss&QR<BT&R9=tk$PY_dh&Pq-yh]7T,nj.Xu=EP&76=cI&Fs*Xg}z7$Gb&+I=DF,AF=cA}rL#7j=Dz&3y<Aa$52=PQ}b0(iY$Fa}oL&xV#6U=ec=WZ,xh%RY<dp#9N&Fl&44=WH*A7=sh&TB&8P=07;u+&PK}uh}J5#72)V/=xC,AB$k0&f6;1E|+5=1B,3v]6n&wR%b+&xx]7f=Ol}fl;+D^wG]7E;nB;uh^Ir&l5=JL,nS=cf=g5;u6|/Q$Gc=MH%Hg#5d%M6^86=U+$Gz,l/,ir^5y&Ba&/F-IY&FI&be%IZ#77&PW_Nu$kE(Yf&NX]7Z,Jy&FJ(Xo&Nz#/d=y7&MX<Ag}Z+;nE]Dt(iG#4D=13&Pj~4c%v8&Zo%OL&/X#4W<HR&ie~6J_1O(Y2=y5=Ad*cv_eB#6k&PX:BU#7A;uk&Ft&Fx_dD=U2;vB=U5=4F}+O&GN.HH:9s=b0%NV(jO&IH=JT}Z9=VZ<Af,Kx^4m&uJ%c6,6r;9m#+L}cf%Kh&F3~4H=vP}bu,Hz|++,1w]nv}k6;uu$jw*Kl*WX&uM[x7&Fr[m7$NO&QN]hu=JN}nR^8g#/h(ps|KC;vd}xz=V0}p6&FD$G1#7K<bG_4p~8g&cf;u4=tl}+k%5/}fz;uw<cA=u1}gU}VM=LJ=eX&+L&Pr#4U}p2:nC,2K]7H:jF&9x}uX#9O=MB<fz~8X~5m&4D&kN&u5%E/(h7(ZF&VG<de(qM|/e-Wt=3x(a+,/R]f/&ND$Ro&nU}0g=KA%kH&NK$Ke<dS}cB&IX~5g$TN]6m=Uv,Is&Py=Ef%Kz#+/%bi&+A<F4$OG&4C&FL#9V<Zk=2I_eE&6c]nw&kq$HG}y+&A8$P3}OH=XP]70%IS(AJ_gH%GZ&tY&AZ=vb~6y&/r=VI=Wv<Zi=fl=xf&eL}c8}OL=MJ=g8$F7=YT}9u=0+^xC}JH&nL^N0~4T]K2,Cy%OC#6s;vG(AC^xe^cG&MF}Br#9P;wD-7h$O/&xA}Fn^PC]6i]7G&8V$Qs;vl(TB~73~4l<mW&6V=2y&uY&+3)aP}XF;LP&kx$wU=t7;uy<FN&lz)7E=Oo*Y+;wI}9q}le;J6&Ri&4t&Qr#8B=cb&vG=J5|Ql(h5<Yy~4+}QD,Lx=wn%K/&RK=dO&Pw,Q9=co%4u;9u}g0@6a^4I%b0=zo|/c&tX=dQ=OS#+b=yz_AB&wB&Pm=W9$HP_gR=62=AO=ti=hI,oA&jr&dH=tm&b6$P2(x8=zi;nG~7F;05]0n[Ix&3m}rg=Xp=cd&uz]7t;97=cN;vV<jf&FF&F1=6Q&Ik*Kk&P4,2z=fQ]7D&3u,H0=d/}Uw<ZN<7R}Kv;0f$H7,MD]7n$F0#88~9Z%da=by;+T#/u=VF&fO&kr^kf<AB]sU,I5$Ng&Pz;0i&QD&vM=Yl:BM;nJ_xJ]U7&Kf&30,3f|Z9*dC)je_jA&Q4&Kp$NH(Yz#6S&Id%Ib=KX,AD=KV%dP}tW&Pk^+E_Ni=cq,3R}VZ(Si=b+}rv;0j}rZ]uA,/w(Sx&Jv$w9&4d&wE,NJ$Gy=J/]Ls#7k<ZQ<Y/&uj]Ov$PM;v3,2F&+u:up=On&3e,Jv;90=J+&Qm]6q}bK#+d~8Y(h2]hA;99&AS=I/}qB&dQ}yJ-VM}Vl&ui,iB&G3|Dc]7d=eQ%dX%JC_1L~4d^NP;vJ&/1)ZI#7N]9X[bQ&PL=0L(UZ,Lm&kc&IR}n7(iR<AQ<dg=33=vN}ft}au]7I,Ba=x9=dR~6R&Tq=Xi,3d$Nr&Bc}DI&ku&vf]Dn,/F&iD,Ll&Nw=0y&I7=Ls=/A&tU=Qe}Ua&uk&+F=g4=gh=Vj#+1&Qn}Uy*44#5F,Pc&Rz*Xn=oh=5W;0n_Nf(iE<Y7=vr=Zu]oz#5Z%mI=kN=Bv_Jp(T2;vt_Ml<FS&uI=L/&6P]64$M7}86<bo%QX(SI%IY&VK=Al&Ux;vv;ut*E/%uh<ZE|O3,M2(yc]yu=Wk&tp:Ex}hr,Cl&WE)+Z=8U}I2_4Q,hA_si=iw=OM=tM=yZ%Ia=U7;wT}b+;uo=Za}yS!5x}HD}fb#5O_dA;Nv%uB(yB;01(Sf}Fk;v7}Pt#8v<mZ#7L,/r&Pl~4w&f5=Ph$Fw_LF&8m,bL=yJ&BH}p/*Jn}tU~5Q;wB(h6]Df]8p^+B;E4&Wc=d+;Ea&bw$8C&FN,DM=Yf}mP~5w=fT#6V=mC=Fi=AV}jB&AN}lW}aH#/D)dZ;hl;vE}/7,CJ;31&w8,hj%u9_Js=jJ&4M~8k=TN&eC}nL&uc-wi&lX}dj=Mv=e2#6u=cr$uq$6G]8W}Jb:nm=Yg<b3(UA;vX&6n&xF=KT,jC,De&R8&oY=Zv&oB]7/=Z2&Oa}bf,hh(4h^tZ&72&Nx;D2&xL~5h~40)ZG)h+=OJ&RA]Bv$yB=Oq=df,AQ%Jn}OJ;11,3z&Tl&tj;v+^Hv,Dh(id=s+]7N&N3)9Q~8f,S4=uW=w4&uX,LX&3d]CJ&yp&8x<b2_do&lP=y/<cy_dG=Oi=7R(VH(lt_1T,Iq_AA;12^6T%k6#8K[B1{oO<AU[Bt;1b$9S&Ps<8T=St{bY,jB(Zp&63&Uv$9V,PM]6v&Af}zW[bW_oq}sm}nB&Kq&gC&ff_eq_2m&5F&TI}rf}Gf;Zr_z9;ER&jk}iz_sn<BN~+n&vo=Vi%97|ZR=Wc,WE&6t]6z%85(ly#84=KY)6m_5/=aX,N3}Tm&he&6K]tR_B2-I3;u/&hU&lH<AP=iB&IA=XL;/5&Nh=wv<BH#79=vS=zl<AA=0X_RG}Bw&9p$NW,AX&kP_Lp&/Z(Tc]Mu}hs#6I}5B&cI<bq&H9#6m=K9}vH(Y1(Y0#4B&w6,/9&gG<bE,/O=zb}I4_l8<B/;wL%Qo<HO[Mq=XX}0v&BP&F4(mG}0i}nm,EC=9u{I3,xG&/9=JY*DK&hR)BX=EI=cx=b/{6k}yX%A+&wa}Xb=la;wi^lL;0t}jo&Qb=xg=XB}iO<qo{bR=NV&8f=a0&Jy;0v=uK)HK;vN#6h&jB(h/%ud&NI%wY.X7=Pt}Cu-uL&Gs_hl%mH,tm]78=Lb^Q0#7Y=1u<Bt&+Q=Co_RH,w3;1e}ux<aU;ui}U3&Q5%bt]63&UQ|0l&uL}O7&3o,AV&dm|Nj(Xt*5+(Uu&Hh(p7(UF=VR=Bp^Jl&Hd[ix)9/=Iq]C8<67]66}mB%6f}bb}JI]8T$HA}db=YM&pa=2J}tS&Y0=PS&y4=cX$6E,hX,XP&nR;04,FQ&l0&Vm_Dv#5Y~8Z=Bi%MA]6x=JO:+p,Az&9q,Hj~6/}SD=K1:EJ}nA;Qo#/E]9R,Ie&6X%W3]61&v4=xX_MC=0q;06(Xq=fs}IG}Dv=0l}o7$iZ;9v&LH&DP-7a&OY,SZ,Kz,Cv&dh=fx|Nh,F/~7q=XF&w+;9n&Gw;0h}Z7<7O&JK(S7&LS<AD<ac=wo<Dt&zw%4B=4v#8P;9o~6p*vV=Tm,Or&I6=1q}nY=P0=gq&Bl&Uu,Ch%yb}UY=zh}dh}rl(T4_xk(YA#8R*xH,IN}Jn]7V}C4&Ty}j3]7p=cL=3h&wW%Qv<Z3=f0&RI&+S(ic_zq}oN&/Y=z1;Td=LW=0e=OI(Vc,+b^ju(UL;0r:Za%8v=Rp=zw&58&73&wK}qX]6y&8E)a2}WR=wP^ur&nQ<cH}Re=Aq&wk}Q0&+q=PP,Gc|/d^k5,Fw]8Y}Pg]p3=ju=ed}r5_yf&Cs]7z$/G<Cm&Jp&54_1G_gP_Ll}JZ;0u]k8_7k(Sg]65{9i=LN&Sx&WK,iW&fD&Lk{9a}Em-9c#8N&io=sy]8d&nT&IK(lx#7/$lW(Td<s8~49,3o<7Y=MW(T+_Jr&Wd,iL}Ct=xh&5V;v4&8n%Kx=iF&l2_0B{B+,If(J0,Lv;u8=Kx-vB=HC&vS=Z6&fU&vE^xK;3D=4h=MR#45:Jw;0d}iw=LU}I5=I0]gB*im,K9}GU,1k_4U&Tt=Vs(iX&lU(TF#7y,ZO}oA&m5#5P}PN}Uz=hM<B1&FB<aG,e6~7T<tP(UQ_ZT=wu&F8)aQ]iN,1r_Lo&/g:CD}84{J1_Ki&Na&3n$jz&FE=dc;uv;va}in}ll=fv(h1&3h}fp=Cy}BM(+E~8m}lo%v7=hC(T6$cj=BQ=Bw(DR,2j=Ks,NS|F+;00=fU=70}Mb(YU;+G&m7&hr=Sk%Co]t+(X5_Jw}0r}gC(AS-IP&QK<Z2#8Q$WC]WX}T2&pG_Ka,HC=R4&/N;Z+;ch(C7,D4$3p_Mk&B2$8D=n9%Ky#5z(CT&QJ#7B]DC]gW}nf~5M;Iw#80}Tc_1F#4Z-aC}Hl=ph=fz,/3=aW}JM}nn;DG;vm}wn,4P}T3;wx&RG$u+}zK=0b;+J_Ek{re<aZ=AS}yY#5D]7q,Cp}xN=VP*2C}GZ}aG~+m_Cs=OY#6r]6g<GS}LC(UB=3A=Bo}Jy<c4}Is;1P<AG}Op<Z1}ld}nS=1Z,yM&95&98=CJ(4t:2L$Hk=Zo}Vc;+I}np&N1}9y=iv}CO*7p=jL)px]tb^zh&GS&Vl%v/;vR=14=zJ&49|/f]hF}WG;03=8P}o/&Gg&rp;DB,Kv}Ji&Pb;aA^ll(4j%yt}+K$Ht#4y&hY]7Y<F1,eN}bG(Uh%6Z]t5%G7;+F_RE;it}tL=LS&Da=Xx(S+(4f=8G=yI}cJ}WP=37=jS}pX}hd)fp<A8=Jt~+o$HJ=M6}iX=g9}CS=dv=Cj(mP%Kd,xq|+9&LD(4/=Xm&QP=Lc}LX&fL;+K=Op(lu=Qs.qC:+e&L+=Jj#8w;SL]7S(b+#4I=c1&nG_Lf&uH;+R)ZV<bV%B/,TE&0H&Jq&Ah%OF&Ss(p2,Wv&I3=Wl}Vq;1L&lJ#9b_1H=8r=b8=JH(SZ=hD=J2#7U,/U#/X~6P,FU<eL=jx,mG=hG=CE&PU=Se(qX&LY=X6=y4&tk&QQ&tf=4g&xI}W+&mZ=Dc#7w}Lg;DA;wQ_Kb(cJ=hR%yX&Yb,hw{bX_4X;EP;1W_2M}Uc=b5(YF,CM&Tp^OJ{DD]6s=vF=Yo~8q}XH}Fu%P5(SJ=Qt;MO]s8<F3&B3&8T(Ul-BS*dw&dR<87}/8]62$PZ]Lx<Au}9Q]7c=ja=KR,Go,Us&v6(qk}pG&G2=ev^GM%w4&H4]7F&dv]J6}Ew:9w=sj-ZL}Ym$+h(Ut(Um~4n=Xs(U7%eE=Qc_JR<CA#6t<Fv|/I,IS,EG<F2(Xy$/n<Fa(h9}+9_2o&N4#7X<Zq|+f_Dp=dt&na,Ca=NJ)jY=8C=YG=s6&Q+<DO}D3=xB&R1(lw;Qn<bF(Cu|/B}HV=SS&n7,10&u0]Dm%A6^4Q=WR(TD=Xo<GH,Rj(l8)bP&n/=LM&CF,F5&ml=PJ;0k=LG=tq,Rh,D6@4i=1p&+9=YC%er_Mh;nI;0q=Fw]80=xq=FM$Gv;v6&nc;wK%H2&Kj;vs,AA=YP,66}bI(qR~5U=6q~4b$Ni=K5.X3$So&Iu(p+]8G=Cf=RY(TS_O3(iH&57=fE=Dg_Do#9z#7H;FK{qd_2k%JR}en&gh_z8;Rx}9p<cN_Ne,DO;LN_7o~/p=NF=5Y}gN<ce<C1,QE]Wv=3u<BC}GK]yq}DY&u/_hj=II(pz&rC,jV&+Z}ut=NQ;Cg-SR_ZS,+o=u/;Oy_RK_QF(Fx&xP}Wr&TA,Uh&g1=yr{ax[VF$Pg(YB;Ox=Vy;+W(Sp}XV%dd&33(l/]l4#4Y}OE=6c=bw(A7&9t%wd&N/&mo,JH&Qe)fm=Ao}fu=tH",RS="FAZDC6BALcLZCA+GBARCW8wNCcDDZ8LVFBOqqDUiou+M42TFAyERXFb7EjhP+vmBFpFrUpfDV2F7eB+eCltCHJFWLFCED+pWTojEIHFXc3aFn4F68zqjEuKidS1QBVPDEhE7NA4mhMF7oThD49ot3FgtzHFCK0acW1x8DH1EmLoIlrWFBLE+y5+NA3Cx65wJHTaEZVaK1mWAmPGxgYCdxwOjTDIt/faOEhTl1vqNsKtJCOhJWuio2g07KLZEQsFBUpNtwEByBgxFslFheFbiEPvi61msDvApxCzB6rBCzox7joYA5UdDc+Cb4FSgIabpXFAj3bjkmFAxCZE+mD/SFf/0ELecYCt3nLoxC6WEZf2tKDB4oZvrEmqFkKk7BwILA7gtYBpsTq//D4jD0F0wEB9pyQ1BD5Ba0oYHDI+sbDFhvrHXdDHfgFEIJLi5r8qercNFBgFLC4bo5ERJtamWBDFy73KCEb6M8VpmEt330ygCTK58EIIFkYgF84gtGA9Uyh3m68iVrFbWFbcbqiCYHZ9J1jeRPbL8yswhMiDbhEhdNoSwFbZrLT740ABEqgCkO8J1BLd1VhKKR4sD1yUo0z+FF59Mvg71CFbyEhbHSFBKEIKyoQNgQppq9T0KAqePu0ZFGrXOHdKJqkoTFhYvpDNyuuznrN84thJbsCoO6Cu6Xlvntvy0QYuAExQEYtTUBf3CoCqwgGFZ4u1HJFzDVwEy3cjcpV4QvsPaBC3rCGyCF23o4K3pp2gberGgFEJEHo4nHICtyKH2ZqyxhN05KBBJIQlKh/Oujv/DH32VrlqFdIFC7Fz9Ct4kaqFME0UETLprnN9kfy+kFmtQBB0+5CFu0N9Ij8l/VvJDh2oq3hT6EzjTHKFN7ZjZwoTsAZ4Exsko6Fpa6WC+sduz8jyrLpegTv2h1EBeYpLpm2czQW0KoCcS0bCVXCmuWJDBjN1nQNLdF58SFJ0h7i3pC3oEOKy/FjBklL70XvBEEIWp2yZ04xObzAWDDJG7f+DbqBEA7LyiR95j7MDVdDViz2RE5vWlBMv5e4+VfhP3aXNPhvLSynb9O2x4uFBV+3jqu6d5pCG28/sETByvmu/+IJ0L3wb4rj9DNOLBF6XPIODr4L19U9RRofAG6Nxydi8Bki8BhGJbBAJKzbJxkZSlF9Q2Cu8oKqggB9hBArwLLqEBWEtFowy8XK8bEyw9snT+BeyFk1ZCSrdmgfEwFePTgCjELBEnIbjaDDPJm36rG9pztcEzT8dGk23SBhXBB1H4z+OWze0ooFzz8pDBYFvp9j9tvFByf9y4EFdVnz026CGR5qMr7fxMHN8UUdlyJAzlTBDRC28k+L4FB8078ljyD91tUj1ocnTs8vdEf7znbzm+GIjEZnoZE5rnLL700Xc7yHfz05nWxy03vBB9YGHYOWxgMQGBCR24CVYNE1hpfKxN0zKnfJDmmMgMmBWqNbjfSyFCBWSCGCgR8yFXiHyEj+VtD1FB3FpC1zI0kFbzifiKTLm9yq5zFmur+q8FHqjoOBWsBPiDbnCC2ErunV6cJ6TygXFYHYp7MKN9RUlSIS8/xBAGYLzeqUnBF4QbsTuUkUqGs6CaiDWKWjQK9EJkjpkTmNCPYXL",Go={zh_cn:null,zh_tw:null},FS={zh_cn:"0x17bcc4d8547e5a7135e365d1ab443aaae95e76d8230c2782c67305d4f21497a1",zh_tw:"0x51e720e90c7b87bec1d70eb6e74a21a449bd3ec9c020b01d3a40ed991b60ce5d"},Xd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",DS="~!@#$%^&*_-=[]{}|;:,.()<>?";function Dx(t){if(Go[t.locale]===null){Go[t.locale]=[];for(var e=0,r=0;r<2048;r++){var n=DS.indexOf(Gd[r*3]),i=[228+(n>>2),128+Xd.indexOf(Gd[r*3+1]),128+Xd.indexOf(Gd[r*3+2])];if(t.locale==="zh_tw")for(var a=n%4,l=a;l<3;l++)i[l]=Xd.indexOf(RS[e++])+(l==0?228:128);Go[t.locale].push((0,LS.toUtf8String)(i))}if(Vs.Wordlist.check(t)!==FS[t.locale])throw Go[t.locale]=null,new Error("BIP39 Wordlist for "+t.locale+" (Chinese) FAILED")}}var Ix=function(t){PS(e,t);function e(r){return t.call(this,"zh_"+r)||this}return e.prototype.getWord=function(r){return Dx(this),Go[this.locale][r]},e.prototype.getWordIndex=function(r){return Dx(this),Go[this.locale].indexOf(r)},e.prototype.split=function(r){return r=r.replace(/(?:\u3000| )+/g,""),r.split("")},e}(Vs.Wordlist),zd=new Ix("cn");Wi.langZhCn=zd;Vs.Wordlist.register(zd);Vs.Wordlist.register(zd,"zh");var Ox=new Ix("tw");Wi.langZhTw=Ox;Vs.Wordlist.register(Ox)});var Nx=V(bc=>{"use strict";var HF=A(S());Object.defineProperty(bc,"__esModule",{value:!0});bc.wordlists=void 0;var IS=ux(),OS=hx(),kS=mx(),NS=Sx(),JS=_x(),US=Px(),HS=Fx(),Kd=kx();bc.wordlists={cz:IS.langCz,en:OS.langEn,es:kS.langEs,fr:NS.langFr,it:HS.langIt,ja:JS.langJa,ko:US.langKo,zh:Kd.langZhCn,zh_cn:Kd.langZhCn,zh_tw:Kd.langZhTw}});var Ux=V(Yi=>{"use strict";var GF=A(S());Object.defineProperty(Yi,"__esModule",{value:!0});Yi.wordlists=Yi.Wordlist=Yi.logger=void 0;var Jx=$n();Object.defineProperty(Yi,"logger",{enumerable:!0,get:function(){return Jx.logger}});Object.defineProperty(Yi,"Wordlist",{enumerable:!0,get:function(){return Jx.Wordlist}});var qS=Nx();Object.defineProperty(Yi,"wordlists",{enumerable:!0,get:function(){return qS.wordlists}})});var Hx=V(gc=>{"use strict";var zF=A(S());Object.defineProperty(gc,"__esModule",{value:!0});gc.version=void 0;gc.version="hdnode/5.8.0"});var jd=V(br=>{"use strict";var ZF=A(S());Object.defineProperty(br,"__esModule",{value:!0});br.getAccountPath=br.isValidMnemonic=br.entropyToMnemonic=br.mnemonicToEntropy=br.mnemonicToSeed=br.HDNode=br.defaultPath=void 0;var zx=Ym(),nt=at(),Kx=ba(),js=Or(),GS=oc(),pr=$r(),qx=ks(),ei=ax(),XS=Js(),Gx=Ux(),zS=Pt(),KS=Hx(),Qs=new zS.Logger(KS.version),ZS=Kx.BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),VS=(0,js.toUtf8Bytes)("Bitcoin seed"),zo=2147483648;function Zx(t){return(1<<t)-1<<8-t}function jS(t){return(1<<t)-1}function vc(t){return(0,nt.hexZeroPad)((0,nt.hexlify)(t),32)}function Xx(t){return zx.Base58.encode((0,nt.concat)([t,(0,nt.hexDataSlice)((0,ei.sha256)((0,ei.sha256)(t)),0,4)]))}function Zd(t){if(t==null)return Gx.wordlists.en;if(typeof t=="string"){var e=Gx.wordlists[t];return e==null&&Qs.throwArgumentError("unknown locale","wordlist",t),e}return t}var Xo={};br.defaultPath="m/44'/60'/0'/0/0";var QS=function(){function t(e,r,n,i,a,l,b,y){if(e!==Xo)throw new Error("HDNode constructor cannot be called directly");if(r){var x=new qx.SigningKey(r);(0,pr.defineReadOnly)(this,"privateKey",x.privateKey),(0,pr.defineReadOnly)(this,"publicKey",x.compressedPublicKey)}else(0,pr.defineReadOnly)(this,"privateKey",null),(0,pr.defineReadOnly)(this,"publicKey",(0,nt.hexlify)(n));(0,pr.defineReadOnly)(this,"parentFingerprint",i),(0,pr.defineReadOnly)(this,"fingerprint",(0,nt.hexDataSlice)((0,ei.ripemd160)((0,ei.sha256)(this.publicKey)),0,4)),(0,pr.defineReadOnly)(this,"address",(0,XS.computeAddress)(this.publicKey)),(0,pr.defineReadOnly)(this,"chainCode",a),(0,pr.defineReadOnly)(this,"index",l),(0,pr.defineReadOnly)(this,"depth",b),y==null?((0,pr.defineReadOnly)(this,"mnemonic",null),(0,pr.defineReadOnly)(this,"path",null)):typeof y=="string"?((0,pr.defineReadOnly)(this,"mnemonic",null),(0,pr.defineReadOnly)(this,"path",y)):((0,pr.defineReadOnly)(this,"mnemonic",y),(0,pr.defineReadOnly)(this,"path",y.path))}return Object.defineProperty(t.prototype,"extendedKey",{get:function(){if(this.depth>=256)throw new Error("Depth too large!");return Xx((0,nt.concat)([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",(0,nt.hexlify)(this.depth),this.parentFingerprint,(0,nt.hexZeroPad)((0,nt.hexlify)(this.index),4),this.chainCode,this.privateKey!=null?(0,nt.concat)(["0x00",this.privateKey]):this.publicKey]))},enumerable:!1,configurable:!0}),t.prototype.neuter=function(){return new t(Xo,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)},t.prototype._derive=function(e){if(e>4294967295)throw new Error("invalid index - "+String(e));var r=this.path;r&&(r+="/"+(e&~zo));var n=new Uint8Array(37);if(e&zo){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set((0,nt.arrayify)(this.privateKey),1),r&&(r+="'")}else n.set((0,nt.arrayify)(this.publicKey));for(var i=24;i>=0;i-=8)n[33+(i>>3)]=e>>24-i&255;var a=(0,nt.arrayify)((0,ei.computeHmac)(ei.SupportedAlgorithm.sha512,this.chainCode,n)),l=a.slice(0,32),b=a.slice(32),y=null,x=null;if(this.privateKey)y=vc(Kx.BigNumber.from(l).add(this.privateKey).mod(ZS));else{var _=new qx.SigningKey((0,nt.hexlify)(l));x=_._addPoint(this.publicKey)}var C=r,D=this.mnemonic;return D&&(C=Object.freeze({phrase:D.phrase,path:r,locale:D.locale||"en"})),new t(Xo,y,x,this.fingerprint,vc(b),e,this.depth+1,C)},t.prototype.derivePath=function(e){var r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();for(var n=this,i=0;i<r.length;i++){var a=r[i];if(a.match(/^[0-9]+'$/)){var l=parseInt(a.substring(0,a.length-1));if(l>=zo)throw new Error("invalid path index - "+a);n=n._derive(zo+l)}else if(a.match(/^[0-9]+$/)){var l=parseInt(a);if(l>=zo)throw new Error("invalid path index - "+a);n=n._derive(l)}else throw new Error("invalid path component - "+a)}return n},t._fromSeed=function(e,r){var n=(0,nt.arrayify)(e);if(n.length<16||n.length>64)throw new Error("invalid seed");var i=(0,nt.arrayify)((0,ei.computeHmac)(ei.SupportedAlgorithm.sha512,VS,n));return new t(Xo,vc(i.slice(0,32)),null,"0x00000000",vc(i.slice(32)),0,0,r)},t.fromMnemonic=function(e,r,n){return n=Zd(n),e=jx(Vd(e,n),n),t._fromSeed(Vx(e,r),{phrase:e,path:"m",locale:n.locale})},t.fromSeed=function(e){return t._fromSeed(e,null)},t.fromExtendedKey=function(e){var r=zx.Base58.decode(e);(r.length!==82||Xx(r.slice(0,78))!==e)&&Qs.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var n=r[4],i=(0,nt.hexlify)(r.slice(5,9)),a=parseInt((0,nt.hexlify)(r.slice(9,13)).substring(2),16),l=(0,nt.hexlify)(r.slice(13,45)),b=r.slice(45,78);switch((0,nt.hexlify)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new t(Xo,null,(0,nt.hexlify)(b),i,l,a,n,null);case"0x0488ade4":case"0x04358394 ":if(b[0]!==0)break;return new t(Xo,(0,nt.hexlify)(b.slice(1)),null,i,l,a,n,null)}return Qs.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")},t}();br.HDNode=QS;function Vx(t,e){e||(e="");var r=(0,js.toUtf8Bytes)("mnemonic"+e,js.UnicodeNormalizationForm.NFKD);return(0,GS.pbkdf2)((0,js.toUtf8Bytes)(t,js.UnicodeNormalizationForm.NFKD),r,2048,64,"sha512")}br.mnemonicToSeed=Vx;function Vd(t,e){e=Zd(e),Qs.checkNormalize();var r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");for(var n=(0,nt.arrayify)(new Uint8Array(Math.ceil(11*r.length/8))),i=0,a=0;a<r.length;a++){var l=e.getWordIndex(r[a].normalize("NFKD"));if(l===-1)throw new Error("invalid mnemonic");for(var b=0;b<11;b++)l&1<<10-b&&(n[i>>3]|=1<<7-i%8),i++}var y=32*r.length/3,x=r.length/3,_=Zx(x),C=(0,nt.arrayify)((0,ei.sha256)(n.slice(0,y/8)))[0]&_;if(C!==(n[n.length-1]&_))throw new Error("invalid checksum");return(0,nt.hexlify)(n.slice(0,y/8))}br.mnemonicToEntropy=Vd;function jx(t,e){if(e=Zd(e),t=(0,nt.arrayify)(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");for(var r=[0],n=11,i=0;i<t.length;i++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=t[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[i]>>8-n,r.push(t[i]&jS(8-n)),n+=3);var a=t.length/4,l=(0,nt.arrayify)((0,ei.sha256)(t))[0]&Zx(a);return r[r.length-1]<<=a,r[r.length-1]|=l>>8-a,e.join(r.map(function(b){return e.getWord(b)}))}br.entropyToMnemonic=jx;function WS(t,e){try{return Vd(t,e),!0}catch{}return!1}br.isValidMnemonic=WS;function YS(t){return(typeof t!="number"||t<0||t>=zo||t%1)&&Qs.throwArgumentError("invalid account index","index",t),"m/44'/60'/"+t+"'/0/0"}br.getAccountPath=YS});var Qx=V(mc=>{"use strict";var jF=A(S());Object.defineProperty(mc,"__esModule",{value:!0});mc.randomBytes=void 0;var $S=it("crypto"),eM=at();function tM(t){return(0,eM.arrayify)((0,$S.randomBytes)(t))}mc.randomBytes=tM});var Wx=V(xc=>{"use strict";var WF=A(S());Object.defineProperty(xc,"__esModule",{value:!0});xc.shuffled=void 0;function rM(t){t=t.slice();for(var e=t.length-1;e>0;e--){var r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}xc.shuffled=rM});var Qd=V(Ko=>{"use strict";var $F=A(S());Object.defineProperty(Ko,"__esModule",{value:!0});Ko.shuffled=Ko.randomBytes=void 0;var nM=Qx();Object.defineProperty(Ko,"randomBytes",{enumerable:!0,get:function(){return nM.randomBytes}});var iM=Wx();Object.defineProperty(Ko,"shuffled",{enumerable:!0,get:function(){return iM.shuffled}})});var Yd=V((Wd,Yx)=>{"use strict";var eD=A(S());(function(t){function e(o){return parseInt(o)===o}function r(o){if(!e(o.length))return!1;for(var p=0;p<o.length;p++)if(!e(o[p])||o[p]<0||o[p]>255)return!1;return!0}function n(o,p){if(o.buffer&&ArrayBuffer.isView(o)&&o.name==="Uint8Array")return p&&(o.slice?o=o.slice():o=Array.prototype.slice.call(o)),o;if(Array.isArray(o)){if(!r(o))throw new Error("Array contains invalid value: "+o);return new Uint8Array(o)}if(e(o.length)&&r(o))return new Uint8Array(o);throw new Error("unsupported array-like object")}function i(o){return new Uint8Array(o)}function a(o,p,E,g,w){(g!=null||w!=null)&&(o.slice?o=o.slice(g,w):o=Array.prototype.slice.call(o,g,w)),p.set(o,E)}var l=function(){function o(E){var g=[],w=0;for(E=encodeURI(E);w<E.length;){var U=E.charCodeAt(w++);U===37?(g.push(parseInt(E.substr(w,2),16)),w+=2):g.push(U)}return n(g)}function p(E){for(var g=[],w=0;w<E.length;){var U=E[w];U<128?(g.push(String.fromCharCode(U)),w++):U>191&&U<224?(g.push(String.fromCharCode((U&31)<<6|E[w+1]&63)),w+=2):(g.push(String.fromCharCode((U&15)<<12|(E[w+1]&63)<<6|E[w+2]&63)),w+=3)}return g.join("")}return{toBytes:o,fromBytes:p}}(),b=function(){function o(g){for(var w=[],U=0;U<g.length;U+=2)w.push(parseInt(g.substr(U,2),16));return w}var p="0123456789abcdef";function E(g){for(var w=[],U=0;U<g.length;U++){var M=g[U];w.push(p[(M&240)>>4]+p[M&15])}return w.join("")}return{toBytes:o,fromBytes:E}}(),y={16:10,24:12,32:14},x=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],_=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],C=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],D=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],F=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],P=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],z=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],W=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],X=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],ne=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],$=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],ae=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],ie=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],ee=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],ce=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function te(o){for(var p=[],E=0;E<o.length;E+=4)p.push(o[E]<<24|o[E+1]<<16|o[E+2]<<8|o[E+3]);return p}var Y=function(o){if(!(this instanceof Y))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:n(o,!0)}),this._prepare()};Y.prototype._prepare=function(){var o=y[this.key.length];if(o==null)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var p=0;p<=o;p++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var E=(o+1)*4,g=this.key.length/4,w=te(this.key),U,p=0;p<g;p++)U=p>>2,this._Ke[U][p%4]=w[p],this._Kd[o-U][p%4]=w[p];for(var M=0,k=g,G;k<E;){if(G=w[g-1],w[0]^=_[G>>16&255]<<24^_[G>>8&255]<<16^_[G&255]<<8^_[G>>24&255]^x[M]<<24,M+=1,g!=8)for(var p=1;p<g;p++)w[p]^=w[p-1];else{for(var p=1;p<g/2;p++)w[p]^=w[p-1];G=w[g/2-1],w[g/2]^=_[G&255]^_[G>>8&255]<<8^_[G>>16&255]<<16^_[G>>24&255]<<24;for(var p=g/2+1;p<g;p++)w[p]^=w[p-1]}for(var p=0,Z,B;p<g&&k<E;)Z=k>>2,B=k%4,this._Ke[Z][B]=w[p],this._Kd[o-Z][B]=w[p++],k++}for(var Z=1;Z<o;Z++)for(var B=0;B<4;B++)G=this._Kd[Z][B],this._Kd[Z][B]=ae[G>>24&255]^ie[G>>16&255]^ee[G>>8&255]^ce[G&255]},Y.prototype.encrypt=function(o){if(o.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var p=this._Ke.length-1,E=[0,0,0,0],g=te(o),w=0;w<4;w++)g[w]^=this._Ke[0][w];for(var U=1;U<p;U++){for(var w=0;w<4;w++)E[w]=D[g[w]>>24&255]^F[g[(w+1)%4]>>16&255]^P[g[(w+2)%4]>>8&255]^z[g[(w+3)%4]&255]^this._Ke[U][w];g=E.slice()}for(var M=i(16),k,w=0;w<4;w++)k=this._Ke[p][w],M[4*w]=(_[g[w]>>24&255]^k>>24)&255,M[4*w+1]=(_[g[(w+1)%4]>>16&255]^k>>16)&255,M[4*w+2]=(_[g[(w+2)%4]>>8&255]^k>>8)&255,M[4*w+3]=(_[g[(w+3)%4]&255]^k)&255;return M},Y.prototype.decrypt=function(o){if(o.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var p=this._Kd.length-1,E=[0,0,0,0],g=te(o),w=0;w<4;w++)g[w]^=this._Kd[0][w];for(var U=1;U<p;U++){for(var w=0;w<4;w++)E[w]=W[g[w]>>24&255]^X[g[(w+3)%4]>>16&255]^ne[g[(w+2)%4]>>8&255]^$[g[(w+1)%4]&255]^this._Kd[U][w];g=E.slice()}for(var M=i(16),k,w=0;w<4;w++)k=this._Kd[p][w],M[4*w]=(C[g[w]>>24&255]^k>>24)&255,M[4*w+1]=(C[g[(w+3)%4]>>16&255]^k>>16)&255,M[4*w+2]=(C[g[(w+2)%4]>>8&255]^k>>8)&255,M[4*w+3]=(C[g[(w+1)%4]&255]^k)&255;return M};var T=function(o){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Y(o)};T.prototype.encrypt=function(o){if(o=n(o),o.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var p=i(o.length),E=i(16),g=0;g<o.length;g+=16)a(o,E,0,g,g+16),E=this._aes.encrypt(E),a(E,p,g);return p},T.prototype.decrypt=function(o){if(o=n(o),o.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var p=i(o.length),E=i(16),g=0;g<o.length;g+=16)a(o,E,0,g,g+16),E=this._aes.decrypt(E),a(E,p,g);return p};var s=function(o,p){if(!(this instanceof s))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",!p)p=i(16);else if(p.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastCipherblock=n(p,!0),this._aes=new Y(o)};s.prototype.encrypt=function(o){if(o=n(o),o.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var p=i(o.length),E=i(16),g=0;g<o.length;g+=16){a(o,E,0,g,g+16);for(var w=0;w<16;w++)E[w]^=this._lastCipherblock[w];this._lastCipherblock=this._aes.encrypt(E),a(this._lastCipherblock,p,g)}return p},s.prototype.decrypt=function(o){if(o=n(o),o.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var p=i(o.length),E=i(16),g=0;g<o.length;g+=16){a(o,E,0,g,g+16),E=this._aes.decrypt(E);for(var w=0;w<16;w++)p[g+w]=E[w]^this._lastCipherblock[w];a(o,this._lastCipherblock,0,g,g+16)}return p};var u=function(o,p,E){if(!(this instanceof u))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",!p)p=i(16);else if(p.length!=16)throw new Error("invalid initialation vector size (must be 16 size)");E||(E=1),this.segmentSize=E,this._shiftRegister=n(p,!0),this._aes=new Y(o)};u.prototype.encrypt=function(o){if(o.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var p=n(o,!0),E,g=0;g<p.length;g+=this.segmentSize){E=this._aes.encrypt(this._shiftRegister);for(var w=0;w<this.segmentSize;w++)p[g+w]^=E[w];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(p,this._shiftRegister,16-this.segmentSize,g,g+this.segmentSize)}return p},u.prototype.decrypt=function(o){if(o.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var p=n(o,!0),E,g=0;g<p.length;g+=this.segmentSize){E=this._aes.encrypt(this._shiftRegister);for(var w=0;w<this.segmentSize;w++)p[g+w]^=E[w];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(o,this._shiftRegister,16-this.segmentSize,g,g+this.segmentSize)}return p};var d=function(o,p){if(!(this instanceof d))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",!p)p=i(16);else if(p.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastPrecipher=n(p,!0),this._lastPrecipherIndex=16,this._aes=new Y(o)};d.prototype.encrypt=function(o){for(var p=n(o,!0),E=0;E<p.length;E++)this._lastPrecipherIndex===16&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),p[E]^=this._lastPrecipher[this._lastPrecipherIndex++];return p},d.prototype.decrypt=d.prototype.encrypt;var f=function(o){if(!(this instanceof f))throw Error("Counter must be instanitated with `new`");o!==0&&!o&&(o=1),typeof o=="number"?(this._counter=i(16),this.setValue(o)):this.setBytes(o)};f.prototype.setValue=function(o){if(typeof o!="number"||parseInt(o)!=o)throw new Error("invalid counter value (must be an integer)");for(var p=15;p>=0;--p)this._counter[p]=o%256,o=o>>8},f.prototype.setBytes=function(o){if(o=n(o,!0),o.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=o},f.prototype.increment=function(){for(var o=15;o>=0;o--)if(this._counter[o]===255)this._counter[o]=0;else{this._counter[o]++;break}};var c=function(o,p){if(!(this instanceof c))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",p instanceof f||(p=new f(p)),this._counter=p,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Y(o)};c.prototype.encrypt=function(o){for(var p=n(o,!0),E=0;E<p.length;E++)this._remainingCounterIndex===16&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),p[E]^=this._remainingCounter[this._remainingCounterIndex++];return p},c.prototype.decrypt=c.prototype.encrypt;function v(o){o=n(o,!0);var p=16-o.length%16,E=i(o.length+p);a(o,E);for(var g=o.length;g<E.length;g++)E[g]=p;return E}function m(o){if(o=n(o,!0),o.length<16)throw new Error("PKCS#7 invalid length");var p=o[o.length-1];if(p>16)throw new Error("PKCS#7 padding byte out of range");for(var E=o.length-p,g=0;g<p;g++)if(o[E+g]!==p)throw new Error("PKCS#7 invalid padding byte");var w=i(E);return a(o,w,0,0,E),w}var h={AES:Y,Counter:f,ModeOfOperation:{ecb:T,cbc:s,cfb:u,ofb:d,ctr:c},utils:{hex:b,utf8:l},padding:{pkcs7:{pad:v,strip:m}},_arrayTest:{coerceArray:n,createArray:i,copyArray:a}};typeof Wd<"u"?Yx.exports=h:typeof define=="function"&&define.amd?define(h):(t.aesjs&&(h._aesjs=t.aesjs),t.aesjs=h)})(Wd)});var $d=V(yc=>{"use strict";var rD=A(S());Object.defineProperty(yc,"__esModule",{value:!0});yc.version=void 0;yc.version="json-wallets/5.8.0"});var eh=V(cn=>{"use strict";var iD=A(S());Object.defineProperty(cn,"__esModule",{value:!0});cn.uuidV4=cn.searchPath=cn.getPassword=cn.zpad=cn.looseArrayify=void 0;var wc=at(),$x=Or();function aM(t){return typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),(0,wc.arrayify)(t)}cn.looseArrayify=aM;function oM(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}cn.zpad=oM;function sM(t){return typeof t=="string"?(0,$x.toUtf8Bytes)(t,$x.UnicodeNormalizationForm.NFKC):(0,wc.arrayify)(t)}cn.getPassword=sM;function fM(t,e){for(var r=t,n=e.toLowerCase().split("/"),i=0;i<n.length;i++){var a=null;for(var l in r)if(l.toLowerCase()===n[i]){a=r[l];break}if(a===null)return null;r=a}return r}cn.searchPath=fM;function cM(t){var e=(0,wc.arrayify)(t);e[6]=e[6]&15|64,e[8]=e[8]&63|128;var r=(0,wc.hexlify)(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}cn.uuidV4=cM});var ny=V(ti=>{"use strict";var oD=A(S()),uM=ti&&ti.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),lM=ti&&ti.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ti,"__esModule",{value:!0});ti.decrypt=ti.CrowdsaleAccount=void 0;var ey=lM(Yd()),dM=ya(),ty=at(),hM=Nn(),pM=oc(),bM=Or(),gM=$r(),vM=Pt(),mM=$d(),xM=new vM.Logger(mM.version),Ac=eh(),ry=function(t){uM(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.isCrowdsaleAccount=function(r){return!!(r&&r._isCrowdsaleAccount)},e}(gM.Description);ti.CrowdsaleAccount=ry;function yM(t,e){var r=JSON.parse(t);e=(0,Ac.getPassword)(e);var n=(0,dM.getAddress)((0,Ac.searchPath)(r,"ethaddr")),i=(0,Ac.looseArrayify)((0,Ac.searchPath)(r,"encseed"));(!i||i.length%16!==0)&&xM.throwArgumentError("invalid encseed","json",t);for(var a=(0,ty.arrayify)((0,pM.pbkdf2)(e,e,2e3,32,"sha256")).slice(0,16),l=i.slice(0,16),b=i.slice(16),y=new ey.default.ModeOfOperation.cbc(a,l),x=ey.default.padding.pkcs7.strip((0,ty.arrayify)(y.decrypt(b))),_="",C=0;C<x.length;C++)_+=String.fromCharCode(x[C]);var D=(0,bM.toUtf8Bytes)(_),F=(0,hM.keccak256)(D);return new ry({_isCrowdsaleAccount:!0,address:n,privateKey:F})}ti.decrypt=yM});var sy=V($i=>{"use strict";var fD=A(S());Object.defineProperty($i,"__esModule",{value:!0});$i.getJsonWalletAddress=$i.isKeystoreWallet=$i.isCrowdsaleWallet=void 0;var iy=ya();function ay(t){var e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}$i.isCrowdsaleWallet=ay;function oy(t){var e=null;try{e=JSON.parse(t)}catch{return!1}return!(!e.version||parseInt(e.version)!==e.version||parseInt(e.version)!==3)}$i.isKeystoreWallet=oy;function wM(t){if(ay(t))try{return(0,iy.getAddress)(JSON.parse(t).ethaddr)}catch{return null}if(oy(t))try{return(0,iy.getAddress)(JSON.parse(t).address)}catch{return null}return null}$i.getJsonWalletAddress=wM});var cy=V((th,fy)=>{"use strict";var cD=A(S());(function(t){function r(F){let P=new Uint32Array([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]),z=1779033703,W=3144134277,X=1013904242,ne=2773480762,$=1359893119,ae=2600822924,ie=528734635,ee=1541459225,ce=new Uint32Array(64);function te(c){let v=0,m=c.length;for(;m>=64;){let h=z,o=W,p=X,E=ne,g=$,w=ae,U=ie,M=ee,k,G,Z,B,R;for(G=0;G<16;G++)Z=v+G*4,ce[G]=(c[Z]&255)<<24|(c[Z+1]&255)<<16|(c[Z+2]&255)<<8|c[Z+3]&255;for(G=16;G<64;G++)k=ce[G-2],B=(k>>>17|k<<15)^(k>>>19|k<<13)^k>>>10,k=ce[G-15],R=(k>>>7|k<<25)^(k>>>18|k<<14)^k>>>3,ce[G]=(B+ce[G-7]|0)+(R+ce[G-16]|0)|0;for(G=0;G<64;G++)B=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&w^~g&U)|0)+(M+(P[G]+ce[G]|0)|0)|0,R=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&o^h&p^o&p)|0,M=U,U=w,w=g,g=E+B|0,E=p,p=o,o=h,h=B+R|0;z=z+h|0,W=W+o|0,X=X+p|0,ne=ne+E|0,$=$+g|0,ae=ae+w|0,ie=ie+U|0,ee=ee+M|0,v+=64,m-=64}}te(F);let Y,T=F.length%64,s=F.length/536870912|0,u=F.length<<3,d=T<56?56:120,f=F.slice(F.length-T,F.length);for(f.push(128),Y=T+1;Y<d;Y++)f.push(0);return f.push(s>>>24&255),f.push(s>>>16&255),f.push(s>>>8&255),f.push(s>>>0&255),f.push(u>>>24&255),f.push(u>>>16&255),f.push(u>>>8&255),f.push(u>>>0&255),te(f),[z>>>24&255,z>>>16&255,z>>>8&255,z>>>0&255,W>>>24&255,W>>>16&255,W>>>8&255,W>>>0&255,X>>>24&255,X>>>16&255,X>>>8&255,X>>>0&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255,ae>>>24&255,ae>>>16&255,ae>>>8&255,ae>>>0&255,ie>>>24&255,ie>>>16&255,ie>>>8&255,ie>>>0&255,ee>>>24&255,ee>>>16&255,ee>>>8&255,ee>>>0&255]}function n(F,P,z){F=F.length<=64?F:r(F);let W=64+P.length+4,X=new Array(W),ne=new Array(64),$,ae=[];for($=0;$<64;$++)X[$]=54;for($=0;$<F.length;$++)X[$]^=F[$];for($=0;$<P.length;$++)X[64+$]=P[$];for($=W-4;$<W;$++)X[$]=0;for($=0;$<64;$++)ne[$]=92;for($=0;$<F.length;$++)ne[$]^=F[$];function ie(){for(let ee=W-1;ee>=W-4;ee--){if(X[ee]++,X[ee]<=255)return;X[ee]=0}}for(;z>=32;)ie(),ae=ae.concat(r(ne.concat(r(X)))),z-=32;return z>0&&(ie(),ae=ae.concat(r(ne.concat(r(X))).slice(0,z))),ae}function i(F,P,z,W,X){let ne;for(y(F,(2*z-1)*16,X,0,16),ne=0;ne<2*z;ne++)b(F,ne*16,X,16),l(X,W),y(X,0,F,P+ne*16,16);for(ne=0;ne<z;ne++)y(F,P+ne*2*16,F,ne*16,16);for(ne=0;ne<z;ne++)y(F,P+(ne*2+1)*16,F,(ne+z)*16,16)}function a(F,P){return F<<P|F>>>32-P}function l(F,P){y(F,0,P,0,16);for(let z=8;z>0;z-=2)P[4]^=a(P[0]+P[12],7),P[8]^=a(P[4]+P[0],9),P[12]^=a(P[8]+P[4],13),P[0]^=a(P[12]+P[8],18),P[9]^=a(P[5]+P[1],7),P[13]^=a(P[9]+P[5],9),P[1]^=a(P[13]+P[9],13),P[5]^=a(P[1]+P[13],18),P[14]^=a(P[10]+P[6],7),P[2]^=a(P[14]+P[10],9),P[6]^=a(P[2]+P[14],13),P[10]^=a(P[6]+P[2],18),P[3]^=a(P[15]+P[11],7),P[7]^=a(P[3]+P[15],9),P[11]^=a(P[7]+P[3],13),P[15]^=a(P[11]+P[7],18),P[1]^=a(P[0]+P[3],7),P[2]^=a(P[1]+P[0],9),P[3]^=a(P[2]+P[1],13),P[0]^=a(P[3]+P[2],18),P[6]^=a(P[5]+P[4],7),P[7]^=a(P[6]+P[5],9),P[4]^=a(P[7]+P[6],13),P[5]^=a(P[4]+P[7],18),P[11]^=a(P[10]+P[9],7),P[8]^=a(P[11]+P[10],9),P[9]^=a(P[8]+P[11],13),P[10]^=a(P[9]+P[8],18),P[12]^=a(P[15]+P[14],7),P[13]^=a(P[12]+P[15],9),P[14]^=a(P[13]+P[12],13),P[15]^=a(P[14]+P[13],18);for(let z=0;z<16;++z)F[z]+=P[z]}function b(F,P,z,W){for(let X=0;X<W;X++)z[X]^=F[P+X]}function y(F,P,z,W,X){for(;X--;)z[W++]=F[P++]}function x(F){if(!F||typeof F.length!="number")return!1;for(let P=0;P<F.length;P++){let z=F[P];if(typeof z!="number"||z%1||z<0||z>=256)return!1}return!0}function _(F,P){if(typeof F!="number"||F%1)throw new Error("invalid "+P);return F}function C(F,P,z,W,X,ne,$){if(z=_(z,"N"),W=_(W,"r"),X=_(X,"p"),ne=_(ne,"dkLen"),z===0||z&z-1)throw new Error("N must be power of 2");if(z>2147483647/128/W)throw new Error("N too large");if(W>2147483647/128/X)throw new Error("r too large");if(!x(F))throw new Error("password must be an array or buffer");if(F=Array.prototype.slice.call(F),!x(P))throw new Error("salt must be an array or buffer");P=Array.prototype.slice.call(P);let ae=n(F,P,X*128*W),ie=new Uint32Array(X*32*W);for(let g=0;g<ie.length;g++){let w=g*4;ie[g]=(ae[w+3]&255)<<24|(ae[w+2]&255)<<16|(ae[w+1]&255)<<8|(ae[w+0]&255)<<0}let ee=new Uint32Array(64*W),ce=new Uint32Array(32*W*z),te=32*W,Y=new Uint32Array(16),T=new Uint32Array(16),s=X*z*2,u=0,d=null,f=!1,c=0,v=0,m,h,o=$?parseInt(1e3/W):4294967295,p=typeof setImmediate<"u"?setImmediate:setTimeout,E=function(){if(f)return $(new Error("cancelled"),u/s);let g;switch(c){case 0:h=v*32*W,y(ie,h,ee,0,te),c=1,m=0;case 1:g=z-m,g>o&&(g=o);for(let U=0;U<g;U++)y(ee,0,ce,(m+U)*te,te),i(ee,te,W,Y,T);if(m+=g,u+=g,$){let U=parseInt(1e3*u/s);if(U!==d){if(f=$(null,u/s),f)break;d=U}}if(m<z)break;m=0,c=2;case 2:g=z-m,g>o&&(g=o);for(let U=0;U<g;U++){let M=(2*W-1)*16,k=ee[M]&z-1;b(ce,k*te,ee,te),i(ee,te,W,Y,T)}if(m+=g,u+=g,$){let U=parseInt(1e3*u/s);if(U!==d){if(f=$(null,u/s),f)break;d=U}}if(m<z)break;if(y(ee,0,ie,h,te),v++,v<X){c=0;break}ae=[];for(let U=0;U<ie.length;U++)ae.push(ie[U]>>0&255),ae.push(ie[U]>>8&255),ae.push(ie[U]>>16&255),ae.push(ie[U]>>24&255);let w=n(F,ae,ne);return $&&$(null,1,w),w}$&&p(E)};if(!$)for(;;){let g=E();if(g!=null)return g}E()}let D={scrypt:function(F,P,z,W,X,ne,$){return new Promise(function(ae,ie){let ee=0;$&&$(0),C(F,P,z,W,X,ne,function(ce,te,Y){if(ce)ie(ce);else if(Y)$&&ee!==1&&$(1),ae(new Uint8Array(Y));else if($&&te!==ee)return ee=te,$(te)})})},syncScrypt:function(F,P,z,W,X,ne){return new Uint8Array(C(F,P,z,W,X,ne))}};typeof th<"u"?fy.exports=D:typeof define=="function"&&define.amd?define(D):t&&(t.scrypt&&(t._scrypt=t.scrypt),t.scrypt=D)})(th)});var xy=V(Kt=>{"use strict";var lD=A(S()),AM=Kt&&Kt.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),SM=Kt&&Kt.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},MM=Kt&&Kt.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}},ly=Kt&&Kt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.encrypt=Kt.decrypt=Kt.decryptSync=Kt.KeystoreAccount=void 0;var ea=ly(Yd()),ih=ly(cy()),dy=ya(),Ft=at(),Ra=jd(),hy=Nn(),TM=oc(),Sc=Qd(),EM=$r(),py=Js(),je=eh(),rh=Pt(),_M=$d(),nh=new rh.Logger(_M.version);function uy(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}var by=function(t){AM(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.isKeystoreAccount=function(r){return!!(r&&r._isKeystoreAccount)},e}(EM.Description);Kt.KeystoreAccount=by;function BM(t,e,r){var n=(0,je.searchPath)(t,"crypto/cipher");if(n==="aes-128-ctr"){var i=(0,je.looseArrayify)((0,je.searchPath)(t,"crypto/cipherparams/iv")),a=new ea.default.Counter(i),l=new ea.default.ModeOfOperation.ctr(e,a);return(0,Ft.arrayify)(l.decrypt(r))}return null}function gy(t,e){var r=(0,je.looseArrayify)((0,je.searchPath)(t,"crypto/ciphertext")),n=(0,Ft.hexlify)((0,hy.keccak256)((0,Ft.concat)([e.slice(16,32),r]))).substring(2);if(n!==(0,je.searchPath)(t,"crypto/mac").toLowerCase())throw new Error("invalid password");var i=BM(t,e.slice(0,16),r);i||nh.throwError("unsupported cipher",rh.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});var a=e.slice(32,64),l=(0,py.computeAddress)(i);if(t.address){var b=t.address.toLowerCase();if(b.substring(0,2)!=="0x"&&(b="0x"+b),(0,dy.getAddress)(b)!==l)throw new Error("address mismatch")}var y={_isKeystoreAccount:!0,address:l,privateKey:(0,Ft.hexlify)(i)};if((0,je.searchPath)(t,"x-ethers/version")==="0.1"){var x=(0,je.looseArrayify)((0,je.searchPath)(t,"x-ethers/mnemonicCiphertext")),_=(0,je.looseArrayify)((0,je.searchPath)(t,"x-ethers/mnemonicCounter")),C=new ea.default.Counter(_),D=new ea.default.ModeOfOperation.ctr(a,C),F=(0,je.searchPath)(t,"x-ethers/path")||Ra.defaultPath,P=(0,je.searchPath)(t,"x-ethers/locale")||"en",z=(0,Ft.arrayify)(D.decrypt(x));try{var W=(0,Ra.entropyToMnemonic)(z,P),X=Ra.HDNode.fromMnemonic(W,null,P).derivePath(F);if(X.privateKey!=y.privateKey)throw new Error("mnemonic mismatch");y.mnemonic=X.mnemonic}catch(ne){if(ne.code!==rh.Logger.errors.INVALID_ARGUMENT||ne.argument!=="wordlist")throw ne}}return new by(y)}function vy(t,e,r,n,i){return(0,Ft.arrayify)((0,TM.pbkdf2)(t,e,r,n,i))}function CM(t,e,r,n,i){return Promise.resolve(vy(t,e,r,n,i))}function my(t,e,r,n,i){var a=(0,je.getPassword)(e),l=(0,je.searchPath)(t,"crypto/kdf");if(l&&typeof l=="string"){var b=function(W,X){return nh.throwArgumentError("invalid key-derivation function parameters",W,X)};if(l.toLowerCase()==="scrypt"){var y=(0,je.looseArrayify)((0,je.searchPath)(t,"crypto/kdfparams/salt")),x=parseInt((0,je.searchPath)(t,"crypto/kdfparams/n")),_=parseInt((0,je.searchPath)(t,"crypto/kdfparams/r")),C=parseInt((0,je.searchPath)(t,"crypto/kdfparams/p"));(!x||!_||!C)&&b("kdf",l),x&x-1&&b("N",x);var D=parseInt((0,je.searchPath)(t,"crypto/kdfparams/dklen"));return D!==32&&b("dklen",D),n(a,y,x,_,C,64,i)}else if(l.toLowerCase()==="pbkdf2"){var y=(0,je.looseArrayify)((0,je.searchPath)(t,"crypto/kdfparams/salt")),F=null,P=(0,je.searchPath)(t,"crypto/kdfparams/prf");P==="hmac-sha256"?F="sha256":P==="hmac-sha512"?F="sha512":b("prf",P);var z=parseInt((0,je.searchPath)(t,"crypto/kdfparams/c")),D=parseInt((0,je.searchPath)(t,"crypto/kdfparams/dklen"));return D!==32&&b("dklen",D),r(a,y,z,D,F)}}return nh.throwArgumentError("unsupported key-derivation function","kdf",l)}function PM(t,e){var r=JSON.parse(t),n=my(r,e,vy,ih.default.syncScrypt);return gy(r,n)}Kt.decryptSync=PM;function LM(t,e,r){return SM(this,void 0,void 0,function(){var n,i;return MM(this,function(a){switch(a.label){case 0:return n=JSON.parse(t),[4,my(n,e,CM,ih.default.scrypt,r)];case 1:return i=a.sent(),[2,gy(n,i)]}})})}Kt.decrypt=LM;function RM(t,e,r,n){try{if((0,dy.getAddress)(t.address)!==(0,py.computeAddress)(t.privateKey))throw new Error("address/privateKey mismatch");if(uy(t)){var i=t.mnemonic,a=Ra.HDNode.fromMnemonic(i.phrase,null,i.locale).derivePath(i.path||Ra.defaultPath);if(a.privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch($){return Promise.reject($)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});var l=(0,Ft.arrayify)(t.privateKey),b=(0,je.getPassword)(e),y=null,x=null,_=null;if(uy(t)){var C=t.mnemonic;y=(0,Ft.arrayify)((0,Ra.mnemonicToEntropy)(C.phrase,C.locale||"en")),x=C.path||Ra.defaultPath,_=C.locale||"en"}var D=r.client;D||(D="ethers.js");var F=null;r.salt?F=(0,Ft.arrayify)(r.salt):F=(0,Sc.randomBytes)(32);var P=null;if(r.iv){if(P=(0,Ft.arrayify)(r.iv),P.length!==16)throw new Error("invalid iv")}else P=(0,Sc.randomBytes)(16);var z=null;if(r.uuid){if(z=(0,Ft.arrayify)(r.uuid),z.length!==16)throw new Error("invalid uuid")}else z=(0,Sc.randomBytes)(16);var W=1<<17,X=8,ne=1;return r.scrypt&&(r.scrypt.N&&(W=r.scrypt.N),r.scrypt.r&&(X=r.scrypt.r),r.scrypt.p&&(ne=r.scrypt.p)),ih.default.scrypt(b,F,W,X,ne,64,n).then(function($){$=(0,Ft.arrayify)($);var ae=$.slice(0,16),ie=$.slice(16,32),ee=$.slice(32,64),ce=new ea.default.Counter(P),te=new ea.default.ModeOfOperation.ctr(ae,ce),Y=(0,Ft.arrayify)(te.encrypt(l)),T=(0,hy.keccak256)((0,Ft.concat)([ie,Y])),s={address:t.address.substring(2).toLowerCase(),id:(0,je.uuidV4)(z),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,Ft.hexlify)(P).substring(2)},ciphertext:(0,Ft.hexlify)(Y).substring(2),kdf:"scrypt",kdfparams:{salt:(0,Ft.hexlify)(F).substring(2),n:W,dklen:32,p:ne,r:X},mac:T.substring(2)}};if(y){var u=(0,Sc.randomBytes)(16),d=new ea.default.Counter(u),f=new ea.default.ModeOfOperation.ctr(ee,d),c=(0,Ft.arrayify)(f.encrypt(y)),v=new Date,m=v.getUTCFullYear()+"-"+(0,je.zpad)(v.getUTCMonth()+1,2)+"-"+(0,je.zpad)(v.getUTCDate(),2)+"T"+(0,je.zpad)(v.getUTCHours(),2)+"-"+(0,je.zpad)(v.getUTCMinutes(),2)+"-"+(0,je.zpad)(v.getUTCSeconds(),2)+".0Z";s["x-ethers"]={client:D,gethFilename:"UTC--"+m+"--"+s.address,mnemonicCounter:(0,Ft.hexlify)(u).substring(2),mnemonicCiphertext:(0,Ft.hexlify)(c).substring(2),path:x,locale:_,version:"0.1"}}return JSON.stringify(s)})}Kt.encrypt=RM});var yy=V(Dt=>{"use strict";var hD=A(S());Object.defineProperty(Dt,"__esModule",{value:!0});Dt.decryptJsonWalletSync=Dt.decryptJsonWallet=Dt.getJsonWalletAddress=Dt.isKeystoreWallet=Dt.isCrowdsaleWallet=Dt.encryptKeystore=Dt.decryptKeystoreSync=Dt.decryptKeystore=Dt.decryptCrowdsale=void 0;var ah=ny();Object.defineProperty(Dt,"decryptCrowdsale",{enumerable:!0,get:function(){return ah.decrypt}});var Fa=sy();Object.defineProperty(Dt,"getJsonWalletAddress",{enumerable:!0,get:function(){return Fa.getJsonWalletAddress}});Object.defineProperty(Dt,"isCrowdsaleWallet",{enumerable:!0,get:function(){return Fa.isCrowdsaleWallet}});Object.defineProperty(Dt,"isKeystoreWallet",{enumerable:!0,get:function(){return Fa.isKeystoreWallet}});var Ws=xy();Object.defineProperty(Dt,"decryptKeystore",{enumerable:!0,get:function(){return Ws.decrypt}});Object.defineProperty(Dt,"decryptKeystoreSync",{enumerable:!0,get:function(){return Ws.decryptSync}});Object.defineProperty(Dt,"encryptKeystore",{enumerable:!0,get:function(){return Ws.encrypt}});function FM(t,e,r){if((0,Fa.isCrowdsaleWallet)(t)){r&&r(0);var n=(0,ah.decrypt)(t,e);return r&&r(1),Promise.resolve(n)}return(0,Fa.isKeystoreWallet)(t)?(0,Ws.decrypt)(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}Dt.decryptJsonWallet=FM;function DM(t,e){if((0,Fa.isCrowdsaleWallet)(t))return(0,ah.decrypt)(t,e);if((0,Fa.isKeystoreWallet)(t))return(0,Ws.decryptSync)(t,e);throw new Error("invalid JSON wallet")}Dt.decryptJsonWalletSync=DM});var wy=V(Mc=>{"use strict";var bD=A(S());Object.defineProperty(Mc,"__esModule",{value:!0});Mc.version=void 0;Mc.version="wallet/5.8.0"});var ef=V(Rr=>{"use strict";var vD=A(S()),IM=Rr&&Rr.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ay=Rr&&Rr.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},Sy=Rr&&Rr.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.verifyTypedData=Rr.verifyMessage=Rr.Wallet=void 0;var My=ya(),OM=Zm(),kM=Qm(),Vo=at(),$s=Cs(),Ys=jd(),Ty=Nn(),ri=$r(),NM=Qd(),oh=ks(),sh=yy(),Da=Js(),Ey=Pt(),JM=wy(),Zo=new Ey.Logger(JM.version);function UM(t){return t!=null&&(0,Vo.isHexString)(t.privateKey,32)&&t.address!=null}function HM(t){var e=t.mnemonic;return e&&e.phrase}var qM=function(t){IM(e,t);function e(r,n){var i=t.call(this)||this;if(UM(r)){var a=new oh.SigningKey(r.privateKey);if((0,ri.defineReadOnly)(i,"_signingKey",function(){return a}),(0,ri.defineReadOnly)(i,"address",(0,Da.computeAddress)(i.publicKey)),i.address!==(0,My.getAddress)(r.address)&&Zo.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),HM(r)){var l=r.mnemonic;(0,ri.defineReadOnly)(i,"_mnemonic",function(){return{phrase:l.phrase,path:l.path||Ys.defaultPath,locale:l.locale||"en"}});var b=i.mnemonic,y=Ys.HDNode.fromMnemonic(b.phrase,null,b.locale).derivePath(b.path);(0,Da.computeAddress)(y.privateKey)!==i.address&&Zo.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,ri.defineReadOnly)(i,"_mnemonic",function(){return null})}else{if(oh.SigningKey.isSigningKey(r))r.curve!=="secp256k1"&&Zo.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,ri.defineReadOnly)(i,"_signingKey",function(){return r});else{typeof r=="string"&&r.match(/^[0-9a-f]*$/i)&&r.length===64&&(r="0x"+r);var x=new oh.SigningKey(r);(0,ri.defineReadOnly)(i,"_signingKey",function(){return x})}(0,ri.defineReadOnly)(i,"_mnemonic",function(){return null}),(0,ri.defineReadOnly)(i,"address",(0,Da.computeAddress)(i.publicKey))}return n&&!OM.Provider.isProvider(n)&&Zo.throwArgumentError("invalid provider","provider",n),(0,ri.defineReadOnly)(i,"provider",n||null),i}return Object.defineProperty(e.prototype,"mnemonic",{get:function(){return this._mnemonic()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"privateKey",{get:function(){return this._signingKey().privateKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"publicKey",{get:function(){return this._signingKey().publicKey},enumerable:!1,configurable:!0}),e.prototype.getAddress=function(){return Promise.resolve(this.address)},e.prototype.connect=function(r){return new e(this,r)},e.prototype.signTransaction=function(r){var n=this;return(0,ri.resolveProperties)(r).then(function(i){i.from!=null&&((0,My.getAddress)(i.from)!==n.address&&Zo.throwArgumentError("transaction from address mismatch","transaction.from",r.from),delete i.from);var a=n._signingKey().signDigest((0,Ty.keccak256)((0,Da.serialize)(i)));return(0,Da.serialize)(i,a)})},e.prototype.signMessage=function(r){return Ay(this,void 0,void 0,function(){return Sy(this,function(n){return[2,(0,Vo.joinSignature)(this._signingKey().signDigest((0,$s.hashMessage)(r)))]})})},e.prototype._signTypedData=function(r,n,i){return Ay(this,void 0,void 0,function(){var a,l=this;return Sy(this,function(b){switch(b.label){case 0:return[4,$s._TypedDataEncoder.resolveNames(r,n,i,function(y){return l.provider==null&&Zo.throwError("cannot resolve ENS names without a provider",Ey.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:y}),l.provider.resolveName(y)})];case 1:return a=b.sent(),[2,(0,Vo.joinSignature)(this._signingKey().signDigest($s._TypedDataEncoder.hash(a.domain,n,a.value)))]}})})},e.prototype.encrypt=function(r,n,i){if(typeof n=="function"&&!i&&(i=n,n={}),i&&typeof i!="function")throw new Error("invalid callback");return n||(n={}),(0,sh.encryptKeystore)(this,r,n,i)},e.createRandom=function(r){var n=(0,NM.randomBytes)(16);r||(r={}),r.extraEntropy&&(n=(0,Vo.arrayify)((0,Vo.hexDataSlice)((0,Ty.keccak256)((0,Vo.concat)([n,r.extraEntropy])),0,16)));var i=(0,Ys.entropyToMnemonic)(n,r.locale);return e.fromMnemonic(i,r.path,r.locale)},e.fromEncryptedJson=function(r,n,i){return(0,sh.decryptJsonWallet)(r,n,i).then(function(a){return new e(a)})},e.fromEncryptedJsonSync=function(r,n){return new e((0,sh.decryptJsonWalletSync)(r,n))},e.fromMnemonic=function(r,n,i){return n||(n=Ys.defaultPath),new e(Ys.HDNode.fromMnemonic(r,null,i).derivePath(n))},e}(kM.Signer);Rr.Wallet=qM;function GM(t,e){return(0,Da.recoverAddress)((0,$s.hashMessage)(t),e)}Rr.verifyMessage=GM;function XM(t,e,r,n){return(0,Da.recoverAddress)($s._TypedDataEncoder.hash(t,e,r),n)}Rr.verifyTypedData=XM});var Fy=V((uh,Ry)=>{var wD=A(S());var Tc=it("buffer"),ni=Tc.Buffer;function Ly(t,e){for(var r in t)e[r]=t[r]}ni.from&&ni.alloc&&ni.allocUnsafe&&ni.allocUnsafeSlow?Ry.exports=Tc:(Ly(Tc,uh),uh.Buffer=Ia);function Ia(t,e,r){return ni(t,e,r)}Ia.prototype=Object.create(ni.prototype);Ly(ni,Ia);Ia.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return ni(t,e,r)};Ia.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=ni(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Ia.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ni(t)};Ia.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Tc.SlowBuffer(t)}});var Iy=V((AD,Dy)=>{"use strict";var SD=A(S()),Ec=Fy().Buffer;function zM(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 i=t.charAt(n),a=i.charCodeAt(0);if(e[a]!==255)throw new TypeError(i+" is ambiguous");e[a]=n}var l=t.length,b=t.charAt(0),y=Math.log(l)/Math.log(256),x=Math.log(256)/Math.log(l);function _(F){if((Array.isArray(F)||F instanceof Uint8Array)&&(F=Ec.from(F)),!Ec.isBuffer(F))throw new TypeError("Expected Buffer");if(F.length===0)return"";for(var P=0,z=0,W=0,X=F.length;W!==X&&F[W]===0;)W++,P++;for(var ne=(X-W)*x+1>>>0,$=new Uint8Array(ne);W!==X;){for(var ae=F[W],ie=0,ee=ne-1;(ae!==0||ie<z)&&ee!==-1;ee--,ie++)ae+=256*$[ee]>>>0,$[ee]=ae%l>>>0,ae=ae/l>>>0;if(ae!==0)throw new Error("Non-zero carry");z=ie,W++}for(var ce=ne-z;ce!==ne&&$[ce]===0;)ce++;for(var te=b.repeat(P);ce<ne;++ce)te+=t.charAt($[ce]);return te}function C(F){if(typeof F!="string")throw new TypeError("Expected String");if(F.length===0)return Ec.alloc(0);for(var P=0,z=0,W=0;F[P]===b;)z++,P++;for(var X=(F.length-P)*y+1>>>0,ne=new Uint8Array(X);P<F.length;){var $=F.charCodeAt(P);if($>255)return;var ae=e[$];if(ae===255)return;for(var ie=0,ee=X-1;(ae!==0||ie<W)&&ee!==-1;ee--,ie++)ae+=l*ne[ee]>>>0,ne[ee]=ae%256>>>0,ae=ae/256>>>0;if(ae!==0)throw new Error("Non-zero carry");W=ie,P++}for(var ce=X-W;ce!==X&&ne[ce]===0;)ce++;var te=Ec.allocUnsafe(z+(X-ce));te.fill(0,0,z);for(var Y=z;ce!==X;)te[Y++]=ne[ce++];return te}function D(F){var P=C(F);if(P)return P;throw new Error("Non-base"+l+" character")}return{encode:_,decodeUnsafe:C,decode:D}}Dy.exports=zM});var ky=V((MD,Oy)=>{var TD=A(S()),KM=Iy(),ZM="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";Oy.exports=KM(ZM)});var $y=V((CD,Yy)=>{var PD=A(S()),Hy=it("fs"),Ti=it("path"),qy=it("os"),Gy=typeof __webpack_require__=="function"?__non_webpack_require__:it,VM=process.config&&process.config.variables||{},jM=!!process.env.PREBUILDS_ONLY,Ny=process.versions.modules,lh=YM()?"electron":WM()?"node-webkit":"node",dh=process.env.npm_config_arch||qy.arch(),hh=process.env.npm_config_platform||qy.platform(),Xy=process.env.LIBC||($M(hh)?"musl":"glibc"),ph=process.env.ARM_VERSION||(dh==="arm64"?"8":VM.arm_version)||"",zy=(process.versions.uv||"").split(".")[0];Yy.exports=ii;function ii(t){return Gy(ii.resolve(t))}ii.resolve=ii.path=function(t){t=Ti.resolve(t||".");try{var e=Gy(Ti.join(t,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(t=process.env[e+"_PREBUILD"])}catch{}if(!jM){var r=Jy(Ti.join(t,"build/Release"),Uy);if(r)return r;var n=Jy(Ti.join(t,"build/Debug"),Uy);if(n)return n}var i=b(t);if(i)return i;var a=b(Ti.dirname(process.execPath));if(a)return a;var l=["platform="+hh,"arch="+dh,"runtime="+lh,"abi="+Ny,"uv="+zy,ph?"armv="+ph:"","libc="+Xy,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"",typeof __webpack_require__=="function"?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+l+`
12
+ `)},t.register=function(e,r){if(r||(r=e.locale),QA)try{var n=window;n._ethers&&n._ethers.wordlists&&(n._ethers.wordlists[r]||(0,fx.defineReadOnly)(n._ethers.wordlists,r,e))}catch{}},t}();La.Wordlist=eS});var lx=V(Oo=>{"use strict";var EF=A(S()),tS=Oo&&Oo.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Oo,"__esModule",{value:!0});Oo.langCz=void 0;var Jd=$n(),rS="AbdikaceAbecedaAdresaAgreseAkceAktovkaAlejAlkoholAmputaceAnanasAndulkaAnekdotaAnketaAntikaAnulovatArchaAroganceAsfaltAsistentAspiraceAstmaAstronomAtlasAtletikaAtolAutobusAzylBabkaBachorBacilBaculkaBadatelBagetaBagrBahnoBakterieBaladaBaletkaBalkonBalonekBalvanBalzaBambusBankomatBarbarBaretBarmanBarokoBarvaBaterkaBatohBavlnaBazalkaBazilikaBazukaBednaBeranBesedaBestieBetonBezinkaBezmocBeztakBicyklBidloBiftekBikinyBilanceBiografBiologBitvaBizonBlahobytBlatouchBlechaBleduleBleskBlikatBliznaBlokovatBlouditBludBobekBobrBodlinaBodnoutBohatostBojkotBojovatBokorysBolestBorecBoroviceBotaBoubelBouchatBoudaBouleBouratBoxerBradavkaBramboraBrankaBratrBreptaBriketaBrkoBrlohBronzBroskevBrunetkaBrusinkaBrzdaBrzyBublinaBubnovatBuchtaBuditelBudkaBudovaBufetBujarostBukviceBuldokBulvaBundaBunkrBurzaButikBuvolBuzolaBydletBylinaBytovkaBzukotCapartCarevnaCedrCeduleCejchCejnCelaCelerCelkemCelniceCeninaCennostCenovkaCentrumCenzorCestopisCetkaChalupaChapadloCharitaChataChechtatChemieChichotChirurgChladChlebaChlubitChmelChmuraChobotChocholChodbaCholeraChomoutChopitChorobaChovChrapotChrlitChrtChrupChtivostChudinaChutnatChvatChvilkaChvostChybaChystatChytitCibuleCigaretaCihelnaCihlaCinkotCirkusCisternaCitaceCitrusCizinecCizostClonaCokolivCouvatCtitelCtnostCudnostCuketaCukrCupotCvaknoutCvalCvikCvrkotCyklistaDalekoDarebaDatelDatumDceraDebataDechovkaDecibelDeficitDeflaceDeklDekretDemokratDepreseDerbyDeskaDetektivDikobrazDiktovatDiodaDiplomDiskDisplejDivadloDivochDlahaDlouhoDluhopisDnesDobroDobytekDocentDochutitDodnesDohledDohodaDohraDojemDojniceDokladDokolaDoktorDokumentDolarDolevaDolinaDomaDominantDomluvitDomovDonutitDopadDopisDoplnitDoposudDoprovodDopustitDorazitDorostDortDosahDoslovDostatekDosudDosytaDotazDotekDotknoutDoufatDoutnatDovozceDozaduDoznatDozorceDrahotaDrakDramatikDravecDrazeDrdolDrobnostDrogerieDrozdDrsnostDrtitDrzostDubenDuchovnoDudekDuhaDuhovkaDusitDusnoDutostDvojiceDvorecDynamitEkologEkonomieElektronElipsaEmailEmiseEmoceEmpatieEpizodaEpochaEpopejEposEsejEsenceEskortaEskymoEtiketaEuforieEvoluceExekuceExkurzeExpediceExplozeExportExtraktFackaFajfkaFakultaFanatikFantazieFarmacieFavoritFazoleFederaceFejetonFenkaFialkaFigurantFilozofFiltrFinanceFintaFixaceFjordFlanelFlirtFlotilaFondFosforFotbalFotkaFotonFrakceFreskaFrontaFukarFunkceFyzikaGalejeGarantGenetikaGeologGilotinaGlazuraGlejtGolemGolfistaGotikaGrafGramofonGranuleGrepGrilGrogGroteskaGumaHadiceHadrHalaHalenkaHanbaHanopisHarfaHarpunaHavranHebkostHejkalHejnoHejtmanHektarHelmaHematomHerecHernaHesloHezkyHistorikHladovkaHlasivkyHlavaHledatHlenHlodavecHlohHloupostHltatHlubinaHluchotaHmatHmotaHmyzHnisHnojivoHnoutHoblinaHobojHochHodinyHodlatHodnotaHodovatHojnostHokejHolinkaHolkaHolubHomoleHonitbaHonoraceHoralHordaHorizontHorkoHorlivecHormonHorninaHoroskopHorstvoHospodaHostinaHotovostHoubaHoufHoupatHouskaHovorHradbaHraniceHravostHrazdaHrbolekHrdinaHrdloHrdostHrnekHrobkaHromadaHrotHroudaHrozenHrstkaHrubostHryzatHubenostHubnoutHudbaHukotHumrHusitaHustotaHvozdHybnostHydrantHygienaHymnaHysterikIdylkaIhnedIkonaIluzeImunitaInfekceInflaceInkasoInovaceInspekceInternetInvalidaInvestorInzerceIronieJablkoJachtaJahodaJakmileJakostJalovecJantarJarmarkJaroJasanJasnoJatkaJavorJazykJedinecJedleJednatelJehlanJekotJelenJelitoJemnostJenomJepiceJeseterJevitJezdecJezeroJinakJindyJinochJiskraJistotaJitrniceJizvaJmenovatJogurtJurtaKabaretKabelKabinetKachnaKadetKadidloKahanKajakKajutaKakaoKaktusKalamitaKalhotyKalibrKalnostKameraKamkolivKamnaKanibalKanoeKantorKapalinaKapelaKapitolaKapkaKapleKapotaKaprKapustaKapybaraKaramelKarotkaKartonKasaKatalogKatedraKauceKauzaKavalecKazajkaKazetaKazivostKdekolivKdesiKedlubenKempKeramikaKinoKlacekKladivoKlamKlapotKlasikaKlaunKlecKlenbaKlepatKlesnoutKlidKlimaKlisnaKloboukKlokanKlopaKloubKlubovnaKlusatKluzkostKmenKmitatKmotrKnihaKnotKoaliceKoberecKobkaKoblihaKobylaKocourKohoutKojenecKokosKoktejlKolapsKoledaKolizeKoloKomandoKometaKomikKomnataKomoraKompasKomunitaKonatKonceptKondiceKonecKonfeseKongresKoninaKonkursKontaktKonzervaKopanecKopieKopnoutKoprovkaKorbelKorektorKormidloKoroptevKorpusKorunaKorytoKorzetKosatecKostkaKotelKotletaKotoulKoukatKoupelnaKousekKouzloKovbojKozaKozorohKrabiceKrachKrajinaKralovatKrasopisKravataKreditKrejcarKresbaKrevetaKriketKritikKrizeKrkavecKrmelecKrmivoKrocanKrokKronikaKropitKroupaKrovkaKrtekKruhadloKrupiceKrutostKrvinkaKrychleKryptaKrystalKrytKudlankaKufrKujnostKuklaKulajdaKulichKulkaKulometKulturaKunaKupodivuKurtKurzorKutilKvalitaKvasinkaKvestorKynologKyselinaKytaraKyticeKytkaKytovecKyvadloLabradorLachtanLadnostLaikLakomecLamelaLampaLanovkaLasiceLasoLasturaLatinkaLavinaLebkaLeckdyLedenLedniceLedovkaLedvinaLegendaLegieLegraceLehceLehkostLehnoutLektvarLenochodLentilkaLepenkaLepidloLetadloLetecLetmoLetokruhLevhartLevitaceLevobokLibraLichotkaLidojedLidskostLihovinaLijavecLilekLimetkaLinieLinkaLinoleumListopadLitinaLitovatLobistaLodivodLogikaLogopedLokalitaLoketLomcovatLopataLopuchLordLososLotrLoudalLouhLoukaLouskatLovecLstivostLucernaLuciferLumpLuskLustraceLviceLyraLyrikaLysinaMadamMadloMagistrMahagonMajetekMajitelMajoritaMakakMakoviceMakrelaMalbaMalinaMalovatMalviceMaminkaMandleMankoMarnostMasakrMaskotMasopustMaticeMatrikaMaturitaMazanecMazivoMazlitMazurkaMdlobaMechanikMeditaceMedovinaMelasaMelounMentolkaMetlaMetodaMetrMezeraMigraceMihnoutMihuleMikinaMikrofonMilenecMilimetrMilostMimikaMincovnaMinibarMinometMinulostMiskaMistrMixovatMladostMlhaMlhovinaMlokMlsatMluvitMnichMnohemMobilMocnostModelkaModlitbaMohylaMokroMolekulaMomentkaMonarchaMonoklMonstrumMontovatMonzunMosazMoskytMostMotivaceMotorkaMotykaMouchaMoudrostMozaikaMozekMozolMramorMravenecMrkevMrtvolaMrzetMrzutostMstitelMudrcMuflonMulatMumieMuniceMusetMutaceMuzeumMuzikantMyslivecMzdaNabouratNachytatNadaceNadbytekNadhozNadobroNadpisNahlasNahnatNahodileNahraditNaivitaNajednouNajistoNajmoutNaklonitNakonecNakrmitNalevoNamazatNamluvitNanometrNaokoNaopakNaostroNapadatNapevnoNaplnitNapnoutNaposledNaprostoNaroditNarubyNarychloNasaditNasekatNaslepoNastatNatolikNavenekNavrchNavzdoryNazvatNebeNechatNeckyNedalekoNedbatNeduhNegaceNehetNehodaNejenNejprveNeklidNelibostNemilostNemocNeochotaNeonkaNepokojNerostNervNesmyslNesouladNetvorNeuronNevinaNezvykleNicotaNijakNikamNikdyNiklNikterakNitroNoclehNohaviceNominaceNoraNorekNositelNosnostNouzeNovinyNovotaNozdraNudaNudleNugetNutitNutnostNutrieNymfaObalObarvitObavaObdivObecObehnatObejmoutObezitaObhajobaObilniceObjasnitObjektObklopitOblastOblekOblibaOblohaObludaObnosObohatitObojekOboutObrazecObrnaObrubaObrysObsahObsluhaObstaratObuvObvazObvinitObvodObvykleObyvatelObzorOcasOcelOcenitOchladitOchotaOchranaOcitnoutOdbojOdbytOdchodOdcizitOdebratOdeslatOdevzdatOdezvaOdhadceOdhoditOdjetOdjinudOdkazOdkoupitOdlivOdlukaOdmlkaOdolnostOdpadOdpisOdploutOdporOdpustitOdpykatOdrazkaOdsouditOdstupOdsunOdtokOdtudOdvahaOdvetaOdvolatOdvracetOdznakOfinaOfsajdOhlasOhniskoOhradaOhrozitOhryzekOkapOkeniceOklikaOknoOkouzlitOkovyOkrasaOkresOkrsekOkruhOkupantOkurkaOkusitOlejninaOlizovatOmakOmeletaOmezitOmladinaOmlouvatOmluvaOmylOnehdyOpakovatOpasekOperaceOpiceOpilostOpisovatOporaOpoziceOpravduOprotiOrbitalOrchestrOrgieOrliceOrlojOrtelOsadaOschnoutOsikaOsivoOslavaOslepitOslnitOslovitOsnovaOsobaOsolitOspalecOstenOstrahaOstudaOstychOsvojitOteplitOtiskOtopOtrhatOtrlostOtrokOtrubyOtvorOvanoutOvarOvesOvlivnitOvoceOxidOzdobaPachatelPacientPadouchPahorekPaktPalandaPalecPalivoPalubaPamfletPamlsekPanenkaPanikaPannaPanovatPanstvoPantoflePaprikaParketaParodiePartaParukaParybaPasekaPasivitaPastelkaPatentPatronaPavoukPaznehtPazourekPeckaPedagogPejsekPekloPelotonPenaltaPendrekPenzePeriskopPeroPestrostPetardaPeticePetrolejPevninaPexesoPianistaPihaPijavicePiklePiknikPilinaPilnostPilulkaPinzetaPipetaPisatelPistolePitevnaPivnicePivovarPlacentaPlakatPlamenPlanetaPlastikaPlatitPlavidloPlazPlechPlemenoPlentaPlesPletivoPlevelPlivatPlnitPlnoPlochaPlodinaPlombaPloutPlukPlynPobavitPobytPochodPocitPoctivecPodatPodcenitPodepsatPodhledPodivitPodkladPodmanitPodnikPodobaPodporaPodrazPodstataPodvodPodzimPoeziePohankaPohnutkaPohovorPohromaPohybPointaPojistkaPojmoutPokazitPoklesPokojPokrokPokutaPokynPolednePolibekPolknoutPolohaPolynomPomaluPominoutPomlkaPomocPomstaPomysletPonechatPonorkaPonurostPopadatPopelPopisekPoplachPoprositPopsatPopudPoradcePorcePorodPoruchaPoryvPosaditPosedPosilaPoskokPoslanecPosouditPospoluPostavaPosudekPosypPotahPotkanPotleskPotomekPotravaPotupaPotvoraPoukazPoutoPouzdroPovahaPovidlaPovlakPovozPovrchPovstatPovykPovzdechPozdravPozemekPoznatekPozorPozvatPracovatPrahoryPraktikaPralesPraotecPraporekPrasePravdaPrincipPrknoProbuditProcentoProdejProfeseProhraProjektProlomitPromilePronikatPropadProrokProsbaProtonProutekProvazPrskavkaPrstenPrudkostPrutPrvekPrvohoryPsanecPsovodPstruhPtactvoPubertaPuchPudlPukavecPuklinaPukrlePultPumpaPuncPupenPusaPusinkaPustinaPutovatPutykaPyramidaPyskPytelRacekRachotRadiaceRadniceRadonRaftRagbyRaketaRakovinaRamenoRampouchRandeRarachRaritaRasovnaRastrRatolestRazanceRazidloReagovatReakceReceptRedaktorReferentReflexRejnokReklamaRekordRekrutRektorReputaceRevizeRevmaRevolverRezervaRiskovatRizikoRobotikaRodokmenRohovkaRokleRokokoRomanetoRopovodRopuchaRorejsRosolRostlinaRotmistrRotopedRotundaRoubenkaRouchoRoupRouraRovinaRovniceRozborRozchodRozdatRozeznatRozhodceRozinkaRozjezdRozkazRozlohaRozmarRozpadRozruchRozsahRoztokRozumRozvodRubrikaRuchadloRukaviceRukopisRybaRybolovRychlostRydloRypadloRytinaRyzostSadistaSahatSakoSamecSamizdatSamotaSanitkaSardinkaSasankaSatelitSazbaSazeniceSborSchovatSebrankaSeceseSedadloSedimentSedloSehnatSejmoutSekeraSektaSekundaSekvojeSemenoSenoServisSesaditSeshoraSeskokSeslatSestraSesuvSesypatSetbaSetinaSetkatSetnoutSetrvatSeverSeznamShodaShrnoutSifonSilniceSirkaSirotekSirupSituaceSkafandrSkaliskoSkanzenSkautSkeptikSkicaSkladbaSkleniceSkloSkluzSkobaSkokanSkoroSkriptaSkrzSkupinaSkvostSkvrnaSlabikaSladidloSlaninaSlastSlavnostSledovatSlepecSlevaSlezinaSlibSlinaSlizniceSlonSloupekSlovoSluchSluhaSlunceSlupkaSlzaSmaragdSmetanaSmilstvoSmlouvaSmogSmradSmrkSmrtkaSmutekSmyslSnadSnahaSnobSobotaSochaSodovkaSokolSopkaSotvaSoubojSoucitSoudceSouhlasSouladSoumrakSoupravaSousedSoutokSouvisetSpalovnaSpasitelSpisSplavSpodekSpojenecSpoluSponzorSpornostSpoustaSprchaSpustitSrandaSrazSrdceSrnaSrnecSrovnatSrpenSrstSrubStaniceStarostaStatikaStavbaStehnoStezkaStodolaStolekStopaStornoStoupatStrachStresStrhnoutStromStrunaStudnaStupniceStvolStykSubjektSubtropySucharSudostSuknoSundatSunoutSurikataSurovinaSvahSvalstvoSvetrSvatbaSvazekSvisleSvitekSvobodaSvodidloSvorkaSvrabSykavkaSykotSynekSynovecSypatSypkostSyrovostSyselSytostTabletkaTabuleTahounTajemnoTajfunTajgaTajitTajnostTaktikaTamhleTamponTancovatTanecTankerTapetaTaveninaTazatelTechnikaTehdyTekutinaTelefonTemnotaTendenceTenistaTenorTeplotaTepnaTeprveTerapieTermoskaTextilTichoTiskopisTitulekTkadlecTkaninaTlapkaTleskatTlukotTlupaTmelToaletaTopinkaTopolTorzoTouhaToulecTradiceTraktorTrampTrasaTraverzaTrefitTrestTrezorTrhavinaTrhlinaTrochuTrojiceTroskaTroubaTrpceTrpitelTrpkostTrubecTruchlitTruhliceTrusTrvatTudyTuhnoutTuhostTundraTuristaTurnajTuzemskoTvarohTvorbaTvrdostTvrzTygrTykevUbohostUbozeUbratUbrousekUbrusUbytovnaUchoUctivostUdivitUhraditUjednatUjistitUjmoutUkazatelUklidnitUklonitUkotvitUkrojitUliceUlitaUlovitUmyvadloUnavitUniformaUniknoutUpadnoutUplatnitUplynoutUpoutatUpravitUranUrazitUsednoutUsilovatUsmrtitUsnadnitUsnoutUsouditUstlatUstrnoutUtahovatUtkatUtlumitUtonoutUtopenecUtrousitUvalitUvolnitUvozovkaUzdravitUzelUzeninaUzlinaUznatVagonValchaValounVanaVandalVanilkaVaranVarhanyVarovatVcelkuVchodVdovaVedroVegetaceVejceVelbloudVeletrhVelitelVelmocVelrybaVenkovVerandaVerzeVeselkaVeskrzeVesniceVespoduVestaVeterinaVeverkaVibraceVichrVideohraVidinaVidleVilaViniceVisetVitalitaVizeVizitkaVjezdVkladVkusVlajkaVlakVlasecVlevoVlhkostVlivVlnovkaVloupatVnucovatVnukVodaVodivostVodoznakVodstvoVojenskyVojnaVojskoVolantVolbaVolitVolnoVoskovkaVozidloVozovnaVpravoVrabecVracetVrahVrataVrbaVrcholekVrhatVrstvaVrtuleVsaditVstoupitVstupVtipVybavitVybratVychovatVydatVydraVyfotitVyhledatVyhnoutVyhoditVyhraditVyhubitVyjasnitVyjetVyjmoutVyklopitVykonatVylekatVymazatVymezitVymizetVymysletVynechatVynikatVynutitVypadatVyplatitVypravitVypustitVyrazitVyrovnatVyrvatVyslovitVysokoVystavitVysunoutVysypatVytasitVytesatVytratitVyvinoutVyvolatVyvrhelVyzdobitVyznatVzaduVzbuditVzchopitVzdorVzduchVzdychatVzestupVzhledemVzkazVzlykatVznikVzorekVzpouraVztahVztekXylofonZabratZabydletZachovatZadarmoZadusitZafoukatZahltitZahoditZahradaZahynoutZajatecZajetZajistitZaklepatZakoupitZalepitZamezitZamotatZamysletZanechatZanikatZaplatitZapojitZapsatZarazitZastavitZasunoutZatajitZatemnitZatknoutZaujmoutZavalitZaveletZavinitZavolatZavrtatZazvonitZbavitZbrusuZbudovatZbytekZdalekaZdarmaZdatnostZdivoZdobitZdrojZdvihZdymadloZeleninaZemanZeminaZeptatZezaduZezdolaZhatitZhltnoutZhlubokaZhotovitZhrubaZimaZimniceZjemnitZklamatZkoumatZkratkaZkumavkaZlatoZlehkaZlobaZlomZlostZlozvykZmapovatZmarZmatekZmijeZmizetZmocnitZmodratZmrzlinaZmutovatZnakZnalostZnamenatZnovuZobrazitZotavitZoubekZoufaleZploditZpomalitZpravaZprostitZprudkaZprvuZradaZranitZrcadloZrnitostZrnoZrovnaZrychlitZrzavostZtichaZtratitZubovinaZubrZvednoutZvenkuZveselaZvonZvratZvukovodZvyk",Xs=null;function cx(t){if(Xs==null&&(Xs=rS.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Jd.Wordlist.check(t)!=="0x25f44555f4af25b51a711136e1c7d6e50ce9f8917d39d6b1f076b2bb4d2fac1a"))throw Xs=null,new Error("BIP39 Wordlist for en (English) FAILED")}var nS=function(t){tS(e,t);function e(){return t.call(this,"cz")||this}return e.prototype.getWord=function(r){return cx(this),Xs[r]},e.prototype.getWordIndex=function(r){return cx(this),Xs.indexOf(r)},e}(Jd.Wordlist),ux=new nS;Oo.langCz=ux;Jd.Wordlist.register(ux)});var px=V(ko=>{"use strict";var BF=A(S()),iS=ko&&ko.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(ko,"__esModule",{value:!0});ko.langEn=void 0;var Ud=$n(),aS="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo",zs=null;function dx(t){if(zs==null&&(zs=aS.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),Ud.Wordlist.check(t)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw zs=null,new Error("BIP39 Wordlist for en (English) FAILED")}var oS=function(t){iS(e,t);function e(){return t.call(this,"en")||this}return e.prototype.getWord=function(r){return dx(this),zs[r]},e.prototype.getWordIndex=function(r){return dx(this),zs.indexOf(r)},e}(Ud.Wordlist),hx=new oS;ko.langEn=hx;Ud.Wordlist.register(hx)});var xx=V(No=>{"use strict";var PF=A(S()),sS=No&&No.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(No,"__esModule",{value:!0});No.langEs=void 0;var uc=Or(),lc=$n(),fS="A/bacoAbdomenAbejaAbiertoAbogadoAbonoAbortoAbrazoAbrirAbueloAbusoAcabarAcademiaAccesoAccio/nAceiteAcelgaAcentoAceptarA/cidoAclararAcne/AcogerAcosoActivoActoActrizActuarAcudirAcuerdoAcusarAdictoAdmitirAdoptarAdornoAduanaAdultoAe/reoAfectarAficio/nAfinarAfirmarA/gilAgitarAgoni/aAgostoAgotarAgregarAgrioAguaAgudoA/guilaAgujaAhogoAhorroAireAislarAjedrezAjenoAjusteAlacra/nAlambreAlarmaAlbaA/lbumAlcaldeAldeaAlegreAlejarAlertaAletaAlfilerAlgaAlgodo/nAliadoAlientoAlivioAlmaAlmejaAlmi/barAltarAltezaAltivoAltoAlturaAlumnoAlzarAmableAmanteAmapolaAmargoAmasarA/mbarA/mbitoAmenoAmigoAmistadAmorAmparoAmplioAnchoAncianoAnclaAndarAnde/nAnemiaA/nguloAnilloA/nimoAni/sAnotarAntenaAntiguoAntojoAnualAnularAnuncioA~adirA~ejoA~oApagarAparatoApetitoApioAplicarApodoAporteApoyoAprenderAprobarApuestaApuroAradoAra~aArarA/rbitroA/rbolArbustoArchivoArcoArderArdillaArduoA/reaA/ridoAriesArmoni/aArne/sAromaArpaArpo/nArregloArrozArrugaArteArtistaAsaAsadoAsaltoAscensoAsegurarAseoAsesorAsientoAsiloAsistirAsnoAsombroA/speroAstillaAstroAstutoAsumirAsuntoAtajoAtaqueAtarAtentoAteoA/ticoAtletaA/tomoAtraerAtrozAtu/nAudazAudioAugeAulaAumentoAusenteAutorAvalAvanceAvaroAveAvellanaAvenaAvestruzAvio/nAvisoAyerAyudaAyunoAzafra/nAzarAzoteAzu/carAzufreAzulBabaBaborBacheBahi/aBaileBajarBalanzaBalco/nBaldeBambu/BancoBandaBa~oBarbaBarcoBarnizBarroBa/sculaBasto/nBasuraBatallaBateri/aBatirBatutaBau/lBazarBebe/BebidaBelloBesarBesoBestiaBichoBienBingoBlancoBloqueBlusaBoaBobinaBoboBocaBocinaBodaBodegaBoinaBolaBoleroBolsaBombaBondadBonitoBonoBonsa/iBordeBorrarBosqueBoteBoti/nBo/vedaBozalBravoBrazoBrechaBreveBrilloBrincoBrisaBrocaBromaBronceBroteBrujaBruscoBrutoBuceoBucleBuenoBueyBufandaBufo/nBu/hoBuitreBultoBurbujaBurlaBurroBuscarButacaBuzo/nCaballoCabezaCabinaCabraCacaoCada/verCadenaCaerCafe/Cai/daCaima/nCajaCajo/nCalCalamarCalcioCaldoCalidadCalleCalmaCalorCalvoCamaCambioCamelloCaminoCampoCa/ncerCandilCanelaCanguroCanicaCantoCa~aCa~o/nCaobaCaosCapazCapita/nCapoteCaptarCapuchaCaraCarbo/nCa/rcelCaretaCargaCari~oCarneCarpetaCarroCartaCasaCascoCaseroCaspaCastorCatorceCatreCaudalCausaCazoCebollaCederCedroCeldaCe/lebreCelosoCe/lulaCementoCenizaCentroCercaCerdoCerezaCeroCerrarCertezaCe/spedCetroChacalChalecoChampu/ChanclaChapaCharlaChicoChisteChivoChoqueChozaChuletaChuparCiclo/nCiegoCieloCienCiertoCifraCigarroCimaCincoCineCintaCipre/sCircoCiruelaCisneCitaCiudadClamorClanClaroClaseClaveClienteClimaCli/nicaCobreCoccio/nCochinoCocinaCocoCo/digoCodoCofreCogerCoheteCoji/nCojoColaColchaColegioColgarColinaCollarColmoColumnaCombateComerComidaCo/modoCompraCondeConejoCongaConocerConsejoContarCopaCopiaCorazo/nCorbataCorchoCordo/nCoronaCorrerCoserCosmosCostaCra/neoCra/terCrearCrecerCrei/doCremaCri/aCrimenCriptaCrisisCromoCro/nicaCroquetaCrudoCruzCuadroCuartoCuatroCuboCubrirCucharaCuelloCuentoCuerdaCuestaCuevaCuidarCulebraCulpaCultoCumbreCumplirCunaCunetaCuotaCupo/nCu/pulaCurarCuriosoCursoCurvaCutisDamaDanzaDarDardoDa/tilDeberDe/bilDe/cadaDecirDedoDefensaDefinirDejarDelfi/nDelgadoDelitoDemoraDensoDentalDeporteDerechoDerrotaDesayunoDeseoDesfileDesnudoDestinoDesvi/oDetalleDetenerDeudaDi/aDiabloDiademaDiamanteDianaDiarioDibujoDictarDienteDietaDiezDifi/cilDignoDilemaDiluirDineroDirectoDirigirDiscoDise~oDisfrazDivaDivinoDobleDoceDolorDomingoDonDonarDoradoDormirDorsoDosDosisDrago/nDrogaDuchaDudaDueloDue~oDulceDu/oDuqueDurarDurezaDuroE/banoEbrioEcharEcoEcuadorEdadEdicio/nEdificioEditorEducarEfectoEficazEjeEjemploElefanteElegirElementoElevarElipseE/liteElixirElogioEludirEmbudoEmitirEmocio/nEmpateEmpe~oEmpleoEmpresaEnanoEncargoEnchufeEnci/aEnemigoEneroEnfadoEnfermoEnga~oEnigmaEnlaceEnormeEnredoEnsayoEnse~arEnteroEntrarEnvaseEnvi/oE/pocaEquipoErizoEscalaEscenaEscolarEscribirEscudoEsenciaEsferaEsfuerzoEspadaEspejoEspi/aEsposaEspumaEsqui/EstarEsteEstiloEstufaEtapaEternoE/ticaEtniaEvadirEvaluarEventoEvitarExactoExamenExcesoExcusaExentoExigirExilioExistirE/xitoExpertoExplicarExponerExtremoFa/bricaFa/bulaFachadaFa/cilFactorFaenaFajaFaldaFalloFalsoFaltarFamaFamiliaFamosoFarao/nFarmaciaFarolFarsaFaseFatigaFaunaFavorFaxFebreroFechaFelizFeoFeriaFerozFe/rtilFervorFesti/nFiableFianzaFiarFibraFiccio/nFichaFideoFiebreFielFieraFiestaFiguraFijarFijoFilaFileteFilialFiltroFinFincaFingirFinitoFirmaFlacoFlautaFlechaFlorFlotaFluirFlujoFlu/orFobiaFocaFogataFogo/nFolioFolletoFondoFormaForroFortunaForzarFosaFotoFracasoFra/gilFranjaFraseFraudeFrei/rFrenoFresaFri/oFritoFrutaFuegoFuenteFuerzaFugaFumarFuncio/nFundaFurgo/nFuriaFusilFu/tbolFuturoGacelaGafasGaitaGajoGalaGaleri/aGalloGambaGanarGanchoGangaGansoGarajeGarzaGasolinaGastarGatoGavila/nGemeloGemirGenGe/neroGenioGenteGeranioGerenteGermenGestoGiganteGimnasioGirarGiroGlaciarGloboGloriaGolGolfoGolosoGolpeGomaGordoGorilaGorraGotaGoteoGozarGradaGra/ficoGranoGrasaGratisGraveGrietaGrilloGripeGrisGritoGrosorGru/aGruesoGrumoGrupoGuanteGuapoGuardiaGuerraGui/aGui~oGuionGuisoGuitarraGusanoGustarHaberHa/bilHablarHacerHachaHadaHallarHamacaHarinaHazHaza~aHebillaHebraHechoHeladoHelioHembraHerirHermanoHe/roeHervirHieloHierroHi/gadoHigieneHijoHimnoHistoriaHocicoHogarHogueraHojaHombreHongoHonorHonraHoraHormigaHornoHostilHoyoHuecoHuelgaHuertaHuesoHuevoHuidaHuirHumanoHu/medoHumildeHumoHundirHuraca/nHurtoIconoIdealIdiomaI/doloIglesiaIglu/IgualIlegalIlusio/nImagenIma/nImitarImparImperioImponerImpulsoIncapazI/ndiceInerteInfielInformeIngenioInicioInmensoInmuneInnatoInsectoInstanteIntere/sI/ntimoIntuirInu/tilInviernoIraIrisIroni/aIslaIsloteJabali/Jabo/nJamo/nJarabeJardi/nJarraJaulaJazmi/nJefeJeringaJineteJornadaJorobaJovenJoyaJuergaJuevesJuezJugadorJugoJugueteJuicioJuncoJunglaJunioJuntarJu/piterJurarJustoJuvenilJuzgarKiloKoalaLabioLacioLacraLadoLadro/nLagartoLa/grimaLagunaLaicoLamerLa/minaLa/mparaLanaLanchaLangostaLanzaLa/pizLargoLarvaLa/stimaLataLa/texLatirLaurelLavarLazoLealLeccio/nLecheLectorLeerLegio/nLegumbreLejanoLenguaLentoLe~aLeo/nLeopardoLesio/nLetalLetraLeveLeyendaLibertadLibroLicorLi/derLidiarLienzoLigaLigeroLimaLi/miteLimo/nLimpioLinceLindoLi/neaLingoteLinoLinternaLi/quidoLisoListaLiteraLitioLitroLlagaLlamaLlantoLlaveLlegarLlenarLlevarLlorarLloverLluviaLoboLocio/nLocoLocuraLo/gicaLogroLombrizLomoLonjaLoteLuchaLucirLugarLujoLunaLunesLupaLustroLutoLuzMacetaMachoMaderaMadreMaduroMaestroMafiaMagiaMagoMai/zMaldadMaletaMallaMaloMama/MamboMamutMancoMandoManejarMangaManiqui/ManjarManoMansoMantaMa~anaMapaMa/quinaMarMarcoMareaMarfilMargenMaridoMa/rmolMarro/nMartesMarzoMasaMa/scaraMasivoMatarMateriaMatizMatrizMa/ximoMayorMazorcaMechaMedallaMedioMe/dulaMejillaMejorMelenaMelo/nMemoriaMenorMensajeMenteMenu/MercadoMerengueMe/ritoMesMeso/nMetaMeterMe/todoMetroMezclaMiedoMielMiembroMigaMilMilagroMilitarMillo/nMimoMinaMineroMi/nimoMinutoMiopeMirarMisaMiseriaMisilMismoMitadMitoMochilaMocio/nModaModeloMohoMojarMoldeMolerMolinoMomentoMomiaMonarcaMonedaMonjaMontoMo~oMoradaMorderMorenoMorirMorroMorsaMortalMoscaMostrarMotivoMoverMo/vilMozoMuchoMudarMuebleMuelaMuerteMuestraMugreMujerMulaMuletaMultaMundoMu~ecaMuralMuroMu/sculoMuseoMusgoMu/sicaMusloNa/carNacio/nNadarNaipeNaranjaNarizNarrarNasalNatalNativoNaturalNa/useaNavalNaveNavidadNecioNe/ctarNegarNegocioNegroNeo/nNervioNetoNeutroNevarNeveraNichoNidoNieblaNietoNi~ezNi~oNi/tidoNivelNoblezaNocheNo/minaNoriaNormaNorteNotaNoticiaNovatoNovelaNovioNubeNucaNu/cleoNudilloNudoNueraNueveNuezNuloNu/meroNutriaOasisObesoObispoObjetoObraObreroObservarObtenerObvioOcaOcasoOce/anoOchentaOchoOcioOcreOctavoOctubreOcultoOcuparOcurrirOdiarOdioOdiseaOesteOfensaOfertaOficioOfrecerOgroOi/doOi/rOjoOlaOleadaOlfatoOlivoOllaOlmoOlorOlvidoOmbligoOndaOnzaOpacoOpcio/nO/peraOpinarOponerOptarO/pticaOpuestoOracio/nOradorOralO/rbitaOrcaOrdenOrejaO/rganoOrgi/aOrgulloOrienteOrigenOrillaOroOrquestaOrugaOsadi/aOscuroOseznoOsoOstraOto~oOtroOvejaO/vuloO/xidoOxi/genoOyenteOzonoPactoPadrePaellaPa/ginaPagoPai/sPa/jaroPalabraPalcoPaletaPa/lidoPalmaPalomaPalparPanPanalPa/nicoPanteraPa~ueloPapa/PapelPapillaPaquetePararParcelaParedParirParoPa/rpadoParquePa/rrafoPartePasarPaseoPasio/nPasoPastaPataPatioPatriaPausaPautaPavoPayasoPeato/nPecadoPeceraPechoPedalPedirPegarPeinePelarPelda~oPeleaPeligroPellejoPeloPelucaPenaPensarPe~o/nPeo/nPeorPepinoPeque~oPeraPerchaPerderPerezaPerfilPericoPerlaPermisoPerroPersonaPesaPescaPe/simoPesta~aPe/taloPetro/leoPezPezu~aPicarPicho/nPiePiedraPiernaPiezaPijamaPilarPilotoPimientaPinoPintorPinzaPi~aPiojoPipaPirataPisarPiscinaPisoPistaPito/nPizcaPlacaPlanPlataPlayaPlazaPleitoPlenoPlomoPlumaPluralPobrePocoPoderPodioPoemaPoesi/aPoetaPolenPolici/aPolloPolvoPomadaPomeloPomoPompaPonerPorcio/nPortalPosadaPoseerPosiblePostePotenciaPotroPozoPradoPrecozPreguntaPremioPrensaPresoPrevioPrimoPri/ncipePrisio/nPrivarProaProbarProcesoProductoProezaProfesorProgramaProlePromesaProntoPropioPro/ximoPruebaPu/blicoPucheroPudorPuebloPuertaPuestoPulgaPulirPulmo/nPulpoPulsoPumaPuntoPu~alPu~oPupaPupilaPure/QuedarQuejaQuemarQuererQuesoQuietoQui/micaQuinceQuitarRa/banoRabiaRaboRacio/nRadicalRai/zRamaRampaRanchoRangoRapazRa/pidoRaptoRasgoRaspaRatoRayoRazaRazo/nReaccio/nRealidadReba~oReboteRecaerRecetaRechazoRecogerRecreoRectoRecursoRedRedondoReducirReflejoReformaRefra/nRefugioRegaloRegirReglaRegresoRehe/nReinoRei/rRejaRelatoRelevoRelieveRellenoRelojRemarRemedioRemoRencorRendirRentaRepartoRepetirReposoReptilResRescateResinaRespetoRestoResumenRetiroRetornoRetratoReunirReve/sRevistaReyRezarRicoRiegoRiendaRiesgoRifaRi/gidoRigorRinco/nRi~o/nRi/oRiquezaRisaRitmoRitoRizoRobleRoceRociarRodarRodeoRodillaRoerRojizoRojoRomeroRomperRonRoncoRondaRopaRoperoRosaRoscaRostroRotarRubi/RuborRudoRuedaRugirRuidoRuinaRuletaRuloRumboRumorRupturaRutaRutinaSa/badoSaberSabioSableSacarSagazSagradoSalaSaldoSaleroSalirSalmo/nSalo/nSalsaSaltoSaludSalvarSambaSancio/nSandi/aSanearSangreSanidadSanoSantoSapoSaqueSardinaSarte/nSastreSata/nSaunaSaxofo/nSeccio/nSecoSecretoSectaSedSeguirSeisSelloSelvaSemanaSemillaSendaSensorSe~alSe~orSepararSepiaSequi/aSerSerieSermo/nServirSesentaSesio/nSetaSetentaSeveroSexoSextoSidraSiestaSieteSigloSignoSi/labaSilbarSilencioSillaSi/mboloSimioSirenaSistemaSitioSituarSobreSocioSodioSolSolapaSoldadoSoledadSo/lidoSoltarSolucio/nSombraSondeoSonidoSonoroSonrisaSopaSoplarSoporteSordoSorpresaSorteoSoste/nSo/tanoSuaveSubirSucesoSudorSuegraSueloSue~oSuerteSufrirSujetoSulta/nSumarSuperarSuplirSuponerSupremoSurSurcoSure~oSurgirSustoSutilTabacoTabiqueTablaTabu/TacoTactoTajoTalarTalcoTalentoTallaTalo/nTama~oTamborTangoTanqueTapaTapeteTapiaTapo/nTaquillaTardeTareaTarifaTarjetaTarotTarroTartaTatuajeTauroTazaTazo/nTeatroTechoTeclaTe/cnicaTejadoTejerTejidoTelaTele/fonoTemaTemorTemploTenazTenderTenerTenisTensoTeori/aTerapiaTercoTe/rminoTernuraTerrorTesisTesoroTestigoTeteraTextoTezTibioTiburo/nTiempoTiendaTierraTiesoTigreTijeraTildeTimbreTi/midoTimoTintaTi/oTi/picoTipoTiraTiro/nTita/nTi/tereTi/tuloTizaToallaTobilloTocarTocinoTodoTogaToldoTomarTonoTontoToparTopeToqueTo/raxToreroTormentaTorneoToroTorpedoTorreTorsoTortugaTosToscoToserTo/xicoTrabajoTractorTraerTra/ficoTragoTrajeTramoTranceTratoTraumaTrazarTre/bolTreguaTreintaTrenTreparTresTribuTrigoTripaTristeTriunfoTrofeoTrompaTroncoTropaTroteTrozoTrucoTruenoTrufaTuberi/aTuboTuertoTumbaTumorTu/nelTu/nicaTurbinaTurismoTurnoTutorUbicarU/lceraUmbralUnidadUnirUniversoUnoUntarU~aUrbanoUrbeUrgenteUrnaUsarUsuarioU/tilUtopi/aUvaVacaVaci/oVacunaVagarVagoVainaVajillaValeVa/lidoValleValorVa/lvulaVampiroVaraVariarVaro/nVasoVecinoVectorVehi/culoVeinteVejezVelaVeleroVelozVenaVencerVendaVenenoVengarVenirVentaVenusVerVeranoVerboVerdeVeredaVerjaVersoVerterVi/aViajeVibrarVicioVi/ctimaVidaVi/deoVidrioViejoViernesVigorVilVillaVinagreVinoVi~edoVioli/nViralVirgoVirtudVisorVi/speraVistaVitaminaViudoVivazViveroVivirVivoVolca/nVolumenVolverVorazVotarVotoVozVueloVulgarYacerYateYeguaYemaYernoYesoYodoYogaYogurZafiroZanjaZapatoZarzaZonaZorroZumoZurdo",gx={},Ks=null;function vx(t){return lc.logger.checkNormalize(),(0,uc.toUtf8String)(Array.prototype.filter.call((0,uc.toUtf8Bytes)(t.normalize("NFD").toLowerCase()),function(e){return e>=65&&e<=90||e>=97&&e<=123}))}function cS(t){var e=[];return Array.prototype.forEach.call((0,uc.toUtf8Bytes)(t),function(r){r===47?(e.push(204),e.push(129)):r===126?(e.push(110),e.push(204),e.push(131)):e.push(r)}),(0,uc.toUtf8String)(e)}function bx(t){if(Ks==null&&(Ks=fS.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(function(e){return cS(e)}),Ks.forEach(function(e,r){gx[vx(e)]=r}),lc.Wordlist.check(t)!=="0xf74fb7092aeacdfbf8959557de22098da512207fb9f109cb526994938cf40300"))throw Ks=null,new Error("BIP39 Wordlist for es (Spanish) FAILED")}var uS=function(t){sS(e,t);function e(){return t.call(this,"es")||this}return e.prototype.getWord=function(r){return bx(this),Ks[r]},e.prototype.getWordIndex=function(r){return bx(this),gx[vx(r)]},e}(lc.Wordlist),mx=new uS;No.langEs=mx;lc.Wordlist.register(mx)});var Mx=V(Jo=>{"use strict";var RF=A(S()),lS=Jo&&Jo.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Jo,"__esModule",{value:!0});Jo.langFr=void 0;var dc=Or(),hc=$n(),dS="AbaisserAbandonAbdiquerAbeilleAbolirAborderAboutirAboyerAbrasifAbreuverAbriterAbrogerAbruptAbsenceAbsoluAbsurdeAbusifAbyssalAcade/mieAcajouAcarienAccablerAccepterAcclamerAccoladeAccrocheAccuserAcerbeAchatAcheterAcidulerAcierAcompteAcque/rirAcronymeActeurActifActuelAdepteAde/quatAdhe/sifAdjectifAdjugerAdmettreAdmirerAdopterAdorerAdoucirAdresseAdroitAdulteAdverbeAe/rerAe/ronefAffaireAffecterAfficheAffreuxAffublerAgacerAgencerAgileAgiterAgraferAgre/ableAgrumeAiderAiguilleAilierAimableAisanceAjouterAjusterAlarmerAlchimieAlerteAlge-breAlgueAlie/nerAlimentAlle/gerAlliageAllouerAllumerAlourdirAlpagaAltesseAlve/oleAmateurAmbiguAmbreAme/nagerAmertumeAmidonAmiralAmorcerAmourAmovibleAmphibieAmpleurAmusantAnalyseAnaphoreAnarchieAnatomieAncienAne/antirAngleAngoisseAnguleuxAnimalAnnexerAnnonceAnnuelAnodinAnomalieAnonymeAnormalAntenneAntidoteAnxieuxApaiserApe/ritifAplanirApologieAppareilAppelerApporterAppuyerAquariumAqueducArbitreArbusteArdeurArdoiseArgentArlequinArmatureArmementArmoireArmureArpenterArracherArriverArroserArsenicArte/rielArticleAspectAsphalteAspirerAssautAsservirAssietteAssocierAssurerAsticotAstreAstuceAtelierAtomeAtriumAtroceAttaqueAttentifAttirerAttraperAubaineAubergeAudaceAudibleAugurerAuroreAutomneAutrucheAvalerAvancerAvariceAvenirAverseAveugleAviateurAvideAvionAviserAvoineAvouerAvrilAxialAxiomeBadgeBafouerBagageBaguetteBaignadeBalancerBalconBaleineBalisageBambinBancaireBandageBanlieueBannie-reBanquierBarbierBarilBaronBarqueBarrageBassinBastionBatailleBateauBatterieBaudrierBavarderBeletteBe/lierBeloteBe/ne/ficeBerceauBergerBerlineBermudaBesaceBesogneBe/tailBeurreBiberonBicycleBiduleBijouBilanBilingueBillardBinaireBiologieBiopsieBiotypeBiscuitBisonBistouriBitumeBizarreBlafardBlagueBlanchirBlessantBlinderBlondBloquerBlousonBobardBobineBoireBoiserBolideBonbonBondirBonheurBonifierBonusBordureBorneBotteBoucleBoueuxBougieBoulonBouquinBourseBoussoleBoutiqueBoxeurBrancheBrasierBraveBrebisBre-cheBreuvageBricolerBrigadeBrillantBriocheBriqueBrochureBroderBronzerBrousseBroyeurBrumeBrusqueBrutalBruyantBuffleBuissonBulletinBureauBurinBustierButinerButoirBuvableBuvetteCabanonCabineCachetteCadeauCadreCafe/ineCaillouCaissonCalculerCalepinCalibreCalmerCalomnieCalvaireCamaradeCame/raCamionCampagneCanalCanetonCanonCantineCanularCapableCaporalCapriceCapsuleCapterCapucheCarabineCarboneCaresserCaribouCarnageCarotteCarreauCartonCascadeCasierCasqueCassureCauserCautionCavalierCaverneCaviarCe/dilleCeintureCe/lesteCelluleCendrierCensurerCentralCercleCe/re/bralCeriseCernerCerveauCesserChagrinChaiseChaleurChambreChanceChapitreCharbonChasseurChatonChaussonChavirerChemiseChenilleChe/quierChercherChevalChienChiffreChignonChime-reChiotChlorureChocolatChoisirChoseChouetteChromeChuteCigareCigogneCimenterCine/maCintrerCirculerCirerCirqueCiterneCitoyenCitronCivilClaironClameurClaquerClasseClavierClientClignerClimatClivageClocheClonageCloporteCobaltCobraCocasseCocotierCoderCodifierCoffreCognerCohe/sionCoifferCoincerCole-reColibriCollineColmaterColonelCombatCome/dieCommandeCompactConcertConduireConfierCongelerConnoterConsonneContactConvexeCopainCopieCorailCorbeauCordageCornicheCorpusCorrectCorte-geCosmiqueCostumeCotonCoudeCoupureCourageCouteauCouvrirCoyoteCrabeCrainteCravateCrayonCre/atureCre/diterCre/meuxCreuserCrevetteCriblerCrierCristalCrite-reCroireCroquerCrotaleCrucialCruelCrypterCubiqueCueillirCuille-reCuisineCuivreCulminerCultiverCumulerCupideCuratifCurseurCyanureCycleCylindreCyniqueDaignerDamierDangerDanseurDauphinDe/battreDe/biterDe/borderDe/briderDe/butantDe/calerDe/cembreDe/chirerDe/ciderDe/clarerDe/corerDe/crireDe/cuplerDe/daleDe/ductifDe/esseDe/fensifDe/filerDe/frayerDe/gagerDe/givrerDe/glutirDe/graferDe/jeunerDe/liceDe/logerDemanderDemeurerDe/molirDe/nicherDe/nouerDentelleDe/nuderDe/partDe/penserDe/phaserDe/placerDe/poserDe/rangerDe/roberDe/sastreDescenteDe/sertDe/signerDe/sobe/irDessinerDestrierDe/tacherDe/testerDe/tourerDe/tresseDevancerDevenirDevinerDevoirDiableDialogueDiamantDicterDiffe/rerDige/rerDigitalDigneDiluerDimancheDiminuerDioxydeDirectifDirigerDiscuterDisposerDissiperDistanceDivertirDiviserDocileDocteurDogmeDoigtDomaineDomicileDompterDonateurDonjonDonnerDopamineDortoirDorureDosageDoseurDossierDotationDouanierDoubleDouceurDouterDoyenDragonDraperDresserDribblerDroitureDuperieDuplexeDurableDurcirDynastieE/blouirE/carterE/charpeE/chelleE/clairerE/clipseE/cloreE/cluseE/coleE/conomieE/corceE/couterE/craserE/cre/merE/crivainE/crouE/cumeE/cureuilE/difierE/duquerEffacerEffectifEffigieEffortEffrayerEffusionE/galiserE/garerE/jecterE/laborerE/largirE/lectronE/le/gantE/le/phantE/le-veE/ligibleE/litismeE/logeE/luciderE/luderEmballerEmbellirEmbryonE/meraudeE/missionEmmenerE/motionE/mouvoirEmpereurEmployerEmporterEmpriseE/mulsionEncadrerEnche-reEnclaveEncocheEndiguerEndosserEndroitEnduireE/nergieEnfanceEnfermerEnfouirEngagerEnginEngloberE/nigmeEnjamberEnjeuEnleverEnnemiEnnuyeuxEnrichirEnrobageEnseigneEntasserEntendreEntierEntourerEntraverE/nume/rerEnvahirEnviableEnvoyerEnzymeE/olienE/paissirE/pargneE/patantE/pauleE/picerieE/pide/mieE/pierE/pilogueE/pineE/pisodeE/pitapheE/poqueE/preuveE/prouverE/puisantE/querreE/quipeE/rigerE/rosionErreurE/ruptionEscalierEspadonEspe-ceEspie-gleEspoirEspritEsquiverEssayerEssenceEssieuEssorerEstimeEstomacEstradeE/tage-reE/talerE/tancheE/tatiqueE/teindreE/tendoirE/ternelE/thanolE/thiqueEthnieE/tirerE/tofferE/toileE/tonnantE/tourdirE/trangeE/troitE/tudeEuphorieE/valuerE/vasionE/ventailE/videnceE/viterE/volutifE/voquerExactExage/rerExaucerExcellerExcitantExclusifExcuseExe/cuterExempleExercerExhalerExhorterExigenceExilerExisterExotiqueExpe/dierExplorerExposerExprimerExquisExtensifExtraireExulterFableFabuleuxFacetteFacileFactureFaiblirFalaiseFameuxFamilleFarceurFarfeluFarineFaroucheFascinerFatalFatigueFauconFautifFaveurFavoriFe/brileFe/conderFe/de/rerFe/linFemmeFe/murFendoirFe/odalFermerFe/roceFerveurFestivalFeuilleFeutreFe/vrierFiascoFicelerFictifFide-leFigureFilatureFiletageFilie-reFilleulFilmerFilouFiltrerFinancerFinirFioleFirmeFissureFixerFlairerFlammeFlasqueFlatteurFle/auFle-cheFleurFlexionFloconFloreFluctuerFluideFluvialFolieFonderieFongibleFontaineForcerForgeronFormulerFortuneFossileFoudreFouge-reFouillerFoulureFourmiFragileFraiseFranchirFrapperFrayeurFre/gateFreinerFrelonFre/mirFre/ne/sieFre-reFriableFrictionFrissonFrivoleFroidFromageFrontalFrotterFruitFugitifFuiteFureurFurieuxFurtifFusionFuturGagnerGalaxieGalerieGambaderGarantirGardienGarnirGarrigueGazelleGazonGe/antGe/latineGe/luleGendarmeGe/ne/ralGe/nieGenouGentilGe/ologieGe/ome-treGe/raniumGermeGestuelGeyserGibierGiclerGirafeGivreGlaceGlaiveGlisserGlobeGloireGlorieuxGolfeurGommeGonflerGorgeGorilleGoudronGouffreGoulotGoupilleGourmandGoutteGraduelGraffitiGraineGrandGrappinGratuitGravirGrenatGriffureGrillerGrimperGrognerGronderGrotteGroupeGrugerGrutierGruye-reGue/pardGuerrierGuideGuimauveGuitareGustatifGymnasteGyrostatHabitudeHachoirHalteHameauHangarHannetonHaricotHarmonieHarponHasardHe/liumHe/matomeHerbeHe/rissonHermineHe/ronHe/siterHeureuxHibernerHibouHilarantHistoireHiverHomardHommageHomoge-neHonneurHonorerHonteuxHordeHorizonHorlogeHormoneHorribleHouleuxHousseHublotHuileuxHumainHumbleHumideHumourHurlerHydromelHygie-neHymneHypnoseIdylleIgnorerIguaneIlliciteIllusionImageImbiberImiterImmenseImmobileImmuableImpactImpe/rialImplorerImposerImprimerImputerIncarnerIncendieIncidentInclinerIncoloreIndexerIndiceInductifIne/ditIneptieInexactInfiniInfligerInformerInfusionInge/rerInhalerInhiberInjecterInjureInnocentInoculerInonderInscrireInsecteInsigneInsoliteInspirerInstinctInsulterIntactIntenseIntimeIntrigueIntuitifInutileInvasionInventerInviterInvoquerIroniqueIrradierIrre/elIrriterIsolerIvoireIvresseJaguarJaillirJambeJanvierJardinJaugerJauneJavelotJetableJetonJeudiJeunesseJoindreJoncherJonglerJoueurJouissifJournalJovialJoyauJoyeuxJubilerJugementJuniorJuponJuristeJusticeJuteuxJuve/nileKayakKimonoKiosqueLabelLabialLabourerLace/rerLactoseLaguneLaineLaisserLaitierLambeauLamelleLampeLanceurLangageLanterneLapinLargeurLarmeLaurierLavaboLavoirLectureLe/galLe/gerLe/gumeLessiveLettreLevierLexiqueLe/zardLiasseLibe/rerLibreLicenceLicorneLie-geLie-vreLigatureLigoterLigueLimerLimiteLimonadeLimpideLine/aireLingotLionceauLiquideLisie-reListerLithiumLitigeLittoralLivreurLogiqueLointainLoisirLombricLoterieLouerLourdLoutreLouveLoyalLubieLucideLucratifLueurLugubreLuisantLumie-reLunaireLundiLuronLutterLuxueuxMachineMagasinMagentaMagiqueMaigreMaillonMaintienMairieMaisonMajorerMalaxerMale/ficeMalheurMaliceMalletteMammouthMandaterManiableManquantManteauManuelMarathonMarbreMarchandMardiMaritimeMarqueurMarronMartelerMascotteMassifMate/rielMatie-reMatraqueMaudireMaussadeMauveMaximalMe/chantMe/connuMe/dailleMe/decinMe/diterMe/duseMeilleurMe/langeMe/lodieMembreMe/moireMenacerMenerMenhirMensongeMentorMercrediMe/riteMerleMessagerMesureMe/talMe/te/oreMe/thodeMe/tierMeubleMiaulerMicrobeMietteMignonMigrerMilieuMillionMimiqueMinceMine/ralMinimalMinorerMinuteMiracleMiroiterMissileMixteMobileModerneMoelleuxMondialMoniteurMonnaieMonotoneMonstreMontagneMonumentMoqueurMorceauMorsureMortierMoteurMotifMoucheMoufleMoulinMoussonMoutonMouvantMultipleMunitionMurailleMure-neMurmureMuscleMuse/umMusicienMutationMuterMutuelMyriadeMyrtilleMyste-reMythiqueNageurNappeNarquoisNarrerNatationNationNatureNaufrageNautiqueNavireNe/buleuxNectarNe/fasteNe/gationNe/gligerNe/gocierNeigeNerveuxNettoyerNeuroneNeutronNeveuNicheNickelNitrateNiveauNobleNocifNocturneNoirceurNoisetteNomadeNombreuxNommerNormatifNotableNotifierNotoireNourrirNouveauNovateurNovembreNoviceNuageNuancerNuireNuisibleNume/roNuptialNuqueNutritifObe/irObjectifObligerObscurObserverObstacleObtenirObturerOccasionOccuperOce/anOctobreOctroyerOctuplerOculaireOdeurOdorantOffenserOfficierOffrirOgiveOiseauOisillonOlfactifOlivierOmbrageOmettreOnctueuxOndulerOne/reuxOniriqueOpaleOpaqueOpe/rerOpinionOpportunOpprimerOpterOptiqueOrageuxOrangeOrbiteOrdonnerOreilleOrganeOrgueilOrificeOrnementOrqueOrtieOscillerOsmoseOssatureOtarieOuraganOursonOutilOutragerOuvrageOvationOxydeOxyge-neOzonePaisiblePalacePalmare-sPalourdePalperPanachePandaPangolinPaniquerPanneauPanoramaPantalonPapayePapierPapoterPapyrusParadoxeParcelleParesseParfumerParlerParoleParrainParsemerPartagerParureParvenirPassionPaste-quePaternelPatiencePatronPavillonPavoiserPayerPaysagePeignePeintrePelagePe/licanPellePelousePeluchePendulePe/ne/trerPe/niblePensifPe/nuriePe/pitePe/plumPerdrixPerforerPe/riodePermuterPerplexePersilPertePeserPe/talePetitPe/trirPeuplePharaonPhobiePhoquePhotonPhrasePhysiquePianoPicturalPie-cePierrePieuvrePilotePinceauPipettePiquerPiroguePiscinePistonPivoterPixelPizzaPlacardPlafondPlaisirPlanerPlaquePlastronPlateauPleurerPlexusPliagePlombPlongerPluiePlumagePochettePoe/siePoe-tePointePoirierPoissonPoivrePolairePolicierPollenPolygonePommadePompierPonctuelPonde/rerPoneyPortiquePositionPosse/derPosturePotagerPoteauPotionPoucePoulainPoumonPourprePoussinPouvoirPrairiePratiquePre/cieuxPre/direPre/fixePre/ludePre/nomPre/sencePre/textePre/voirPrimitifPrincePrisonPriverProble-meProce/derProdigeProfondProgre-sProieProjeterProloguePromenerPropreProspe-reProte/gerProuesseProverbePrudencePruneauPsychosePublicPuceronPuiserPulpePulsarPunaisePunitifPupitrePurifierPuzzlePyramideQuasarQuerelleQuestionQuie/tudeQuitterQuotientRacineRaconterRadieuxRagondinRaideurRaisinRalentirRallongeRamasserRapideRasageRatisserRavagerRavinRayonnerRe/actifRe/agirRe/aliserRe/animerRecevoirRe/citerRe/clamerRe/colterRecruterReculerRecyclerRe/digerRedouterRefaireRe/flexeRe/formerRefrainRefugeRe/galienRe/gionRe/glageRe/gulierRe/ite/rerRejeterRejouerRelatifReleverReliefRemarqueReme-deRemiseRemonterRemplirRemuerRenardRenfortReniflerRenoncerRentrerRenvoiReplierReporterRepriseReptileRequinRe/serveRe/sineuxRe/soudreRespectResterRe/sultatRe/tablirRetenirRe/ticuleRetomberRetracerRe/unionRe/ussirRevancheRevivreRe/volteRe/vulsifRichesseRideauRieurRigideRigolerRincerRiposterRisibleRisqueRituelRivalRivie-reRocheuxRomanceRompreRonceRondinRoseauRosierRotatifRotorRotuleRougeRouilleRouleauRoutineRoyaumeRubanRubisRucheRuelleRugueuxRuinerRuisseauRuserRustiqueRythmeSablerSaboterSabreSacocheSafariSagesseSaisirSaladeSaliveSalonSaluerSamediSanctionSanglierSarcasmeSardineSaturerSaugrenuSaumonSauterSauvageSavantSavonnerScalpelScandaleSce/le/ratSce/narioSceptreSche/maScienceScinderScoreScrutinSculpterSe/anceSe/cableSe/cherSecouerSe/cre/terSe/datifSe/duireSeigneurSe/jourSe/lectifSemaineSemblerSemenceSe/minalSe/nateurSensibleSentenceSe/parerSe/quenceSereinSergentSe/rieuxSerrureSe/rumServiceSe/sameSe/virSevrageSextupleSide/ralSie-cleSie/gerSifflerSigleSignalSilenceSiliciumSimpleSince-reSinistreSiphonSiropSismiqueSituerSkierSocialSocleSodiumSoigneuxSoldatSoleilSolitudeSolubleSombreSommeilSomnolerSondeSongeurSonnetteSonoreSorcierSortirSosieSottiseSoucieuxSoudureSouffleSouleverSoupapeSourceSoutirerSouvenirSpacieuxSpatialSpe/cialSphe-reSpiralStableStationSternumStimulusStipulerStrictStudieuxStupeurStylisteSublimeSubstratSubtilSubvenirSucce-sSucreSuffixeSugge/rerSuiveurSulfateSuperbeSupplierSurfaceSuricateSurmenerSurpriseSursautSurvieSuspectSyllabeSymboleSyme/trieSynapseSyntaxeSyste-meTabacTablierTactileTaillerTalentTalismanTalonnerTambourTamiserTangibleTapisTaquinerTarderTarifTartineTasseTatamiTatouageTaupeTaureauTaxerTe/moinTemporelTenailleTendreTeneurTenirTensionTerminerTerneTerribleTe/tineTexteThe-meThe/orieThe/rapieThoraxTibiaTie-deTimideTirelireTiroirTissuTitaneTitreTituberTobogganTole/rantTomateToniqueTonneauToponymeTorcheTordreTornadeTorpilleTorrentTorseTortueTotemToucherTournageTousserToxineTractionTraficTragiqueTrahirTrainTrancherTravailTre-fleTremperTre/sorTreuilTriageTribunalTricoterTrilogieTriompheTriplerTriturerTrivialTromboneTroncTropicalTroupeauTuileTulipeTumulteTunnelTurbineTuteurTutoyerTuyauTympanTyphonTypiqueTyranUbuesqueUltimeUltrasonUnanimeUnifierUnionUniqueUnitaireUniversUraniumUrbainUrticantUsageUsineUsuelUsureUtileUtopieVacarmeVaccinVagabondVagueVaillantVaincreVaisseauValableValiseVallonValveVampireVanilleVapeurVarierVaseuxVassalVasteVecteurVedetteVe/ge/talVe/hiculeVeinardVe/loceVendrediVe/ne/rerVengerVenimeuxVentouseVerdureVe/rinVernirVerrouVerserVertuVestonVe/te/ranVe/tusteVexantVexerViaducViandeVictoireVidangeVide/oVignetteVigueurVilainVillageVinaigreViolonVipe-reVirementVirtuoseVirusVisageViseurVisionVisqueuxVisuelVitalVitesseViticoleVitrineVivaceVivipareVocationVoguerVoileVoisinVoitureVolailleVolcanVoltigerVolumeVoraceVortexVoterVouloirVoyageVoyelleWagonXe/nonYachtZe-breZe/nithZesteZoologie",Zs=null,wx={};function Ax(t){return hc.logger.checkNormalize(),(0,dc.toUtf8String)(Array.prototype.filter.call((0,dc.toUtf8Bytes)(t.normalize("NFD").toLowerCase()),function(e){return e>=65&&e<=90||e>=97&&e<=123}))}function hS(t){var e=[];return Array.prototype.forEach.call((0,dc.toUtf8Bytes)(t),function(r){r===47?(e.push(204),e.push(129)):r===45?(e.push(204),e.push(128)):e.push(r)}),(0,dc.toUtf8String)(e)}function yx(t){if(Zs==null&&(Zs=dS.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" ").map(function(e){return hS(e)}),Zs.forEach(function(e,r){wx[Ax(e)]=r}),hc.Wordlist.check(t)!=="0x51deb7ae009149dc61a6bd18a918eb7ac78d2775726c68e598b92d002519b045"))throw Zs=null,new Error("BIP39 Wordlist for fr (French) FAILED")}var pS=function(t){lS(e,t);function e(){return t.call(this,"fr")||this}return e.prototype.getWord=function(r){return yx(this),Zs[r]},e.prototype.getWordIndex=function(r){return yx(this),wx[Ax(r)]},e}(hc.Wordlist),Sx=new pS;Jo.langFr=Sx;hc.Wordlist.register(Sx)});var Bx=V(Uo=>{"use strict";var DF=A(S()),bS=Uo&&Uo.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Uo,"__esModule",{value:!0});Uo.langJa=void 0;var gS=at(),fn=Or(),pc=$n(),vS=["AQRASRAGBAGUAIRAHBAghAURAdBAdcAnoAMEAFBAFCBKFBQRBSFBCXBCDBCHBGFBEQBpBBpQBIkBHNBeOBgFBVCBhBBhNBmOBmRBiHBiFBUFBZDBvFBsXBkFBlcBjYBwDBMBBTBBTRBWBBWXXaQXaRXQWXSRXCFXYBXpHXOQXHRXhRXuRXmXXbRXlXXwDXTRXrCXWQXWGaBWaKcaYgasFadQalmaMBacAKaRKKBKKXKKjKQRKDRKCYKCRKIDKeVKHcKlXKjHKrYNAHNBWNaRNKcNIBNIONmXNsXNdXNnBNMBNRBNrXNWDNWMNFOQABQAHQBrQXBQXFQaRQKXQKDQKOQKFQNBQNDQQgQCXQCDQGBQGDQGdQYXQpBQpQQpHQLXQHuQgBQhBQhCQuFQmXQiDQUFQZDQsFQdRQkHQbRQlOQlmQPDQjDQwXQMBQMDQcFQTBQTHQrDDXQDNFDGBDGQDGRDpFDhFDmXDZXDbRDMYDRdDTRDrXSAhSBCSBrSGQSEQSHBSVRShYShkSyQSuFSiBSdcSoESocSlmSMBSFBSFKSFNSFdSFcCByCaRCKcCSBCSRCCrCGbCEHCYXCpBCpQCIBCIHCeNCgBCgFCVECVcCmkCmwCZXCZFCdRClOClmClFCjDCjdCnXCwBCwXCcRCFQCFjGXhGNhGDEGDMGCDGCHGIFGgBGVXGVEGVRGmXGsXGdYGoSGbRGnXGwXGwDGWRGFNGFLGFOGFdGFkEABEBDEBFEXOEaBEKSENBENDEYXEIgEIkEgBEgQEgHEhFEudEuFEiBEiHEiFEZDEvBEsXEsFEdXEdREkFEbBEbRElFEPCEfkEFNYAEYAhYBNYQdYDXYSRYCEYYoYgQYgRYuRYmCYZTYdBYbEYlXYjQYRbYWRpKXpQopQnpSFpCXpIBpISphNpdBpdRpbRpcZpFBpFNpFDpFopFrLADLBuLXQLXcLaFLCXLEhLpBLpFLHXLeVLhILdHLdRLoDLbRLrXIABIBQIBCIBsIBoIBMIBRIXaIaRIKYIKRINBINuICDIGBIIDIIkIgRIxFIyQIiHIdRIbYIbRIlHIwRIMYIcRIRVITRIFBIFNIFQOABOAFOBQOaFONBONMOQFOSFOCDOGBOEQOpBOLXOIBOIFOgQOgFOyQOycOmXOsXOdIOkHOMEOMkOWWHBNHXNHXWHNXHDuHDRHSuHSRHHoHhkHmRHdRHkQHlcHlRHwBHWcgAEgAggAkgBNgBQgBEgXOgYcgLXgHjgyQgiBgsFgdagMYgWSgFQgFEVBTVXEVKBVKNVKDVKYVKRVNBVNYVDBVDxVSBVSRVCjVGNVLXVIFVhBVhcVsXVdRVbRVlRhBYhKYhDYhGShxWhmNhdahdkhbRhjohMXhTRxAXxXSxKBxNBxEQxeNxeQxhXxsFxdbxlHxjcxFBxFNxFQxFOxFoyNYyYoybcyMYuBQuBRuBruDMuCouHBudQukkuoBulVuMXuFEmCYmCRmpRmeDmiMmjdmTFmFQiADiBOiaRiKRiNBiNRiSFiGkiGFiERipRiLFiIFihYibHijBijEiMXiWBiFBiFCUBQUXFUaRUNDUNcUNRUNFUDBUSHUCDUGBUGFUEqULNULoUIRUeEUeYUgBUhFUuRUiFUsXUdFUkHUbBUjSUjYUwXUMDUcHURdUTBUrBUrXUrQZAFZXZZaRZKFZNBZQFZCXZGBZYdZpBZLDZIFZHXZHNZeQZVRZVFZmXZiBZvFZdFZkFZbHZbFZwXZcCZcRZRBvBQvBGvBLvBWvCovMYsAFsBDsaRsKFsNFsDrsSHsSFsCXsCRsEBsEHsEfspBsLBsLDsIgsIRseGsbRsFBsFQsFSdNBdSRdCVdGHdYDdHcdVbdySduDdsXdlRdwXdWYdWcdWRkBMkXOkaRkNIkNFkSFkCFkYBkpRkeNkgBkhVkmXksFklVkMBkWDkFNoBNoaQoaFoNBoNXoNaoNEoSRoEroYXoYCoYbopRopFomXojkowXorFbBEbEIbdBbjYlaRlDElMXlFDjKjjSRjGBjYBjYkjpRjLXjIBjOFjeVjbRjwBnXQnSHnpFnLXnINnMBnTRwXBwXNwXYwNFwQFwSBwGFwLXwLDweNwgBwuHwjDwnXMBXMpFMIBMeNMTHcaQcNBcDHcSFcCXcpBcLXcLDcgFcuFcnXcwXccDcTQcrFTQErXNrCHrpFrgFrbFrTHrFcWNYWNbWEHWMXWTR","ABGHABIJAEAVAYJQALZJAIaRAHNXAHdcAHbRAZJMAZJRAZTRAdVJAklmAbcNAjdRAMnRAMWYAWpRAWgRAFgBAFhBAFdcBNJBBNJDBQKBBQhcBQlmBDEJBYJkBYJTBpNBBpJFBIJBBIJDBIcABOKXBOEJBOVJBOiJBOZJBepBBeLXBeIFBegBBgGJBVJXBuocBiJRBUJQBlXVBlITBwNFBMYVBcqXBTlmBWNFBWiJBWnRBFGHBFwXXKGJXNJBXNZJXDTTXSHSXSVRXSlHXCJDXGQJXEhXXYQJXYbRXOfXXeNcXVJFXhQJXhEJXdTRXjdXXMhBXcQTXRGBXTEBXTnQXFCXXFOFXFgFaBaFaBNJaBCJaBpBaBwXaNJKaNJDaQIBaDpRaEPDaHMFamDJalEJaMZJaFaFaFNBaFQJaFLDaFVHKBCYKBEBKBHDKXaFKXGdKXEJKXpHKXIBKXZDKXwXKKwLKNacKNYJKNJoKNWcKDGdKDTRKChXKGaRKGhBKGbRKEBTKEaRKEPTKLMDKLWRKOHDKVJcKdBcKlIBKlOPKFSBKFEPKFpFNBNJNJBQNBGHNBEPNBHXNBgFNBVXNBZDNBsXNBwXNNaRNNJDNNJENNJkNDCJNDVDNGJRNJiDNZJNNsCJNJFNNFSBNFCXNFEPNFLXNFIFQJBFQCaRQJEQQLJDQLJFQIaRQOqXQHaFQHHQQVJXQVJDQhNJQmEIQZJFQsJXQJrFQWbRDJABDBYJDXNFDXCXDXLXDXZDDXsJDQqXDSJFDJCXDEPkDEqXDYmQDpSJDOCkDOGQDHEIDVJDDuDuDWEBDJFgSBNDSBSFSBGHSBIBSBTQSKVYSJQNSJQiSJCXSEqXSJYVSIiJSOMYSHAHSHaQSeCFSepQSegBSHdHSHrFShSJSJuHSJUFSkNRSrSrSWEBSFaHSJFQSFCXSFGDSFYXSFODSFgBSFVXSFhBSFxFSFkFSFbBSFMFCADdCJXBCXaFCXKFCXNFCXCXCXGBCXEJCXYBCXLDCXIBCXOPCXHXCXgBCXhBCXiBCXlDCXcHCJNBCJNFCDCJCDGBCDVXCDhBCDiDCDJdCCmNCpJFCIaRCOqXCHCHCHZJCViJCuCuCmddCJiFCdNBCdHhClEJCnUJCreSCWlgCWTRCFBFCFNBCFYBCFVFCFhFCFdSCFTBCFWDGBNBGBQFGJBCGBEqGBpBGBgQGNBEGNJYGNkOGNJRGDUFGJpQGHaBGJeNGJeEGVBlGVKjGiJDGvJHGsVJGkEBGMIJGWjNGFBFGFCXGFGBGFYXGFpBGFMFEASJEAWpEJNFECJVEIXSEIQJEOqXEOcFEeNcEHEJEHlFEJgFEhlmEmDJEmZJEiMBEUqXEoSREPBFEPXFEPKFEPSFEPEFEPpFEPLXEPIBEJPdEPcFEPTBEJnXEqlHEMpREFCXEFODEFcFYASJYJAFYBaBYBVXYXpFYDhBYCJBYJGFYYbRYeNcYJeVYiIJYZJcYvJgYvJRYJsXYsJFYMYMYreVpBNHpBEJpBwXpQxFpYEJpeNDpJeDpeSFpeCHpHUJpHbBpHcHpmUJpiiJpUJrpsJuplITpFaBpFQqpFGBpFEfpFYBpFpBpFLJpFIDpFgBpFVXpFyQpFuFpFlFpFjDpFnXpFwXpJFMpFTBLXCJLXEFLXhFLXUJLXbFLalmLNJBLSJQLCLCLGJBLLDJLHaFLeNFLeSHLeCXLepFLhaRLZsJLsJDLsJrLocaLlLlLMdbLFNBLFSBLFEHLFkFIBBFIBXFIBaQIBKXIBSFIBpHIBLXIBgBIBhBIBuHIBmXIBiFIBZXIBvFIBbFIBjQIBwXIBWFIKTRIQUJIDGFICjQIYSRIINXIJeCIVaRImEkIZJFIvJRIsJXIdCJIJoRIbBQIjYBIcqXITFVIreVIFKFIFSFIFCJIFGFIFLDIFIBIJFOIFgBIFVXIJFhIFxFIFmXIFdHIFbBIJFrIJFWOBGBOQfXOOKjOUqXOfXBOqXEOcqXORVJOFIBOFlDHBIOHXiFHNTRHCJXHIaRHHJDHHEJHVbRHZJYHbIBHRsJHRkDHWlmgBKFgBSBgBCDgBGHgBpBgBIBgBVJgBuBgBvFgKDTgQVXgDUJgGSJgOqXgmUMgZIJgTUJgWIEgFBFgFNBgFDJgFSFgFGBgFYXgJFOgFgQgFVXgFhBgFbHgJFWVJABVQKcVDgFVOfXVeDFVhaRVmGdViJYVMaRVFNHhBNDhBCXhBEqhBpFhBLXhNJBhSJRheVXhhKEhxlmhZIJhdBQhkIJhbMNhMUJhMZJxNJgxQUJxDEkxDdFxSJRxplmxeSBxeCXxeGFxeYXxepQxegBxWVcxFEQxFLXxFIBxFgBxFxDxFZtxFdcxFbBxFwXyDJXyDlcuASJuDJpuDIBuCpJuGSJuIJFueEFuZIJusJXudWEuoIBuWGJuFBcuFKEuFNFuFQFuFDJuFGJuFVJuFUtuFdHuFTBmBYJmNJYmQhkmLJDmLJomIdXmiJYmvJRmsJRmklmmMBymMuCmclmmcnQiJABiJBNiJBDiBSFiBCJiBEFiBYBiBpFiBLXiBTHiJNciDEfiCZJiECJiJEqiOkHiHKFieNDiHJQieQcieDHieSFieCXieGFieEFieIHiegFihUJixNoioNXiFaBiFKFiFNDiFEPiFYXitFOitFHiFgBiFVEiFmXiFitiFbBiFMFiFrFUCXQUIoQUIJcUHQJUeCEUHwXUUJDUUqXUdWcUcqXUrnQUFNDUFSHUFCFUFEfUFLXUtFOZBXOZXSBZXpFZXVXZEQJZEJkZpDJZOqXZeNHZeCDZUqXZFBQZFEHZFLXvBAFvBKFvBCXvBEPvBpHvBIDvBgFvBuHvQNJvFNFvFGBvFIBvJFcsXCDsXLXsXsXsXlFsXcHsQqXsJQFsEqXseIFsFEHsFjDdBxOdNpRdNJRdEJbdpJRdhZJdnSJdrjNdFNJdFQHdFhNkNJDkYaRkHNRkHSRkVbRkuMRkjSJkcqDoSJFoEiJoYZJoOfXohEBoMGQocqXbBAFbBXFbBaFbBNDbBGBbBLXbBTBbBWDbGJYbIJHbFQqbFpQlDgQlOrFlVJRjGEBjZJRnXvJnXbBnEfHnOPDngJRnxfXnUJWwXEJwNpJwDpBwEfXwrEBMDCJMDGHMDIJMLJDcQGDcQpHcqXccqNFcqCXcFCJRBSBRBGBRBEJRBpQTBNFTBQJTBpBTBVXTFABTFSBTFCFTFGBTFMDrXCJrXLDrDNJrEfHrFQJrFitWNjdWNTR","AKLJMANOPFASNJIAEJWXAYJNRAIIbRAIcdaAeEfDAgidRAdjNYAMYEJAMIbRAFNJBAFpJFBBIJYBDZJFBSiJhBGdEBBEJfXBEJqXBEJWRBpaUJBLXrXBIYJMBOcfXBeEfFBestXBjNJRBcDJOBFEqXXNvJRXDMBhXCJNYXOAWpXONJWXHDEBXeIaRXhYJDXZJSJXMDJOXcASJXFVJXaBQqXaBZJFasXdQaFSJQaFEfXaFpJHaFOqXKBNSRKXvJBKQJhXKEJQJKEJGFKINJBKIJjNKgJNSKVElmKVhEBKiJGFKlBgJKjnUJKwsJYKMFIJKFNJDKFIJFKFOfXNJBSFNJBCXNBpJFNJBvQNJBMBNJLJXNJOqXNJeCXNJeGFNdsJCNbTKFNwXUJQNFEPQDiJcQDMSJQSFpBQGMQJQJeOcQyCJEQUJEBQJFBrQFEJqDXDJFDJXpBDJXIMDGiJhDIJGRDJeYcDHrDJDVXgFDkAWpDkIgRDjDEqDMvJRDJFNFDJFIBSKclmSJQOFSJQVHSJQjDSJGJBSJGJFSECJoSHEJqSJHTBSJVJDSViJYSZJNBSJsJDSFSJFSFEfXSJFLXCBUJVCJXSBCJXpBCXVJXCJXsXCJXdFCJNJHCLIJgCHiJFCVNJMChCJhCUHEJCsJTRCJdYcCoQJCCFEfXCFIJgCFUJxCFstFGJBaQGJBIDGQJqXGYJNRGJHKFGeQqDGHEJFGJeLXGHIiJGHdBlGUJEBGkIJTGFQPDGJFEqEAGegEJIJBEJVJXEhQJTEiJNcEJZJFEJoEqEjDEqEPDsXEPGJBEPOqXEPeQFEfDiDEJfEFEfepQEfMiJEqXNBEqDIDEqeSFEqVJXEMvJRYXNJDYXEJHYKVJcYYJEBYJeEcYJUqXYFpJFYFstXpAZJMpBSJFpNBNFpeQPDpHLJDpHIJFpHgJFpeitFpHZJFpJFADpFSJFpJFCJpFOqXpFitBpJFZJLXIJFLIJgRLVNJWLVHJMLwNpJLFGJBLFLJDLFOqXLJFUJIBDJXIBGJBIJBYQIJBIBIBOqXIBcqDIEGJFILNJTIIJEBIOiJhIJeNBIJeIBIhiJIIWoTRIJFAHIJFpBIJFuHIFUtFIJFTHOSBYJOEcqXOHEJqOvBpFOkVJrObBVJOncqDOcNJkHhNJRHuHJuHdMhBgBUqXgBsJXgONJBgHNJDgHHJQgJeitgHsJXgJyNagyDJBgZJDrgsVJQgkEJNgkjSJgJFAHgFCJDgFZtMVJXNFVXQfXVJXDJVXoQJVQVJQVDEfXVDvJHVEqNFVeQfXVHpJFVHxfXVVJSRVVmaRVlIJOhCXVJhHjYkhxCJVhWVUJhWiJcxBNJIxeEqDxfXBFxcFEPxFSJFxFYJXyBDQJydaUJyFOPDuYCJYuLvJRuHLJXuZJLDuFOPDuFZJHuFcqXmKHJdmCQJcmOsVJiJAGFitLCFieOfXiestXiZJMEikNJQirXzFiFQqXiFIJFiFZJFiFvtFUHpJFUteIcUteOcUVCJkUhdHcUbEJEUJqXQUMNJhURjYkUFitFZDGJHZJIxDZJVJXZJFDJZJFpQvBNJBvBSJFvJxBrseQqDsVFVJdFLJDkEJNBkmNJYkFLJDoQJOPoGsJRoEAHBoEJfFbBQqDbBZJHbFVJXlFIJBjYIrXjeitcjjCEBjWMNBwXQfXwXOaFwDsJXwCJTRwrCZJMDNJQcDDJFcqDOPRYiJFTBsJXTQIJBTFEfXTFLJDrXEJFrEJXMrFZJFWEJdEWYTlm","ABCDEFACNJTRAMBDJdAcNJVXBLNJEBXSIdWRXErNJkXYDJMBXZJCJaXMNJaYKKVJKcKDEJqXKDcNJhKVJrNYKbgJVXKFVJSBNBYBwDNJeQfXNJeEqXNhGJWENJFiJRQlIJbEQJfXxDQqXcfXQFNDEJQFwXUJDYcnUJDJIBgQDIUJTRDJFEqDSJQSJFSJQIJFSOPeZtSJFZJHCJXQfXCTDEqFGJBSJFGJBOfXGJBcqXGJHNJDGJRLiJEJfXEqEJFEJPEFpBEJYJBZJFYBwXUJYiJMEBYJZJyTYTONJXpQMFXFpeGIDdpJFstXpJFcPDLBVSJRLHQJqXLJFZJFIJBNJDIJBUqXIBkFDJIJEJPTIYJGWRIJeQPDIJeEfHIJFsJXOqGDSFHXEJqXgJCsJCgGQJqXgdQYJEgFMFNBgJFcqDVJwXUJVJFZJchIgJCCxOEJqXxOwXUJyDJBVRuscisciJBiJBieUtqXiJFDJkiFsJXQUGEZJcUJFsJXZtXIrXZDZJDrZJFNJDZJFstXvJFQqXvJFCJEsJXQJqkhkNGBbDJdTRbYJMEBlDwXUJMEFiJFcfXNJDRcNJWMTBLJXC","BraFUtHBFSJFdbNBLJXVJQoYJNEBSJBEJfHSJHwXUJCJdAZJMGjaFVJXEJPNJBlEJfFiJFpFbFEJqIJBVJCrIBdHiJhOPFChvJVJZJNJWxGFNIFLueIBQJqUHEJfUFstOZJDrlXEASJRlXVJXSFwVJNJWD","QJEJNNJDQJEJIBSFQJEJxegBQJEJfHEPSJBmXEJFSJCDEJqXLXNJFQqXIcQsFNJFIFEJqXUJgFsJXIJBUJEJfHNFvJxEqXNJnXUJFQqD","IJBEJqXZJ"],mS="~~AzB~X~a~KN~Q~D~S~C~G~E~Y~p~L~I~O~eH~g~V~hxyumi~~U~~Z~~v~~s~~dkoblPjfnqwMcRTr~W~~~F~~~~~Jt",Jr=null;function Tx(t){return(0,gS.hexlify)((0,fn.toUtf8Bytes)(t))}var xS="0xe3818de38284e3818f",yS="0xe3818de38283e3818f";function Ex(t){if(Jr!==null)return;Jr=[];var e={};e[(0,fn.toUtf8String)([227,130,154])]=!1,e[(0,fn.toUtf8String)([227,130,153])]=!1,e[(0,fn.toUtf8String)([227,130,133])]=(0,fn.toUtf8String)([227,130,134]),e[(0,fn.toUtf8String)([227,129,163])]=(0,fn.toUtf8String)([227,129,164]),e[(0,fn.toUtf8String)([227,130,131])]=(0,fn.toUtf8String)([227,130,132]),e[(0,fn.toUtf8String)([227,130,135])]=(0,fn.toUtf8String)([227,130,136]);function r(C){for(var D="",F=0;F<C.length;F++){var P=C[F],z=e[P];z!==!1&&(z&&(P=z),D+=P)}return D}function n(C,D){return C=r(C),D=r(D),C<D?-1:C>D?1:0}for(var i=3;i<=9;i++)for(var a=vS[i-3],l=0;l<a.length;l+=i){for(var b=[],y=0;y<i;y++){var x=mS.indexOf(a[l+y]);b.push(227),b.push(x&64?130:129),b.push((x&63)+128)}Jr.push((0,fn.toUtf8String)(b))}if(Jr.sort(n),Tx(Jr[442])===xS&&Tx(Jr[443])===yS){var _=Jr[442];Jr[442]=Jr[443],Jr[443]=_}if(pc.Wordlist.check(t)!=="0xcb36b09e6baa935787fd762ce65e80b0c6a8dabdfbc3a7f86ac0e2c4fd111600")throw Jr=null,new Error("BIP39 Wordlist for ja (Japanese) FAILED")}var wS=function(t){bS(e,t);function e(){return t.call(this,"ja")||this}return e.prototype.getWord=function(r){return Ex(this),Jr[r]},e.prototype.getWordIndex=function(r){return Ex(this),Jr.indexOf(r)},e.prototype.split=function(r){return pc.logger.checkNormalize(),r.split(/(?:\u3000| )+/g)},e.prototype.join=function(r){return r.join("\u3000")},e}(pc.Wordlist),_x=new wS;Uo.langJa=_x;pc.Wordlist.register(_x)});var Lx=V(Ho=>{"use strict";var OF=A(S()),AS=Ho&&Ho.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ho,"__esModule",{value:!0});Ho.langKo=void 0;var SS=Or(),Hd=$n(),MS=["OYAa","ATAZoATBl3ATCTrATCl8ATDloATGg3ATHT8ATJT8ATJl3ATLlvATLn4ATMT8ATMX8ATMboATMgoAToLbAToMTATrHgATvHnAT3AnAT3JbAT3MTAT8DbAT8JTAT8LmAT8MYAT8MbAT#LnAUHT8AUHZvAUJXrAUJX8AULnrAXJnvAXLUoAXLgvAXMn6AXRg3AXrMbAX3JTAX3QbAYLn3AZLgvAZrSUAZvAcAZ8AaAZ8AbAZ8AnAZ8HnAZ8LgAZ8MYAZ8MgAZ8OnAaAboAaDTrAaFTrAaJTrAaJboAaLVoAaMXvAaOl8AaSeoAbAUoAbAg8AbAl4AbGnrAbMT8AbMXrAbMn4AbQb8AbSV8AbvRlAb8AUAb8AnAb8HgAb8JTAb8NTAb8RbAcGboAcLnvAcMT8AcMX8AcSToAcrAaAcrFnAc8AbAc8MgAfGgrAfHboAfJnvAfLV8AfLkoAfMT8AfMnoAfQb8AfScrAfSgrAgAZ8AgFl3AgGX8AgHZvAgHgrAgJXoAgJX8AgJboAgLZoAgLn4AgOX8AgoATAgoAnAgoCUAgoJgAgoLXAgoMYAgoSeAgrDUAgrJTAhrFnAhrLjAhrQgAjAgoAjJnrAkMX8AkOnoAlCTvAlCV8AlClvAlFg4AlFl6AlFn3AloSnAlrAXAlrAfAlrFUAlrFbAlrGgAlrOXAlvKnAlvMTAl3AbAl3MnAnATrAnAcrAnCZ3AnCl8AnDg8AnFboAnFl3AnHX4AnHbrAnHgrAnIl3AnJgvAnLXoAnLX4AnLbrAnLgrAnLhrAnMXoAnMgrAnOn3AnSbrAnSeoAnvLnAn3OnCTGgvCTSlvCTvAUCTvKnCTvNTCT3CZCT3GUCT3MTCT8HnCUCZrCULf8CULnvCU3HnCU3JUCY6NUCbDb8CbFZoCbLnrCboOTCboScCbrFnCbvLnCb8AgCb8HgCb$LnCkLfoClBn3CloDUDTHT8DTLl3DTSU8DTrAaDTrLXDTrLjDTrOYDTrOgDTvFXDTvFnDT3HUDT3LfDUCT9DUDT4DUFVoDUFV8DUFkoDUGgrDUJnrDULl8DUMT8DUMXrDUMX4DUMg8DUOUoDUOgvDUOg8DUSToDUSZ8DbDXoDbDgoDbGT8DbJn3DbLg3DbLn4DbMXrDbMg8DbOToDboJXGTClvGTDT8GTFZrGTLVoGTLlvGTLl3GTMg8GTOTvGTSlrGToCUGTrDgGTrJYGTrScGTtLnGTvAnGTvQgGUCZrGUDTvGUFZoGUHXrGULnvGUMT8GUoMgGXoLnGXrMXGXrMnGXvFnGYLnvGZOnvGZvOnGZ8LaGZ8LmGbAl3GbDYvGbDlrGbHX3GbJl4GbLV8GbLn3GbMn4GboJTGboRfGbvFUGb3GUGb4JnGgDX3GgFl$GgJlrGgLX6GgLZoGgLf8GgOXoGgrAgGgrJXGgrMYGgrScGgvATGgvOYGnAgoGnJgvGnLZoGnLg3GnLnrGnQn8GnSbrGnrMgHTClvHTDToHTFT3HTQT8HToJTHToJgHTrDUHTrMnHTvFYHTvRfHT8MnHT8SUHUAZ8HUBb4HUDTvHUoMYHXFl6HXJX6HXQlrHXrAUHXrMnHXrSbHXvFYHXvKXHX3LjHX3MeHYvQlHZrScHZvDbHbAcrHbFT3HbFl3HbJT8HbLTrHbMT8HbMXrHbMbrHbQb8HbSX3HboDbHboJTHbrFUHbrHgHbrJTHb8JTHb8MnHb8QgHgAlrHgDT3HgGgrHgHgrHgJTrHgJT8HgLX@HgLnrHgMT8HgMX8HgMboHgOnrHgQToHgRg3HgoHgHgrCbHgrFnHgrLVHgvAcHgvAfHnAloHnCTrHnCnvHnGTrHnGZ8HnGnvHnJT8HnLf8HnLkvHnMg8HnRTrITvFUITvFnJTAXrJTCV8JTFT3JTFT8JTFn4JTGgvJTHT8JTJT8JTJXvJTJl3JTJnvJTLX4JTLf8JTLhvJTMT8JTMXrJTMnrJTObrJTQT8JTSlvJT8DUJT8FkJT8MTJT8OXJT8OgJT8QUJT8RfJUHZoJXFT4JXFlrJXGZ8JXGnrJXLV8JXLgvJXMXoJXMX3JXNboJXPlvJXoJTJXoLkJXrAXJXrHUJXrJgJXvJTJXvOnJX4KnJYAl3JYJT8JYLhvJYQToJYrQXJY6NUJbAl3JbCZrJbDloJbGT8JbGgrJbJXvJbJboJbLf8JbLhrJbLl3JbMnvJbRg8JbSZ8JboDbJbrCZJbrSUJb3KnJb8LnJfRn8JgAXrJgCZrJgDTrJgGZrJgGZ8JgHToJgJT8JgJXoJgJgvJgLX4JgLZ3JgLZ8JgLn4JgMgrJgMn4JgOgvJgPX6JgRnvJgSToJgoCZJgoJbJgoMYJgrJXJgrJgJgrLjJg6MTJlCn3JlGgvJlJl8Jl4AnJl8FnJl8HgJnAToJnATrJnAbvJnDUoJnGnrJnJXrJnJXvJnLhvJnLnrJnLnvJnMToJnMT8JnMXvJnMX3JnMg8JnMlrJnMn4JnOX8JnST4JnSX3JnoAgJnoAnJnoJTJnoObJnrAbJnrAkJnrHnJnrJTJnrJYJnrOYJnrScJnvCUJnvFaJnvJgJnvJnJnvOYJnvQUJnvRUJn3FnJn3JTKnFl3KnLT6LTDlvLTMnoLTOn3LTRl3LTSb4LTSlrLToAnLToJgLTrAULTrAcLTrCULTrHgLTrMgLT3JnLULnrLUMX8LUoJgLVATrLVDTrLVLb8LVoJgLV8MgLV8RTLXDg3LXFlrLXrCnLXrLXLX3GTLX4GgLX4OYLZAXrLZAcrLZAgrLZAhrLZDXyLZDlrLZFbrLZFl3LZJX6LZJX8LZLc8LZLnrLZSU8LZoJTLZoJnLZrAgLZrAnLZrJYLZrLULZrMgLZrSkLZvAnLZvGULZvJeLZvOTLZ3FZLZ4JXLZ8STLZ8ScLaAT3LaAl3LaHT8LaJTrLaJT8LaJXrLaJgvLaJl4LaLVoLaMXrLaMXvLaMX8LbClvLbFToLbHlrLbJn4LbLZ3LbLhvLbMXrLbMnoLbvSULcLnrLc8HnLc8MTLdrMnLeAgoLeOgvLeOn3LfAl3LfLnvLfMl3LfOX8Lf8AnLf8JXLf8LXLgJTrLgJXrLgJl8LgMX8LgRZrLhCToLhrAbLhrFULhrJXLhvJYLjHTrLjHX4LjJX8LjLhrLjSX3LjSZ4LkFX4LkGZ8LkGgvLkJTrLkMXoLkSToLkSU8LkSZ8LkoOYLl3FfLl3MgLmAZrLmCbrLmGgrLmHboLmJnoLmJn3LmLfoLmLhrLmSToLnAX6LnAb6LnCZ3LnCb3LnDTvLnDb8LnFl3LnGnrLnHZvLnHgvLnITvLnJT8LnJX8LnJlvLnLf8LnLg6LnLhvLnLnoLnMXrLnMg8LnQlvLnSbrLnrAgLnrAnLnrDbLnrFkLnrJdLnrMULnrOYLnrSTLnvAnLnvDULnvHgLnvOYLnvOnLn3GgLn4DULn4JTLn4JnMTAZoMTAloMTDb8MTFT8MTJnoMTJnrMTLZrMTLhrMTLkvMTMX8MTRTrMToATMTrDnMTrOnMT3JnMT4MnMT8FUMT8FaMT8FlMT8GTMT8GbMT8GnMT8HnMT8JTMT8JbMT8OTMUCl8MUJTrMUJU8MUMX8MURTrMUSToMXAX6MXAb6MXCZoMXFXrMXHXrMXLgvMXOgoMXrAUMXrAnMXrHgMXrJYMXrJnMXrMTMXrMgMXrOYMXrSZMXrSgMXvDUMXvOTMX3JgMX3OTMX4JnMX8DbMX8FnMX8HbMX8HgMX8HnMX8LbMX8MnMX8OnMYAb8MYGboMYHTvMYHX4MYLTrMYLnvMYMToMYOgvMYRg3MYSTrMbAToMbAXrMbAl3MbAn8MbGZ8MbJT8MbJXrMbMXvMbMX8MbMnoMbrMUMb8AfMb8FbMb8FkMcJXoMeLnrMgFl3MgGTvMgGXoMgGgrMgGnrMgHT8MgHZrMgJnoMgLnrMgLnvMgMT8MgQUoMgrHnMgvAnMg8HgMg8JYMg8LfMloJnMl8ATMl8AXMl8JYMnAToMnAT4MnAZ8MnAl3MnAl4MnCl8MnHT8MnHg8MnJnoMnLZoMnLhrMnMXoMnMX3MnMnrMnOgvMnrFbMnrFfMnrFnMnrNTMnvJXNTMl8OTCT3OTFV8OTFn3OTHZvOTJXrOTOl3OT3ATOT3JUOT3LZOT3LeOT3MbOT8ATOT8AbOT8AgOT8MbOUCXvOUMX3OXHXvOXLl3OXrMUOXvDbOX6NUOX8JbOYFZoOYLbrOYLkoOYMg8OYSX3ObHTrObHT4ObJgrObLhrObMX3ObOX8Ob8FnOeAlrOeJT8OeJXrOeJnrOeLToOeMb8OgJXoOgLXoOgMnrOgOXrOgOloOgoAgOgoJbOgoMYOgoSTOg8AbOjLX4OjMnoOjSV8OnLVoOnrAgOn3DUPXQlrPXvFXPbvFTPdAT3PlFn3PnvFbQTLn4QToAgQToMTQULV8QURg8QUoJnQXCXvQbFbrQb8AaQb8AcQb8FbQb8MYQb8ScQeAlrQeLhrQjAn3QlFXoQloJgQloSnRTLnvRTrGURTrJTRUJZrRUoJlRUrQnRZrLmRZrMnRZrSnRZ8ATRZ8JbRZ8ScRbMT8RbST3RfGZrRfMX8RfMgrRfSZrRnAbrRnGT8RnvJgRnvLfRnvMTRn8AaSTClvSTJgrSTOXrSTRg3STRnvSToAcSToAfSToAnSToHnSToLjSToMTSTrAaSTrEUST3BYST8AgST8LmSUAZvSUAgrSUDT4SUDT8SUGgvSUJXoSUJXvSULTrSU8JTSU8LjSV8AnSV8JgSXFToSXLf8SYvAnSZrDUSZrMUSZrMnSZ8HgSZ8JTSZ8JgSZ8MYSZ8QUSaQUoSbCT3SbHToSbQYvSbSl4SboJnSbvFbSb8HbSb8JgSb8OTScGZrScHgrScJTvScMT8ScSToScoHbScrMTScvAnSeAZrSeAcrSeHboSeJUoSeLhrSeMT8SeMXrSe6JgSgHTrSkJnoSkLnvSk8CUSlFl3SlrSnSl8GnSmAboSmGT8SmJU8","ATLnDlATrAZoATrJX4ATrMT8ATrMX4ATrRTrATvDl8ATvJUoATvMl8AT3AToAT3MX8AT8CT3AT8DT8AT8HZrAT8HgoAUAgFnAUCTFnAXoMX8AXrAT8AXrGgvAXrJXvAXrOgoAXvLl3AZvAgoAZvFbrAZvJXoAZvJl8AZvJn3AZvMX8AZvSbrAZ8FZoAZ8LZ8AZ8MU8AZ8OTvAZ8SV8AZ8SX3AbAgFZAboJnoAbvGboAb8ATrAb8AZoAb8AgrAb8Al4Ab8Db8Ab8JnoAb8LX4Ab8LZrAb8LhrAb8MT8Ab8OUoAb8Qb8Ab8ST8AcrAUoAcrAc8AcrCZ3AcrFT3AcrFZrAcrJl4AcrJn3AcrMX3AcrOTvAc8AZ8Ac8MT8AfAcJXAgoFn4AgoGgvAgoGnrAgoLc8AgoMXoAgrLnrAkrSZ8AlFXCTAloHboAlrHbrAlrLhrAlrLkoAl3CZrAl3LUoAl3LZrAnrAl4AnrMT8An3HT4BT3IToBX4MnvBb!Ln$CTGXMnCToLZ4CTrHT8CT3JTrCT3RZrCT#GTvCU6GgvCU8Db8CU8GZrCU8HT8CboLl3CbrGgrCbrMU8Cb8DT3Cb8GnrCb8LX4Cb8MT8Cb8ObrCgrGgvCgrKX4Cl8FZoDTrAbvDTrDboDTrGT6DTrJgrDTrMX3DTrRZrDTrRg8DTvAVvDTvFZoDT3DT8DT3Ln3DT4HZrDT4MT8DT8AlrDT8MT8DUAkGbDUDbJnDYLnQlDbDUOYDbMTAnDbMXSnDboAT3DboFn4DboLnvDj6JTrGTCgFTGTGgFnGTJTMnGTLnPlGToJT8GTrCT3GTrLVoGTrLnvGTrMX3GTrMboGTvKl3GZClFnGZrDT3GZ8DTrGZ8FZ8GZ8MXvGZ8On8GZ8ST3GbCnQXGbMbFnGboFboGboJg3GboMXoGb3JTvGb3JboGb3Mn6Gb3Qb8GgDXLjGgMnAUGgrDloGgrHX4GgrSToGgvAXrGgvAZvGgvFbrGgvLl3GgvMnvGnDnLXGnrATrGnrMboGnuLl3HTATMnHTAgCnHTCTCTHTrGTvHTrHTvHTrJX8HTrLl8HTrMT8HTrMgoHTrOTrHTuOn3HTvAZrHTvDTvHTvGboHTvJU8HTvLl3HTvMXrHTvQb4HT4GT6HT4JT8HT4Jb#HT8Al3HT8GZrHT8GgrHT8HX4HT8Jb8HT8JnoHT8LTrHT8LgvHT8SToHT8SV8HUoJUoHUoJX8HUoLnrHXrLZoHXvAl3HX3LnrHX4FkvHX4LhrHX4MXoHX4OnoHZrAZ8HZrDb8HZrGZ8HZrJnrHZvGZ8HZvLnvHZ8JnvHZ8LhrHbCXJlHbMTAnHboJl4HbpLl3HbrJX8HbrLnrHbrMnvHbvRYrHgoSTrHgrFV8HgrGZ8HgrJXoHgrRnvHgvBb!HgvGTrHgvHX4HgvHn!HgvLTrHgvSU8HnDnLbHnFbJbHnvDn8Hn6GgvHn!BTvJTCTLnJTQgFnJTrAnvJTrLX4JTrOUoJTvFn3JTvLnrJTvNToJT3AgoJT3Jn4JT3LhvJT3ObrJT8AcrJT8Al3JT8JT8JT8JnoJT8LX4JT8LnrJT8MX3JT8Rg3JT8Sc8JUoBTvJU8AToJU8GZ8JU8GgvJU8JTrJU8JXrJU8JnrJU8LnvJU8ScvJXHnJlJXrGgvJXrJU8JXrLhrJXrMT8JXrMXrJXrQUoJXvCTvJXvGZ8JXvGgrJXvQT8JX8Ab8JX8DT8JX8GZ8JX8HZvJX8LnrJX8MT8JX8MXoJX8MnvJX8ST3JYGnCTJbAkGbJbCTAnJbLTAcJboDT3JboLb6JbrAnvJbrCn3JbrDl8JbrGboJbrIZoJbrJnvJbrMnvJbrQb4Jb8RZrJeAbAnJgJnFbJgScAnJgrATrJgvHZ8JgvMn4JlJlFbJlLiQXJlLjOnJlRbOlJlvNXoJlvRl3Jl4AcrJl8AUoJl8MnrJnFnMlJnHgGbJnoDT8JnoFV8JnoGgvJnoIT8JnoQToJnoRg3JnrCZ3JnrGgrJnrHTvJnrLf8JnrOX8JnvAT3JnvFZoJnvGT8JnvJl4JnvMT8JnvMX8JnvOXrJnvPX6JnvSX3JnvSZrJn3MT8Jn3MX8Jn3RTrLTATKnLTJnLTLTMXKnLTRTQlLToGb8LTrAZ8LTrCZ8LTrDb8LTrHT8LT3PX6LT4FZoLT$CTvLT$GgrLUvHX3LVoATrLVoAgoLVoJboLVoMX3LVoRg3LV8CZ3LV8FZoLV8GTvLXrDXoLXrFbrLXvAgvLXvFlrLXvLl3LXvRn6LX4Mb8LX8GT8LYCXMnLYrMnrLZoSTvLZrAZvLZrAloLZrFToLZrJXvLZrJboLZrJl4LZrLnrLZrMT8LZrOgvLZrRnvLZrST4LZvMX8LZvSlvLZ8AgoLZ8CT3LZ8JT8LZ8LV8LZ8LZoLZ8Lg8LZ8SV8LZ8SbrLZ$HT8LZ$Mn4La6CTvLbFbMnLbRYFTLbSnFZLboJT8LbrAT9LbrGb3LbrQb8LcrJX8LcrMXrLerHTvLerJbrLerNboLgrDb8LgrGZ8LgrHTrLgrMXrLgrSU8LgvJTrLgvLl3Lg6Ll3LhrLnrLhrMT8LhvAl4LiLnQXLkoAgrLkoJT8LkoJn4LlrSU8Ll3FZoLl3HTrLl3JX8Ll3JnoLl3LToLmLeFbLnDUFbLnLVAnLnrATrLnrAZoLnrAb8LnrAlrLnrGgvLnrJU8LnrLZrLnrLhrLnrMb8LnrOXrLnrSZ8LnvAb4LnvDTrLnvDl8LnvHTrLnvHbrLnvJT8LnvJU8LnvJbrLnvLhvLnvMX8LnvMb8LnvNnoLnvSU8Ln3Al3Ln4FZoLn4GT6Ln4JgvLn4LhrLn4MT8Ln4SToMToCZrMToJX8MToLX4MToLf8MToRg3MTrEloMTvGb6MT3BTrMT3Lb6MT8AcrMT8AgrMT8GZrMT8JnoMT8LnrMT8MX3MUOUAnMXAbFnMXoAloMXoJX8MXoLf8MXoLl8MXrAb8MXrDTvMXrGT8MXrGgrMXrHTrMXrLf8MXrMU8MXrOXvMXrQb8MXvGT8MXvHTrMXvLVoMX3AX3MX3Jn3MX3LhrMX3MX3MX4AlrMX4OboMX8GTvMX8GZrMX8GgrMX8JT8MX8JX8MX8LhrMX8MT8MYDUFbMYMgDbMbGnFfMbvLX4MbvLl3Mb8Mb8Mb8ST4MgGXCnMg8ATrMg8AgoMg8CZrMg8DTrMg8DboMg8HTrMg8JgrMg8LT8MloJXoMl8AhrMl8JT8MnLgAUMnoJXrMnoLX4MnoLhrMnoMT8MnrAl4MnrDb8MnrOTvMnrOgvMnrQb8MnrSU8MnvGgrMnvHZ8Mn3MToMn4DTrMn4LTrMn4Mg8NnBXAnOTFTFnOToAToOTrGgvOTrJX8OT3JXoOT6MTrOT8GgrOT8HTpOT8MToOUoHT8OUoJT8OUoLn3OXrAgoOXrDg8OXrMT8OXvSToOX6CTvOX8CZrOX8OgrOb6HgvOb8AToOb8MT8OcvLZ8OgvAlrOgvHTvOgvJTrOgvJnrOgvLZrOgvLn4OgvMT8OgvRTrOg8AZoOg8DbvOnrOXoOnvJn4OnvLhvOnvRTrOn3GgoOn3JnvOn6JbvOn8OTrPTGYFTPbBnFnPbGnDnPgDYQTPlrAnvPlrETvPlrLnvPlrMXvPlvFX4QTMTAnQTrJU8QYCnJlQYJlQlQbGTQbQb8JnrQb8LZoQb8LnvQb8MT8Qb8Ml8Qb8ST4QloAl4QloHZvQloJX8QloMn8QnJZOlRTrAZvRTrDTrRTvJn4RTvLhvRT4Jb8RZrAZrRZ8AkrRZ8JU8RZ8LV8RZ8LnvRbJlQXRg3GboRg3MnvRg8AZ8Rg8JboRg8Jl4RnLTCbRnvFl3RnvQb8SToAl4SToCZrSToFZoSToHXrSToJU8SToJgvSToJl4SToLhrSToMX3STrAlvSTrCT9STrCgrSTrGgrSTrHXrSTrHboSTrJnoSTrNboSTvLnrST4AZoST8Ab8ST8JT8SUoJn3SU6HZ#SU6JTvSU8Db8SU8HboSU8LgrSV8JT8SZrAcrSZrAl3SZrJT8SZrJnvSZrMT8SZvLUoSZ4FZoSZ8JnoSZ8RZrScoLnrScoMT8ScoMX8ScrAT4ScrAZ8ScrLZ8ScrLkvScvDb8ScvLf8ScvNToSgrFZrShvKnrSloHUoSloLnrSlrMXoSl8HgrSmrJUoSn3BX6","ATFlOn3ATLgrDYAT4MTAnAT8LTMnAYJnRTrAbGgJnrAbLV8LnAbvNTAnAeFbLg3AgOYMXoAlQbFboAnDboAfAnJgoJTBToDgAnBUJbAl3BboDUAnCTDlvLnCTFTrSnCYoQTLnDTwAbAnDUDTrSnDUHgHgrDX8LXFnDbJXAcrETvLTLnGTFTQbrGTMnGToGT3DUFbGUJlPX3GbQg8LnGboJbFnGb3GgAYGgAg8ScGgMbAXrGgvAbAnGnJTLnvGnvATFgHTDT6ATHTrDlJnHYLnMn8HZrSbJTHZ8LTFnHbFTJUoHgSeMT8HgrLjAnHgvAbAnHlFUrDlHnDgvAnHnHTFT3HnQTGnrJTAaMXvJTGbCn3JTOgrAnJXvAXMnJbMg8SnJbMnRg3Jb8LTMnJnAl3OnJnGYrQlJnJlQY3LTDlCn3LTJjLg3LTLgvFXLTMg3GTLV8HUOgLXFZLg3LXNXrMnLX8QXFnLX9AlMYLYLXPXrLZAbJU8LZDUJU8LZMXrSnLZ$AgFnLaPXrDULbFYrMnLbMn8LXLboJgJgLeFbLg3LgLZrSnLgOYAgoLhrRnJlLkCTrSnLkOnLhrLnFX%AYLnFZoJXLnHTvJbLnLloAbMTATLf8MTHgJn3MTMXrAXMT3MTFnMUITvFnMXFX%AYMXMXvFbMXrFTDbMYAcMX3MbLf8SnMb8JbFnMgMXrMTMgvAXFnMgvGgCmMnAloSnMnFnJTrOXvMXSnOX8HTMnObJT8ScObLZFl3ObMXCZoPTLgrQXPUFnoQXPU3RXJlPX3RkQXPbrJXQlPlrJbFnQUAhrDbQXGnCXvQYLnHlvQbLfLnvRTOgvJbRXJYrQlRYLnrQlRbLnrQlRlFT8JlRlFnrQXSTClCn3STHTrAnSTLZQlrSTMnGTrSToHgGbSTrGTDnSTvGXCnST3HgFbSU3HXAXSbAnJn3SbFT8LnScLfLnv","AT3JgJX8AT8FZoSnAT8JgFV8AT8LhrDbAZ8JT8DbAb8GgLhrAb8SkLnvAe8MT8SnAlMYJXLVAl3GYDTvAl3LfLnvBUDTvLl3CTOn3HTrCT3DUGgrCU8MT8AbCbFTrJUoCgrDb8MTDTLV8JX8DTLnLXQlDT8LZrSnDUQb8FZ8DUST4JnvDb8ScOUoDj6GbJl4GTLfCYMlGToAXvFnGboAXvLnGgAcrJn3GgvFnSToGnLf8JnvGn#HTDToHTLnFXJlHTvATFToHTvHTDToHTvMTAgoHT3STClvHT4AlFl6HT8HTDToHUoDgJTrHUoScMX3HbRZrMXoHboJg8LTHgDb8JTrHgMToLf8HgvLnLnoHnHn3HT4Hn6MgvAnJTJU8ScvJT3AaQT8JT8HTrAnJXrRg8AnJbAloMXoJbrATFToJbvMnoSnJgDb6GgvJgDb8MXoJgSX3JU8JguATFToJlPYLnQlJlQkDnLbJlQlFYJlJl8Lf8OTJnCTFnLbJnLTHXMnJnLXGXCnJnoFfRg3JnrMYRg3Jn3HgFl3KT8Dg8LnLTRlFnPTLTvPbLbvLVoSbrCZLXMY6HT3LXNU7DlrLXNXDTATLX8DX8LnLZDb8JU8LZMnoLhrLZSToJU8LZrLaLnrLZvJn3SnLZ8LhrSnLaJnoMT8LbFlrHTvLbrFTLnrLbvATLlvLb6OTFn3LcLnJZOlLeAT6Mn4LeJT3ObrLg6LXFlrLhrJg8LnLhvDlPX4LhvLfLnvLj6JTFT3LnFbrMXoLnQluCTvLnrQXCY6LnvLfLnvLnvMgLnvLnvSeLf8MTMbrJn3MT3JgST3MT8AnATrMT8LULnrMUMToCZrMUScvLf8MXoDT8SnMX6ATFToMX8AXMT8MX8FkMT8MX8HTrDUMX8ScoSnMYJT6CTvMgAcrMXoMg8SToAfMlvAXLg3MnFl3AnvOT3AnFl3OUoATHT8OU3RnLXrOXrOXrSnObPbvFn6Og8HgrSnOg8OX8DbPTvAgoJgPU3RYLnrPXrDnJZrPb8CTGgvPlrLTDlvPlvFUJnoQUvFXrQlQeMnoAl3QlrQlrSnRTFTrJUoSTDlLiLXSTFg6HT3STJgoMn4STrFTJTrSTrLZFl3ST4FnMXoSUrDlHUoScvHTvSnSfLkvMXo","AUoAcrMXoAZ8HboAg8AbOg6ATFgAg8AloMXoAl3AT8JTrAl8MX8MXoCT3SToJU8Cl8Db8MXoDT8HgrATrDboOT8MXoGTOTrATMnGT8LhrAZ8GnvFnGnQXHToGgvAcrHTvAXvLl3HbrAZoMXoHgBlFXLg3HgMnFXrSnHgrSb8JUoHn6HT8LgvITvATrJUoJUoLZrRnvJU8HT8Jb8JXvFX8QT8JXvLToJTrJYrQnGnQXJgrJnoATrJnoJU8ScvJnvMnvMXoLTCTLgrJXLTJlRTvQlLbRnJlQYvLbrMb8LnvLbvFn3RnoLdCVSTGZrLeSTvGXCnLg3MnoLn3MToLlrETvMT8SToAl3MbrDU6GTvMb8LX4LhrPlrLXGXCnSToLf8Rg3STrDb8LTrSTvLTHXMnSb3RYLnMnSgOg6ATFg","HUDlGnrQXrJTrHgLnrAcJYMb8DULc8LTvFgGnCk3Mg8JbAnLX4QYvFYHnMXrRUoJnGnvFnRlvFTJlQnoSTrBXHXrLYSUJgLfoMT8Se8DTrHbDb","AbDl8SToJU8An3RbAb8ST8DUSTrGnrAgoLbFU6Db8LTrMg8AaHT8Jb8ObDl8SToJU8Pb3RlvFYoJl"],TS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*";function ES(t){return t>=40?t=t+168-40:t>=19&&(t=t+97-19),(0,SS.toUtf8String)([225,(t>>6)+132,(t&63)+128])}var Ra=null;function Cx(t){if(Ra==null&&(Ra=[],MS.forEach(function(e,r){r+=4;for(var n=0;n<e.length;n+=r){for(var i="",a=0;a<r;a++)i+=ES(TS.indexOf(e[n+a]));Ra.push(i)}}),Ra.sort(),Hd.Wordlist.check(t)!=="0xf9eddeace9c5d3da9c93cf7d3cd38f6a13ed3affb933259ae865714e8a3ae71a"))throw Ra=null,new Error("BIP39 Wordlist for ko (Korean) FAILED")}var _S=function(t){AS(e,t);function e(){return t.call(this,"ko")||this}return e.prototype.getWord=function(r){return Cx(this),Ra[r]},e.prototype.getWordIndex=function(r){return Cx(this),Ra.indexOf(r)},e}(Hd.Wordlist),Px=new _S;Ho.langKo=Px;Hd.Wordlist.register(Px)});var Dx=V(qo=>{"use strict";var NF=A(S()),BS=qo&&qo.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qo,"__esModule",{value:!0});qo.langIt=void 0;var qd=$n(),CS="AbacoAbbaglioAbbinatoAbeteAbissoAbolireAbrasivoAbrogatoAccadereAccennoAccusatoAcetoneAchilleAcidoAcquaAcreAcrilicoAcrobataAcutoAdagioAddebitoAddomeAdeguatoAderireAdipeAdottareAdulareAffabileAffettoAffissoAffrantoAforismaAfosoAfricanoAgaveAgenteAgevoleAggancioAgireAgitareAgonismoAgricoloAgrumetoAguzzoAlabardaAlatoAlbatroAlberatoAlboAlbumeAlceAlcolicoAlettoneAlfaAlgebraAlianteAlibiAlimentoAllagatoAllegroAllievoAllodolaAllusivoAlmenoAlogenoAlpacaAlpestreAltalenaAlternoAlticcioAltroveAlunnoAlveoloAlzareAmalgamaAmanitaAmarenaAmbitoAmbratoAmebaAmericaAmetistaAmicoAmmassoAmmendaAmmirareAmmonitoAmoreAmpioAmpliareAmuletoAnacardoAnagrafeAnalistaAnarchiaAnatraAncaAncellaAncoraAndareAndreaAnelloAngeloAngolareAngustoAnimaAnnegareAnnidatoAnnoAnnuncioAnonimoAnticipoAnziApaticoAperturaApodeApparireAppetitoAppoggioApprodoAppuntoAprileArabicaArachideAragostaAraldicaArancioAraturaArazzoArbitroArchivioArditoArenileArgentoArgineArgutoAriaArmoniaArneseArredatoArringaArrostoArsenicoArsoArteficeArzilloAsciuttoAscoltoAsepsiAsetticoAsfaltoAsinoAsolaAspiratoAsproAssaggioAsseAssolutoAssurdoAstaAstenutoAsticeAstrattoAtavicoAteismoAtomicoAtonoAttesaAttivareAttornoAttritoAttualeAusilioAustriaAutistaAutonomoAutunnoAvanzatoAvereAvvenireAvvisoAvvolgereAzioneAzotoAzzimoAzzurroBabeleBaccanoBacinoBacoBadessaBadilataBagnatoBaitaBalconeBaldoBalenaBallataBalzanoBambinoBandireBaraondaBarbaroBarcaBaritonoBarlumeBaroccoBasilicoBassoBatostaBattutoBauleBavaBavosaBeccoBeffaBelgioBelvaBendaBenevoleBenignoBenzinaBereBerlinaBetaBibitaBiciBidoneBifidoBigaBilanciaBimboBinocoloBiologoBipedeBipolareBirbanteBirraBiscottoBisestoBisnonnoBisonteBisturiBizzarroBlandoBlattaBollitoBonificoBordoBoscoBotanicoBottinoBozzoloBraccioBradipoBramaBrancaBravuraBretellaBrevettoBrezzaBrigliaBrillanteBrindareBroccoloBrodoBronzinaBrulloBrunoBubboneBucaBudinoBuffoneBuioBulboBuonoBurloneBurrascaBussolaBustaCadettoCaducoCalamaroCalcoloCalesseCalibroCalmoCaloriaCambusaCamerataCamiciaCamminoCamolaCampaleCanapaCandelaCaneCaninoCanottoCantinaCapaceCapelloCapitoloCapogiroCapperoCapraCapsulaCarapaceCarcassaCardoCarismaCarovanaCarrettoCartolinaCasaccioCascataCasermaCasoCassoneCastelloCasualeCatastaCatenaCatrameCautoCavilloCedibileCedrataCefaloCelebreCellulareCenaCenoneCentesimoCeramicaCercareCertoCerumeCervelloCesoiaCespoCetoChelaChiaroChiccaChiedereChimeraChinaChirurgoChitarraCiaoCiclismoCifrareCignoCilindroCiottoloCircaCirrosiCitricoCittadinoCiuffoCivettaCivileClassicoClinicaCloroCoccoCodardoCodiceCoerenteCognomeCollareColmatoColoreColposoColtivatoColzaComaCometaCommandoComodoComputerComuneConcisoCondurreConfermaCongelareConiugeConnessoConoscereConsumoContinuoConvegnoCopertoCopioneCoppiaCopricapoCorazzaCordataCoricatoCorniceCorollaCorpoCorredoCorsiaCorteseCosmicoCostanteCotturaCovatoCratereCravattaCreatoCredereCremosoCrescitaCretaCricetoCrinaleCrisiCriticoCroceCronacaCrostataCrucialeCruscaCucireCuculoCuginoCullatoCupolaCuratoreCursoreCurvoCuscinoCustodeDadoDainoDalmataDamerinoDanielaDannosoDanzareDatatoDavantiDavveroDebuttoDecennioDecisoDeclinoDecolloDecretoDedicatoDefinitoDeformeDegnoDelegareDelfinoDelirioDeltaDemenzaDenotatoDentroDepositoDerapataDerivareDerogaDescrittoDesertoDesiderioDesumereDetersivoDevotoDiametroDicembreDiedroDifesoDiffusoDigerireDigitaleDiluvioDinamicoDinnanziDipintoDiplomaDipoloDiradareDireDirottoDirupoDisagioDiscretoDisfareDisgeloDispostoDistanzaDisumanoDitoDivanoDiveltoDividereDivoratoDobloneDocenteDoganaleDogmaDolceDomatoDomenicaDominareDondoloDonoDormireDoteDottoreDovutoDozzinaDragoDruidoDubbioDubitareDucaleDunaDuomoDupliceDuraturoEbanoEccessoEccoEclissiEconomiaEderaEdicolaEdileEditoriaEducareEgemoniaEgliEgoismoEgregioElaboratoElargireEleganteElencatoElettoElevareElficoElicaElmoElsaElusoEmanatoEmblemaEmessoEmiroEmotivoEmozioneEmpiricoEmuloEndemicoEnduroEnergiaEnfasiEnotecaEntrareEnzimaEpatiteEpilogoEpisodioEpocaleEppureEquatoreErarioErbaErbosoEredeEremitaErigereErmeticoEroeErosivoErranteEsagonoEsameEsanimeEsaudireEscaEsempioEsercitoEsibitoEsigenteEsistereEsitoEsofagoEsortatoEsosoEspansoEspressoEssenzaEssoEstesoEstimareEstoniaEstrosoEsultareEtilicoEtnicoEtruscoEttoEuclideoEuropaEvasoEvidenzaEvitatoEvolutoEvvivaFabbricaFaccendaFachiroFalcoFamigliaFanaleFanfaraFangoFantasmaFareFarfallaFarinosoFarmacoFasciaFastosoFasulloFaticareFatoFavolosoFebbreFecolaFedeFegatoFelpaFeltroFemminaFendereFenomenoFermentoFerroFertileFessuraFestivoFettaFeudoFiabaFiduciaFifaFiguratoFiloFinanzaFinestraFinireFioreFiscaleFisicoFiumeFlaconeFlamencoFleboFlemmaFloridoFluenteFluoroFobicoFocacciaFocosoFoderatoFoglioFolataFolcloreFolgoreFondenteFoneticoFoniaFontanaForbitoForchettaForestaFormicaFornaioForoFortezzaForzareFosfatoFossoFracassoFranaFrassinoFratelloFreccettaFrenataFrescoFrigoFrollinoFrondeFrugaleFruttaFucilataFucsiaFuggenteFulmineFulvoFumanteFumettoFumosoFuneFunzioneFuocoFurboFurgoneFuroreFusoFutileGabbianoGaffeGalateoGallinaGaloppoGamberoGammaGaranziaGarboGarofanoGarzoneGasdottoGasolioGastricoGattoGaudioGazeboGazzellaGecoGelatinaGelsoGemelloGemmatoGeneGenitoreGennaioGenotipoGergoGhepardoGhiaccioGhisaGialloGildaGineproGiocareGioielloGiornoGioveGiratoGironeGittataGiudizioGiuratoGiustoGlobuloGlutineGnomoGobbaGolfGomitoGommoneGonfioGonnaGovernoGracileGradoGraficoGrammoGrandeGrattareGravosoGraziaGrecaGreggeGrifoneGrigioGrinzaGrottaGruppoGuadagnoGuaioGuantoGuardareGufoGuidareIbernatoIconaIdenticoIdillioIdoloIdraIdricoIdrogenoIgieneIgnaroIgnoratoIlareIllesoIllogicoIlludereImballoImbevutoImboccoImbutoImmaneImmersoImmolatoImpaccoImpetoImpiegoImportoImprontaInalareInarcareInattivoIncantoIncendioInchinoIncisivoInclusoIncontroIncrocioIncuboIndagineIndiaIndoleIneditoInfattiInfilareInflittoIngaggioIngegnoIngleseIngordoIngrossoInnescoInodoreInoltrareInondatoInsanoInsettoInsiemeInsonniaInsulinaIntasatoInteroIntonacoIntuitoInumidireInvalidoInveceInvitoIperboleIpnoticoIpotesiIppicaIrideIrlandaIronicoIrrigatoIrrorareIsolatoIsotopoIstericoIstitutoIstriceItaliaIterareLabbroLabirintoLaccaLaceratoLacrimaLacunaLaddoveLagoLampoLancettaLanternaLardosoLargaLaringeLastraLatenzaLatinoLattugaLavagnaLavoroLegaleLeggeroLemboLentezzaLenzaLeoneLepreLesivoLessatoLestoLetteraleLevaLevigatoLiberoLidoLievitoLillaLimaturaLimitareLimpidoLineareLinguaLiquidoLiraLiricaLiscaLiteLitigioLivreaLocandaLodeLogicaLombareLondraLongevoLoquaceLorenzoLotoLotteriaLuceLucidatoLumacaLuminosoLungoLupoLuppoloLusingaLussoLuttoMacabroMacchinaMaceroMacinatoMadamaMagicoMagliaMagneteMagroMaiolicaMalafedeMalgradoMalintesoMalsanoMaltoMalumoreManaManciaMandorlaMangiareManifestoMannaroManovraMansardaMantideManubrioMappaMaratonaMarcireMarettaMarmoMarsupioMascheraMassaiaMastinoMaterassoMatricolaMattoneMaturoMazurcaMeandroMeccanicoMecenateMedesimoMeditareMegaMelassaMelisMelodiaMeningeMenoMensolaMercurioMerendaMerloMeschinoMeseMessereMestoloMetalloMetodoMettereMiagolareMicaMicelioMicheleMicroboMidolloMieleMiglioreMilanoMiliteMimosaMineraleMiniMinoreMirinoMirtilloMiscelaMissivaMistoMisurareMitezzaMitigareMitraMittenteMnemonicoModelloModificaModuloMoganoMogioMoleMolossoMonasteroMoncoMondinaMonetarioMonileMonotonoMonsoneMontatoMonvisoMoraMordereMorsicatoMostroMotivatoMotosegaMottoMovenzaMovimentoMozzoMuccaMucosaMuffaMughettoMugnaioMulattoMulinelloMultiploMummiaMuntoMuovereMuraleMusaMuscoloMusicaMutevoleMutoNababboNaftaNanometroNarcisoNariceNarratoNascereNastrareNaturaleNauticaNaviglioNebulosaNecrosiNegativoNegozioNemmenoNeofitaNerettoNervoNessunoNettunoNeutraleNeveNevroticoNicchiaNinfaNitidoNobileNocivoNodoNomeNominaNordicoNormaleNorvegeseNostranoNotareNotiziaNotturnoNovellaNucleoNullaNumeroNuovoNutrireNuvolaNuzialeOasiObbedireObbligoObeliscoOblioOboloObsoletoOccasioneOcchioOccidenteOccorrereOccultareOcraOculatoOdiernoOdorareOffertaOffrireOffuscatoOggettoOggiOgnunoOlandeseOlfattoOliatoOlivaOlogrammaOltreOmaggioOmbelicoOmbraOmegaOmissioneOndosoOnereOniceOnnivoroOnorevoleOntaOperatoOpinioneOppostoOracoloOrafoOrdineOrecchinoOreficeOrfanoOrganicoOrigineOrizzonteOrmaOrmeggioOrnativoOrologioOrrendoOrribileOrtensiaOrticaOrzataOrzoOsareOscurareOsmosiOspedaleOspiteOssaOssidareOstacoloOsteOtiteOtreOttagonoOttimoOttobreOvaleOvestOvinoOviparoOvocitoOvunqueOvviareOzioPacchettoPacePacificoPadellaPadronePaesePagaPaginaPalazzinaPalesarePallidoPaloPaludePandoroPannelloPaoloPaonazzoPapricaParabolaParcellaParerePargoloPariParlatoParolaPartireParvenzaParzialePassivoPasticcaPataccaPatologiaPattumePavonePeccatoPedalarePedonalePeggioPelosoPenarePendicePenisolaPennutoPenombraPensarePentolaPepePepitaPerbenePercorsoPerdonatoPerforarePergamenaPeriodoPermessoPernoPerplessoPersuasoPertugioPervasoPesatorePesistaPesoPestiferoPetaloPettinePetulantePezzoPiacerePiantaPiattinoPiccinoPicozzaPiegaPietraPifferoPigiamaPigolioPigroPilaPiliferoPillolaPilotaPimpantePinetaPinnaPinoloPioggiaPiomboPiramidePireticoPiritePirolisiPitonePizzicoPlaceboPlanarePlasmaPlatanoPlenarioPochezzaPoderosoPodismoPoesiaPoggiarePolentaPoligonoPollicePolmonitePolpettaPolsoPoltronaPolverePomicePomodoroPontePopolosoPorfidoPorosoPorporaPorrePortataPosaPositivoPossessoPostulatoPotassioPoterePranzoPrassiPraticaPreclusoPredicaPrefissoPregiatoPrelievoPremerePrenotarePreparatoPresenzaPretestoPrevalsoPrimaPrincipePrivatoProblemaProcuraProdurreProfumoProgettoProlungaPromessaPronomePropostaProrogaProtesoProvaPrudentePrugnaPruritoPsichePubblicoPudicaPugilatoPugnoPulcePulitoPulsantePuntarePupazzoPupillaPuroQuadroQualcosaQuasiQuerelaQuotaRaccoltoRaddoppioRadicaleRadunatoRafficaRagazzoRagioneRagnoRamarroRamingoRamoRandagioRantolareRapatoRapinaRappresoRasaturaRaschiatoRasenteRassegnaRastrelloRataRavvedutoRealeRecepireRecintoReclutaReconditoRecuperoRedditoRedimereRegalatoRegistroRegolaRegressoRelazioneRemareRemotoRennaReplicaReprimereReputareResaResidenteResponsoRestauroReteRetinaRetoricaRettificaRevocatoRiassuntoRibadireRibelleRibrezzoRicaricaRiccoRicevereRiciclatoRicordoRicredutoRidicoloRidurreRifasareRiflessoRiformaRifugioRigareRigettatoRighelloRilassatoRilevatoRimanereRimbalzoRimedioRimorchioRinascitaRincaroRinforzoRinnovoRinomatoRinsavitoRintoccoRinunciaRinvenireRiparatoRipetutoRipienoRiportareRipresaRipulireRisataRischioRiservaRisibileRisoRispettoRistoroRisultatoRisvoltoRitardoRitegnoRitmicoRitrovoRiunioneRivaRiversoRivincitaRivoltoRizomaRobaRoboticoRobustoRocciaRocoRodaggioRodereRoditoreRogitoRollioRomanticoRompereRonzioRosolareRospoRotanteRotondoRotulaRovescioRubizzoRubricaRugaRullinoRumineRumorosoRuoloRupeRussareRusticoSabatoSabbiareSabotatoSagomaSalassoSaldaturaSalgemmaSalivareSalmoneSaloneSaltareSalutoSalvoSapereSapidoSaporitoSaracenoSarcasmoSartoSassosoSatelliteSatiraSatolloSaturnoSavanaSavioSaziatoSbadiglioSbalzoSbancatoSbarraSbattereSbavareSbendareSbirciareSbloccatoSbocciatoSbrinareSbruffoneSbuffareScabrosoScadenzaScalaScambiareScandaloScapolaScarsoScatenareScavatoSceltoScenicoScettroSchedaSchienaSciarpaScienzaScindereScippoSciroppoScivoloSclerareScodellaScolpitoScompartoSconfortoScoprireScortaScossoneScozzeseScribaScrollareScrutinioScuderiaScultoreScuolaScuroScusareSdebitareSdoganareSeccaturaSecondoSedanoSeggiolaSegnalatoSegregatoSeguitoSelciatoSelettivoSellaSelvaggioSemaforoSembrareSemeSeminatoSempreSensoSentireSepoltoSequenzaSerataSerbatoSerenoSerioSerpenteSerraglioServireSestinaSetolaSettimanaSfaceloSfaldareSfamatoSfarzosoSfaticatoSferaSfidaSfilatoSfingeSfocatoSfoderareSfogoSfoltireSforzatoSfrattoSfruttatoSfuggitoSfumareSfusoSgabelloSgarbatoSgonfiareSgorbioSgrassatoSguardoSibiloSiccomeSierraSiglaSignoreSilenzioSillabaSimboloSimpaticoSimulatoSinfoniaSingoloSinistroSinoSintesiSinusoideSiparioSismaSistoleSituatoSlittaSlogaturaSlovenoSmarritoSmemoratoSmentitoSmeraldoSmilzoSmontareSmottatoSmussatoSnellireSnervatoSnodoSobbalzoSobrioSoccorsoSocialeSodaleSoffittoSognoSoldatoSolenneSolidoSollazzoSoloSolubileSolventeSomaticoSommaSondaSonettoSonniferoSopireSoppesoSopraSorgereSorpassoSorrisoSorsoSorteggioSorvolatoSospiroSostaSottileSpadaSpallaSpargereSpatolaSpaventoSpazzolaSpecieSpedireSpegnereSpelaturaSperanzaSpessoreSpettraleSpezzatoSpiaSpigolosoSpillatoSpinosoSpiraleSplendidoSportivoSposoSprangaSprecareSpronatoSpruzzoSpuntinoSquilloSradicareSrotolatoStabileStaccoStaffaStagnareStampatoStantioStarnutoStaseraStatutoSteloSteppaSterzoStilettoStimaStirpeStivaleStizzosoStonatoStoricoStrappoStregatoStriduloStrozzareStruttoStuccareStufoStupendoSubentroSuccosoSudoreSuggeritoSugoSultanoSuonareSuperboSupportoSurgelatoSurrogatoSussurroSuturaSvagareSvedeseSveglioSvelareSvenutoSveziaSviluppoSvistaSvizzeraSvoltaSvuotareTabaccoTabulatoTacciareTaciturnoTaleTalismanoTamponeTanninoTaraTardivoTargatoTariffaTarpareTartarugaTastoTatticoTavernaTavolataTazzaTecaTecnicoTelefonoTemerarioTempoTemutoTendoneTeneroTensioneTentacoloTeoremaTermeTerrazzoTerzettoTesiTesseratoTestatoTetroTettoiaTifareTigellaTimbroTintoTipicoTipografoTiraggioTiroTitanioTitoloTitubanteTizioTizzoneToccareTollerareToltoTombolaTomoTonfoTonsillaTopazioTopologiaToppaTorbaTornareTorroneTortoraToscanoTossireTostaturaTotanoTraboccoTracheaTrafilaTragediaTralcioTramontoTransitoTrapanoTrarreTraslocoTrattatoTraveTrecciaTremolioTrespoloTributoTrichecoTrifoglioTrilloTrinceaTrioTristezzaTrituratoTrivellaTrombaTronoTroppoTrottolaTrovareTruccatoTubaturaTuffatoTulipanoTumultoTunisiaTurbareTurchinoTutaTutelaUbicatoUccelloUccisoreUdireUditivoUffaUfficioUgualeUlisseUltimatoUmanoUmileUmorismoUncinettoUngereUnghereseUnicornoUnificatoUnisonoUnitarioUnteUovoUpupaUraganoUrgenzaUrloUsanzaUsatoUscitoUsignoloUsuraioUtensileUtilizzoUtopiaVacanteVaccinatoVagabondoVagliatoValangaValgoValicoVallettaValorosoValutareValvolaVampataVangareVanitosoVanoVantaggioVanveraVaporeVaranoVarcatoVarianteVascaVedettaVedovaVedutoVegetaleVeicoloVelcroVelinaVellutoVeloceVenatoVendemmiaVentoVeraceVerbaleVergognaVerificaVeroVerrucaVerticaleVescicaVessilloVestaleVeteranoVetrinaVetustoViandanteVibranteVicendaVichingoVicinanzaVidimareVigiliaVignetoVigoreVileVillanoViminiVincitoreViolaViperaVirgolaVirologoVirulentoViscosoVisioneVispoVissutoVisuraVitaVitelloVittimaVivandaVividoViziareVoceVogaVolatileVolereVolpeVoragineVulcanoZampognaZannaZappatoZatteraZavorraZefiroZelanteZeloZenzeroZerbinoZibettoZincoZirconeZittoZollaZoticoZuccheroZufoloZuluZuppa",Vs=null;function Rx(t){if(Vs==null&&(Vs=CS.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),qd.Wordlist.check(t)!=="0x5c1362d88fd4cf614a96f3234941d29f7d37c08c5292fde03bf62c2db6ff7620"))throw Vs=null,new Error("BIP39 Wordlist for it (Italian) FAILED")}var PS=function(t){BS(e,t);function e(){return t.call(this,"it")||this}return e.prototype.getWord=function(r){return Rx(this),Vs[r]},e.prototype.getWordIndex=function(r){return Rx(this),Vs.indexOf(r)},e}(qd.Wordlist),Fx=new PS;qo.langIt=Fx;qd.Wordlist.register(Fx)});var Nx=V(Wi=>{"use strict";var UF=A(S()),LS=Wi&&Wi.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Wi,"__esModule",{value:!0});Wi.langZhTw=Wi.langZhCn=void 0;var RS=Or(),js=$n(),Gd="}aE#4A=Yv&co#4N#6G=cJ&SM#66|/Z#4t&kn~46#4K~4q%b9=IR#7l,mB#7W_X2*dl}Uo~7s}Uf&Iw#9c&cw~6O&H6&wx&IG%v5=IQ~8a&Pv#47$PR&50%Ko&QM&3l#5f,D9#4L|/H&tQ;v0~6n]nN<di,AM=W5%QO&ka&ua,hM^tm=zV=JA=wR&+X]7P&NB#4J#5L|/b[dA}tJ<Do&6m&u2[U1&Kb.HM&mC=w0&MW<rY,Hq#6M}QG,13&wP}Jp]Ow%ue&Kg<HP<D9~4k~9T&I2_c6$9T#9/[C5~7O~4a=cs&O7=KK=An&l9$6U$8A&uD&QI|/Y&bg}Ux&F2#6b}E2&JN&kW&kp=U/&bb=Xl<Cj}k+~5J#6L&5z&9i}b4&Fo,ho(X0_g3~4O$Fz&QE<HN=Ww]6/%GF-Vw=tj&/D&PN#9g=YO}cL&Of&PI~5I&Ip=vU=IW#9G;0o-wU}ss&QR<BT&R9=tk$PY_dh&Pq-yh]7T,nj.Xu=EP&76=cI&Fs*Xg}z7$Gb&+I=DF,AF=cA}rL#7j=Dz&3y<Aa$52=PQ}b0(iY$Fa}oL&xV#6U=ec=WZ,xh%RY<dp#9N&Fl&44=WH*A7=sh&TB&8P=07;u+&PK}uh}J5#72)V/=xC,AB$k0&f6;1E|+5=1B,3v]6n&wR%b+&xx]7f=Ol}fl;+D^wG]7E;nB;uh^Ir&l5=JL,nS=cf=g5;u6|/Q$Gc=MH%Hg#5d%M6^86=U+$Gz,l/,ir^5y&Ba&/F-IY&FI&be%IZ#77&PW_Nu$kE(Yf&NX]7Z,Jy&FJ(Xo&Nz#/d=y7&MX<Ag}Z+;nE]Dt(iG#4D=13&Pj~4c%v8&Zo%OL&/X#4W<HR&ie~6J_1O(Y2=y5=Ad*cv_eB#6k&PX:BU#7A;uk&Ft&Fx_dD=U2;vB=U5=4F}+O&GN.HH:9s=b0%NV(jO&IH=JT}Z9=VZ<Af,Kx^4m&uJ%c6,6r;9m#+L}cf%Kh&F3~4H=vP}bu,Hz|++,1w]nv}k6;uu$jw*Kl*WX&uM[x7&Fr[m7$NO&QN]hu=JN}nR^8g#/h(ps|KC;vd}xz=V0}p6&FD$G1#7K<bG_4p~8g&cf;u4=tl}+k%5/}fz;uw<cA=u1}gU}VM=LJ=eX&+L&Pr#4U}p2:nC,2K]7H:jF&9x}uX#9O=MB<fz~8X~5m&4D&kN&u5%E/(h7(ZF&VG<de(qM|/e-Wt=3x(a+,/R]f/&ND$Ro&nU}0g=KA%kH&NK$Ke<dS}cB&IX~5g$TN]6m=Uv,Is&Py=Ef%Kz#+/%bi&+A<F4$OG&4C&FL#9V<Zk=2I_eE&6c]nw&kq$HG}y+&A8$P3}OH=XP]70%IS(AJ_gH%GZ&tY&AZ=vb~6y&/r=VI=Wv<Zi=fl=xf&eL}c8}OL=MJ=g8$F7=YT}9u=0+^xC}JH&nL^N0~4T]K2,Cy%OC#6s;vG(AC^xe^cG&MF}Br#9P;wD-7h$O/&xA}Fn^PC]6i]7G&8V$Qs;vl(TB~73~4l<mW&6V=2y&uY&+3)aP}XF;LP&kx$wU=t7;uy<FN&lz)7E=Oo*Y+;wI}9q}le;J6&Ri&4t&Qr#8B=cb&vG=J5|Ql(h5<Yy~4+}QD,Lx=wn%K/&RK=dO&Pw,Q9=co%4u;9u}g0@6a^4I%b0=zo|/c&tX=dQ=OS#+b=yz_AB&wB&Pm=W9$HP_gR=62=AO=ti=hI,oA&jr&dH=tm&b6$P2(x8=zi;nG~7F;05]0n[Ix&3m}rg=Xp=cd&uz]7t;97=cN;vV<jf&FF&F1=6Q&Ik*Kk&P4,2z=fQ]7D&3u,H0=d/}Uw<ZN<7R}Kv;0f$H7,MD]7n$F0#88~9Z%da=by;+T#/u=VF&fO&kr^kf<AB]sU,I5$Ng&Pz;0i&QD&vM=Yl:BM;nJ_xJ]U7&Kf&30,3f|Z9*dC)je_jA&Q4&Kp$NH(Yz#6S&Id%Ib=KX,AD=KV%dP}tW&Pk^+E_Ni=cq,3R}VZ(Si=b+}rv;0j}rZ]uA,/w(Sx&Jv$w9&4d&wE,NJ$Gy=J/]Ls#7k<ZQ<Y/&uj]Ov$PM;v3,2F&+u:up=On&3e,Jv;90=J+&Qm]6q}bK#+d~8Y(h2]hA;99&AS=I/}qB&dQ}yJ-VM}Vl&ui,iB&G3|Dc]7d=eQ%dX%JC_1L~4d^NP;vJ&/1)ZI#7N]9X[bQ&PL=0L(UZ,Lm&kc&IR}n7(iR<AQ<dg=33=vN}ft}au]7I,Ba=x9=dR~6R&Tq=Xi,3d$Nr&Bc}DI&ku&vf]Dn,/F&iD,Ll&Nw=0y&I7=Ls=/A&tU=Qe}Ua&uk&+F=g4=gh=Vj#+1&Qn}Uy*44#5F,Pc&Rz*Xn=oh=5W;0n_Nf(iE<Y7=vr=Zu]oz#5Z%mI=kN=Bv_Jp(T2;vt_Ml<FS&uI=L/&6P]64$M7}86<bo%QX(SI%IY&VK=Al&Ux;vv;ut*E/%uh<ZE|O3,M2(yc]yu=Wk&tp:Ex}hr,Cl&WE)+Z=8U}I2_4Q,hA_si=iw=OM=tM=yZ%Ia=U7;wT}b+;uo=Za}yS!5x}HD}fb#5O_dA;Nv%uB(yB;01(Sf}Fk;v7}Pt#8v<mZ#7L,/r&Pl~4w&f5=Ph$Fw_LF&8m,bL=yJ&BH}p/*Jn}tU~5Q;wB(h6]Df]8p^+B;E4&Wc=d+;Ea&bw$8C&FN,DM=Yf}mP~5w=fT#6V=mC=Fi=AV}jB&AN}lW}aH#/D)dZ;hl;vE}/7,CJ;31&w8,hj%u9_Js=jJ&4M~8k=TN&eC}nL&uc-wi&lX}dj=Mv=e2#6u=cr$uq$6G]8W}Jb:nm=Yg<b3(UA;vX&6n&xF=KT,jC,De&R8&oY=Zv&oB]7/=Z2&Oa}bf,hh(4h^tZ&72&Nx;D2&xL~5h~40)ZG)h+=OJ&RA]Bv$yB=Oq=df,AQ%Jn}OJ;11,3z&Tl&tj;v+^Hv,Dh(id=s+]7N&N3)9Q~8f,S4=uW=w4&uX,LX&3d]CJ&yp&8x<b2_do&lP=y/<cy_dG=Oi=7R(VH(lt_1T,Iq_AA;12^6T%k6#8K[B1{oO<AU[Bt;1b$9S&Ps<8T=St{bY,jB(Zp&63&Uv$9V,PM]6v&Af}zW[bW_oq}sm}nB&Kq&gC&ff_eq_2m&5F&TI}rf}Gf;Zr_z9;ER&jk}iz_sn<BN~+n&vo=Vi%97|ZR=Wc,WE&6t]6z%85(ly#84=KY)6m_5/=aX,N3}Tm&he&6K]tR_B2-I3;u/&hU&lH<AP=iB&IA=XL;/5&Nh=wv<BH#79=vS=zl<AA=0X_RG}Bw&9p$NW,AX&kP_Lp&/Z(Tc]Mu}hs#6I}5B&cI<bq&H9#6m=K9}vH(Y1(Y0#4B&w6,/9&gG<bE,/O=zb}I4_l8<B/;wL%Qo<HO[Mq=XX}0v&BP&F4(mG}0i}nm,EC=9u{I3,xG&/9=JY*DK&hR)BX=EI=cx=b/{6k}yX%A+&wa}Xb=la;wi^lL;0t}jo&Qb=xg=XB}iO<qo{bR=NV&8f=a0&Jy;0v=uK)HK;vN#6h&jB(h/%ud&NI%wY.X7=Pt}Cu-uL&Gs_hl%mH,tm]78=Lb^Q0#7Y=1u<Bt&+Q=Co_RH,w3;1e}ux<aU;ui}U3&Q5%bt]63&UQ|0l&uL}O7&3o,AV&dm|Nj(Xt*5+(Uu&Hh(p7(UF=VR=Bp^Jl&Hd[ix)9/=Iq]C8<67]66}mB%6f}bb}JI]8T$HA}db=YM&pa=2J}tS&Y0=PS&y4=cX$6E,hX,XP&nR;04,FQ&l0&Vm_Dv#5Y~8Z=Bi%MA]6x=JO:+p,Az&9q,Hj~6/}SD=K1:EJ}nA;Qo#/E]9R,Ie&6X%W3]61&v4=xX_MC=0q;06(Xq=fs}IG}Dv=0l}o7$iZ;9v&LH&DP-7a&OY,SZ,Kz,Cv&dh=fx|Nh,F/~7q=XF&w+;9n&Gw;0h}Z7<7O&JK(S7&LS<AD<ac=wo<Dt&zw%4B=4v#8P;9o~6p*vV=Tm,Or&I6=1q}nY=P0=gq&Bl&Uu,Ch%yb}UY=zh}dh}rl(T4_xk(YA#8R*xH,IN}Jn]7V}C4&Ty}j3]7p=cL=3h&wW%Qv<Z3=f0&RI&+S(ic_zq}oN&/Y=z1;Td=LW=0e=OI(Vc,+b^ju(UL;0r:Za%8v=Rp=zw&58&73&wK}qX]6y&8E)a2}WR=wP^ur&nQ<cH}Re=Aq&wk}Q0&+q=PP,Gc|/d^k5,Fw]8Y}Pg]p3=ju=ed}r5_yf&Cs]7z$/G<Cm&Jp&54_1G_gP_Ll}JZ;0u]k8_7k(Sg]65{9i=LN&Sx&WK,iW&fD&Lk{9a}Em-9c#8N&io=sy]8d&nT&IK(lx#7/$lW(Td<s8~49,3o<7Y=MW(T+_Jr&Wd,iL}Ct=xh&5V;v4&8n%Kx=iF&l2_0B{B+,If(J0,Lv;u8=Kx-vB=HC&vS=Z6&fU&vE^xK;3D=4h=MR#45:Jw;0d}iw=LU}I5=I0]gB*im,K9}GU,1k_4U&Tt=Vs(iX&lU(TF#7y,ZO}oA&m5#5P}PN}Uz=hM<B1&FB<aG,e6~7T<tP(UQ_ZT=wu&F8)aQ]iN,1r_Lo&/g:CD}84{J1_Ki&Na&3n$jz&FE=dc;uv;va}in}ll=fv(h1&3h}fp=Cy}BM(+E~8m}lo%v7=hC(T6$cj=BQ=Bw(DR,2j=Ks,NS|F+;00=fU=70}Mb(YU;+G&m7&hr=Sk%Co]t+(X5_Jw}0r}gC(AS-IP&QK<Z2#8Q$WC]WX}T2&pG_Ka,HC=R4&/N;Z+;ch(C7,D4$3p_Mk&B2$8D=n9%Ky#5z(CT&QJ#7B]DC]gW}nf~5M;Iw#80}Tc_1F#4Z-aC}Hl=ph=fz,/3=aW}JM}nn;DG;vm}wn,4P}T3;wx&RG$u+}zK=0b;+J_Ek{re<aZ=AS}yY#5D]7q,Cp}xN=VP*2C}GZ}aG~+m_Cs=OY#6r]6g<GS}LC(UB=3A=Bo}Jy<c4}Is;1P<AG}Op<Z1}ld}nS=1Z,yM&95&98=CJ(4t:2L$Hk=Zo}Vc;+I}np&N1}9y=iv}CO*7p=jL)px]tb^zh&GS&Vl%v/;vR=14=zJ&49|/f]hF}WG;03=8P}o/&Gg&rp;DB,Kv}Ji&Pb;aA^ll(4j%yt}+K$Ht#4y&hY]7Y<F1,eN}bG(Uh%6Z]t5%G7;+F_RE;it}tL=LS&Da=Xx(S+(4f=8G=yI}cJ}WP=37=jS}pX}hd)fp<A8=Jt~+o$HJ=M6}iX=g9}CS=dv=Cj(mP%Kd,xq|+9&LD(4/=Xm&QP=Lc}LX&fL;+K=Op(lu=Qs.qC:+e&L+=Jj#8w;SL]7S(b+#4I=c1&nG_Lf&uH;+R)ZV<bV%B/,TE&0H&Jq&Ah%OF&Ss(p2,Wv&I3=Wl}Vq;1L&lJ#9b_1H=8r=b8=JH(SZ=hD=J2#7U,/U#/X~6P,FU<eL=jx,mG=hG=CE&PU=Se(qX&LY=X6=y4&tk&QQ&tf=4g&xI}W+&mZ=Dc#7w}Lg;DA;wQ_Kb(cJ=hR%yX&Yb,hw{bX_4X;EP;1W_2M}Uc=b5(YF,CM&Tp^OJ{DD]6s=vF=Yo~8q}XH}Fu%P5(SJ=Qt;MO]s8<F3&B3&8T(Ul-BS*dw&dR<87}/8]62$PZ]Lx<Au}9Q]7c=ja=KR,Go,Us&v6(qk}pG&G2=ev^GM%w4&H4]7F&dv]J6}Ew:9w=sj-ZL}Ym$+h(Ut(Um~4n=Xs(U7%eE=Qc_JR<CA#6t<Fv|/I,IS,EG<F2(Xy$/n<Fa(h9}+9_2o&N4#7X<Zq|+f_Dp=dt&na,Ca=NJ)jY=8C=YG=s6&Q+<DO}D3=xB&R1(lw;Qn<bF(Cu|/B}HV=SS&n7,10&u0]Dm%A6^4Q=WR(TD=Xo<GH,Rj(l8)bP&n/=LM&CF,F5&ml=PJ;0k=LG=tq,Rh,D6@4i=1p&+9=YC%er_Mh;nI;0q=Fw]80=xq=FM$Gv;v6&nc;wK%H2&Kj;vs,AA=YP,66}bI(qR~5U=6q~4b$Ni=K5.X3$So&Iu(p+]8G=Cf=RY(TS_O3(iH&57=fE=Dg_Do#9z#7H;FK{qd_2k%JR}en&gh_z8;Rx}9p<cN_Ne,DO;LN_7o~/p=NF=5Y}gN<ce<C1,QE]Wv=3u<BC}GK]yq}DY&u/_hj=II(pz&rC,jV&+Z}ut=NQ;Cg-SR_ZS,+o=u/;Oy_RK_QF(Fx&xP}Wr&TA,Uh&g1=yr{ax[VF$Pg(YB;Ox=Vy;+W(Sp}XV%dd&33(l/]l4#4Y}OE=6c=bw(A7&9t%wd&N/&mo,JH&Qe)fm=Ao}fu=tH",FS="FAZDC6BALcLZCA+GBARCW8wNCcDDZ8LVFBOqqDUiou+M42TFAyERXFb7EjhP+vmBFpFrUpfDV2F7eB+eCltCHJFWLFCED+pWTojEIHFXc3aFn4F68zqjEuKidS1QBVPDEhE7NA4mhMF7oThD49ot3FgtzHFCK0acW1x8DH1EmLoIlrWFBLE+y5+NA3Cx65wJHTaEZVaK1mWAmPGxgYCdxwOjTDIt/faOEhTl1vqNsKtJCOhJWuio2g07KLZEQsFBUpNtwEByBgxFslFheFbiEPvi61msDvApxCzB6rBCzox7joYA5UdDc+Cb4FSgIabpXFAj3bjkmFAxCZE+mD/SFf/0ELecYCt3nLoxC6WEZf2tKDB4oZvrEmqFkKk7BwILA7gtYBpsTq//D4jD0F0wEB9pyQ1BD5Ba0oYHDI+sbDFhvrHXdDHfgFEIJLi5r8qercNFBgFLC4bo5ERJtamWBDFy73KCEb6M8VpmEt330ygCTK58EIIFkYgF84gtGA9Uyh3m68iVrFbWFbcbqiCYHZ9J1jeRPbL8yswhMiDbhEhdNoSwFbZrLT740ABEqgCkO8J1BLd1VhKKR4sD1yUo0z+FF59Mvg71CFbyEhbHSFBKEIKyoQNgQppq9T0KAqePu0ZFGrXOHdKJqkoTFhYvpDNyuuznrN84thJbsCoO6Cu6Xlvntvy0QYuAExQEYtTUBf3CoCqwgGFZ4u1HJFzDVwEy3cjcpV4QvsPaBC3rCGyCF23o4K3pp2gberGgFEJEHo4nHICtyKH2ZqyxhN05KBBJIQlKh/Oujv/DH32VrlqFdIFC7Fz9Ct4kaqFME0UETLprnN9kfy+kFmtQBB0+5CFu0N9Ij8l/VvJDh2oq3hT6EzjTHKFN7ZjZwoTsAZ4Exsko6Fpa6WC+sduz8jyrLpegTv2h1EBeYpLpm2czQW0KoCcS0bCVXCmuWJDBjN1nQNLdF58SFJ0h7i3pC3oEOKy/FjBklL70XvBEEIWp2yZ04xObzAWDDJG7f+DbqBEA7LyiR95j7MDVdDViz2RE5vWlBMv5e4+VfhP3aXNPhvLSynb9O2x4uFBV+3jqu6d5pCG28/sETByvmu/+IJ0L3wb4rj9DNOLBF6XPIODr4L19U9RRofAG6Nxydi8Bki8BhGJbBAJKzbJxkZSlF9Q2Cu8oKqggB9hBArwLLqEBWEtFowy8XK8bEyw9snT+BeyFk1ZCSrdmgfEwFePTgCjELBEnIbjaDDPJm36rG9pztcEzT8dGk23SBhXBB1H4z+OWze0ooFzz8pDBYFvp9j9tvFByf9y4EFdVnz026CGR5qMr7fxMHN8UUdlyJAzlTBDRC28k+L4FB8078ljyD91tUj1ocnTs8vdEf7znbzm+GIjEZnoZE5rnLL700Xc7yHfz05nWxy03vBB9YGHYOWxgMQGBCR24CVYNE1hpfKxN0zKnfJDmmMgMmBWqNbjfSyFCBWSCGCgR8yFXiHyEj+VtD1FB3FpC1zI0kFbzifiKTLm9yq5zFmur+q8FHqjoOBWsBPiDbnCC2ErunV6cJ6TygXFYHYp7MKN9RUlSIS8/xBAGYLzeqUnBF4QbsTuUkUqGs6CaiDWKWjQK9EJkjpkTmNCPYXL",Go={zh_cn:null,zh_tw:null},DS={zh_cn:"0x17bcc4d8547e5a7135e365d1ab443aaae95e76d8230c2782c67305d4f21497a1",zh_tw:"0x51e720e90c7b87bec1d70eb6e74a21a449bd3ec9c020b01d3a40ed991b60ce5d"},Xd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",IS="~!@#$%^&*_-=[]{}|;:,.()<>?";function Ix(t){if(Go[t.locale]===null){Go[t.locale]=[];for(var e=0,r=0;r<2048;r++){var n=IS.indexOf(Gd[r*3]),i=[228+(n>>2),128+Xd.indexOf(Gd[r*3+1]),128+Xd.indexOf(Gd[r*3+2])];if(t.locale==="zh_tw")for(var a=n%4,l=a;l<3;l++)i[l]=Xd.indexOf(FS[e++])+(l==0?228:128);Go[t.locale].push((0,RS.toUtf8String)(i))}if(js.Wordlist.check(t)!==DS[t.locale])throw Go[t.locale]=null,new Error("BIP39 Wordlist for "+t.locale+" (Chinese) FAILED")}}var Ox=function(t){LS(e,t);function e(r){return t.call(this,"zh_"+r)||this}return e.prototype.getWord=function(r){return Ix(this),Go[this.locale][r]},e.prototype.getWordIndex=function(r){return Ix(this),Go[this.locale].indexOf(r)},e.prototype.split=function(r){return r=r.replace(/(?:\u3000| )+/g,""),r.split("")},e}(js.Wordlist),zd=new Ox("cn");Wi.langZhCn=zd;js.Wordlist.register(zd);js.Wordlist.register(zd,"zh");var kx=new Ox("tw");Wi.langZhTw=kx;js.Wordlist.register(kx)});var Jx=V(bc=>{"use strict";var qF=A(S());Object.defineProperty(bc,"__esModule",{value:!0});bc.wordlists=void 0;var OS=lx(),kS=px(),NS=xx(),JS=Mx(),US=Bx(),HS=Lx(),qS=Dx(),Kd=Nx();bc.wordlists={cz:OS.langCz,en:kS.langEn,es:NS.langEs,fr:JS.langFr,it:qS.langIt,ja:US.langJa,ko:HS.langKo,zh:Kd.langZhCn,zh_cn:Kd.langZhCn,zh_tw:Kd.langZhTw}});var Hx=V(Yi=>{"use strict";var XF=A(S());Object.defineProperty(Yi,"__esModule",{value:!0});Yi.wordlists=Yi.Wordlist=Yi.logger=void 0;var Ux=$n();Object.defineProperty(Yi,"logger",{enumerable:!0,get:function(){return Ux.logger}});Object.defineProperty(Yi,"Wordlist",{enumerable:!0,get:function(){return Ux.Wordlist}});var GS=Jx();Object.defineProperty(Yi,"wordlists",{enumerable:!0,get:function(){return GS.wordlists}})});var qx=V(gc=>{"use strict";var KF=A(S());Object.defineProperty(gc,"__esModule",{value:!0});gc.version=void 0;gc.version="hdnode/5.8.0"});var jd=V(br=>{"use strict";var VF=A(S());Object.defineProperty(br,"__esModule",{value:!0});br.getAccountPath=br.isValidMnemonic=br.entropyToMnemonic=br.mnemonicToEntropy=br.mnemonicToSeed=br.HDNode=br.defaultPath=void 0;var Kx=$m(),nt=at(),Zx=ga(),Qs=Or(),XS=oc(),pr=$r(),Gx=Ns(),ei=ox(),zS=Us(),Xx=Hx(),KS=Pt(),ZS=qx(),Ws=new KS.Logger(ZS.version),VS=Zx.BigNumber.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),jS=(0,Qs.toUtf8Bytes)("Bitcoin seed"),zo=2147483648;function Vx(t){return(1<<t)-1<<8-t}function QS(t){return(1<<t)-1}function vc(t){return(0,nt.hexZeroPad)((0,nt.hexlify)(t),32)}function zx(t){return Kx.Base58.encode((0,nt.concat)([t,(0,nt.hexDataSlice)((0,ei.sha256)((0,ei.sha256)(t)),0,4)]))}function Zd(t){if(t==null)return Xx.wordlists.en;if(typeof t=="string"){var e=Xx.wordlists[t];return e==null&&Ws.throwArgumentError("unknown locale","wordlist",t),e}return t}var Xo={};br.defaultPath="m/44'/60'/0'/0/0";var WS=function(){function t(e,r,n,i,a,l,b,y){if(e!==Xo)throw new Error("HDNode constructor cannot be called directly");if(r){var x=new Gx.SigningKey(r);(0,pr.defineReadOnly)(this,"privateKey",x.privateKey),(0,pr.defineReadOnly)(this,"publicKey",x.compressedPublicKey)}else(0,pr.defineReadOnly)(this,"privateKey",null),(0,pr.defineReadOnly)(this,"publicKey",(0,nt.hexlify)(n));(0,pr.defineReadOnly)(this,"parentFingerprint",i),(0,pr.defineReadOnly)(this,"fingerprint",(0,nt.hexDataSlice)((0,ei.ripemd160)((0,ei.sha256)(this.publicKey)),0,4)),(0,pr.defineReadOnly)(this,"address",(0,zS.computeAddress)(this.publicKey)),(0,pr.defineReadOnly)(this,"chainCode",a),(0,pr.defineReadOnly)(this,"index",l),(0,pr.defineReadOnly)(this,"depth",b),y==null?((0,pr.defineReadOnly)(this,"mnemonic",null),(0,pr.defineReadOnly)(this,"path",null)):typeof y=="string"?((0,pr.defineReadOnly)(this,"mnemonic",null),(0,pr.defineReadOnly)(this,"path",y)):((0,pr.defineReadOnly)(this,"mnemonic",y),(0,pr.defineReadOnly)(this,"path",y.path))}return Object.defineProperty(t.prototype,"extendedKey",{get:function(){if(this.depth>=256)throw new Error("Depth too large!");return zx((0,nt.concat)([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",(0,nt.hexlify)(this.depth),this.parentFingerprint,(0,nt.hexZeroPad)((0,nt.hexlify)(this.index),4),this.chainCode,this.privateKey!=null?(0,nt.concat)(["0x00",this.privateKey]):this.publicKey]))},enumerable:!1,configurable:!0}),t.prototype.neuter=function(){return new t(Xo,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)},t.prototype._derive=function(e){if(e>4294967295)throw new Error("invalid index - "+String(e));var r=this.path;r&&(r+="/"+(e&~zo));var n=new Uint8Array(37);if(e&zo){if(!this.privateKey)throw new Error("cannot derive child of neutered node");n.set((0,nt.arrayify)(this.privateKey),1),r&&(r+="'")}else n.set((0,nt.arrayify)(this.publicKey));for(var i=24;i>=0;i-=8)n[33+(i>>3)]=e>>24-i&255;var a=(0,nt.arrayify)((0,ei.computeHmac)(ei.SupportedAlgorithm.sha512,this.chainCode,n)),l=a.slice(0,32),b=a.slice(32),y=null,x=null;if(this.privateKey)y=vc(Zx.BigNumber.from(l).add(this.privateKey).mod(VS));else{var _=new Gx.SigningKey((0,nt.hexlify)(l));x=_._addPoint(this.publicKey)}var C=r,D=this.mnemonic;return D&&(C=Object.freeze({phrase:D.phrase,path:r,locale:D.locale||"en"})),new t(Xo,y,x,this.fingerprint,vc(b),e,this.depth+1,C)},t.prototype.derivePath=function(e){var r=e.split("/");if(r.length===0||r[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+e);r[0]==="m"&&r.shift();for(var n=this,i=0;i<r.length;i++){var a=r[i];if(a.match(/^[0-9]+'$/)){var l=parseInt(a.substring(0,a.length-1));if(l>=zo)throw new Error("invalid path index - "+a);n=n._derive(zo+l)}else if(a.match(/^[0-9]+$/)){var l=parseInt(a);if(l>=zo)throw new Error("invalid path index - "+a);n=n._derive(l)}else throw new Error("invalid path component - "+a)}return n},t._fromSeed=function(e,r){var n=(0,nt.arrayify)(e);if(n.length<16||n.length>64)throw new Error("invalid seed");var i=(0,nt.arrayify)((0,ei.computeHmac)(ei.SupportedAlgorithm.sha512,jS,n));return new t(Xo,vc(i.slice(0,32)),null,"0x00000000",vc(i.slice(32)),0,0,r)},t.fromMnemonic=function(e,r,n){return n=Zd(n),e=Qx(Vd(e,n),n),t._fromSeed(jx(e,r),{phrase:e,path:"m",locale:n.locale})},t.fromSeed=function(e){return t._fromSeed(e,null)},t.fromExtendedKey=function(e){var r=Kx.Base58.decode(e);(r.length!==82||zx(r.slice(0,78))!==e)&&Ws.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");var n=r[4],i=(0,nt.hexlify)(r.slice(5,9)),a=parseInt((0,nt.hexlify)(r.slice(9,13)).substring(2),16),l=(0,nt.hexlify)(r.slice(13,45)),b=r.slice(45,78);switch((0,nt.hexlify)(r.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new t(Xo,null,(0,nt.hexlify)(b),i,l,a,n,null);case"0x0488ade4":case"0x04358394 ":if(b[0]!==0)break;return new t(Xo,(0,nt.hexlify)(b.slice(1)),null,i,l,a,n,null)}return Ws.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")},t}();br.HDNode=WS;function jx(t,e){e||(e="");var r=(0,Qs.toUtf8Bytes)("mnemonic"+e,Qs.UnicodeNormalizationForm.NFKD);return(0,XS.pbkdf2)((0,Qs.toUtf8Bytes)(t,Qs.UnicodeNormalizationForm.NFKD),r,2048,64,"sha512")}br.mnemonicToSeed=jx;function Vd(t,e){e=Zd(e),Ws.checkNormalize();var r=e.split(t);if(r.length%3!==0)throw new Error("invalid mnemonic");for(var n=(0,nt.arrayify)(new Uint8Array(Math.ceil(11*r.length/8))),i=0,a=0;a<r.length;a++){var l=e.getWordIndex(r[a].normalize("NFKD"));if(l===-1)throw new Error("invalid mnemonic");for(var b=0;b<11;b++)l&1<<10-b&&(n[i>>3]|=1<<7-i%8),i++}var y=32*r.length/3,x=r.length/3,_=Vx(x),C=(0,nt.arrayify)((0,ei.sha256)(n.slice(0,y/8)))[0]&_;if(C!==(n[n.length-1]&_))throw new Error("invalid checksum");return(0,nt.hexlify)(n.slice(0,y/8))}br.mnemonicToEntropy=Vd;function Qx(t,e){if(e=Zd(e),t=(0,nt.arrayify)(t),t.length%4!==0||t.length<16||t.length>32)throw new Error("invalid entropy");for(var r=[0],n=11,i=0;i<t.length;i++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=t[i],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=t[i]>>8-n,r.push(t[i]&QS(8-n)),n+=3);var a=t.length/4,l=(0,nt.arrayify)((0,ei.sha256)(t))[0]&Vx(a);return r[r.length-1]<<=a,r[r.length-1]|=l>>8-a,e.join(r.map(function(b){return e.getWord(b)}))}br.entropyToMnemonic=Qx;function YS(t,e){try{return Vd(t,e),!0}catch{}return!1}br.isValidMnemonic=YS;function $S(t){return(typeof t!="number"||t<0||t>=zo||t%1)&&Ws.throwArgumentError("invalid account index","index",t),"m/44'/60'/"+t+"'/0/0"}br.getAccountPath=$S});var Wx=V(mc=>{"use strict";var QF=A(S());Object.defineProperty(mc,"__esModule",{value:!0});mc.randomBytes=void 0;var eM=it("crypto"),tM=at();function rM(t){return(0,tM.arrayify)((0,eM.randomBytes)(t))}mc.randomBytes=rM});var Yx=V(xc=>{"use strict";var YF=A(S());Object.defineProperty(xc,"__esModule",{value:!0});xc.shuffled=void 0;function nM(t){t=t.slice();for(var e=t.length-1;e>0;e--){var r=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[r],t[r]=n}return t}xc.shuffled=nM});var Qd=V(Ko=>{"use strict";var eD=A(S());Object.defineProperty(Ko,"__esModule",{value:!0});Ko.shuffled=Ko.randomBytes=void 0;var iM=Wx();Object.defineProperty(Ko,"randomBytes",{enumerable:!0,get:function(){return iM.randomBytes}});var aM=Yx();Object.defineProperty(Ko,"shuffled",{enumerable:!0,get:function(){return aM.shuffled}})});var Yd=V((Wd,$x)=>{"use strict";var tD=A(S());(function(t){function e(o){return parseInt(o)===o}function r(o){if(!e(o.length))return!1;for(var p=0;p<o.length;p++)if(!e(o[p])||o[p]<0||o[p]>255)return!1;return!0}function n(o,p){if(o.buffer&&ArrayBuffer.isView(o)&&o.name==="Uint8Array")return p&&(o.slice?o=o.slice():o=Array.prototype.slice.call(o)),o;if(Array.isArray(o)){if(!r(o))throw new Error("Array contains invalid value: "+o);return new Uint8Array(o)}if(e(o.length)&&r(o))return new Uint8Array(o);throw new Error("unsupported array-like object")}function i(o){return new Uint8Array(o)}function a(o,p,E,g,w){(g!=null||w!=null)&&(o.slice?o=o.slice(g,w):o=Array.prototype.slice.call(o,g,w)),p.set(o,E)}var l=function(){function o(E){var g=[],w=0;for(E=encodeURI(E);w<E.length;){var U=E.charCodeAt(w++);U===37?(g.push(parseInt(E.substr(w,2),16)),w+=2):g.push(U)}return n(g)}function p(E){for(var g=[],w=0;w<E.length;){var U=E[w];U<128?(g.push(String.fromCharCode(U)),w++):U>191&&U<224?(g.push(String.fromCharCode((U&31)<<6|E[w+1]&63)),w+=2):(g.push(String.fromCharCode((U&15)<<12|(E[w+1]&63)<<6|E[w+2]&63)),w+=3)}return g.join("")}return{toBytes:o,fromBytes:p}}(),b=function(){function o(g){for(var w=[],U=0;U<g.length;U+=2)w.push(parseInt(g.substr(U,2),16));return w}var p="0123456789abcdef";function E(g){for(var w=[],U=0;U<g.length;U++){var M=g[U];w.push(p[(M&240)>>4]+p[M&15])}return w.join("")}return{toBytes:o,fromBytes:E}}(),y={16:10,24:12,32:14},x=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],_=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],C=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],D=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],F=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],P=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],z=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],W=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],X=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],ne=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],$=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],ae=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],ie=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],ee=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],ce=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function te(o){for(var p=[],E=0;E<o.length;E+=4)p.push(o[E]<<24|o[E+1]<<16|o[E+2]<<8|o[E+3]);return p}var Y=function(o){if(!(this instanceof Y))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:n(o,!0)}),this._prepare()};Y.prototype._prepare=function(){var o=y[this.key.length];if(o==null)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var p=0;p<=o;p++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var E=(o+1)*4,g=this.key.length/4,w=te(this.key),U,p=0;p<g;p++)U=p>>2,this._Ke[U][p%4]=w[p],this._Kd[o-U][p%4]=w[p];for(var M=0,k=g,G;k<E;){if(G=w[g-1],w[0]^=_[G>>16&255]<<24^_[G>>8&255]<<16^_[G&255]<<8^_[G>>24&255]^x[M]<<24,M+=1,g!=8)for(var p=1;p<g;p++)w[p]^=w[p-1];else{for(var p=1;p<g/2;p++)w[p]^=w[p-1];G=w[g/2-1],w[g/2]^=_[G&255]^_[G>>8&255]<<8^_[G>>16&255]<<16^_[G>>24&255]<<24;for(var p=g/2+1;p<g;p++)w[p]^=w[p-1]}for(var p=0,Z,B;p<g&&k<E;)Z=k>>2,B=k%4,this._Ke[Z][B]=w[p],this._Kd[o-Z][B]=w[p++],k++}for(var Z=1;Z<o;Z++)for(var B=0;B<4;B++)G=this._Kd[Z][B],this._Kd[Z][B]=ae[G>>24&255]^ie[G>>16&255]^ee[G>>8&255]^ce[G&255]},Y.prototype.encrypt=function(o){if(o.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var p=this._Ke.length-1,E=[0,0,0,0],g=te(o),w=0;w<4;w++)g[w]^=this._Ke[0][w];for(var U=1;U<p;U++){for(var w=0;w<4;w++)E[w]=D[g[w]>>24&255]^F[g[(w+1)%4]>>16&255]^P[g[(w+2)%4]>>8&255]^z[g[(w+3)%4]&255]^this._Ke[U][w];g=E.slice()}for(var M=i(16),k,w=0;w<4;w++)k=this._Ke[p][w],M[4*w]=(_[g[w]>>24&255]^k>>24)&255,M[4*w+1]=(_[g[(w+1)%4]>>16&255]^k>>16)&255,M[4*w+2]=(_[g[(w+2)%4]>>8&255]^k>>8)&255,M[4*w+3]=(_[g[(w+3)%4]&255]^k)&255;return M},Y.prototype.decrypt=function(o){if(o.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var p=this._Kd.length-1,E=[0,0,0,0],g=te(o),w=0;w<4;w++)g[w]^=this._Kd[0][w];for(var U=1;U<p;U++){for(var w=0;w<4;w++)E[w]=W[g[w]>>24&255]^X[g[(w+3)%4]>>16&255]^ne[g[(w+2)%4]>>8&255]^$[g[(w+1)%4]&255]^this._Kd[U][w];g=E.slice()}for(var M=i(16),k,w=0;w<4;w++)k=this._Kd[p][w],M[4*w]=(C[g[w]>>24&255]^k>>24)&255,M[4*w+1]=(C[g[(w+3)%4]>>16&255]^k>>16)&255,M[4*w+2]=(C[g[(w+2)%4]>>8&255]^k>>8)&255,M[4*w+3]=(C[g[(w+1)%4]&255]^k)&255;return M};var T=function(o){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Y(o)};T.prototype.encrypt=function(o){if(o=n(o),o.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var p=i(o.length),E=i(16),g=0;g<o.length;g+=16)a(o,E,0,g,g+16),E=this._aes.encrypt(E),a(E,p,g);return p},T.prototype.decrypt=function(o){if(o=n(o),o.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var p=i(o.length),E=i(16),g=0;g<o.length;g+=16)a(o,E,0,g,g+16),E=this._aes.decrypt(E),a(E,p,g);return p};var s=function(o,p){if(!(this instanceof s))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",!p)p=i(16);else if(p.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastCipherblock=n(p,!0),this._aes=new Y(o)};s.prototype.encrypt=function(o){if(o=n(o),o.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var p=i(o.length),E=i(16),g=0;g<o.length;g+=16){a(o,E,0,g,g+16);for(var w=0;w<16;w++)E[w]^=this._lastCipherblock[w];this._lastCipherblock=this._aes.encrypt(E),a(this._lastCipherblock,p,g)}return p},s.prototype.decrypt=function(o){if(o=n(o),o.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var p=i(o.length),E=i(16),g=0;g<o.length;g+=16){a(o,E,0,g,g+16),E=this._aes.decrypt(E);for(var w=0;w<16;w++)p[g+w]=E[w]^this._lastCipherblock[w];a(o,this._lastCipherblock,0,g,g+16)}return p};var u=function(o,p,E){if(!(this instanceof u))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",!p)p=i(16);else if(p.length!=16)throw new Error("invalid initialation vector size (must be 16 size)");E||(E=1),this.segmentSize=E,this._shiftRegister=n(p,!0),this._aes=new Y(o)};u.prototype.encrypt=function(o){if(o.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var p=n(o,!0),E,g=0;g<p.length;g+=this.segmentSize){E=this._aes.encrypt(this._shiftRegister);for(var w=0;w<this.segmentSize;w++)p[g+w]^=E[w];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(p,this._shiftRegister,16-this.segmentSize,g,g+this.segmentSize)}return p},u.prototype.decrypt=function(o){if(o.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var p=n(o,!0),E,g=0;g<p.length;g+=this.segmentSize){E=this._aes.encrypt(this._shiftRegister);for(var w=0;w<this.segmentSize;w++)p[g+w]^=E[w];a(this._shiftRegister,this._shiftRegister,0,this.segmentSize),a(o,this._shiftRegister,16-this.segmentSize,g,g+this.segmentSize)}return p};var d=function(o,p){if(!(this instanceof d))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",!p)p=i(16);else if(p.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastPrecipher=n(p,!0),this._lastPrecipherIndex=16,this._aes=new Y(o)};d.prototype.encrypt=function(o){for(var p=n(o,!0),E=0;E<p.length;E++)this._lastPrecipherIndex===16&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),p[E]^=this._lastPrecipher[this._lastPrecipherIndex++];return p},d.prototype.decrypt=d.prototype.encrypt;var f=function(o){if(!(this instanceof f))throw Error("Counter must be instanitated with `new`");o!==0&&!o&&(o=1),typeof o=="number"?(this._counter=i(16),this.setValue(o)):this.setBytes(o)};f.prototype.setValue=function(o){if(typeof o!="number"||parseInt(o)!=o)throw new Error("invalid counter value (must be an integer)");for(var p=15;p>=0;--p)this._counter[p]=o%256,o=o>>8},f.prototype.setBytes=function(o){if(o=n(o,!0),o.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=o},f.prototype.increment=function(){for(var o=15;o>=0;o--)if(this._counter[o]===255)this._counter[o]=0;else{this._counter[o]++;break}};var c=function(o,p){if(!(this instanceof c))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",p instanceof f||(p=new f(p)),this._counter=p,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Y(o)};c.prototype.encrypt=function(o){for(var p=n(o,!0),E=0;E<p.length;E++)this._remainingCounterIndex===16&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),p[E]^=this._remainingCounter[this._remainingCounterIndex++];return p},c.prototype.decrypt=c.prototype.encrypt;function v(o){o=n(o,!0);var p=16-o.length%16,E=i(o.length+p);a(o,E);for(var g=o.length;g<E.length;g++)E[g]=p;return E}function m(o){if(o=n(o,!0),o.length<16)throw new Error("PKCS#7 invalid length");var p=o[o.length-1];if(p>16)throw new Error("PKCS#7 padding byte out of range");for(var E=o.length-p,g=0;g<p;g++)if(o[E+g]!==p)throw new Error("PKCS#7 invalid padding byte");var w=i(E);return a(o,w,0,0,E),w}var h={AES:Y,Counter:f,ModeOfOperation:{ecb:T,cbc:s,cfb:u,ofb:d,ctr:c},utils:{hex:b,utf8:l},padding:{pkcs7:{pad:v,strip:m}},_arrayTest:{coerceArray:n,createArray:i,copyArray:a}};typeof Wd<"u"?$x.exports=h:typeof define=="function"&&define.amd?define(h):(t.aesjs&&(h._aesjs=t.aesjs),t.aesjs=h)})(Wd)});var $d=V(yc=>{"use strict";var nD=A(S());Object.defineProperty(yc,"__esModule",{value:!0});yc.version=void 0;yc.version="json-wallets/5.8.0"});var eh=V(cn=>{"use strict";var aD=A(S());Object.defineProperty(cn,"__esModule",{value:!0});cn.uuidV4=cn.searchPath=cn.getPassword=cn.zpad=cn.looseArrayify=void 0;var wc=at(),ey=Or();function oM(t){return typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),(0,wc.arrayify)(t)}cn.looseArrayify=oM;function sM(t,e){for(t=String(t);t.length<e;)t="0"+t;return t}cn.zpad=sM;function fM(t){return typeof t=="string"?(0,ey.toUtf8Bytes)(t,ey.UnicodeNormalizationForm.NFKC):(0,wc.arrayify)(t)}cn.getPassword=fM;function cM(t,e){for(var r=t,n=e.toLowerCase().split("/"),i=0;i<n.length;i++){var a=null;for(var l in r)if(l.toLowerCase()===n[i]){a=r[l];break}if(a===null)return null;r=a}return r}cn.searchPath=cM;function uM(t){var e=(0,wc.arrayify)(t);e[6]=e[6]&15|64,e[8]=e[8]&63|128;var r=(0,wc.hexlify)(e);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}cn.uuidV4=uM});var iy=V(ti=>{"use strict";var sD=A(S()),lM=ti&&ti.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),dM=ti&&ti.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ti,"__esModule",{value:!0});ti.decrypt=ti.CrowdsaleAccount=void 0;var ty=dM(Yd()),hM=wa(),ry=at(),pM=Nn(),bM=oc(),gM=Or(),vM=$r(),mM=Pt(),xM=$d(),yM=new mM.Logger(xM.version),Ac=eh(),ny=function(t){lM(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.isCrowdsaleAccount=function(r){return!!(r&&r._isCrowdsaleAccount)},e}(vM.Description);ti.CrowdsaleAccount=ny;function wM(t,e){var r=JSON.parse(t);e=(0,Ac.getPassword)(e);var n=(0,hM.getAddress)((0,Ac.searchPath)(r,"ethaddr")),i=(0,Ac.looseArrayify)((0,Ac.searchPath)(r,"encseed"));(!i||i.length%16!==0)&&yM.throwArgumentError("invalid encseed","json",t);for(var a=(0,ry.arrayify)((0,bM.pbkdf2)(e,e,2e3,32,"sha256")).slice(0,16),l=i.slice(0,16),b=i.slice(16),y=new ty.default.ModeOfOperation.cbc(a,l),x=ty.default.padding.pkcs7.strip((0,ry.arrayify)(y.decrypt(b))),_="",C=0;C<x.length;C++)_+=String.fromCharCode(x[C]);var D=(0,gM.toUtf8Bytes)(_),F=(0,pM.keccak256)(D);return new ny({_isCrowdsaleAccount:!0,address:n,privateKey:F})}ti.decrypt=wM});var fy=V($i=>{"use strict";var cD=A(S());Object.defineProperty($i,"__esModule",{value:!0});$i.getJsonWalletAddress=$i.isKeystoreWallet=$i.isCrowdsaleWallet=void 0;var ay=wa();function oy(t){var e=null;try{e=JSON.parse(t)}catch{return!1}return e.encseed&&e.ethaddr}$i.isCrowdsaleWallet=oy;function sy(t){var e=null;try{e=JSON.parse(t)}catch{return!1}return!(!e.version||parseInt(e.version)!==e.version||parseInt(e.version)!==3)}$i.isKeystoreWallet=sy;function AM(t){if(oy(t))try{return(0,ay.getAddress)(JSON.parse(t).ethaddr)}catch{return null}if(sy(t))try{return(0,ay.getAddress)(JSON.parse(t).address)}catch{return null}return null}$i.getJsonWalletAddress=AM});var uy=V((th,cy)=>{"use strict";var uD=A(S());(function(t){function r(F){let P=new Uint32Array([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]),z=1779033703,W=3144134277,X=1013904242,ne=2773480762,$=1359893119,ae=2600822924,ie=528734635,ee=1541459225,ce=new Uint32Array(64);function te(c){let v=0,m=c.length;for(;m>=64;){let h=z,o=W,p=X,E=ne,g=$,w=ae,U=ie,M=ee,k,G,Z,B,R;for(G=0;G<16;G++)Z=v+G*4,ce[G]=(c[Z]&255)<<24|(c[Z+1]&255)<<16|(c[Z+2]&255)<<8|c[Z+3]&255;for(G=16;G<64;G++)k=ce[G-2],B=(k>>>17|k<<15)^(k>>>19|k<<13)^k>>>10,k=ce[G-15],R=(k>>>7|k<<25)^(k>>>18|k<<14)^k>>>3,ce[G]=(B+ce[G-7]|0)+(R+ce[G-16]|0)|0;for(G=0;G<64;G++)B=(((g>>>6|g<<26)^(g>>>11|g<<21)^(g>>>25|g<<7))+(g&w^~g&U)|0)+(M+(P[G]+ce[G]|0)|0)|0,R=((h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10))+(h&o^h&p^o&p)|0,M=U,U=w,w=g,g=E+B|0,E=p,p=o,o=h,h=B+R|0;z=z+h|0,W=W+o|0,X=X+p|0,ne=ne+E|0,$=$+g|0,ae=ae+w|0,ie=ie+U|0,ee=ee+M|0,v+=64,m-=64}}te(F);let Y,T=F.length%64,s=F.length/536870912|0,u=F.length<<3,d=T<56?56:120,f=F.slice(F.length-T,F.length);for(f.push(128),Y=T+1;Y<d;Y++)f.push(0);return f.push(s>>>24&255),f.push(s>>>16&255),f.push(s>>>8&255),f.push(s>>>0&255),f.push(u>>>24&255),f.push(u>>>16&255),f.push(u>>>8&255),f.push(u>>>0&255),te(f),[z>>>24&255,z>>>16&255,z>>>8&255,z>>>0&255,W>>>24&255,W>>>16&255,W>>>8&255,W>>>0&255,X>>>24&255,X>>>16&255,X>>>8&255,X>>>0&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne>>>0&255,$>>>24&255,$>>>16&255,$>>>8&255,$>>>0&255,ae>>>24&255,ae>>>16&255,ae>>>8&255,ae>>>0&255,ie>>>24&255,ie>>>16&255,ie>>>8&255,ie>>>0&255,ee>>>24&255,ee>>>16&255,ee>>>8&255,ee>>>0&255]}function n(F,P,z){F=F.length<=64?F:r(F);let W=64+P.length+4,X=new Array(W),ne=new Array(64),$,ae=[];for($=0;$<64;$++)X[$]=54;for($=0;$<F.length;$++)X[$]^=F[$];for($=0;$<P.length;$++)X[64+$]=P[$];for($=W-4;$<W;$++)X[$]=0;for($=0;$<64;$++)ne[$]=92;for($=0;$<F.length;$++)ne[$]^=F[$];function ie(){for(let ee=W-1;ee>=W-4;ee--){if(X[ee]++,X[ee]<=255)return;X[ee]=0}}for(;z>=32;)ie(),ae=ae.concat(r(ne.concat(r(X)))),z-=32;return z>0&&(ie(),ae=ae.concat(r(ne.concat(r(X))).slice(0,z))),ae}function i(F,P,z,W,X){let ne;for(y(F,(2*z-1)*16,X,0,16),ne=0;ne<2*z;ne++)b(F,ne*16,X,16),l(X,W),y(X,0,F,P+ne*16,16);for(ne=0;ne<z;ne++)y(F,P+ne*2*16,F,ne*16,16);for(ne=0;ne<z;ne++)y(F,P+(ne*2+1)*16,F,(ne+z)*16,16)}function a(F,P){return F<<P|F>>>32-P}function l(F,P){y(F,0,P,0,16);for(let z=8;z>0;z-=2)P[4]^=a(P[0]+P[12],7),P[8]^=a(P[4]+P[0],9),P[12]^=a(P[8]+P[4],13),P[0]^=a(P[12]+P[8],18),P[9]^=a(P[5]+P[1],7),P[13]^=a(P[9]+P[5],9),P[1]^=a(P[13]+P[9],13),P[5]^=a(P[1]+P[13],18),P[14]^=a(P[10]+P[6],7),P[2]^=a(P[14]+P[10],9),P[6]^=a(P[2]+P[14],13),P[10]^=a(P[6]+P[2],18),P[3]^=a(P[15]+P[11],7),P[7]^=a(P[3]+P[15],9),P[11]^=a(P[7]+P[3],13),P[15]^=a(P[11]+P[7],18),P[1]^=a(P[0]+P[3],7),P[2]^=a(P[1]+P[0],9),P[3]^=a(P[2]+P[1],13),P[0]^=a(P[3]+P[2],18),P[6]^=a(P[5]+P[4],7),P[7]^=a(P[6]+P[5],9),P[4]^=a(P[7]+P[6],13),P[5]^=a(P[4]+P[7],18),P[11]^=a(P[10]+P[9],7),P[8]^=a(P[11]+P[10],9),P[9]^=a(P[8]+P[11],13),P[10]^=a(P[9]+P[8],18),P[12]^=a(P[15]+P[14],7),P[13]^=a(P[12]+P[15],9),P[14]^=a(P[13]+P[12],13),P[15]^=a(P[14]+P[13],18);for(let z=0;z<16;++z)F[z]+=P[z]}function b(F,P,z,W){for(let X=0;X<W;X++)z[X]^=F[P+X]}function y(F,P,z,W,X){for(;X--;)z[W++]=F[P++]}function x(F){if(!F||typeof F.length!="number")return!1;for(let P=0;P<F.length;P++){let z=F[P];if(typeof z!="number"||z%1||z<0||z>=256)return!1}return!0}function _(F,P){if(typeof F!="number"||F%1)throw new Error("invalid "+P);return F}function C(F,P,z,W,X,ne,$){if(z=_(z,"N"),W=_(W,"r"),X=_(X,"p"),ne=_(ne,"dkLen"),z===0||z&z-1)throw new Error("N must be power of 2");if(z>2147483647/128/W)throw new Error("N too large");if(W>2147483647/128/X)throw new Error("r too large");if(!x(F))throw new Error("password must be an array or buffer");if(F=Array.prototype.slice.call(F),!x(P))throw new Error("salt must be an array or buffer");P=Array.prototype.slice.call(P);let ae=n(F,P,X*128*W),ie=new Uint32Array(X*32*W);for(let g=0;g<ie.length;g++){let w=g*4;ie[g]=(ae[w+3]&255)<<24|(ae[w+2]&255)<<16|(ae[w+1]&255)<<8|(ae[w+0]&255)<<0}let ee=new Uint32Array(64*W),ce=new Uint32Array(32*W*z),te=32*W,Y=new Uint32Array(16),T=new Uint32Array(16),s=X*z*2,u=0,d=null,f=!1,c=0,v=0,m,h,o=$?parseInt(1e3/W):4294967295,p=typeof setImmediate<"u"?setImmediate:setTimeout,E=function(){if(f)return $(new Error("cancelled"),u/s);let g;switch(c){case 0:h=v*32*W,y(ie,h,ee,0,te),c=1,m=0;case 1:g=z-m,g>o&&(g=o);for(let U=0;U<g;U++)y(ee,0,ce,(m+U)*te,te),i(ee,te,W,Y,T);if(m+=g,u+=g,$){let U=parseInt(1e3*u/s);if(U!==d){if(f=$(null,u/s),f)break;d=U}}if(m<z)break;m=0,c=2;case 2:g=z-m,g>o&&(g=o);for(let U=0;U<g;U++){let M=(2*W-1)*16,k=ee[M]&z-1;b(ce,k*te,ee,te),i(ee,te,W,Y,T)}if(m+=g,u+=g,$){let U=parseInt(1e3*u/s);if(U!==d){if(f=$(null,u/s),f)break;d=U}}if(m<z)break;if(y(ee,0,ie,h,te),v++,v<X){c=0;break}ae=[];for(let U=0;U<ie.length;U++)ae.push(ie[U]>>0&255),ae.push(ie[U]>>8&255),ae.push(ie[U]>>16&255),ae.push(ie[U]>>24&255);let w=n(F,ae,ne);return $&&$(null,1,w),w}$&&p(E)};if(!$)for(;;){let g=E();if(g!=null)return g}E()}let D={scrypt:function(F,P,z,W,X,ne,$){return new Promise(function(ae,ie){let ee=0;$&&$(0),C(F,P,z,W,X,ne,function(ce,te,Y){if(ce)ie(ce);else if(Y)$&&ee!==1&&$(1),ae(new Uint8Array(Y));else if($&&te!==ee)return ee=te,$(te)})})},syncScrypt:function(F,P,z,W,X,ne){return new Uint8Array(C(F,P,z,W,X,ne))}};typeof th<"u"?cy.exports=D:typeof define=="function"&&define.amd?define(D):t&&(t.scrypt&&(t._scrypt=t.scrypt),t.scrypt=D)})(th)});var yy=V(Kt=>{"use strict";var dD=A(S()),SM=Kt&&Kt.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),MM=Kt&&Kt.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},TM=Kt&&Kt.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}},dy=Kt&&Kt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.encrypt=Kt.decrypt=Kt.decryptSync=Kt.KeystoreAccount=void 0;var ea=dy(Yd()),ih=dy(uy()),hy=wa(),Ft=at(),Fa=jd(),py=Nn(),EM=oc(),Sc=Qd(),_M=$r(),by=Us(),je=eh(),rh=Pt(),BM=$d(),nh=new rh.Logger(BM.version);function ly(t){return t!=null&&t.mnemonic&&t.mnemonic.phrase}var gy=function(t){SM(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.isKeystoreAccount=function(r){return!!(r&&r._isKeystoreAccount)},e}(_M.Description);Kt.KeystoreAccount=gy;function CM(t,e,r){var n=(0,je.searchPath)(t,"crypto/cipher");if(n==="aes-128-ctr"){var i=(0,je.looseArrayify)((0,je.searchPath)(t,"crypto/cipherparams/iv")),a=new ea.default.Counter(i),l=new ea.default.ModeOfOperation.ctr(e,a);return(0,Ft.arrayify)(l.decrypt(r))}return null}function vy(t,e){var r=(0,je.looseArrayify)((0,je.searchPath)(t,"crypto/ciphertext")),n=(0,Ft.hexlify)((0,py.keccak256)((0,Ft.concat)([e.slice(16,32),r]))).substring(2);if(n!==(0,je.searchPath)(t,"crypto/mac").toLowerCase())throw new Error("invalid password");var i=CM(t,e.slice(0,16),r);i||nh.throwError("unsupported cipher",rh.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});var a=e.slice(32,64),l=(0,by.computeAddress)(i);if(t.address){var b=t.address.toLowerCase();if(b.substring(0,2)!=="0x"&&(b="0x"+b),(0,hy.getAddress)(b)!==l)throw new Error("address mismatch")}var y={_isKeystoreAccount:!0,address:l,privateKey:(0,Ft.hexlify)(i)};if((0,je.searchPath)(t,"x-ethers/version")==="0.1"){var x=(0,je.looseArrayify)((0,je.searchPath)(t,"x-ethers/mnemonicCiphertext")),_=(0,je.looseArrayify)((0,je.searchPath)(t,"x-ethers/mnemonicCounter")),C=new ea.default.Counter(_),D=new ea.default.ModeOfOperation.ctr(a,C),F=(0,je.searchPath)(t,"x-ethers/path")||Fa.defaultPath,P=(0,je.searchPath)(t,"x-ethers/locale")||"en",z=(0,Ft.arrayify)(D.decrypt(x));try{var W=(0,Fa.entropyToMnemonic)(z,P),X=Fa.HDNode.fromMnemonic(W,null,P).derivePath(F);if(X.privateKey!=y.privateKey)throw new Error("mnemonic mismatch");y.mnemonic=X.mnemonic}catch(ne){if(ne.code!==rh.Logger.errors.INVALID_ARGUMENT||ne.argument!=="wordlist")throw ne}}return new gy(y)}function my(t,e,r,n,i){return(0,Ft.arrayify)((0,EM.pbkdf2)(t,e,r,n,i))}function PM(t,e,r,n,i){return Promise.resolve(my(t,e,r,n,i))}function xy(t,e,r,n,i){var a=(0,je.getPassword)(e),l=(0,je.searchPath)(t,"crypto/kdf");if(l&&typeof l=="string"){var b=function(W,X){return nh.throwArgumentError("invalid key-derivation function parameters",W,X)};if(l.toLowerCase()==="scrypt"){var y=(0,je.looseArrayify)((0,je.searchPath)(t,"crypto/kdfparams/salt")),x=parseInt((0,je.searchPath)(t,"crypto/kdfparams/n")),_=parseInt((0,je.searchPath)(t,"crypto/kdfparams/r")),C=parseInt((0,je.searchPath)(t,"crypto/kdfparams/p"));(!x||!_||!C)&&b("kdf",l),x&x-1&&b("N",x);var D=parseInt((0,je.searchPath)(t,"crypto/kdfparams/dklen"));return D!==32&&b("dklen",D),n(a,y,x,_,C,64,i)}else if(l.toLowerCase()==="pbkdf2"){var y=(0,je.looseArrayify)((0,je.searchPath)(t,"crypto/kdfparams/salt")),F=null,P=(0,je.searchPath)(t,"crypto/kdfparams/prf");P==="hmac-sha256"?F="sha256":P==="hmac-sha512"?F="sha512":b("prf",P);var z=parseInt((0,je.searchPath)(t,"crypto/kdfparams/c")),D=parseInt((0,je.searchPath)(t,"crypto/kdfparams/dklen"));return D!==32&&b("dklen",D),r(a,y,z,D,F)}}return nh.throwArgumentError("unsupported key-derivation function","kdf",l)}function LM(t,e){var r=JSON.parse(t),n=xy(r,e,my,ih.default.syncScrypt);return vy(r,n)}Kt.decryptSync=LM;function RM(t,e,r){return MM(this,void 0,void 0,function(){var n,i;return TM(this,function(a){switch(a.label){case 0:return n=JSON.parse(t),[4,xy(n,e,PM,ih.default.scrypt,r)];case 1:return i=a.sent(),[2,vy(n,i)]}})})}Kt.decrypt=RM;function FM(t,e,r,n){try{if((0,hy.getAddress)(t.address)!==(0,by.computeAddress)(t.privateKey))throw new Error("address/privateKey mismatch");if(ly(t)){var i=t.mnemonic,a=Fa.HDNode.fromMnemonic(i.phrase,null,i.locale).derivePath(i.path||Fa.defaultPath);if(a.privateKey!=t.privateKey)throw new Error("mnemonic mismatch")}}catch($){return Promise.reject($)}typeof r=="function"&&!n&&(n=r,r={}),r||(r={});var l=(0,Ft.arrayify)(t.privateKey),b=(0,je.getPassword)(e),y=null,x=null,_=null;if(ly(t)){var C=t.mnemonic;y=(0,Ft.arrayify)((0,Fa.mnemonicToEntropy)(C.phrase,C.locale||"en")),x=C.path||Fa.defaultPath,_=C.locale||"en"}var D=r.client;D||(D="ethers.js");var F=null;r.salt?F=(0,Ft.arrayify)(r.salt):F=(0,Sc.randomBytes)(32);var P=null;if(r.iv){if(P=(0,Ft.arrayify)(r.iv),P.length!==16)throw new Error("invalid iv")}else P=(0,Sc.randomBytes)(16);var z=null;if(r.uuid){if(z=(0,Ft.arrayify)(r.uuid),z.length!==16)throw new Error("invalid uuid")}else z=(0,Sc.randomBytes)(16);var W=1<<17,X=8,ne=1;return r.scrypt&&(r.scrypt.N&&(W=r.scrypt.N),r.scrypt.r&&(X=r.scrypt.r),r.scrypt.p&&(ne=r.scrypt.p)),ih.default.scrypt(b,F,W,X,ne,64,n).then(function($){$=(0,Ft.arrayify)($);var ae=$.slice(0,16),ie=$.slice(16,32),ee=$.slice(32,64),ce=new ea.default.Counter(P),te=new ea.default.ModeOfOperation.ctr(ae,ce),Y=(0,Ft.arrayify)(te.encrypt(l)),T=(0,py.keccak256)((0,Ft.concat)([ie,Y])),s={address:t.address.substring(2).toLowerCase(),id:(0,je.uuidV4)(z),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,Ft.hexlify)(P).substring(2)},ciphertext:(0,Ft.hexlify)(Y).substring(2),kdf:"scrypt",kdfparams:{salt:(0,Ft.hexlify)(F).substring(2),n:W,dklen:32,p:ne,r:X},mac:T.substring(2)}};if(y){var u=(0,Sc.randomBytes)(16),d=new ea.default.Counter(u),f=new ea.default.ModeOfOperation.ctr(ee,d),c=(0,Ft.arrayify)(f.encrypt(y)),v=new Date,m=v.getUTCFullYear()+"-"+(0,je.zpad)(v.getUTCMonth()+1,2)+"-"+(0,je.zpad)(v.getUTCDate(),2)+"T"+(0,je.zpad)(v.getUTCHours(),2)+"-"+(0,je.zpad)(v.getUTCMinutes(),2)+"-"+(0,je.zpad)(v.getUTCSeconds(),2)+".0Z";s["x-ethers"]={client:D,gethFilename:"UTC--"+m+"--"+s.address,mnemonicCounter:(0,Ft.hexlify)(u).substring(2),mnemonicCiphertext:(0,Ft.hexlify)(c).substring(2),path:x,locale:_,version:"0.1"}}return JSON.stringify(s)})}Kt.encrypt=FM});var wy=V(Dt=>{"use strict";var pD=A(S());Object.defineProperty(Dt,"__esModule",{value:!0});Dt.decryptJsonWalletSync=Dt.decryptJsonWallet=Dt.getJsonWalletAddress=Dt.isKeystoreWallet=Dt.isCrowdsaleWallet=Dt.encryptKeystore=Dt.decryptKeystoreSync=Dt.decryptKeystore=Dt.decryptCrowdsale=void 0;var ah=iy();Object.defineProperty(Dt,"decryptCrowdsale",{enumerable:!0,get:function(){return ah.decrypt}});var Da=fy();Object.defineProperty(Dt,"getJsonWalletAddress",{enumerable:!0,get:function(){return Da.getJsonWalletAddress}});Object.defineProperty(Dt,"isCrowdsaleWallet",{enumerable:!0,get:function(){return Da.isCrowdsaleWallet}});Object.defineProperty(Dt,"isKeystoreWallet",{enumerable:!0,get:function(){return Da.isKeystoreWallet}});var Ys=yy();Object.defineProperty(Dt,"decryptKeystore",{enumerable:!0,get:function(){return Ys.decrypt}});Object.defineProperty(Dt,"decryptKeystoreSync",{enumerable:!0,get:function(){return Ys.decryptSync}});Object.defineProperty(Dt,"encryptKeystore",{enumerable:!0,get:function(){return Ys.encrypt}});function DM(t,e,r){if((0,Da.isCrowdsaleWallet)(t)){r&&r(0);var n=(0,ah.decrypt)(t,e);return r&&r(1),Promise.resolve(n)}return(0,Da.isKeystoreWallet)(t)?(0,Ys.decrypt)(t,e,r):Promise.reject(new Error("invalid JSON wallet"))}Dt.decryptJsonWallet=DM;function IM(t,e){if((0,Da.isCrowdsaleWallet)(t))return(0,ah.decrypt)(t,e);if((0,Da.isKeystoreWallet)(t))return(0,Ys.decryptSync)(t,e);throw new Error("invalid JSON wallet")}Dt.decryptJsonWalletSync=IM});var Ay=V(Mc=>{"use strict";var gD=A(S());Object.defineProperty(Mc,"__esModule",{value:!0});Mc.version=void 0;Mc.version="wallet/5.8.0"});var tf=V(Rr=>{"use strict";var mD=A(S()),OM=Rr&&Rr.__extends||function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Sy=Rr&&Rr.__awaiter||function(t,e,r,n){function i(a){return a instanceof r?a:new r(function(l){l(a)})}return new(r||(r=Promise))(function(a,l){function b(_){try{x(n.next(_))}catch(C){l(C)}}function y(_){try{x(n.throw(_))}catch(C){l(C)}}function x(_){_.done?a(_.value):i(_.value).then(b,y)}x((n=n.apply(t,e||[])).next())})},My=Rr&&Rr.__generator||function(t,e){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,l;return l={next:b(0),throw:b(1),return:b(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function b(x){return function(_){return y([x,_])}}function y(x){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(a=x[0]&2?i.return:x[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,x[1])).done)return a;switch(i=0,a&&(x=[x[0]&2,a.value]),x[0]){case 0:case 1:a=x;break;case 4:return r.label++,{value:x[1],done:!1};case 5:r.label++,i=x[1],x=[0];continue;case 7:x=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(x[0]===6||x[0]===2)){r=0;continue}if(x[0]===3&&(!a||x[1]>a[0]&&x[1]<a[3])){r.label=x[1];break}if(x[0]===6&&r.label<a[1]){r.label=a[1],a=x;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(x);break}a[2]&&r.ops.pop(),r.trys.pop();continue}x=e.call(t,r)}catch(_){x=[6,_],i=0}finally{n=a=0}if(x[0]&5)throw x[1];return{value:x[0]?x[1]:void 0,done:!0}}};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.verifyTypedData=Rr.verifyMessage=Rr.Wallet=void 0;var Ty=wa(),kM=Vm(),NM=Wm(),Vo=at(),ef=Ps(),$s=jd(),Ey=Nn(),ri=$r(),JM=Qd(),oh=Ns(),sh=wy(),Ia=Us(),_y=Pt(),UM=Ay(),Zo=new _y.Logger(UM.version);function HM(t){return t!=null&&(0,Vo.isHexString)(t.privateKey,32)&&t.address!=null}function qM(t){var e=t.mnemonic;return e&&e.phrase}var GM=function(t){OM(e,t);function e(r,n){var i=t.call(this)||this;if(HM(r)){var a=new oh.SigningKey(r.privateKey);if((0,ri.defineReadOnly)(i,"_signingKey",function(){return a}),(0,ri.defineReadOnly)(i,"address",(0,Ia.computeAddress)(i.publicKey)),i.address!==(0,Ty.getAddress)(r.address)&&Zo.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),qM(r)){var l=r.mnemonic;(0,ri.defineReadOnly)(i,"_mnemonic",function(){return{phrase:l.phrase,path:l.path||$s.defaultPath,locale:l.locale||"en"}});var b=i.mnemonic,y=$s.HDNode.fromMnemonic(b.phrase,null,b.locale).derivePath(b.path);(0,Ia.computeAddress)(y.privateKey)!==i.address&&Zo.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,ri.defineReadOnly)(i,"_mnemonic",function(){return null})}else{if(oh.SigningKey.isSigningKey(r))r.curve!=="secp256k1"&&Zo.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,ri.defineReadOnly)(i,"_signingKey",function(){return r});else{typeof r=="string"&&r.match(/^[0-9a-f]*$/i)&&r.length===64&&(r="0x"+r);var x=new oh.SigningKey(r);(0,ri.defineReadOnly)(i,"_signingKey",function(){return x})}(0,ri.defineReadOnly)(i,"_mnemonic",function(){return null}),(0,ri.defineReadOnly)(i,"address",(0,Ia.computeAddress)(i.publicKey))}return n&&!kM.Provider.isProvider(n)&&Zo.throwArgumentError("invalid provider","provider",n),(0,ri.defineReadOnly)(i,"provider",n||null),i}return Object.defineProperty(e.prototype,"mnemonic",{get:function(){return this._mnemonic()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"privateKey",{get:function(){return this._signingKey().privateKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"publicKey",{get:function(){return this._signingKey().publicKey},enumerable:!1,configurable:!0}),e.prototype.getAddress=function(){return Promise.resolve(this.address)},e.prototype.connect=function(r){return new e(this,r)},e.prototype.signTransaction=function(r){var n=this;return(0,ri.resolveProperties)(r).then(function(i){i.from!=null&&((0,Ty.getAddress)(i.from)!==n.address&&Zo.throwArgumentError("transaction from address mismatch","transaction.from",r.from),delete i.from);var a=n._signingKey().signDigest((0,Ey.keccak256)((0,Ia.serialize)(i)));return(0,Ia.serialize)(i,a)})},e.prototype.signMessage=function(r){return Sy(this,void 0,void 0,function(){return My(this,function(n){return[2,(0,Vo.joinSignature)(this._signingKey().signDigest((0,ef.hashMessage)(r)))]})})},e.prototype._signTypedData=function(r,n,i){return Sy(this,void 0,void 0,function(){var a,l=this;return My(this,function(b){switch(b.label){case 0:return[4,ef._TypedDataEncoder.resolveNames(r,n,i,function(y){return l.provider==null&&Zo.throwError("cannot resolve ENS names without a provider",_y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:y}),l.provider.resolveName(y)})];case 1:return a=b.sent(),[2,(0,Vo.joinSignature)(this._signingKey().signDigest(ef._TypedDataEncoder.hash(a.domain,n,a.value)))]}})})},e.prototype.encrypt=function(r,n,i){if(typeof n=="function"&&!i&&(i=n,n={}),i&&typeof i!="function")throw new Error("invalid callback");return n||(n={}),(0,sh.encryptKeystore)(this,r,n,i)},e.createRandom=function(r){var n=(0,JM.randomBytes)(16);r||(r={}),r.extraEntropy&&(n=(0,Vo.arrayify)((0,Vo.hexDataSlice)((0,Ey.keccak256)((0,Vo.concat)([n,r.extraEntropy])),0,16)));var i=(0,$s.entropyToMnemonic)(n,r.locale);return e.fromMnemonic(i,r.path,r.locale)},e.fromEncryptedJson=function(r,n,i){return(0,sh.decryptJsonWallet)(r,n,i).then(function(a){return new e(a)})},e.fromEncryptedJsonSync=function(r,n){return new e((0,sh.decryptJsonWalletSync)(r,n))},e.fromMnemonic=function(r,n,i){return n||(n=$s.defaultPath),new e($s.HDNode.fromMnemonic(r,null,i).derivePath(n))},e}(NM.Signer);Rr.Wallet=GM;function XM(t,e){return(0,Ia.recoverAddress)((0,ef.hashMessage)(t),e)}Rr.verifyMessage=XM;function zM(t,e,r,n){return(0,Ia.recoverAddress)(ef._TypedDataEncoder.hash(t,e,r),n)}Rr.verifyTypedData=zM});var Dy=V((uh,Fy)=>{var AD=A(S());var Tc=it("buffer"),ni=Tc.Buffer;function Ry(t,e){for(var r in t)e[r]=t[r]}ni.from&&ni.alloc&&ni.allocUnsafe&&ni.allocUnsafeSlow?Fy.exports=Tc:(Ry(Tc,uh),uh.Buffer=Oa);function Oa(t,e,r){return ni(t,e,r)}Oa.prototype=Object.create(ni.prototype);Ry(ni,Oa);Oa.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return ni(t,e,r)};Oa.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=ni(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};Oa.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ni(t)};Oa.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Tc.SlowBuffer(t)}});var Oy=V((SD,Iy)=>{"use strict";var MD=A(S()),Ec=Dy().Buffer;function KM(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 i=t.charAt(n),a=i.charCodeAt(0);if(e[a]!==255)throw new TypeError(i+" is ambiguous");e[a]=n}var l=t.length,b=t.charAt(0),y=Math.log(l)/Math.log(256),x=Math.log(256)/Math.log(l);function _(F){if((Array.isArray(F)||F instanceof Uint8Array)&&(F=Ec.from(F)),!Ec.isBuffer(F))throw new TypeError("Expected Buffer");if(F.length===0)return"";for(var P=0,z=0,W=0,X=F.length;W!==X&&F[W]===0;)W++,P++;for(var ne=(X-W)*x+1>>>0,$=new Uint8Array(ne);W!==X;){for(var ae=F[W],ie=0,ee=ne-1;(ae!==0||ie<z)&&ee!==-1;ee--,ie++)ae+=256*$[ee]>>>0,$[ee]=ae%l>>>0,ae=ae/l>>>0;if(ae!==0)throw new Error("Non-zero carry");z=ie,W++}for(var ce=ne-z;ce!==ne&&$[ce]===0;)ce++;for(var te=b.repeat(P);ce<ne;++ce)te+=t.charAt($[ce]);return te}function C(F){if(typeof F!="string")throw new TypeError("Expected String");if(F.length===0)return Ec.alloc(0);for(var P=0,z=0,W=0;F[P]===b;)z++,P++;for(var X=(F.length-P)*y+1>>>0,ne=new Uint8Array(X);P<F.length;){var $=F.charCodeAt(P);if($>255)return;var ae=e[$];if(ae===255)return;for(var ie=0,ee=X-1;(ae!==0||ie<W)&&ee!==-1;ee--,ie++)ae+=l*ne[ee]>>>0,ne[ee]=ae%256>>>0,ae=ae/256>>>0;if(ae!==0)throw new Error("Non-zero carry");W=ie,P++}for(var ce=X-W;ce!==X&&ne[ce]===0;)ce++;var te=Ec.allocUnsafe(z+(X-ce));te.fill(0,0,z);for(var Y=z;ce!==X;)te[Y++]=ne[ce++];return te}function D(F){var P=C(F);if(P)return P;throw new Error("Non-base"+l+" character")}return{encode:_,decodeUnsafe:C,decode:D}}Iy.exports=KM});var Ny=V((TD,ky)=>{var ED=A(S()),ZM=Oy(),VM="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";ky.exports=ZM(VM)});var e2=V((PD,$y)=>{var LD=A(S()),qy=it("fs"),Ti=it("path"),Gy=it("os"),Xy=typeof __webpack_require__=="function"?__non_webpack_require__:it,jM=process.config&&process.config.variables||{},QM=!!process.env.PREBUILDS_ONLY,Jy=process.versions.modules,lh=$M()?"electron":YM()?"node-webkit":"node",dh=process.env.npm_config_arch||Gy.arch(),hh=process.env.npm_config_platform||Gy.platform(),zy=process.env.LIBC||(eT(hh)?"musl":"glibc"),ph=process.env.ARM_VERSION||(dh==="arm64"?"8":jM.arm_version)||"",Ky=(process.versions.uv||"").split(".")[0];$y.exports=ii;function ii(t){return Xy(ii.resolve(t))}ii.resolve=ii.path=function(t){t=Ti.resolve(t||".");try{var e=Xy(Ti.join(t,"package.json")).name.toUpperCase().replace(/-/g,"_");process.env[e+"_PREBUILD"]&&(t=process.env[e+"_PREBUILD"])}catch{}if(!QM){var r=Uy(Ti.join(t,"build/Release"),Hy);if(r)return r;var n=Uy(Ti.join(t,"build/Debug"),Hy);if(n)return n}var i=b(t);if(i)return i;var a=b(Ti.dirname(process.execPath));if(a)return a;var l=["platform="+hh,"arch="+dh,"runtime="+lh,"abi="+Jy,"uv="+Ky,ph?"armv="+ph:"","libc="+zy,"node="+process.versions.node,process.versions.electron?"electron="+process.versions.electron:"",typeof __webpack_require__=="function"?"webpack=true":""].filter(Boolean).join(" ");throw new Error("No native build was found for "+l+`
13
13
  loaded from: `+t+`
14
- `);function b(y){var x=bh(Ti.join(y,"prebuilds")).map(Ky),_=x.filter(Zy(hh,dh)).sort(Vy)[0];if(_){var C=Ti.join(y,"prebuilds",_.name),D=bh(C).map(jy),F=D.filter(Qy(lh,Ny)),P=F.sort(Wy(lh))[0];if(P)return Ti.join(C,P.file)}}};function bh(t){try{return Hy.readdirSync(t)}catch{return[]}}function Jy(t,e){var r=bh(t).filter(e);return r[0]&&Ti.join(t,r[0])}function Uy(t){return/\.node$/.test(t)}function Ky(t){var e=t.split("-");if(e.length===2){var r=e[0],n=e[1].split("+");if(r&&n.length&&n.every(Boolean))return{name:t,platform:r,architectures:n}}}function Zy(t,e){return function(r){return r==null||r.platform!==t?!1:r.architectures.includes(e)}}function Vy(t,e){return t.architectures.length-e.architectures.length}function jy(t){var e=t.split("."),r=e.pop(),n={file:t,specificity:0};if(r==="node"){for(var i=0;i<e.length;i++){var a=e[i];if(a==="node"||a==="electron"||a==="node-webkit")n.runtime=a;else if(a==="napi")n.napi=!0;else if(a.slice(0,3)==="abi")n.abi=a.slice(3);else if(a.slice(0,2)==="uv")n.uv=a.slice(2);else if(a.slice(0,4)==="armv")n.armv=a.slice(4);else if(a==="glibc"||a==="musl")n.libc=a;else continue;n.specificity++}return n}}function Qy(t,e){return function(r){return!(r==null||r.runtime&&r.runtime!==t&&!QM(r)||r.abi&&r.abi!==e&&!r.napi||r.uv&&r.uv!==zy||r.armv&&r.armv!==ph||r.libc&&r.libc!==Xy)}}function QM(t){return t.runtime==="node"&&t.napi}function Wy(t){return function(e,r){return e.runtime!==r.runtime?e.runtime===t?-1:1:e.abi!==r.abi?e.abi?-1:1:e.specificity!==r.specificity?e.specificity>r.specificity?-1:1:0}}function WM(){return!!(process.versions&&process.versions.nw)}function YM(){return process.versions&&process.versions.electron||process.env.ELECTRON_RUN_AS_NODE?!0:typeof window<"u"&&window.process&&window.process.type==="renderer"}function $M(t){return t==="linux"&&Hy.existsSync("/etc/alpine-release")}ii.parseTags=jy;ii.matchTags=Qy;ii.compareTags=Wy;ii.parseTuple=Ky;ii.matchTuple=Zy;ii.compareTuples=Vy});var mh=V((RD,vh)=>{var FD=A(S()),gh=typeof __webpack_require__=="function"?__non_webpack_require__:it;typeof gh.addon=="function"?vh.exports=gh.addon.bind(gh):vh.exports=$y()});var xh=V((ID,e2)=>{var OD=A(S()),We={IMPOSSIBLE_CASE:"Impossible case. Please create issue.",TWEAK_ADD:"The tweak was out of range or the resulted private key is invalid",TWEAK_MUL:"The tweak was out of range or equal to zero",CONTEXT_RANDOMIZE_UNKNOW:"Unknow error on context randomization",SECKEY_INVALID:"Private Key is invalid",PUBKEY_PARSE:"Public Key could not be parsed",PUBKEY_SERIALIZE:"Public Key serialization error",PUBKEY_COMBINE:"The sum of the public keys is not valid",SIG_PARSE:"Signature could not be parsed",SIGN:"The nonce generation function failed, or the private key was invalid",RECOVER:"Public key could not be recover",ECDH:"Scalar was invalid (zero or overflow)"};function un(t,e){if(!t)throw new Error(e)}function Ze(t,e,r){if(un(e instanceof Uint8Array,`Expected ${t} to be an Uint8Array`),r!==void 0)if(Array.isArray(r)){let n=r.join(", "),i=`Expected ${t} to be an Uint8Array with length [${n}]`;un(r.includes(e.length),i)}else{let n=`Expected ${t} to be an Uint8Array with length ${r}`;un(e.length===r,n)}}function Oa(t){un(Qo(t)==="Boolean","Expected compressed to be a Boolean")}function _n(t=r=>new Uint8Array(r),e){return typeof t=="function"&&(t=t(e)),Ze("output",t,e),t}function Qo(t){return Object.prototype.toString.call(t).slice(8,-1)}e2.exports=t=>({contextRandomize(e){switch(un(e===null||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),e!==null&&Ze("seed",e,32),t.contextRandomize(e)){case 1:throw new Error(We.CONTEXT_RANDOMIZE_UNKNOW)}},privateKeyVerify(e){return Ze("private key",e,32),t.privateKeyVerify(e)===0},privateKeyNegate(e){switch(Ze("private key",e,32),t.privateKeyNegate(e)){case 0:return e;case 1:throw new Error(We.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(e,r){switch(Ze("private key",e,32),Ze("tweak",r,32),t.privateKeyTweakAdd(e,r)){case 0:return e;case 1:throw new Error(We.TWEAK_ADD)}},privateKeyTweakMul(e,r){switch(Ze("private key",e,32),Ze("tweak",r,32),t.privateKeyTweakMul(e,r)){case 0:return e;case 1:throw new Error(We.TWEAK_MUL)}},publicKeyVerify(e){return Ze("public key",e,[33,65]),t.publicKeyVerify(e)===0},publicKeyCreate(e,r=!0,n){switch(Ze("private key",e,32),Oa(r),n=_n(n,r?33:65),t.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(We.SECKEY_INVALID);case 2:throw new Error(We.PUBKEY_SERIALIZE)}},publicKeyConvert(e,r=!0,n){switch(Ze("public key",e,[33,65]),Oa(r),n=_n(n,r?33:65),t.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.PUBKEY_SERIALIZE)}},publicKeyNegate(e,r=!0,n){switch(Ze("public key",e,[33,65]),Oa(r),n=_n(n,r?33:65),t.publicKeyNegate(n,e)){case 0:return n;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.IMPOSSIBLE_CASE);case 3:throw new Error(We.PUBKEY_SERIALIZE)}},publicKeyCombine(e,r=!0,n){un(Array.isArray(e),"Expected public keys to be an Array"),un(e.length>0,"Expected public keys array will have more than zero items");for(let i of e)Ze("public key",i,[33,65]);switch(Oa(r),n=_n(n,r?33:65),t.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.PUBKEY_COMBINE);case 3:throw new Error(We.PUBKEY_SERIALIZE)}},publicKeyTweakAdd(e,r,n=!0,i){switch(Ze("public key",e,[33,65]),Ze("tweak",r,32),Oa(n),i=_n(i,n?33:65),t.publicKeyTweakAdd(i,e,r)){case 0:return i;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.TWEAK_ADD)}},publicKeyTweakMul(e,r,n=!0,i){switch(Ze("public key",e,[33,65]),Ze("tweak",r,32),Oa(n),i=_n(i,n?33:65),t.publicKeyTweakMul(i,e,r)){case 0:return i;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.TWEAK_MUL)}},signatureNormalize(e){switch(Ze("signature",e,64),t.signatureNormalize(e)){case 0:return e;case 1:throw new Error(We.SIG_PARSE)}},signatureExport(e,r){Ze("signature",e,64),r=_n(r,72);let n={output:r,outputlen:72};switch(t.signatureExport(n,e)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(We.SIG_PARSE);case 2:throw new Error(We.IMPOSSIBLE_CASE)}},signatureImport(e,r){switch(Ze("signature",e),r=_n(r,64),t.signatureImport(r,e)){case 0:return r;case 1:throw new Error(We.SIG_PARSE);case 2:throw new Error(We.IMPOSSIBLE_CASE)}},ecdsaSign(e,r,n={},i){Ze("message",e,32),Ze("private key",r,32),un(Qo(n)==="Object","Expected options to be an Object"),n.data!==void 0&&Ze("options.data",n.data),n.noncefn!==void 0&&un(Qo(n.noncefn)==="Function","Expected options.noncefn to be a Function"),i=_n(i,64);let a={signature:i,recid:null};switch(t.ecdsaSign(a,e,r,n.data,n.noncefn)){case 0:return a;case 1:throw new Error(We.SIGN);case 2:throw new Error(We.IMPOSSIBLE_CASE)}},ecdsaVerify(e,r,n){switch(Ze("signature",e,64),Ze("message",r,32),Ze("public key",n,[33,65]),t.ecdsaVerify(e,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(We.SIG_PARSE);case 2:throw new Error(We.PUBKEY_PARSE)}},ecdsaRecover(e,r,n,i=!0,a){switch(Ze("signature",e,64),un(Qo(r)==="Number"&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),Ze("message",n,32),Oa(i),a=_n(a,i?33:65),t.ecdsaRecover(a,e,r,n)){case 0:return a;case 1:throw new Error(We.SIG_PARSE);case 2:throw new Error(We.RECOVER);case 3:throw new Error(We.IMPOSSIBLE_CASE)}},ecdh(e,r,n={},i){switch(Ze("public key",e,[33,65]),Ze("private key",r,32),un(Qo(n)==="Object","Expected options to be an Object"),n.data!==void 0&&Ze("options.data",n.data),n.hashfn!==void 0?(un(Qo(n.hashfn)==="Function","Expected options.hashfn to be a Function"),n.xbuf!==void 0&&Ze("options.xbuf",n.xbuf,32),n.ybuf!==void 0&&Ze("options.ybuf",n.ybuf,32),Ze("output",i)):i=_n(i,32),t.ecdh(i,e,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.ECDH)}}})});var r2=V((kD,t2)=>{var ND=A(S()),eT=mh()(__dirname);t2.exports=xh()(new eT.Secp256k1)});var i2=V((JD,n2)=>{var UD=A(S()),tT=Bd().ec,ai=new tT("secp256k1"),qe=ai.curve,st=qe.n.constructor;function rT(t,e){let r=new st(e);if(r.cmp(qe.p)>=0)return null;r=r.toRed(qe.red);let n=r.redSqr().redIMul(r).redIAdd(qe.b).redSqrt();t===3!==n.isOdd()&&(n=n.redNeg());let i=r.redSqr().redIMul(r);return n.redSqr().redISub(i.redIAdd(qe.b)).isZero()?ai.keyPair({pub:{x:r,y:n}}):null}function nT(t,e,r){let n=new st(e),i=new st(r);if(n.cmp(qe.p)>=0||i.cmp(qe.p)>=0||(n=n.toRed(qe.red),i=i.toRed(qe.red),(t===6||t===7)&&i.isOdd()!==(t===7)))return null;let a=n.redSqr().redIMul(n);return i.redSqr().redISub(a.redIAdd(qe.b)).isZero()?ai.keyPair({pub:{x:n,y:i}}):null}function ta(t){let e=t[0];switch(e){case 2:case 3:return t.length!==33?null:rT(e,t.subarray(1,33));case 4:case 6:case 7:return t.length!==65?null:nT(e,t.subarray(1,33),t.subarray(33,65));default:return null}}function ka(t,e){let r=e.encode(null,t.length===33);for(let n=0;n<t.length;++n)t[n]=r[n]}n2.exports={contextRandomize(){return 0},privateKeyVerify(t){let e=new st(t);return e.cmp(qe.n)<0&&!e.isZero()?0:1},privateKeyNegate(t){let e=new st(t),r=qe.n.sub(e).umod(qe.n).toArrayLike(Uint8Array,"be",32);return t.set(r),0},privateKeyTweakAdd(t,e){let r=new st(e);if(r.cmp(qe.n)>=0||(r.iadd(new st(t)),r.cmp(qe.n)>=0&&r.isub(qe.n),r.isZero()))return 1;let n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},privateKeyTweakMul(t,e){let r=new st(e);if(r.cmp(qe.n)>=0||r.isZero())return 1;r.imul(new st(t)),r.cmp(qe.n)>=0&&(r=r.umod(qe.n));let n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},publicKeyVerify(t){return ta(t)===null?1:0},publicKeyCreate(t,e){let r=new st(e);if(r.cmp(qe.n)>=0||r.isZero())return 1;let n=ai.keyFromPrivate(e).getPublic();return ka(t,n),0},publicKeyConvert(t,e){let r=ta(e);if(r===null)return 1;let n=r.getPublic();return ka(t,n),0},publicKeyNegate(t,e){let r=ta(e);if(r===null)return 1;let n=r.getPublic();return n.y=n.y.redNeg(),ka(t,n),0},publicKeyCombine(t,e){let r=new Array(e.length);for(let i=0;i<e.length;++i)if(r[i]=ta(e[i]),r[i]===null)return 1;let n=r[0].getPublic();for(let i=1;i<r.length;++i)n=n.add(r[i].pub);return n.isInfinity()?2:(ka(t,n),0)},publicKeyTweakAdd(t,e,r){let n=ta(e);if(n===null)return 1;if(r=new st(r),r.cmp(qe.n)>=0)return 2;let i=n.getPublic().add(qe.g.mul(r));return i.isInfinity()?2:(ka(t,i),0)},publicKeyTweakMul(t,e,r){let n=ta(e);if(n===null)return 1;if(r=new st(r),r.cmp(qe.n)>=0||r.isZero())return 2;let i=n.getPublic().mul(r);return ka(t,i),0},signatureNormalize(t){let e=new st(t.subarray(0,32)),r=new st(t.subarray(32,64));return e.cmp(qe.n)>=0||r.cmp(qe.n)>=0?1:(r.cmp(ai.nh)===1&&t.set(qe.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(t,e){let r=e.subarray(0,32),n=e.subarray(32,64);if(new st(r).cmp(qe.n)>=0||new st(n).cmp(qe.n)>=0)return 1;let{output:i}=t,a=i.subarray(4,37);a[0]=0,a.set(r,1);let l=33,b=0;for(;l>1&&a[b]===0&&!(a[b+1]&128);--l,++b);if(a=a.subarray(b),a[0]&128||l>1&&a[0]===0&&!(a[1]&128))return 1;let y=i.subarray(39,72);y[0]=0,y.set(n,1);let x=33,_=0;for(;x>1&&y[_]===0&&!(y[_+1]&128);--x,++_);return y=y.subarray(_),y[0]&128||x>1&&y[0]===0&&!(y[1]&128)?1:(t.outputlen=6+l+x,i[0]=48,i[1]=t.outputlen-2,i[2]=2,i[3]=a.length,i.set(a,4),i[4+l]=2,i[5+l]=y.length,i.set(y,6+l),0)},signatureImport(t,e){if(e.length<8||e.length>72||e[0]!==48||e[1]!==e.length-2||e[2]!==2)return 1;let r=e[3];if(r===0||5+r>=e.length||e[4+r]!==2)return 1;let n=e[5+r];if(n===0||6+r+n!==e.length||e[4]&128||r>1&&e[4]===0&&!(e[5]&128)||e[r+6]&128||n>1&&e[r+6]===0&&!(e[r+7]&128))return 1;let i=e.subarray(4,4+r);if(i.length===33&&i[0]===0&&(i=i.subarray(1)),i.length>32)return 1;let a=e.subarray(6+r);if(a.length===33&&a[0]===0&&(a=a.slice(1)),a.length>32)throw new Error("S length is too long");let l=new st(i);l.cmp(qe.n)>=0&&(l=new st(0));let b=new st(e.subarray(6+r));return b.cmp(qe.n)>=0&&(b=new st(0)),t.set(l.toArrayLike(Uint8Array,"be",32),0),t.set(b.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(t,e,r,n,i){if(i){let b=i;i=y=>{let x=b(e,r,null,n,y);if(!(x instanceof Uint8Array&&x.length===32))throw new Error("This is the way");return new st(x)}}let a=new st(r);if(a.cmp(qe.n)>=0||a.isZero())return 1;let l;try{l=ai.sign(e,r,{canonical:!0,k:i,pers:n})}catch{return 1}return t.signature.set(l.r.toArrayLike(Uint8Array,"be",32),0),t.signature.set(l.s.toArrayLike(Uint8Array,"be",32),32),t.recid=l.recoveryParam,0},ecdsaVerify(t,e,r){let n={r:t.subarray(0,32),s:t.subarray(32,64)},i=new st(n.r),a=new st(n.s);if(i.cmp(qe.n)>=0||a.cmp(qe.n)>=0)return 1;if(a.cmp(ai.nh)===1||i.isZero()||a.isZero())return 3;let l=ta(r);if(l===null)return 2;let b=l.getPublic();return ai.verify(e,n,b)?0:3},ecdsaRecover(t,e,r,n){let i={r:e.slice(0,32),s:e.slice(32,64)},a=new st(i.r),l=new st(i.s);if(a.cmp(qe.n)>=0||l.cmp(qe.n)>=0)return 1;if(a.isZero()||l.isZero())return 2;let b;try{b=ai.recoverPubKey(n,i,r)}catch{return 2}return ka(t,b),0},ecdh(t,e,r,n,i,a,l){let b=ta(e);if(b===null)return 1;let y=new st(r);if(y.cmp(qe.n)>=0||y.isZero())return 2;let x=b.getPublic().mul(y);if(i===void 0){let _=x.encode(null,!0),C=ai.hash().update(_).digest();for(let D=0;D<32;++D)t[D]=C[D]}else{a||(a=new Uint8Array(32));let _=x.getX().toArray("be",32);for(let P=0;P<32;++P)a[P]=_[P];l||(l=new Uint8Array(32));let C=x.getY().toArray("be",32);for(let P=0;P<32;++P)l[P]=C[P];let D=i(a,l,n);if(!(D instanceof Uint8Array&&D.length===t.length))return 2;t.set(D)}return 0}}});var o2=V((HD,a2)=>{var qD=A(S());a2.exports=xh()(i2())});var wh=V((GD,yh)=>{var XD=A(S());try{yh.exports=r2()}catch{yh.exports=o2()}});var Ah=V((zD,s2)=>{var KD=A(S());s2.exports=it("stream")});var h2=V((ZD,d2)=>{"use strict";var VD=A(S());function f2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function c2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?f2(Object(r),!0).forEach(function(n){iT(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function iT(t,e,r){return e=l2(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l2(n.key),n)}}function oT(t,e,r){return e&&u2(t.prototype,e),r&&u2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l2(t){var e=sT(t,"string");return typeof e=="symbol"?e:String(e)}function sT(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var fT=it("buffer"),_c=fT.Buffer,cT=it("util"),Sh=cT.inspect,uT=Sh&&Sh.custom||"inspect";function lT(t,e,r){_c.prototype.copy.call(t,e,r)}d2.exports=function(){function t(){aT(this,t),this.head=null,this.tail=null,this.length=0}return oT(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return _c.alloc(0);for(var n=_c.allocUnsafe(r>>>0),i=this.head,a=0;i;)lT(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,a=n.data;for(r-=a.length;n=n.next;){var l=n.data,b=r>l.length?l.length:r;if(b===l.length?a+=l:a+=l.slice(0,r),r-=b,r===0){b===l.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=l.slice(b));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=_c.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var l=i.data,b=r>l.length?l.length:r;if(l.copy(n,n.length-r,0,b),r-=b,r===0){b===l.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=l.slice(b));break}++a}return this.length-=a,n}},{key:uT,value:function(r,n){return Sh(this,c2(c2({},n),{},{depth:0,customInspect:!1}))}}]),t}()});var Th=V((jD,b2)=>{"use strict";var QD=A(S());function dT(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Mh,this,t)):process.nextTick(Mh,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(Bc,r):(r._writableState.errorEmitted=!0,process.nextTick(p2,r,a)):process.nextTick(p2,r,a):e?(process.nextTick(Bc,r),e(a)):process.nextTick(Bc,r)}),this)}function p2(t,e){Mh(t,e),Bc(t)}function Bc(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function hT(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Mh(t,e){t.emit("error",e)}function pT(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}b2.exports={destroy:dT,undestroy:hT,errorOrDestroy:pT}});var ra=V((WD,m2)=>{"use strict";var YD=A(S()),v2={};function ln(t,e,r){r||(r=Error);function n(a,l,b){return typeof e=="string"?e:e(a,l,b)}class i extends r{constructor(l,b,y){super(n(l,b,y))}}i.prototype.name=r.name,i.prototype.code=t,v2[t]=i}function g2(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function bT(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function gT(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function vT(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}ln("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);ln("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&bT(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(gT(t," argument"))i=`The ${t} ${n} ${g2(e,"type")}`;else{let a=vT(t,".")?"property":"argument";i=`The "${t}" ${a} ${n} ${g2(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);ln("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ln("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});ln("ERR_STREAM_PREMATURE_CLOSE","Premature close");ln("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});ln("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ln("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ln("ERR_STREAM_WRITE_AFTER_END","write after end");ln("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ln("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);ln("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");m2.exports.codes=v2});var Eh=V(($D,x2)=>{"use strict";var eI=A(S()),mT=ra().codes.ERR_INVALID_OPT_VALUE;function xT(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function yT(t,e,r,n){var i=xT(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new mT(a,i)}return Math.floor(i)}return t.objectMode?16:16*1024}x2.exports={getHighWaterMark:yT}});var w2=V((tI,y2)=>{var rI=A(S());y2.exports=it("util").deprecate});var Ch=V((nI,_2)=>{"use strict";var iI=A(S());_2.exports=gt;function S2(t){var e=this;this.next=null,this.entry=null,this.finish=function(){ZT(e,t)}}var Wo;gt.WritableState=rf;var wT={deprecate:w2()},M2=Ah(),Pc=it("buffer").Buffer,AT=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function ST(t){return Pc.from(t)}function MT(t){return Pc.isBuffer(t)||t instanceof AT}var Bh=Th(),TT=Eh(),ET=TT.getHighWaterMark,na=ra().codes,_T=na.ERR_INVALID_ARG_TYPE,BT=na.ERR_METHOD_NOT_IMPLEMENTED,CT=na.ERR_MULTIPLE_CALLBACK,PT=na.ERR_STREAM_CANNOT_PIPE,LT=na.ERR_STREAM_DESTROYED,RT=na.ERR_STREAM_NULL_VALUES,FT=na.ERR_STREAM_WRITE_AFTER_END,DT=na.ERR_UNKNOWN_ENCODING,Yo=Bh.errorOrDestroy;nr()(gt,M2);function IT(){}function rf(t,e,r){Wo=Wo||Na(),t=t||{},typeof r!="boolean"&&(r=e instanceof Wo),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=ET(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){qT(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new S2(this)}rf.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(rf.prototype,"buffer",{get:wT.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Cc;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Cc=Function.prototype[Symbol.hasInstance],Object.defineProperty(gt,Symbol.hasInstance,{value:function(e){return Cc.call(this,e)?!0:this!==gt?!1:e&&e._writableState instanceof rf}})):Cc=function(e){return e instanceof this};function gt(t){Wo=Wo||Na();var e=this instanceof Wo;if(!e&&!Cc.call(gt,this))return new gt(t);this._writableState=new rf(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),M2.call(this)}gt.prototype.pipe=function(){Yo(this,new PT)};function OT(t,e){var r=new FT;Yo(t,r),process.nextTick(e,r)}function kT(t,e,r,n){var i;return r===null?i=new RT:typeof r!="string"&&!e.objectMode&&(i=new _T("chunk",["string","Buffer"],r)),i?(Yo(t,i),process.nextTick(n,i),!1):!0}gt.prototype.write=function(t,e,r){var n=this._writableState,i=!1,a=!n.objectMode&&MT(t);return a&&!Pc.isBuffer(t)&&(t=ST(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=IT),n.ending?OT(this,r):(a||kT(this,n,t,r))&&(n.pendingcb++,i=JT(this,n,a,t,e,r)),i};gt.prototype.cork=function(){this._writableState.corked++};gt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&T2(this,t))};gt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new DT(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(gt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function NT(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Pc.from(e,r)),e}Object.defineProperty(gt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function JT(t,e,r,n,i,a){if(!r){var l=NT(e,n,i);n!==l&&(r=!0,i="buffer",n=l)}var b=e.objectMode?1:n.length;e.length+=b;var y=e.length<e.highWaterMark;if(y||(e.needDrain=!0),e.writing||e.corked){var x=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},x?x.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _h(t,e,!1,b,n,i,a);return y}function _h(t,e,r,n,i,a,l){e.writelen=n,e.writecb=l,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new LT("write")):r?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function UT(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(tf,t,e),t._writableState.errorEmitted=!0,Yo(t,n)):(i(n),t._writableState.errorEmitted=!0,Yo(t,n),tf(t,e))}function HT(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function qT(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new CT;if(HT(r),e)UT(t,r,n,e,i);else{var a=E2(r)||t.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&T2(t,r),n?process.nextTick(A2,t,r,a,i):A2(t,r,a,i)}}function A2(t,e,r,n){r||GT(t,e),e.pendingcb--,n(),tf(t,e)}function GT(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function T2(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var l=0,b=!0;r;)i[l]=r,r.isBuf||(b=!1),r=r.next,l+=1;i.allBuffers=b,_h(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new S2(e),e.bufferedRequestCount=0}else{for(;r;){var y=r.chunk,x=r.encoding,_=r.callback,C=e.objectMode?1:y.length;if(_h(t,e,!1,C,y,x,_),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}gt.prototype._write=function(t,e,r){r(new BT("_write()"))};gt.prototype._writev=null;gt.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||KT(this,n,r),this};Object.defineProperty(gt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function E2(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function XT(t,e){t._final(function(r){e.pendingcb--,r&&Yo(t,r),e.prefinished=!0,t.emit("prefinish"),tf(t,e)})}function zT(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(XT,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function tf(t,e){var r=E2(e);if(r&&(zT(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function KT(t,e,r){e.ending=!0,tf(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function ZT(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(gt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});gt.prototype.destroy=Bh.destroy;gt.prototype._undestroy=Bh.undestroy;gt.prototype._destroy=function(t,e){e(t)}});var Na=V((aI,C2)=>{"use strict";var oI=A(S()),VT=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};C2.exports=oi;var B2=Rh(),Lh=Ch();nr()(oi,B2);for(Ph=VT(Lh.prototype),Lc=0;Lc<Ph.length;Lc++)Rc=Ph[Lc],oi.prototype[Rc]||(oi.prototype[Rc]=Lh.prototype[Rc]);var Ph,Rc,Lc;function oi(t){if(!(this instanceof oi))return new oi(t);B2.call(this,t),Lh.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",jT)))}Object.defineProperty(oi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(oi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(oi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function jT(){this._writableState.ended||process.nextTick(QT,this)}function QT(t){t.end()}Object.defineProperty(oi.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var R2=V((Fh,L2)=>{var sI=A(S()),Fc=it("buffer"),Ei=Fc.Buffer;function P2(t,e){for(var r in t)e[r]=t[r]}Ei.from&&Ei.alloc&&Ei.allocUnsafe&&Ei.allocUnsafeSlow?L2.exports=Fc:(P2(Fc,Fh),Fh.Buffer=$o);function $o(t,e,r){return Ei(t,e,r)}P2(Ei,$o);$o.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ei(t,e,r)};$o.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Ei(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};$o.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ei(t)};$o.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Fc.SlowBuffer(t)}});var Oh=V(D2=>{"use strict";var cI=A(S()),Ih=R2().Buffer,F2=Ih.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function WT(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function YT(t){var e=WT(t);if(typeof e!="string"&&(Ih.isEncoding===F2||!F2(t)))throw new Error("Unknown encoding: "+t);return e||t}D2.StringDecoder=nf;function nf(t){this.encoding=YT(t);var e;switch(this.encoding){case"utf16le":this.text=iE,this.end=aE,e=4;break;case"utf8":this.fillLast=tE,e=4;break;case"base64":this.text=oE,this.end=sE,e=3;break;default:this.write=fE,this.end=cE;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ih.allocUnsafe(e)}nf.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};nf.prototype.end=nE;nf.prototype.text=rE;nf.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Dh(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function $T(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Dh(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Dh(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Dh(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function eE(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function tE(t){var e=this.lastTotal-this.lastNeed,r=eE(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function rE(t,e){var r=$T(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function nE(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function iE(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function aE(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function oE(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function sE(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function fE(t){return t.toString(this.encoding)}function cE(t){return t&&t.length?this.write(t):""}});var Dc=V((uI,k2)=>{"use strict";var lI=A(S()),I2=ra().codes.ERR_STREAM_PREMATURE_CLOSE;function uE(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function lE(){}function dE(t){return t.setHeader&&typeof t.abort=="function"}function O2(t,e,r){if(typeof e=="function")return O2(t,null,e);e||(e={}),r=uE(r||lE);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,a=function(){t.writable||b()},l=t._writableState&&t._writableState.finished,b=function(){i=!1,l=!0,n||r.call(t)},y=t._readableState&&t._readableState.endEmitted,x=function(){n=!1,y=!0,i||r.call(t)},_=function(P){r.call(t,P)},C=function(){var P;if(n&&!y)return(!t._readableState||!t._readableState.ended)&&(P=new I2),r.call(t,P);if(i&&!l)return(!t._writableState||!t._writableState.ended)&&(P=new I2),r.call(t,P)},D=function(){t.req.on("finish",b)};return dE(t)?(t.on("complete",b),t.on("abort",C),t.req?D():t.on("request",D)):i&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",x),t.on("finish",b),e.error!==!1&&t.on("error",_),t.on("close",C),function(){t.removeListener("complete",b),t.removeListener("abort",C),t.removeListener("request",D),t.req&&t.req.removeListener("finish",b),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",b),t.removeListener("end",x),t.removeListener("error",_),t.removeListener("close",C)}}k2.exports=O2});var J2=V((dI,N2)=>{"use strict";var hI=A(S()),Ic;function ia(t,e,r){return e=hE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hE(t){var e=pE(t,"string");return typeof e=="symbol"?e:String(e)}function pE(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var bE=Dc(),aa=Symbol("lastResolve"),Ja=Symbol("lastReject"),af=Symbol("error"),Oc=Symbol("ended"),Ua=Symbol("lastPromise"),kh=Symbol("handlePromise"),Ha=Symbol("stream");function oa(t,e){return{value:t,done:e}}function gE(t){var e=t[aa];if(e!==null){var r=t[Ha].read();r!==null&&(t[Ua]=null,t[aa]=null,t[Ja]=null,e(oa(r,!1)))}}function vE(t){process.nextTick(gE,t)}function mE(t,e){return function(r,n){t.then(function(){if(e[Oc]){r(oa(void 0,!0));return}e[kh](r,n)},n)}}var xE=Object.getPrototypeOf(function(){}),yE=Object.setPrototypeOf((Ic={get stream(){return this[Ha]},next:function(){var e=this,r=this[af];if(r!==null)return Promise.reject(r);if(this[Oc])return Promise.resolve(oa(void 0,!0));if(this[Ha].destroyed)return new Promise(function(l,b){process.nextTick(function(){e[af]?b(e[af]):l(oa(void 0,!0))})});var n=this[Ua],i;if(n)i=new Promise(mE(n,this));else{var a=this[Ha].read();if(a!==null)return Promise.resolve(oa(a,!1));i=new Promise(this[kh])}return this[Ua]=i,i}},ia(Ic,Symbol.asyncIterator,function(){return this}),ia(Ic,"return",function(){var e=this;return new Promise(function(r,n){e[Ha].destroy(null,function(i){if(i){n(i);return}r(oa(void 0,!0))})})}),Ic),xE),wE=function(e){var r,n=Object.create(yE,(r={},ia(r,Ha,{value:e,writable:!0}),ia(r,aa,{value:null,writable:!0}),ia(r,Ja,{value:null,writable:!0}),ia(r,af,{value:null,writable:!0}),ia(r,Oc,{value:e._readableState.endEmitted,writable:!0}),ia(r,kh,{value:function(a,l){var b=n[Ha].read();b?(n[Ua]=null,n[aa]=null,n[Ja]=null,a(oa(b,!1))):(n[aa]=a,n[Ja]=l)},writable:!0}),r));return n[Ua]=null,bE(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[Ja];a!==null&&(n[Ua]=null,n[aa]=null,n[Ja]=null,a(i)),n[af]=i;return}var l=n[aa];l!==null&&(n[Ua]=null,n[aa]=null,n[Ja]=null,l(oa(void 0,!0))),n[Oc]=!0}),e.on("readable",vE.bind(null,n)),n};N2.exports=wE});var G2=V((pI,q2)=>{"use strict";var bI=A(S());function U2(t,e,r,n,i,a,l){try{var b=t[a](l),y=b.value}catch(x){r(x);return}b.done?e(y):Promise.resolve(y).then(n,i)}function AE(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function l(y){U2(a,n,i,l,b,"next",y)}function b(y){U2(a,n,i,l,b,"throw",y)}l(void 0)})}}function H2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function SE(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?H2(Object(r),!0).forEach(function(n){ME(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):H2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function ME(t,e,r){return e=TE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function TE(t){var e=EE(t,"string");return typeof e=="symbol"?e:String(e)}function EE(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _E=ra().codes.ERR_INVALID_ARG_TYPE;function BE(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new _E("iterable",["Iterable"],e);var i=new t(SE({objectMode:!0},r)),a=!1;i._read=function(){a||(a=!0,l())};function l(){return b.apply(this,arguments)}function b(){return b=AE(function*(){try{var y=yield n.next(),x=y.value,_=y.done;_?i.push(null):i.push(yield x)?l():a=!1}catch(C){i.destroy(C)}}),b.apply(this,arguments)}return i}q2.exports=BE});var Rh=V((vI,$2)=>{"use strict";var mI=A(S());$2.exports=Qe;var es;Qe.ReadableState=Z2;var gI=it("events").EventEmitter,K2=function(e,r){return e.listeners(r).length},sf=Ah(),kc=it("buffer").Buffer,CE=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function PE(t){return kc.from(t)}function LE(t){return kc.isBuffer(t)||t instanceof CE}var Nh=it("util"),Oe;Nh&&Nh.debuglog?Oe=Nh.debuglog("stream"):Oe=function(){};var RE=h2(),zh=Th(),FE=Eh(),DE=FE.getHighWaterMark,Nc=ra().codes,IE=Nc.ERR_INVALID_ARG_TYPE,OE=Nc.ERR_STREAM_PUSH_AFTER_EOF,kE=Nc.ERR_METHOD_NOT_IMPLEMENTED,NE=Nc.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ts,Jh,Uh;nr()(Qe,sf);var of=zh.errorOrDestroy,Hh=["error","close","destroy","pause","resume"];function JE(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Z2(t,e,r){es=es||Na(),t=t||{},typeof r!="boolean"&&(r=e instanceof es),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=DE(this,t,"readableHighWaterMark",r),this.buffer=new RE,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(ts||(ts=Oh().StringDecoder),this.decoder=new ts(t.encoding),this.encoding=t.encoding)}function Qe(t){if(es=es||Na(),!(this instanceof Qe))return new Qe(t);var e=this instanceof es;this._readableState=new Z2(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),sf.call(this)}Object.defineProperty(Qe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Qe.prototype.destroy=zh.destroy;Qe.prototype._undestroy=zh.undestroy;Qe.prototype._destroy=function(t,e){e(t)};Qe.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=kc.from(t,e),e=""),n=!0),V2(this,t,e,!1,n)};Qe.prototype.unshift=function(t){return V2(this,t,null,!0,!1)};function V2(t,e,r,n,i){Oe("readableAddChunk",e);var a=t._readableState;if(e===null)a.reading=!1,qE(t,a);else{var l;if(i||(l=UE(a,e)),l)of(t,l);else if(a.objectMode||e&&e.length>0)if(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==kc.prototype&&(e=PE(e)),n)a.endEmitted?of(t,new NE):qh(t,a,e,!0);else if(a.ended)of(t,new OE);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?qh(t,a,e,!1):Xh(t,a)):qh(t,a,e,!1)}else n||(a.reading=!1,Xh(t,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function qh(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Jc(t)),Xh(t,e)}function UE(t,e){var r;return!LE(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new IE("chunk",["string","Buffer","Uint8Array"],e)),r}Qe.prototype.isPaused=function(){return this._readableState.flowing===!1};Qe.prototype.setEncoding=function(t){ts||(ts=Oh().StringDecoder);var e=new ts(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var X2=1073741824;function HE(t){return t>=X2?t=X2:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function z2(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=HE(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Qe.prototype.read=function(t){Oe("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Oe("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Gh(this):Jc(this),null;if(t=z2(t,e),t===0&&e.ended)return e.length===0&&Gh(this),null;var n=e.needReadable;Oe("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,Oe("length less than watermark",n)),e.ended||e.reading?(n=!1,Oe("reading or ended",n)):n&&(Oe("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=z2(r,e)));var i;return t>0?i=W2(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Gh(this)),i!==null&&this.emit("data",i),i};function qE(t,e){if(Oe("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Jc(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,j2(t)))}}function Jc(t){var e=t._readableState;Oe("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Oe("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(j2,t))}function j2(t){var e=t._readableState;Oe("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Kh(t)}function Xh(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(GE,t,e))}function GE(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Oe("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Qe.prototype._read=function(t){of(this,new kE("_read()"))};Qe.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,Oe("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,a=i?b:z;n.endEmitted?process.nextTick(a):r.once("end",a),t.on("unpipe",l);function l(W,X){Oe("onunpipe"),W===r&&X&&X.hasUnpiped===!1&&(X.hasUnpiped=!0,_())}function b(){Oe("onend"),t.end()}var y=XE(r);t.on("drain",y);var x=!1;function _(){Oe("cleanup"),t.removeListener("close",F),t.removeListener("finish",P),t.removeListener("drain",y),t.removeListener("error",D),t.removeListener("unpipe",l),r.removeListener("end",b),r.removeListener("end",z),r.removeListener("data",C),x=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&y()}r.on("data",C);function C(W){Oe("ondata");var X=t.write(W);Oe("dest.write",X),X===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&Y2(n.pipes,t)!==-1)&&!x&&(Oe("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function D(W){Oe("onerror",W),z(),t.removeListener("error",D),K2(t,"error")===0&&of(t,W)}JE(t,"error",D);function F(){t.removeListener("finish",P),z()}t.once("close",F);function P(){Oe("onfinish"),t.removeListener("close",F),z()}t.once("finish",P);function z(){Oe("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(Oe("pipe resume"),r.resume()),t};function XE(t){return function(){var r=t._readableState;Oe("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&K2(t,"data")&&(r.flowing=!0,Kh(t))}}Qe.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var l=Y2(e.pipes,t);return l===-1?this:(e.pipes.splice(l,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Qe.prototype.on=function(t,e){var r=sf.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Oe("on readable",n.length,n.reading),n.length?Jc(this):n.reading||process.nextTick(zE,this)),r};Qe.prototype.addListener=Qe.prototype.on;Qe.prototype.removeListener=function(t,e){var r=sf.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(Q2,this),r};Qe.prototype.removeAllListeners=function(t){var e=sf.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(Q2,this),e};function Q2(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function zE(t){Oe("readable nexttick read 0"),t.read(0)}Qe.prototype.resume=function(){var t=this._readableState;return t.flowing||(Oe("resume"),t.flowing=!t.readableListening,KE(this,t)),t.paused=!1,this};function KE(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(ZE,t,e))}function ZE(t,e){Oe("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Kh(t),e.flowing&&!e.reading&&t.read(0)}Qe.prototype.pause=function(){return Oe("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Oe("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Kh(t){var e=t._readableState;for(Oe("flow",e.flowing);e.flowing&&t.read()!==null;);}Qe.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(Oe("wrapped end"),r.decoder&&!r.ended){var l=r.decoder.end();l&&l.length&&e.push(l)}e.push(null)}),t.on("data",function(l){if(Oe("wrapped data"),r.decoder&&(l=r.decoder.write(l)),!(r.objectMode&&l==null)&&!(!r.objectMode&&(!l||!l.length))){var b=e.push(l);b||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(b){return function(){return t[b].apply(t,arguments)}}(i));for(var a=0;a<Hh.length;a++)t.on(Hh[a],this.emit.bind(this,Hh[a]));return this._read=function(l){Oe("wrapped _read",l),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(Qe.prototype[Symbol.asyncIterator]=function(){return Jh===void 0&&(Jh=J2()),Jh(this)});Object.defineProperty(Qe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Qe.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Qe.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Qe._fromList=W2;Object.defineProperty(Qe.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function W2(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Gh(t){var e=t._readableState;Oe("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(VE,e,t))}function VE(t,e){if(Oe("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Qe.from=function(t,e){return Uh===void 0&&(Uh=G2()),Uh(Qe,t,e)});function Y2(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Zh=V((xI,t3)=>{"use strict";var yI=A(S());t3.exports=_i;var Uc=ra().codes,jE=Uc.ERR_METHOD_NOT_IMPLEMENTED,QE=Uc.ERR_MULTIPLE_CALLBACK,WE=Uc.ERR_TRANSFORM_ALREADY_TRANSFORMING,YE=Uc.ERR_TRANSFORM_WITH_LENGTH_0,Hc=Na();nr()(_i,Hc);function $E(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new QE);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function _i(t){if(!(this instanceof _i))return new _i(t);Hc.call(this,t),this._transformState={afterTransform:$E.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",e_)}function e_(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){e3(t,e,r)}):e3(this,null,null)}_i.prototype.push=function(t,e){return this._transformState.needTransform=!1,Hc.prototype.push.call(this,t,e)};_i.prototype._transform=function(t,e,r){r(new jE("_transform()"))};_i.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};_i.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};_i.prototype._destroy=function(t,e){Hc.prototype._destroy.call(this,t,function(r){e(r)})};function e3(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new YE;if(t._transformState.transforming)throw new WE;return t.push(null)}});var i3=V((wI,n3)=>{"use strict";var AI=A(S());n3.exports=ff;var r3=Zh();nr()(ff,r3);function ff(t){if(!(this instanceof ff))return new ff(t);r3.call(this,t)}ff.prototype._transform=function(t,e,r){r(null,t)}});var c3=V((SI,f3)=>{"use strict";var MI=A(S()),Vh;function t_(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var s3=ra().codes,r_=s3.ERR_MISSING_ARGS,n_=s3.ERR_STREAM_DESTROYED;function a3(t){if(t)throw t}function i_(t){return t.setHeader&&typeof t.abort=="function"}function a_(t,e,r,n){n=t_(n);var i=!1;t.on("close",function(){i=!0}),Vh===void 0&&(Vh=Dc()),Vh(t,{readable:e,writable:r},function(l){if(l)return n(l);i=!0,n()});var a=!1;return function(l){if(!i&&!a){if(a=!0,i_(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(l||new n_("pipe"))}}}function o3(t){t()}function o_(t,e){return t.pipe(e)}function s_(t){return!t.length||typeof t[t.length-1]!="function"?a3:t.pop()}function f_(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=s_(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new r_("streams");var i,a=e.map(function(l,b){var y=b<e.length-1,x=b>0;return a_(l,y,x,function(_){i||(i=_),_&&a.forEach(o3),!y&&(a.forEach(o3),n(i))})});return e.reduce(o_)}f3.exports=f_});var jh=V((dn,uf)=>{var TI=A(S()),cf=it("stream");process.env.READABLE_STREAM==="disable"&&cf?(uf.exports=cf.Readable,Object.assign(uf.exports,cf),uf.exports.Stream=cf):(dn=uf.exports=Rh(),dn.Stream=cf||dn,dn.Readable=dn,dn.Writable=Ch(),dn.Duplex=Na(),dn.Transform=Zh(),dn.PassThrough=i3(),dn.finished=Dc(),dn.pipeline=c3())});var d3=V((EI,l3)=>{var _I=A(S()),{Transform:c_}=jh();l3.exports=t=>class u3 extends c_{constructor(r,n,i,a,l){super(l),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=a,this._options=l,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let a=null;try{this.update(r,n)}catch(l){a=l}i(a)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new u3(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}}});var b3=V((BI,p3)=>{var CI=A(S()),{Transform:u_}=jh();p3.exports=t=>class h3 extends u_{constructor(r,n,i,a){super(a),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=a,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let a=null;try{this.update(r,n)}catch(l){a=l}i(a)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new h3(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}}});var Qh=V((PI,g3)=>{var LI=A(S()),l_=d3(),d_=b3();g3.exports=function(t){let e=l_(t),r=d_(t);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new r(1344,256,31,i);case"shake256":return new r(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}}});var x3=V((RI,m3)=>{var FI=A(S()),v3=mh()(__dirname);if(typeof v3!="function")throw new Error("Native add-on failed to load");m3.exports=Qh()(v3)});var A3=V(w3=>{var II=A(S()),y3=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];w3.p1600=function(t){for(let e=0;e<24;++e){let r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],l=t[4]^t[14]^t[24]^t[34]^t[44],b=t[5]^t[15]^t[25]^t[35]^t[45],y=t[6]^t[16]^t[26]^t[36]^t[46],x=t[7]^t[17]^t[27]^t[37]^t[47],_=t[8]^t[18]^t[28]^t[38]^t[48],C=t[9]^t[19]^t[29]^t[39]^t[49],D=_^(i<<1|a>>>31),F=C^(a<<1|i>>>31),P=t[0]^D,z=t[1]^F,W=t[10]^D,X=t[11]^F,ne=t[20]^D,$=t[21]^F,ae=t[30]^D,ie=t[31]^F,ee=t[40]^D,ce=t[41]^F;D=r^(l<<1|b>>>31),F=n^(b<<1|l>>>31);let te=t[2]^D,Y=t[3]^F,T=t[12]^D,s=t[13]^F,u=t[22]^D,d=t[23]^F,f=t[32]^D,c=t[33]^F,v=t[42]^D,m=t[43]^F;D=i^(y<<1|x>>>31),F=a^(x<<1|y>>>31);let h=t[4]^D,o=t[5]^F,p=t[14]^D,E=t[15]^F,g=t[24]^D,w=t[25]^F,U=t[34]^D,M=t[35]^F,k=t[44]^D,G=t[45]^F;D=l^(_<<1|C>>>31),F=b^(C<<1|_>>>31);let Z=t[6]^D,B=t[7]^F,R=t[16]^D,L=t[17]^F,I=t[26]^D,q=t[27]^F,O=t[36]^D,J=t[37]^F,K=t[46]^D,N=t[47]^F;D=y^(r<<1|n>>>31),F=x^(n<<1|r>>>31);let H=t[8]^D,Q=t[9]^F,j=t[18]^D,re=t[19]^F,De=t[28]^D,se=t[29]^F,le=t[38]^D,Ue=t[39]^F,oe=t[48]^D,fe=t[49]^F,Xe=P,ge=z,ve=X<<4|W>>>28,mt=W<<4|X>>>28,pe=ne<<3|$>>>29,be=$<<3|ne>>>29,Ye=ie<<9|ae>>>23,de=ae<<9|ie>>>23,ue=ee<<18|ce>>>14,Zt=ce<<18|ee>>>14,me=te<<1|Y>>>31,xe=Y<<1|te>>>31,Vt=s<<12|T>>>20,ye=T<<12|s>>>20,we=u<<10|d>>>22,jt=d<<10|u>>>22,Ae=c<<13|f>>>19,Se=f<<13|c>>>19,Qt=v<<2|m>>>30,Me=m<<2|v>>>30,Te=o<<30|h>>>2,Wt=h<<30|o>>>2,Ee=p<<6|E>>>26,_e=E<<6|p>>>26,Yt=w<<11|g>>>21,Be=g<<11|w>>>21,Ce=U<<15|M>>>17,$t=M<<15|U>>>17,Pe=G<<29|k>>>3,Le=k<<29|G>>>3,er=Z<<28|B>>>4,Re=B<<28|Z>>>4,Fe=L<<23|R>>>9,It=R<<23|L>>>9,ke=I<<25|q>>>7,Ne=q<<25|I>>>7,Tt=O<<21|J>>>11,Et=J<<21|O>>>11,_t=N<<24|K>>>8,Bt=K<<24|N>>>8,Ct=H<<27|Q>>>5,gr=Q<<27|H>>>5,vr=j<<20|re>>>12,mr=re<<20|j>>>12,xr=se<<7|De>>>25,yr=De<<7|se>>>25,wr=le<<8|Ue>>>24,Ar=Ue<<8|le>>>24,Sr=oe<<14|fe>>>18,Mr=fe<<14|oe>>>18;t[0]=Xe^~Vt&Yt,t[1]=ge^~ye&Be,t[10]=er^~vr&pe,t[11]=Re^~mr&be,t[20]=me^~Ee&ke,t[21]=xe^~_e&Ne,t[30]=Ct^~ve&we,t[31]=gr^~mt&jt,t[40]=Te^~Fe&xr,t[41]=Wt^~It&yr,t[2]=Vt^~Yt&Tt,t[3]=ye^~Be&Et,t[12]=vr^~pe&Ae,t[13]=mr^~be&Se,t[22]=Ee^~ke&wr,t[23]=_e^~Ne&Ar,t[32]=ve^~we&Ce,t[33]=mt^~jt&$t,t[42]=Fe^~xr&Ye,t[43]=It^~yr&de,t[4]=Yt^~Tt&Sr,t[5]=Be^~Et&Mr,t[14]=pe^~Ae&Pe,t[15]=be^~Se&Le,t[24]=ke^~wr&ue,t[25]=Ne^~Ar&Zt,t[34]=we^~Ce&_t,t[35]=jt^~$t&Bt,t[44]=xr^~Ye&Qt,t[45]=yr^~de&Me,t[6]=Tt^~Sr&Xe,t[7]=Et^~Mr&ge,t[16]=Ae^~Pe&er,t[17]=Se^~Le&Re,t[26]=wr^~ue&me,t[27]=Ar^~Zt&xe,t[36]=Ce^~_t&Ct,t[37]=$t^~Bt&gr,t[46]=Ye^~Qt&Te,t[47]=de^~Me&Wt,t[8]=Sr^~Xe&Vt,t[9]=Mr^~ge&ye,t[18]=Pe^~er&vr,t[19]=Le^~Re&mr,t[28]=ue^~me&Ee,t[29]=Zt^~xe&_e,t[38]=_t^~Ct&ve,t[39]=Bt^~gr&mt,t[48]=Qt^~Te&Fe,t[49]=Me^~Wt&It,t[0]^=y3[e*2],t[1]^=y3[e*2+1]}}});var M3=V((OI,S3)=>{var kI=A(S()),qc=A3();function rs(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}rs.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};rs.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(qc.p1600(this.state),this.count=0)};rs.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<8*(this.count%4),t&128&&this.count===this.blockSize-1&&qc.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),qc.p1600(this.state),this.count=0,this.squeezing=!0};rs.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);let e=Buffer.alloc(t);for(let r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(qc.p1600(this.state),this.count=0);return e};rs.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};S3.exports=rs});var E3=V((NI,T3)=>{var JI=A(S());T3.exports=Qh()(M3())});var _3=V((UI,Wh)=>{var HI=A(S());try{Wh.exports=x3()}catch{Wh.exports=E3()}});var $J=A(S(),1);var QN=A(S(),1);var nB=A(S(),1);var q_=A(S(),1),yt={module:"ISShJH1ij-hPPt9St5UFFr_8Ys3Kj5cyg7zrMGt7H9s",scheduler:"_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA",mu:"fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY",src:{asset:"sZIr_sxx49iQVGO6Qo_VHzLnoUxID8yEI4yPSusRHTw",collection:"x35anB0wqaCdjtketSkiLPrH4_jR_GWSUFTSK8fyaZU",collectionActivity:"qjpg3ramJVb2iF6O5BAUfKInQ0UHhi3NqfELh73qKGw",comments:"HxZOaxNkL5o0QjAFmoU67HNwaMi7TEjUTmF7rfd2Ye0",moderation:"TGCoo6JDvZ7JY_E5Smz5VQiI9ncc6uXI8tU_snAodl0",zone:{id:"59YCoqcuTgLDyGQMJNO8_72pfMnwjo6LvkxfpQ5mAIE",version:"0.0.22"}},collectionRegistry:"zwKi27GuKS3GOlwL3EhNGH02SJDDAO5Uy43ZJwomhZ4"},Tp={defaultNode:"https://forward.computer"},Ep={"application/json":{type:"application/json",serialize:t=>JSON.stringify(t)}},Pn={arweave:"arweave.net",ao:"ao-search-gateway.goldsky.com"};var Ve={keys:{access:"Access-Fee",ans110:{title:"Title",description:"Description",topic:"Topic:*",type:"Type",implements:"Implements",license:"License"},assetType:"Asset-Type",banner:"Banner",bootloader:"Bootloader",collectionId:"Collection-Id",collectionName:"Collection-Name",commericalUse:"Commercial-Use",contentType:"Content-Type",creator:"Creator",currency:"Currency",dataModelTraining:"Data-Model-Training",dataProtocol:"Data-Protocol",dateCreated:"Date-Created",derivations:"Derivations",description:"Description",displayName:"Display-Name",handle:"Handle",implements:"Implements",initialOwner:"Initial-Owner",license:"License",name:"Name",onBoot:"On-Boot",paymentAddress:"Payment-Address",paymentMode:"Payment-Mode",profileCreator:"Profile-Creator",profileIndex:"Profile-Index",protocolName:"Protocol-Name",renderWith:"Render-With",thumbnail:"Thumbnail",title:"Title",topic:"Topic",type:"Type",zoneType:"Zone-Type"},values:{dataProtocol:"ao",document:"Document",user:"User"}},hu={node1:"https://turbo.ardrive.io",batchSize:1,chunkSize:75e5,dispatchUploadSize:100*1024};var V_=A(S(),1);var z_=A(S(),1);function tr(t){return t?/^[a-z0-9_-]{43}$/i.test(t):!1}function Ya(t,e){for(let r=0;r<t.length;r++)if(t[r]&&t[r].name===e)return t[r].value;return null}function _p(t){let e=t.match(/^data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+);base64,/);return e?e[1]:null}function Bp(t){return t.split(",")[1]}function Cp(t){let e;if(t instanceof Uint8Array)e=t.byteLength;else if(t instanceof ArrayBuffer)e=t.byteLength;else if(typeof t=="string")e=new TextEncoder().encode(t).byteLength;else if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(t))e=t.length;else throw new Error("Input must be a string, Uint8Array, ArrayBuffer, or Buffer");return e}function pu(t){let e;return e=t.replace(/\[|\]/g,""),`[[${e}]]`}function as(t){let e;return e=t.replace(/\[|\]/g,""),e}var $e=(...t)=>{console.log("[@permaweb/libs]",...t)};function I8(t){return t.replace(/^[a-z]/,e=>e.toUpperCase())}function Wa(t){return Array.isArray(t)?t.map(Wa):t&&typeof t=="object"?Object.entries(t).reduce((e,[r,n])=>{let i=I8(r);return e[i]=tr(n)?n:Wa(n),e},{}):t}function O8(t){return t.charAt(0).toLowerCase()+t.slice(1)}function sr(t){return Array.isArray(t)?t.map(sr):t&&typeof t=="object"?Object.entries(t).reduce((e,[r,n])=>{if(typeof r=="string"&&r.toLowerCase()==="commitments")return e;let i=tr(r)||r.includes("-")?r:O8(r);return e[i]=tr(n)?n:sr(n),e},{}):t}function fr(t,e){let r=t.charAt(0).toUpperCase()+t.slice(1);return{name:`${Ve.keys.bootloader}-${r}`,value:e}}function Pf(t){return tr(t)||t.startsWith("data")}function bu(t){return t.map(e=>({...e,value:e.value?.replace(/\r?\n/g," ")??""}))}async function gu(t,e={}){let{maxRetries:r=3,delayMs:n=1e3,backoff:i=!0,validate:a}=e,l,b;for(let y=0;y<r;y++)try{let x=await t();if(!a||a(x))return y>0&&$e(`Success on attempt ${y+1}`),x;if(b=x,y<r-1){let _=i?n*Math.pow(2,y):n;$e(`Validation failed on attempt ${y+1}/${r}, retrying in ${_}ms...`),await new Promise(C=>setTimeout(C,_))}}catch(x){if(l=x,y<r-1){let _=i?n*Math.pow(2,y):n;$e(`Error on attempt ${y+1}/${r}: ${l.message}, retrying in ${_}ms...`),await new Promise(C=>setTimeout(C,_))}}if(l)throw $e(`Failed after ${r} attempts: ${l.message}`),l;return $e(`Validation failed after ${r} attempts`),b}function Pp(t){return t.map(e=>({...e,name:e.name.toLowerCase()}))}var k8="https://arweave.net";function Lf(t){return`${k8}/${t}`}var W_=A(S(),1);var Rf={p1:"P1",end:"END"},vu={default:100};function Ln(t){return async e=>{let r=e.paginator?e.paginator:vu.default,n=[],i=0,a=null;if(e.ids&&!e.ids.length)return{data:n,count:i,nextCursor:a,previousCursor:null};try{let l=J8(e),b=await U8({gateway:e.gateway??t.gateway??Pn.ao,query:N8(l)});return e.id&&b?.data?.transaction?(n=[{cursor:null,node:b.data.transaction}],i=1,a=Rf.end,{data:n,count:i,nextCursor:a,previousCursor:null}):b?.data?.transactions?.edges?.length?(n=[...b.data.transactions.edges],i=b.data.transactions.count??0,n.length<r||b.data.transactions?.pageInfo?.hasNextPage===!1?a=Rf.end:a=n[n.length-1].cursor,{data:n,count:i,nextCursor:a,previousCursor:null}):{data:n,count:i,nextCursor:a,previousCursor:null}}catch(l){return console.error(l),{data:n,count:i,nextCursor:a,previousCursor:null}}}}function Lp(t){return async(e,r)=>{let n=Ln(t),i=1,a=await n(e);if(a&&a.data.length){let l=a.data;for(r&&r(`Count: ${a.count}`),r&&r(`Pages to fetch: ${Math.ceil(a.count/(e.paginator??vu.default))}`),r&&r(`Page ${i} fetched`);a.nextCursor&&a.nextCursor!==Rf.end;)i+=1,r&&r(`Fetching page ${i}...`),a=await n({...e,cursor:a.nextCursor}),a&&a.data.length&&(l=l.concat(a.data));return r&&r("All pages fetched!"),l}else r&&r("No data found");return null}}function N8(t){let e={query:`query { ${t} }`};return JSON.stringify(e)}function J8(t){let e=t.paginator?t.paginator:vu.default,r=t.id?`"${t.id}"`:null,n=t.ids?JSON.stringify(t.ids):null,i=null;t.minBlock!==void 0&&t.minBlock!==null&&(i||(i={}),i.min=t.minBlock),t.maxBlock!==void 0&&t.maxBlock!==null&&(i||(i={}),i.max=t.maxBlock);let a=i?JSON.stringify(i).replace(/"([^"]+)":/g,"$1:"):null,l=t.tags?JSON.stringify(t.tags).replace(/"(name)":/g,"$1:").replace(/"(values)":/g,"$1:").replace(/"match"/g,"match").replace(/"FUZZY_OR"/g,"FUZZY_OR").replace(/"WILDCARD"/g,"WILDCARD"):null,b=t.owners?JSON.stringify(t.owners):null,y=t.recipients?JSON.stringify(t.recipients):null,x=t.cursor&&t.cursor!==Rf.end?`"${t.cursor}"`:null,_="";if(t.sort)switch(_+="sort: ",t.sort){case"ascending":_+="INGESTED_AT_ASC";break;case"descending":_+="INGESTED_AT_DESC";break}let C=`first: ${e}`,D="",F="data { size type } owner { address } block { height timestamp }",P="";switch(t.gateway??Pn.ao){case Pn.arweave:break;case Pn.ao:x||(D="count"),y&&(P=`recipients: ${y}`),F+=" recipient";break}if(r){let ne=`
14
+ `);function b(y){var x=bh(Ti.join(y,"prebuilds")).map(Zy),_=x.filter(Vy(hh,dh)).sort(jy)[0];if(_){var C=Ti.join(y,"prebuilds",_.name),D=bh(C).map(Qy),F=D.filter(Wy(lh,Jy)),P=F.sort(Yy(lh))[0];if(P)return Ti.join(C,P.file)}}};function bh(t){try{return qy.readdirSync(t)}catch{return[]}}function Uy(t,e){var r=bh(t).filter(e);return r[0]&&Ti.join(t,r[0])}function Hy(t){return/\.node$/.test(t)}function Zy(t){var e=t.split("-");if(e.length===2){var r=e[0],n=e[1].split("+");if(r&&n.length&&n.every(Boolean))return{name:t,platform:r,architectures:n}}}function Vy(t,e){return function(r){return r==null||r.platform!==t?!1:r.architectures.includes(e)}}function jy(t,e){return t.architectures.length-e.architectures.length}function Qy(t){var e=t.split("."),r=e.pop(),n={file:t,specificity:0};if(r==="node"){for(var i=0;i<e.length;i++){var a=e[i];if(a==="node"||a==="electron"||a==="node-webkit")n.runtime=a;else if(a==="napi")n.napi=!0;else if(a.slice(0,3)==="abi")n.abi=a.slice(3);else if(a.slice(0,2)==="uv")n.uv=a.slice(2);else if(a.slice(0,4)==="armv")n.armv=a.slice(4);else if(a==="glibc"||a==="musl")n.libc=a;else continue;n.specificity++}return n}}function Wy(t,e){return function(r){return!(r==null||r.runtime&&r.runtime!==t&&!WM(r)||r.abi&&r.abi!==e&&!r.napi||r.uv&&r.uv!==Ky||r.armv&&r.armv!==ph||r.libc&&r.libc!==zy)}}function WM(t){return t.runtime==="node"&&t.napi}function Yy(t){return function(e,r){return e.runtime!==r.runtime?e.runtime===t?-1:1:e.abi!==r.abi?e.abi?-1:1:e.specificity!==r.specificity?e.specificity>r.specificity?-1:1:0}}function YM(){return!!(process.versions&&process.versions.nw)}function $M(){return process.versions&&process.versions.electron||process.env.ELECTRON_RUN_AS_NODE?!0:typeof window<"u"&&window.process&&window.process.type==="renderer"}function eT(t){return t==="linux"&&qy.existsSync("/etc/alpine-release")}ii.parseTags=Qy;ii.matchTags=Wy;ii.compareTags=Yy;ii.parseTuple=Zy;ii.matchTuple=Vy;ii.compareTuples=jy});var mh=V((FD,vh)=>{var DD=A(S()),gh=typeof __webpack_require__=="function"?__non_webpack_require__:it;typeof gh.addon=="function"?vh.exports=gh.addon.bind(gh):vh.exports=e2()});var xh=V((OD,t2)=>{var kD=A(S()),We={IMPOSSIBLE_CASE:"Impossible case. Please create issue.",TWEAK_ADD:"The tweak was out of range or the resulted private key is invalid",TWEAK_MUL:"The tweak was out of range or equal to zero",CONTEXT_RANDOMIZE_UNKNOW:"Unknow error on context randomization",SECKEY_INVALID:"Private Key is invalid",PUBKEY_PARSE:"Public Key could not be parsed",PUBKEY_SERIALIZE:"Public Key serialization error",PUBKEY_COMBINE:"The sum of the public keys is not valid",SIG_PARSE:"Signature could not be parsed",SIGN:"The nonce generation function failed, or the private key was invalid",RECOVER:"Public key could not be recover",ECDH:"Scalar was invalid (zero or overflow)"};function un(t,e){if(!t)throw new Error(e)}function Ve(t,e,r){if(un(e instanceof Uint8Array,`Expected ${t} to be an Uint8Array`),r!==void 0)if(Array.isArray(r)){let n=r.join(", "),i=`Expected ${t} to be an Uint8Array with length [${n}]`;un(r.includes(e.length),i)}else{let n=`Expected ${t} to be an Uint8Array with length ${r}`;un(e.length===r,n)}}function ka(t){un(Qo(t)==="Boolean","Expected compressed to be a Boolean")}function _n(t=r=>new Uint8Array(r),e){return typeof t=="function"&&(t=t(e)),Ve("output",t,e),t}function Qo(t){return Object.prototype.toString.call(t).slice(8,-1)}t2.exports=t=>({contextRandomize(e){switch(un(e===null||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),e!==null&&Ve("seed",e,32),t.contextRandomize(e)){case 1:throw new Error(We.CONTEXT_RANDOMIZE_UNKNOW)}},privateKeyVerify(e){return Ve("private key",e,32),t.privateKeyVerify(e)===0},privateKeyNegate(e){switch(Ve("private key",e,32),t.privateKeyNegate(e)){case 0:return e;case 1:throw new Error(We.IMPOSSIBLE_CASE)}},privateKeyTweakAdd(e,r){switch(Ve("private key",e,32),Ve("tweak",r,32),t.privateKeyTweakAdd(e,r)){case 0:return e;case 1:throw new Error(We.TWEAK_ADD)}},privateKeyTweakMul(e,r){switch(Ve("private key",e,32),Ve("tweak",r,32),t.privateKeyTweakMul(e,r)){case 0:return e;case 1:throw new Error(We.TWEAK_MUL)}},publicKeyVerify(e){return Ve("public key",e,[33,65]),t.publicKeyVerify(e)===0},publicKeyCreate(e,r=!0,n){switch(Ve("private key",e,32),ka(r),n=_n(n,r?33:65),t.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error(We.SECKEY_INVALID);case 2:throw new Error(We.PUBKEY_SERIALIZE)}},publicKeyConvert(e,r=!0,n){switch(Ve("public key",e,[33,65]),ka(r),n=_n(n,r?33:65),t.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.PUBKEY_SERIALIZE)}},publicKeyNegate(e,r=!0,n){switch(Ve("public key",e,[33,65]),ka(r),n=_n(n,r?33:65),t.publicKeyNegate(n,e)){case 0:return n;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.IMPOSSIBLE_CASE);case 3:throw new Error(We.PUBKEY_SERIALIZE)}},publicKeyCombine(e,r=!0,n){un(Array.isArray(e),"Expected public keys to be an Array"),un(e.length>0,"Expected public keys array will have more than zero items");for(let i of e)Ve("public key",i,[33,65]);switch(ka(r),n=_n(n,r?33:65),t.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.PUBKEY_COMBINE);case 3:throw new Error(We.PUBKEY_SERIALIZE)}},publicKeyTweakAdd(e,r,n=!0,i){switch(Ve("public key",e,[33,65]),Ve("tweak",r,32),ka(n),i=_n(i,n?33:65),t.publicKeyTweakAdd(i,e,r)){case 0:return i;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.TWEAK_ADD)}},publicKeyTweakMul(e,r,n=!0,i){switch(Ve("public key",e,[33,65]),Ve("tweak",r,32),ka(n),i=_n(i,n?33:65),t.publicKeyTweakMul(i,e,r)){case 0:return i;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.TWEAK_MUL)}},signatureNormalize(e){switch(Ve("signature",e,64),t.signatureNormalize(e)){case 0:return e;case 1:throw new Error(We.SIG_PARSE)}},signatureExport(e,r){Ve("signature",e,64),r=_n(r,72);let n={output:r,outputlen:72};switch(t.signatureExport(n,e)){case 0:return r.slice(0,n.outputlen);case 1:throw new Error(We.SIG_PARSE);case 2:throw new Error(We.IMPOSSIBLE_CASE)}},signatureImport(e,r){switch(Ve("signature",e),r=_n(r,64),t.signatureImport(r,e)){case 0:return r;case 1:throw new Error(We.SIG_PARSE);case 2:throw new Error(We.IMPOSSIBLE_CASE)}},ecdsaSign(e,r,n={},i){Ve("message",e,32),Ve("private key",r,32),un(Qo(n)==="Object","Expected options to be an Object"),n.data!==void 0&&Ve("options.data",n.data),n.noncefn!==void 0&&un(Qo(n.noncefn)==="Function","Expected options.noncefn to be a Function"),i=_n(i,64);let a={signature:i,recid:null};switch(t.ecdsaSign(a,e,r,n.data,n.noncefn)){case 0:return a;case 1:throw new Error(We.SIGN);case 2:throw new Error(We.IMPOSSIBLE_CASE)}},ecdsaVerify(e,r,n){switch(Ve("signature",e,64),Ve("message",r,32),Ve("public key",n,[33,65]),t.ecdsaVerify(e,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(We.SIG_PARSE);case 2:throw new Error(We.PUBKEY_PARSE)}},ecdsaRecover(e,r,n,i=!0,a){switch(Ve("signature",e,64),un(Qo(r)==="Number"&&r>=0&&r<=3,"Expected recovery id to be a Number within interval [0, 3]"),Ve("message",n,32),ka(i),a=_n(a,i?33:65),t.ecdsaRecover(a,e,r,n)){case 0:return a;case 1:throw new Error(We.SIG_PARSE);case 2:throw new Error(We.RECOVER);case 3:throw new Error(We.IMPOSSIBLE_CASE)}},ecdh(e,r,n={},i){switch(Ve("public key",e,[33,65]),Ve("private key",r,32),un(Qo(n)==="Object","Expected options to be an Object"),n.data!==void 0&&Ve("options.data",n.data),n.hashfn!==void 0?(un(Qo(n.hashfn)==="Function","Expected options.hashfn to be a Function"),n.xbuf!==void 0&&Ve("options.xbuf",n.xbuf,32),n.ybuf!==void 0&&Ve("options.ybuf",n.ybuf,32),Ve("output",i)):i=_n(i,32),t.ecdh(i,e,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return i;case 1:throw new Error(We.PUBKEY_PARSE);case 2:throw new Error(We.ECDH)}}})});var n2=V((ND,r2)=>{var JD=A(S()),tT=mh()(__dirname);r2.exports=xh()(new tT.Secp256k1)});var a2=V((UD,i2)=>{var HD=A(S()),rT=Bd().ec,ai=new rT("secp256k1"),Ge=ai.curve,st=Ge.n.constructor;function nT(t,e){let r=new st(e);if(r.cmp(Ge.p)>=0)return null;r=r.toRed(Ge.red);let n=r.redSqr().redIMul(r).redIAdd(Ge.b).redSqrt();t===3!==n.isOdd()&&(n=n.redNeg());let i=r.redSqr().redIMul(r);return n.redSqr().redISub(i.redIAdd(Ge.b)).isZero()?ai.keyPair({pub:{x:r,y:n}}):null}function iT(t,e,r){let n=new st(e),i=new st(r);if(n.cmp(Ge.p)>=0||i.cmp(Ge.p)>=0||(n=n.toRed(Ge.red),i=i.toRed(Ge.red),(t===6||t===7)&&i.isOdd()!==(t===7)))return null;let a=n.redSqr().redIMul(n);return i.redSqr().redISub(a.redIAdd(Ge.b)).isZero()?ai.keyPair({pub:{x:n,y:i}}):null}function ta(t){let e=t[0];switch(e){case 2:case 3:return t.length!==33?null:nT(e,t.subarray(1,33));case 4:case 6:case 7:return t.length!==65?null:iT(e,t.subarray(1,33),t.subarray(33,65));default:return null}}function Na(t,e){let r=e.encode(null,t.length===33);for(let n=0;n<t.length;++n)t[n]=r[n]}i2.exports={contextRandomize(){return 0},privateKeyVerify(t){let e=new st(t);return e.cmp(Ge.n)<0&&!e.isZero()?0:1},privateKeyNegate(t){let e=new st(t),r=Ge.n.sub(e).umod(Ge.n).toArrayLike(Uint8Array,"be",32);return t.set(r),0},privateKeyTweakAdd(t,e){let r=new st(e);if(r.cmp(Ge.n)>=0||(r.iadd(new st(t)),r.cmp(Ge.n)>=0&&r.isub(Ge.n),r.isZero()))return 1;let n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},privateKeyTweakMul(t,e){let r=new st(e);if(r.cmp(Ge.n)>=0||r.isZero())return 1;r.imul(new st(t)),r.cmp(Ge.n)>=0&&(r=r.umod(Ge.n));let n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},publicKeyVerify(t){return ta(t)===null?1:0},publicKeyCreate(t,e){let r=new st(e);if(r.cmp(Ge.n)>=0||r.isZero())return 1;let n=ai.keyFromPrivate(e).getPublic();return Na(t,n),0},publicKeyConvert(t,e){let r=ta(e);if(r===null)return 1;let n=r.getPublic();return Na(t,n),0},publicKeyNegate(t,e){let r=ta(e);if(r===null)return 1;let n=r.getPublic();return n.y=n.y.redNeg(),Na(t,n),0},publicKeyCombine(t,e){let r=new Array(e.length);for(let i=0;i<e.length;++i)if(r[i]=ta(e[i]),r[i]===null)return 1;let n=r[0].getPublic();for(let i=1;i<r.length;++i)n=n.add(r[i].pub);return n.isInfinity()?2:(Na(t,n),0)},publicKeyTweakAdd(t,e,r){let n=ta(e);if(n===null)return 1;if(r=new st(r),r.cmp(Ge.n)>=0)return 2;let i=n.getPublic().add(Ge.g.mul(r));return i.isInfinity()?2:(Na(t,i),0)},publicKeyTweakMul(t,e,r){let n=ta(e);if(n===null)return 1;if(r=new st(r),r.cmp(Ge.n)>=0||r.isZero())return 2;let i=n.getPublic().mul(r);return Na(t,i),0},signatureNormalize(t){let e=new st(t.subarray(0,32)),r=new st(t.subarray(32,64));return e.cmp(Ge.n)>=0||r.cmp(Ge.n)>=0?1:(r.cmp(ai.nh)===1&&t.set(Ge.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(t,e){let r=e.subarray(0,32),n=e.subarray(32,64);if(new st(r).cmp(Ge.n)>=0||new st(n).cmp(Ge.n)>=0)return 1;let{output:i}=t,a=i.subarray(4,37);a[0]=0,a.set(r,1);let l=33,b=0;for(;l>1&&a[b]===0&&!(a[b+1]&128);--l,++b);if(a=a.subarray(b),a[0]&128||l>1&&a[0]===0&&!(a[1]&128))return 1;let y=i.subarray(39,72);y[0]=0,y.set(n,1);let x=33,_=0;for(;x>1&&y[_]===0&&!(y[_+1]&128);--x,++_);return y=y.subarray(_),y[0]&128||x>1&&y[0]===0&&!(y[1]&128)?1:(t.outputlen=6+l+x,i[0]=48,i[1]=t.outputlen-2,i[2]=2,i[3]=a.length,i.set(a,4),i[4+l]=2,i[5+l]=y.length,i.set(y,6+l),0)},signatureImport(t,e){if(e.length<8||e.length>72||e[0]!==48||e[1]!==e.length-2||e[2]!==2)return 1;let r=e[3];if(r===0||5+r>=e.length||e[4+r]!==2)return 1;let n=e[5+r];if(n===0||6+r+n!==e.length||e[4]&128||r>1&&e[4]===0&&!(e[5]&128)||e[r+6]&128||n>1&&e[r+6]===0&&!(e[r+7]&128))return 1;let i=e.subarray(4,4+r);if(i.length===33&&i[0]===0&&(i=i.subarray(1)),i.length>32)return 1;let a=e.subarray(6+r);if(a.length===33&&a[0]===0&&(a=a.slice(1)),a.length>32)throw new Error("S length is too long");let l=new st(i);l.cmp(Ge.n)>=0&&(l=new st(0));let b=new st(e.subarray(6+r));return b.cmp(Ge.n)>=0&&(b=new st(0)),t.set(l.toArrayLike(Uint8Array,"be",32),0),t.set(b.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(t,e,r,n,i){if(i){let b=i;i=y=>{let x=b(e,r,null,n,y);if(!(x instanceof Uint8Array&&x.length===32))throw new Error("This is the way");return new st(x)}}let a=new st(r);if(a.cmp(Ge.n)>=0||a.isZero())return 1;let l;try{l=ai.sign(e,r,{canonical:!0,k:i,pers:n})}catch{return 1}return t.signature.set(l.r.toArrayLike(Uint8Array,"be",32),0),t.signature.set(l.s.toArrayLike(Uint8Array,"be",32),32),t.recid=l.recoveryParam,0},ecdsaVerify(t,e,r){let n={r:t.subarray(0,32),s:t.subarray(32,64)},i=new st(n.r),a=new st(n.s);if(i.cmp(Ge.n)>=0||a.cmp(Ge.n)>=0)return 1;if(a.cmp(ai.nh)===1||i.isZero()||a.isZero())return 3;let l=ta(r);if(l===null)return 2;let b=l.getPublic();return ai.verify(e,n,b)?0:3},ecdsaRecover(t,e,r,n){let i={r:e.slice(0,32),s:e.slice(32,64)},a=new st(i.r),l=new st(i.s);if(a.cmp(Ge.n)>=0||l.cmp(Ge.n)>=0)return 1;if(a.isZero()||l.isZero())return 2;let b;try{b=ai.recoverPubKey(n,i,r)}catch{return 2}return Na(t,b),0},ecdh(t,e,r,n,i,a,l){let b=ta(e);if(b===null)return 1;let y=new st(r);if(y.cmp(Ge.n)>=0||y.isZero())return 2;let x=b.getPublic().mul(y);if(i===void 0){let _=x.encode(null,!0),C=ai.hash().update(_).digest();for(let D=0;D<32;++D)t[D]=C[D]}else{a||(a=new Uint8Array(32));let _=x.getX().toArray("be",32);for(let P=0;P<32;++P)a[P]=_[P];l||(l=new Uint8Array(32));let C=x.getY().toArray("be",32);for(let P=0;P<32;++P)l[P]=C[P];let D=i(a,l,n);if(!(D instanceof Uint8Array&&D.length===t.length))return 2;t.set(D)}return 0}}});var s2=V((qD,o2)=>{var GD=A(S());o2.exports=xh()(a2())});var wh=V((XD,yh)=>{var zD=A(S());try{yh.exports=n2()}catch{yh.exports=s2()}});var Ah=V((KD,f2)=>{var ZD=A(S());f2.exports=it("stream")});var p2=V((VD,h2)=>{"use strict";var jD=A(S());function c2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function u2(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?c2(Object(r),!0).forEach(function(n){aT(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function aT(t,e,r){return e=d2(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oT(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l2(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d2(n.key),n)}}function sT(t,e,r){return e&&l2(t.prototype,e),r&&l2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function d2(t){var e=fT(t,"string");return typeof e=="symbol"?e:String(e)}function fT(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var cT=it("buffer"),_c=cT.Buffer,uT=it("util"),Sh=uT.inspect,lT=Sh&&Sh.custom||"inspect";function dT(t,e,r){_c.prototype.copy.call(t,e,r)}h2.exports=function(){function t(){oT(this,t),this.head=null,this.tail=null,this.length=0}return sT(t,[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(this.length===0)return _c.alloc(0);for(var n=_c.allocUnsafe(r>>>0),i=this.head,a=0;i;)dT(i.data,n,a),a+=i.data.length,i=i.next;return n}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?i=this.shift():i=n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,a=n.data;for(r-=a.length;n=n.next;){var l=n.data,b=r>l.length?l.length:r;if(b===l.length?a+=l:a+=l.slice(0,r),r-=b,r===0){b===l.length?(++i,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=l.slice(b));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=_c.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var l=i.data,b=r>l.length?l.length:r;if(l.copy(n,n.length-r,0,b),r-=b,r===0){b===l.length?(++a,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=l.slice(b));break}++a}return this.length-=a,n}},{key:lT,value:function(r,n){return Sh(this,u2(u2({},n),{},{depth:0,customInspect:!1}))}}]),t}()});var Th=V((QD,g2)=>{"use strict";var WD=A(S());function hT(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Mh,this,t)):process.nextTick(Mh,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted?process.nextTick(Bc,r):(r._writableState.errorEmitted=!0,process.nextTick(b2,r,a)):process.nextTick(b2,r,a):e?(process.nextTick(Bc,r),e(a)):process.nextTick(Bc,r)}),this)}function b2(t,e){Mh(t,e),Bc(t)}function Bc(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function pT(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Mh(t,e){t.emit("error",e)}function bT(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}g2.exports={destroy:hT,undestroy:pT,errorOrDestroy:bT}});var ra=V((YD,x2)=>{"use strict";var $D=A(S()),m2={};function ln(t,e,r){r||(r=Error);function n(a,l,b){return typeof e=="string"?e:e(a,l,b)}class i extends r{constructor(l,b,y){super(n(l,b,y))}}i.prototype.name=r.name,i.prototype.code=t,m2[t]=i}function v2(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(n=>String(n)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function gT(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function vT(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function mT(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}ln("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);ln("ERR_INVALID_ARG_TYPE",function(t,e,r){let n;typeof e=="string"&&gT(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";let i;if(vT(t," argument"))i=`The ${t} ${n} ${v2(e,"type")}`;else{let a=mT(t,".")?"property":"argument";i=`The "${t}" ${a} ${n} ${v2(e,"type")}`}return i+=`. Received type ${typeof r}`,i},TypeError);ln("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");ln("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});ln("ERR_STREAM_PREMATURE_CLOSE","Premature close");ln("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});ln("ERR_MULTIPLE_CALLBACK","Callback called multiple times");ln("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");ln("ERR_STREAM_WRITE_AFTER_END","write after end");ln("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);ln("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);ln("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");x2.exports.codes=m2});var Eh=V((eI,y2)=>{"use strict";var tI=A(S()),xT=ra().codes.ERR_INVALID_OPT_VALUE;function yT(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function wT(t,e,r,n){var i=yT(e,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new xT(a,i)}return Math.floor(i)}return t.objectMode?16:16*1024}y2.exports={getHighWaterMark:wT}});var A2=V((rI,w2)=>{var nI=A(S());w2.exports=it("util").deprecate});var Ch=V((iI,B2)=>{"use strict";var aI=A(S());B2.exports=vt;function M2(t){var e=this;this.next=null,this.entry=null,this.finish=function(){VT(e,t)}}var Wo;vt.WritableState=nf;var AT={deprecate:A2()},T2=Ah(),Pc=it("buffer").Buffer,ST=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function MT(t){return Pc.from(t)}function TT(t){return Pc.isBuffer(t)||t instanceof ST}var Bh=Th(),ET=Eh(),_T=ET.getHighWaterMark,na=ra().codes,BT=na.ERR_INVALID_ARG_TYPE,CT=na.ERR_METHOD_NOT_IMPLEMENTED,PT=na.ERR_MULTIPLE_CALLBACK,LT=na.ERR_STREAM_CANNOT_PIPE,RT=na.ERR_STREAM_DESTROYED,FT=na.ERR_STREAM_NULL_VALUES,DT=na.ERR_STREAM_WRITE_AFTER_END,IT=na.ERR_UNKNOWN_ENCODING,Yo=Bh.errorOrDestroy;nr()(vt,T2);function OT(){}function nf(t,e,r){Wo=Wo||Ja(),t=t||{},typeof r!="boolean"&&(r=e instanceof Wo),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=_T(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=t.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(i){GT(e,i)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new M2(this)}nf.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(nf.prototype,"buffer",{get:AT.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Cc;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Cc=Function.prototype[Symbol.hasInstance],Object.defineProperty(vt,Symbol.hasInstance,{value:function(e){return Cc.call(this,e)?!0:this!==vt?!1:e&&e._writableState instanceof nf}})):Cc=function(e){return e instanceof this};function vt(t){Wo=Wo||Ja();var e=this instanceof Wo;if(!e&&!Cc.call(vt,this))return new vt(t);this._writableState=new nf(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),T2.call(this)}vt.prototype.pipe=function(){Yo(this,new LT)};function kT(t,e){var r=new DT;Yo(t,r),process.nextTick(e,r)}function NT(t,e,r,n){var i;return r===null?i=new FT:typeof r!="string"&&!e.objectMode&&(i=new BT("chunk",["string","Buffer"],r)),i?(Yo(t,i),process.nextTick(n,i),!1):!0}vt.prototype.write=function(t,e,r){var n=this._writableState,i=!1,a=!n.objectMode&&TT(t);return a&&!Pc.isBuffer(t)&&(t=MT(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=n.defaultEncoding),typeof r!="function"&&(r=OT),n.ending?kT(this,r):(a||NT(this,n,t,r))&&(n.pendingcb++,i=UT(this,n,a,t,e,r)),i};vt.prototype.cork=function(){this._writableState.corked++};vt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&E2(this,t))};vt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new IT(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(vt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function JT(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Pc.from(e,r)),e}Object.defineProperty(vt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function UT(t,e,r,n,i,a){if(!r){var l=JT(e,n,i);n!==l&&(r=!0,i="buffer",n=l)}var b=e.objectMode?1:n.length;e.length+=b;var y=e.length<e.highWaterMark;if(y||(e.needDrain=!0),e.writing||e.corked){var x=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},x?x.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else _h(t,e,!1,b,n,i,a);return y}function _h(t,e,r,n,i,a,l){e.writelen=n,e.writecb=l,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new RT("write")):r?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function HT(t,e,r,n,i){--e.pendingcb,r?(process.nextTick(i,n),process.nextTick(rf,t,e),t._writableState.errorEmitted=!0,Yo(t,n)):(i(n),t._writableState.errorEmitted=!0,Yo(t,n),rf(t,e))}function qT(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function GT(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(typeof i!="function")throw new PT;if(qT(r),e)HT(t,r,n,e,i);else{var a=_2(r)||t.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&E2(t,r),n?process.nextTick(S2,t,r,a,i):S2(t,r,a,i)}}function S2(t,e,r,n){r||XT(t,e),e.pendingcb--,n(),rf(t,e)}function XT(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function E2(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var l=0,b=!0;r;)i[l]=r,r.isBuf||(b=!1),r=r.next,l+=1;i.allBuffers=b,_h(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new M2(e),e.bufferedRequestCount=0}else{for(;r;){var y=r.chunk,x=r.encoding,_=r.callback,C=e.objectMode?1:y.length;if(_h(t,e,!1,C,y,x,_),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}vt.prototype._write=function(t,e,r){r(new CT("_write()"))};vt.prototype._writev=null;vt.prototype.end=function(t,e,r){var n=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||ZT(this,n,r),this};Object.defineProperty(vt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function _2(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function zT(t,e){t._final(function(r){e.pendingcb--,r&&Yo(t,r),e.prefinished=!0,t.emit("prefinish"),rf(t,e)})}function KT(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(zT,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function rf(t,e){var r=_2(e);if(r&&(KT(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}function ZT(t,e,r){e.ending=!0,rf(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function VT(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}Object.defineProperty(vt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});vt.prototype.destroy=Bh.destroy;vt.prototype._undestroy=Bh.undestroy;vt.prototype._destroy=function(t,e){e(t)}});var Ja=V((oI,P2)=>{"use strict";var sI=A(S()),jT=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};P2.exports=oi;var C2=Rh(),Lh=Ch();nr()(oi,C2);for(Ph=jT(Lh.prototype),Lc=0;Lc<Ph.length;Lc++)Rc=Ph[Lc],oi.prototype[Rc]||(oi.prototype[Rc]=Lh.prototype[Rc]);var Ph,Rc,Lc;function oi(t){if(!(this instanceof oi))return new oi(t);C2.call(this,t),Lh.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",QT)))}Object.defineProperty(oi.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(oi.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(oi.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function QT(){this._writableState.ended||process.nextTick(WT,this)}function WT(t){t.end()}Object.defineProperty(oi.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var F2=V((Fh,R2)=>{var fI=A(S()),Fc=it("buffer"),Ei=Fc.Buffer;function L2(t,e){for(var r in t)e[r]=t[r]}Ei.from&&Ei.alloc&&Ei.allocUnsafe&&Ei.allocUnsafeSlow?R2.exports=Fc:(L2(Fc,Fh),Fh.Buffer=$o);function $o(t,e,r){return Ei(t,e,r)}L2(Ei,$o);$o.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Ei(t,e,r)};$o.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var n=Ei(t);return e!==void 0?typeof r=="string"?n.fill(e,r):n.fill(e):n.fill(0),n};$o.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Ei(t)};$o.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Fc.SlowBuffer(t)}});var Oh=V(I2=>{"use strict";var uI=A(S()),Ih=F2().Buffer,D2=Ih.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function YT(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function $T(t){var e=YT(t);if(typeof e!="string"&&(Ih.isEncoding===D2||!D2(t)))throw new Error("Unknown encoding: "+t);return e||t}I2.StringDecoder=af;function af(t){this.encoding=$T(t);var e;switch(this.encoding){case"utf16le":this.text=aE,this.end=oE,e=4;break;case"utf8":this.fillLast=rE,e=4;break;case"base64":this.text=sE,this.end=fE,e=3;break;default:this.write=cE,this.end=uE;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Ih.allocUnsafe(e)}af.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};af.prototype.end=iE;af.prototype.text=nE;af.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function Dh(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function eE(t,e,r){var n=e.length-1;if(n<r)return 0;var i=Dh(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||i===-2?0:(i=Dh(e[n]),i>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||i===-2?0:(i=Dh(e[n]),i>=0?(i>0&&(i===2?i=0:t.lastNeed=i-3),i):0))}function tE(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function rE(t){var e=this.lastTotal-this.lastNeed,r=tE(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function nE(t,e){var r=eE(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function iE(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function aE(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function oE(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function sE(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function fE(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function cE(t){return t.toString(this.encoding)}function uE(t){return t&&t.length?this.write(t):""}});var Dc=V((lI,N2)=>{"use strict";var dI=A(S()),O2=ra().codes.ERR_STREAM_PREMATURE_CLOSE;function lE(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}function dE(){}function hE(t){return t.setHeader&&typeof t.abort=="function"}function k2(t,e,r){if(typeof e=="function")return k2(t,null,e);e||(e={}),r=lE(r||dE);var n=e.readable||e.readable!==!1&&t.readable,i=e.writable||e.writable!==!1&&t.writable,a=function(){t.writable||b()},l=t._writableState&&t._writableState.finished,b=function(){i=!1,l=!0,n||r.call(t)},y=t._readableState&&t._readableState.endEmitted,x=function(){n=!1,y=!0,i||r.call(t)},_=function(P){r.call(t,P)},C=function(){var P;if(n&&!y)return(!t._readableState||!t._readableState.ended)&&(P=new O2),r.call(t,P);if(i&&!l)return(!t._writableState||!t._writableState.ended)&&(P=new O2),r.call(t,P)},D=function(){t.req.on("finish",b)};return hE(t)?(t.on("complete",b),t.on("abort",C),t.req?D():t.on("request",D)):i&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",x),t.on("finish",b),e.error!==!1&&t.on("error",_),t.on("close",C),function(){t.removeListener("complete",b),t.removeListener("abort",C),t.removeListener("request",D),t.req&&t.req.removeListener("finish",b),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",b),t.removeListener("end",x),t.removeListener("error",_),t.removeListener("close",C)}}N2.exports=k2});var U2=V((hI,J2)=>{"use strict";var pI=A(S()),Ic;function ia(t,e,r){return e=pE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pE(t){var e=bE(t,"string");return typeof e=="symbol"?e:String(e)}function bE(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var gE=Dc(),aa=Symbol("lastResolve"),Ua=Symbol("lastReject"),of=Symbol("error"),Oc=Symbol("ended"),Ha=Symbol("lastPromise"),kh=Symbol("handlePromise"),qa=Symbol("stream");function oa(t,e){return{value:t,done:e}}function vE(t){var e=t[aa];if(e!==null){var r=t[qa].read();r!==null&&(t[Ha]=null,t[aa]=null,t[Ua]=null,e(oa(r,!1)))}}function mE(t){process.nextTick(vE,t)}function xE(t,e){return function(r,n){t.then(function(){if(e[Oc]){r(oa(void 0,!0));return}e[kh](r,n)},n)}}var yE=Object.getPrototypeOf(function(){}),wE=Object.setPrototypeOf((Ic={get stream(){return this[qa]},next:function(){var e=this,r=this[of];if(r!==null)return Promise.reject(r);if(this[Oc])return Promise.resolve(oa(void 0,!0));if(this[qa].destroyed)return new Promise(function(l,b){process.nextTick(function(){e[of]?b(e[of]):l(oa(void 0,!0))})});var n=this[Ha],i;if(n)i=new Promise(xE(n,this));else{var a=this[qa].read();if(a!==null)return Promise.resolve(oa(a,!1));i=new Promise(this[kh])}return this[Ha]=i,i}},ia(Ic,Symbol.asyncIterator,function(){return this}),ia(Ic,"return",function(){var e=this;return new Promise(function(r,n){e[qa].destroy(null,function(i){if(i){n(i);return}r(oa(void 0,!0))})})}),Ic),yE),AE=function(e){var r,n=Object.create(wE,(r={},ia(r,qa,{value:e,writable:!0}),ia(r,aa,{value:null,writable:!0}),ia(r,Ua,{value:null,writable:!0}),ia(r,of,{value:null,writable:!0}),ia(r,Oc,{value:e._readableState.endEmitted,writable:!0}),ia(r,kh,{value:function(a,l){var b=n[qa].read();b?(n[Ha]=null,n[aa]=null,n[Ua]=null,a(oa(b,!1))):(n[aa]=a,n[Ua]=l)},writable:!0}),r));return n[Ha]=null,gE(e,function(i){if(i&&i.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=n[Ua];a!==null&&(n[Ha]=null,n[aa]=null,n[Ua]=null,a(i)),n[of]=i;return}var l=n[aa];l!==null&&(n[Ha]=null,n[aa]=null,n[Ua]=null,l(oa(void 0,!0))),n[Oc]=!0}),e.on("readable",mE.bind(null,n)),n};J2.exports=AE});var X2=V((bI,G2)=>{"use strict";var gI=A(S());function H2(t,e,r,n,i,a,l){try{var b=t[a](l),y=b.value}catch(x){r(x);return}b.done?e(y):Promise.resolve(y).then(n,i)}function SE(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var a=t.apply(e,r);function l(y){H2(a,n,i,l,b,"next",y)}function b(y){H2(a,n,i,l,b,"throw",y)}l(void 0)})}}function q2(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function ME(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?q2(Object(r),!0).forEach(function(n){TE(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q2(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function TE(t,e,r){return e=EE(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function EE(t){var e=_E(t,"string");return typeof e=="symbol"?e:String(e)}function _E(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var BE=ra().codes.ERR_INVALID_ARG_TYPE;function CE(t,e,r){var n;if(e&&typeof e.next=="function")n=e;else if(e&&e[Symbol.asyncIterator])n=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])n=e[Symbol.iterator]();else throw new BE("iterable",["Iterable"],e);var i=new t(ME({objectMode:!0},r)),a=!1;i._read=function(){a||(a=!0,l())};function l(){return b.apply(this,arguments)}function b(){return b=SE(function*(){try{var y=yield n.next(),x=y.value,_=y.done;_?i.push(null):i.push(yield x)?l():a=!1}catch(C){i.destroy(C)}}),b.apply(this,arguments)}return i}G2.exports=CE});var Rh=V((mI,e3)=>{"use strict";var xI=A(S());e3.exports=Qe;var es;Qe.ReadableState=V2;var vI=it("events").EventEmitter,Z2=function(e,r){return e.listeners(r).length},ff=Ah(),kc=it("buffer").Buffer,PE=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function LE(t){return kc.from(t)}function RE(t){return kc.isBuffer(t)||t instanceof PE}var Nh=it("util"),Oe;Nh&&Nh.debuglog?Oe=Nh.debuglog("stream"):Oe=function(){};var FE=p2(),zh=Th(),DE=Eh(),IE=DE.getHighWaterMark,Nc=ra().codes,OE=Nc.ERR_INVALID_ARG_TYPE,kE=Nc.ERR_STREAM_PUSH_AFTER_EOF,NE=Nc.ERR_METHOD_NOT_IMPLEMENTED,JE=Nc.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ts,Jh,Uh;nr()(Qe,ff);var sf=zh.errorOrDestroy,Hh=["error","close","destroy","pause","resume"];function UE(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function V2(t,e,r){es=es||Ja(),t=t||{},typeof r!="boolean"&&(r=e instanceof es),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=IE(this,t,"readableHighWaterMark",r),this.buffer=new FE,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(ts||(ts=Oh().StringDecoder),this.decoder=new ts(t.encoding),this.encoding=t.encoding)}function Qe(t){if(es=es||Ja(),!(this instanceof Qe))return new Qe(t);var e=this instanceof es;this._readableState=new V2(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ff.call(this)}Object.defineProperty(Qe.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});Qe.prototype.destroy=zh.destroy;Qe.prototype._undestroy=zh.undestroy;Qe.prototype._destroy=function(t,e){e(t)};Qe.prototype.push=function(t,e){var r=this._readableState,n;return r.objectMode?n=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=kc.from(t,e),e=""),n=!0),j2(this,t,e,!1,n)};Qe.prototype.unshift=function(t){return j2(this,t,null,!0,!1)};function j2(t,e,r,n,i){Oe("readableAddChunk",e);var a=t._readableState;if(e===null)a.reading=!1,GE(t,a);else{var l;if(i||(l=HE(a,e)),l)sf(t,l);else if(a.objectMode||e&&e.length>0)if(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==kc.prototype&&(e=LE(e)),n)a.endEmitted?sf(t,new JE):qh(t,a,e,!0);else if(a.ended)sf(t,new kE);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?qh(t,a,e,!1):Xh(t,a)):qh(t,a,e,!1)}else n||(a.reading=!1,Xh(t,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function qh(t,e,r,n){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Jc(t)),Xh(t,e)}function HE(t,e){var r;return!RE(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new OE("chunk",["string","Buffer","Uint8Array"],e)),r}Qe.prototype.isPaused=function(){return this._readableState.flowing===!1};Qe.prototype.setEncoding=function(t){ts||(ts=Oh().StringDecoder);var e=new ts(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";r!==null;)n+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),n!==""&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var z2=1073741824;function qE(t){return t>=z2?t=z2:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function K2(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=qE(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Qe.prototype.read=function(t){Oe("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Oe("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Gh(this):Jc(this),null;if(t=K2(t,e),t===0&&e.ended)return e.length===0&&Gh(this),null;var n=e.needReadable;Oe("need readable",n),(e.length===0||e.length-t<e.highWaterMark)&&(n=!0,Oe("length less than watermark",n)),e.ended||e.reading?(n=!1,Oe("reading or ended",n)):n&&(Oe("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=K2(r,e)));var i;return t>0?i=Y2(t,e):i=null,i===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Gh(this)),i!==null&&this.emit("data",i),i};function GE(t,e){if(Oe("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Jc(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Q2(t)))}}function Jc(t){var e=t._readableState;Oe("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Oe("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(Q2,t))}function Q2(t){var e=t._readableState;Oe("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Kh(t)}function Xh(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(XE,t,e))}function XE(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Oe("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}Qe.prototype._read=function(t){sf(this,new NE("_read()"))};Qe.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t);break}n.pipesCount+=1,Oe("pipe count=%d opts=%j",n.pipesCount,e);var i=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,a=i?b:z;n.endEmitted?process.nextTick(a):r.once("end",a),t.on("unpipe",l);function l(W,X){Oe("onunpipe"),W===r&&X&&X.hasUnpiped===!1&&(X.hasUnpiped=!0,_())}function b(){Oe("onend"),t.end()}var y=zE(r);t.on("drain",y);var x=!1;function _(){Oe("cleanup"),t.removeListener("close",F),t.removeListener("finish",P),t.removeListener("drain",y),t.removeListener("error",D),t.removeListener("unpipe",l),r.removeListener("end",b),r.removeListener("end",z),r.removeListener("data",C),x=!0,n.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&y()}r.on("data",C);function C(W){Oe("ondata");var X=t.write(W);Oe("dest.write",X),X===!1&&((n.pipesCount===1&&n.pipes===t||n.pipesCount>1&&$2(n.pipes,t)!==-1)&&!x&&(Oe("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function D(W){Oe("onerror",W),z(),t.removeListener("error",D),Z2(t,"error")===0&&sf(t,W)}UE(t,"error",D);function F(){t.removeListener("finish",P),z()}t.once("close",F);function P(){Oe("onfinish"),t.removeListener("close",F),z()}t.once("finish",P);function z(){Oe("unpipe"),r.unpipe(t)}return t.emit("pipe",r),n.flowing||(Oe("pipe resume"),r.resume()),t};function zE(t){return function(){var r=t._readableState;Oe("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Z2(t,"data")&&(r.flowing=!0,Kh(t))}}Qe.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var l=$2(e.pipes,t);return l===-1?this:(e.pipes.splice(l,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Qe.prototype.on=function(t,e){var r=ff.prototype.on.call(this,t,e),n=this._readableState;return t==="data"?(n.readableListening=this.listenerCount("readable")>0,n.flowing!==!1&&this.resume()):t==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Oe("on readable",n.length,n.reading),n.length?Jc(this):n.reading||process.nextTick(KE,this)),r};Qe.prototype.addListener=Qe.prototype.on;Qe.prototype.removeListener=function(t,e){var r=ff.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(W2,this),r};Qe.prototype.removeAllListeners=function(t){var e=ff.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(W2,this),e};function W2(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function KE(t){Oe("readable nexttick read 0"),t.read(0)}Qe.prototype.resume=function(){var t=this._readableState;return t.flowing||(Oe("resume"),t.flowing=!t.readableListening,ZE(this,t)),t.paused=!1,this};function ZE(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(VE,t,e))}function VE(t,e){Oe("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Kh(t),e.flowing&&!e.reading&&t.read(0)}Qe.prototype.pause=function(){return Oe("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Oe("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Kh(t){var e=t._readableState;for(Oe("flow",e.flowing);e.flowing&&t.read()!==null;);}Qe.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;t.on("end",function(){if(Oe("wrapped end"),r.decoder&&!r.ended){var l=r.decoder.end();l&&l.length&&e.push(l)}e.push(null)}),t.on("data",function(l){if(Oe("wrapped data"),r.decoder&&(l=r.decoder.write(l)),!(r.objectMode&&l==null)&&!(!r.objectMode&&(!l||!l.length))){var b=e.push(l);b||(n=!0,t.pause())}});for(var i in t)this[i]===void 0&&typeof t[i]=="function"&&(this[i]=function(b){return function(){return t[b].apply(t,arguments)}}(i));for(var a=0;a<Hh.length;a++)t.on(Hh[a],this.emit.bind(this,Hh[a]));return this._read=function(l){Oe("wrapped _read",l),n&&(n=!1,t.resume())},this};typeof Symbol=="function"&&(Qe.prototype[Symbol.asyncIterator]=function(){return Jh===void 0&&(Jh=U2()),Jh(this)});Object.defineProperty(Qe.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Qe.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Qe.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});Qe._fromList=Y2;Object.defineProperty(Qe.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Y2(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function Gh(t){var e=t._readableState;Oe("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(jE,e,t))}function jE(t,e){if(Oe("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(Qe.from=function(t,e){return Uh===void 0&&(Uh=X2()),Uh(Qe,t,e)});function $2(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}});var Zh=V((yI,r3)=>{"use strict";var wI=A(S());r3.exports=_i;var Uc=ra().codes,QE=Uc.ERR_METHOD_NOT_IMPLEMENTED,WE=Uc.ERR_MULTIPLE_CALLBACK,YE=Uc.ERR_TRANSFORM_ALREADY_TRANSFORMING,$E=Uc.ERR_TRANSFORM_WITH_LENGTH_0,Hc=Ja();nr()(_i,Hc);function e_(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new WE);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function _i(t){if(!(this instanceof _i))return new _i(t);Hc.call(this,t),this._transformState={afterTransform:e_.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",t_)}function t_(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){t3(t,e,r)}):t3(this,null,null)}_i.prototype.push=function(t,e){return this._transformState.needTransform=!1,Hc.prototype.push.call(this,t,e)};_i.prototype._transform=function(t,e,r){r(new QE("_transform()"))};_i.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};_i.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};_i.prototype._destroy=function(t,e){Hc.prototype._destroy.call(this,t,function(r){e(r)})};function t3(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new $E;if(t._transformState.transforming)throw new YE;return t.push(null)}});var a3=V((AI,i3)=>{"use strict";var SI=A(S());i3.exports=cf;var n3=Zh();nr()(cf,n3);function cf(t){if(!(this instanceof cf))return new cf(t);n3.call(this,t)}cf.prototype._transform=function(t,e,r){r(null,t)}});var u3=V((MI,c3)=>{"use strict";var TI=A(S()),Vh;function r_(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var f3=ra().codes,n_=f3.ERR_MISSING_ARGS,i_=f3.ERR_STREAM_DESTROYED;function o3(t){if(t)throw t}function a_(t){return t.setHeader&&typeof t.abort=="function"}function o_(t,e,r,n){n=r_(n);var i=!1;t.on("close",function(){i=!0}),Vh===void 0&&(Vh=Dc()),Vh(t,{readable:e,writable:r},function(l){if(l)return n(l);i=!0,n()});var a=!1;return function(l){if(!i&&!a){if(a=!0,a_(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();n(l||new i_("pipe"))}}}function s3(t){t()}function s_(t,e){return t.pipe(e)}function f_(t){return!t.length||typeof t[t.length-1]!="function"?o3:t.pop()}function c_(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=f_(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new n_("streams");var i,a=e.map(function(l,b){var y=b<e.length-1,x=b>0;return o_(l,y,x,function(_){i||(i=_),_&&a.forEach(s3),!y&&(a.forEach(s3),n(i))})});return e.reduce(s_)}c3.exports=c_});var jh=V((dn,lf)=>{var EI=A(S()),uf=it("stream");process.env.READABLE_STREAM==="disable"&&uf?(lf.exports=uf.Readable,Object.assign(lf.exports,uf),lf.exports.Stream=uf):(dn=lf.exports=Rh(),dn.Stream=uf||dn,dn.Readable=dn,dn.Writable=Ch(),dn.Duplex=Ja(),dn.Transform=Zh(),dn.PassThrough=a3(),dn.finished=Dc(),dn.pipeline=u3())});var h3=V((_I,d3)=>{var BI=A(S()),{Transform:u_}=jh();d3.exports=t=>class l3 extends u_{constructor(r,n,i,a,l){super(l),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._hashBitLength=a,this._options=l,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let a=null;try{this.update(r,n)}catch(l){a=l}i(a)}_flush(r){let n=null;try{this.push(this.digest())}catch(i){n=i}r(n)}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let n=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(n=n.toString(r)),this._resetState(),n}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new l3(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}}});var g3=V((CI,b3)=>{var PI=A(S()),{Transform:l_}=jh();b3.exports=t=>class p3 extends l_{constructor(r,n,i,a){super(a),this._rate=r,this._capacity=n,this._delimitedSuffix=i,this._options=a,this._state=new t,this._state.initialize(r,n),this._finalized=!1}_transform(r,n,i){let a=null;try{this.update(r,n)}catch(l){a=l}i(a)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,n){if(!Buffer.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Buffer.isBuffer(r)||(r=Buffer.from(r,n)),this._state.absorb(r),this}squeeze(r,n){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let i=this._state.squeeze(r);return n!==void 0&&(i=i.toString(n)),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){let r=new p3(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}}});var Qh=V((LI,v3)=>{var RI=A(S()),d_=h3(),h_=g3();v3.exports=function(t){let e=d_(t),r=h_(t);return function(n,i){switch(typeof n=="string"?n.toLowerCase():n){case"keccak224":return new e(1152,448,null,224,i);case"keccak256":return new e(1088,512,null,256,i);case"keccak384":return new e(832,768,null,384,i);case"keccak512":return new e(576,1024,null,512,i);case"sha3-224":return new e(1152,448,6,224,i);case"sha3-256":return new e(1088,512,6,256,i);case"sha3-384":return new e(832,768,6,384,i);case"sha3-512":return new e(576,1024,6,512,i);case"shake128":return new r(1344,256,31,i);case"shake256":return new r(1088,512,31,i);default:throw new Error("Invald algorithm: "+n)}}}});var y3=V((FI,x3)=>{var DI=A(S()),m3=mh()(__dirname);if(typeof m3!="function")throw new Error("Native add-on failed to load");x3.exports=Qh()(m3)});var S3=V(A3=>{var OI=A(S()),w3=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];A3.p1600=function(t){for(let e=0;e<24;++e){let r=t[0]^t[10]^t[20]^t[30]^t[40],n=t[1]^t[11]^t[21]^t[31]^t[41],i=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],l=t[4]^t[14]^t[24]^t[34]^t[44],b=t[5]^t[15]^t[25]^t[35]^t[45],y=t[6]^t[16]^t[26]^t[36]^t[46],x=t[7]^t[17]^t[27]^t[37]^t[47],_=t[8]^t[18]^t[28]^t[38]^t[48],C=t[9]^t[19]^t[29]^t[39]^t[49],D=_^(i<<1|a>>>31),F=C^(a<<1|i>>>31),P=t[0]^D,z=t[1]^F,W=t[10]^D,X=t[11]^F,ne=t[20]^D,$=t[21]^F,ae=t[30]^D,ie=t[31]^F,ee=t[40]^D,ce=t[41]^F;D=r^(l<<1|b>>>31),F=n^(b<<1|l>>>31);let te=t[2]^D,Y=t[3]^F,T=t[12]^D,s=t[13]^F,u=t[22]^D,d=t[23]^F,f=t[32]^D,c=t[33]^F,v=t[42]^D,m=t[43]^F;D=i^(y<<1|x>>>31),F=a^(x<<1|y>>>31);let h=t[4]^D,o=t[5]^F,p=t[14]^D,E=t[15]^F,g=t[24]^D,w=t[25]^F,U=t[34]^D,M=t[35]^F,k=t[44]^D,G=t[45]^F;D=l^(_<<1|C>>>31),F=b^(C<<1|_>>>31);let Z=t[6]^D,B=t[7]^F,R=t[16]^D,L=t[17]^F,I=t[26]^D,q=t[27]^F,O=t[36]^D,J=t[37]^F,K=t[46]^D,N=t[47]^F;D=y^(r<<1|n>>>31),F=x^(n<<1|r>>>31);let H=t[8]^D,Q=t[9]^F,j=t[18]^D,re=t[19]^F,De=t[28]^D,se=t[29]^F,le=t[38]^D,He=t[39]^F,oe=t[48]^D,fe=t[49]^F,ze=P,ge=z,ve=X<<4|W>>>28,xt=W<<4|X>>>28,pe=ne<<3|$>>>29,be=$<<3|ne>>>29,$e=ie<<9|ae>>>23,de=ae<<9|ie>>>23,ue=ee<<18|ce>>>14,Zt=ce<<18|ee>>>14,me=te<<1|Y>>>31,xe=Y<<1|te>>>31,Vt=s<<12|T>>>20,ye=T<<12|s>>>20,we=u<<10|d>>>22,jt=d<<10|u>>>22,Ae=c<<13|f>>>19,Se=f<<13|c>>>19,Qt=v<<2|m>>>30,Me=m<<2|v>>>30,Te=o<<30|h>>>2,Wt=h<<30|o>>>2,Ee=p<<6|E>>>26,_e=E<<6|p>>>26,Yt=w<<11|g>>>21,Be=g<<11|w>>>21,Ce=U<<15|M>>>17,$t=M<<15|U>>>17,Pe=G<<29|k>>>3,Le=k<<29|G>>>3,er=Z<<28|B>>>4,Re=B<<28|Z>>>4,Fe=L<<23|R>>>9,It=R<<23|L>>>9,ke=I<<25|q>>>7,Ne=q<<25|I>>>7,Tt=O<<21|J>>>11,Et=J<<21|O>>>11,_t=N<<24|K>>>8,Bt=K<<24|N>>>8,Ct=H<<27|Q>>>5,gr=Q<<27|H>>>5,vr=j<<20|re>>>12,mr=re<<20|j>>>12,xr=se<<7|De>>>25,yr=De<<7|se>>>25,wr=le<<8|He>>>24,Ar=He<<8|le>>>24,Sr=oe<<14|fe>>>18,Mr=fe<<14|oe>>>18;t[0]=ze^~Vt&Yt,t[1]=ge^~ye&Be,t[10]=er^~vr&pe,t[11]=Re^~mr&be,t[20]=me^~Ee&ke,t[21]=xe^~_e&Ne,t[30]=Ct^~ve&we,t[31]=gr^~xt&jt,t[40]=Te^~Fe&xr,t[41]=Wt^~It&yr,t[2]=Vt^~Yt&Tt,t[3]=ye^~Be&Et,t[12]=vr^~pe&Ae,t[13]=mr^~be&Se,t[22]=Ee^~ke&wr,t[23]=_e^~Ne&Ar,t[32]=ve^~we&Ce,t[33]=xt^~jt&$t,t[42]=Fe^~xr&$e,t[43]=It^~yr&de,t[4]=Yt^~Tt&Sr,t[5]=Be^~Et&Mr,t[14]=pe^~Ae&Pe,t[15]=be^~Se&Le,t[24]=ke^~wr&ue,t[25]=Ne^~Ar&Zt,t[34]=we^~Ce&_t,t[35]=jt^~$t&Bt,t[44]=xr^~$e&Qt,t[45]=yr^~de&Me,t[6]=Tt^~Sr&ze,t[7]=Et^~Mr&ge,t[16]=Ae^~Pe&er,t[17]=Se^~Le&Re,t[26]=wr^~ue&me,t[27]=Ar^~Zt&xe,t[36]=Ce^~_t&Ct,t[37]=$t^~Bt&gr,t[46]=$e^~Qt&Te,t[47]=de^~Me&Wt,t[8]=Sr^~ze&Vt,t[9]=Mr^~ge&ye,t[18]=Pe^~er&vr,t[19]=Le^~Re&mr,t[28]=ue^~me&Ee,t[29]=Zt^~xe&_e,t[38]=_t^~Ct&ve,t[39]=Bt^~gr&xt,t[48]=Qt^~Te&Fe,t[49]=Me^~Wt&It,t[0]^=w3[e*2],t[1]^=w3[e*2+1]}}});var T3=V((kI,M3)=>{var NI=A(S()),qc=S3();function rs(){this.state=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.blockSize=null,this.count=0,this.squeezing=!1}rs.prototype.initialize=function(t,e){for(let r=0;r<50;++r)this.state[r]=0;this.blockSize=t/8,this.count=0,this.squeezing=!1};rs.prototype.absorb=function(t){for(let e=0;e<t.length;++e)this.state[~~(this.count/4)]^=t[e]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(qc.p1600(this.state),this.count=0)};rs.prototype.absorbLastFewBits=function(t){this.state[~~(this.count/4)]^=t<<8*(this.count%4),t&128&&this.count===this.blockSize-1&&qc.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),qc.p1600(this.state),this.count=0,this.squeezing=!0};rs.prototype.squeeze=function(t){this.squeezing||this.absorbLastFewBits(1);let e=Buffer.alloc(t);for(let r=0;r<t;++r)e[r]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(qc.p1600(this.state),this.count=0);return e};rs.prototype.copy=function(t){for(let e=0;e<50;++e)t.state[e]=this.state[e];t.blockSize=this.blockSize,t.count=this.count,t.squeezing=this.squeezing};M3.exports=rs});var _3=V((JI,E3)=>{var UI=A(S());E3.exports=Qh()(T3())});var B3=V((HI,Wh)=>{var qI=A(S());try{Wh.exports=y3()}catch{Wh.exports=_3()}});var eU=A(S(),1);var WN=A(S(),1);var iB=A(S(),1);var G_=A(S(),1),dt={module:"ISShJH1ij-hPPt9St5UFFr_8Ys3Kj5cyg7zrMGt7H9s",scheduler:"_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA",mu:"fcoN_xJeisVsPXA-trzVAuIiqO3ydLQxM-L4XbrQKzY",src:{asset:"gonhUssZEFRapTsaQadHMxwnKcT8ld567KCNI9-0Exg",collection:"x35anB0wqaCdjtketSkiLPrH4_jR_GWSUFTSK8fyaZU",collectionActivity:"qjpg3ramJVb2iF6O5BAUfKInQ0UHhi3NqfELh73qKGw",comments:"HxZOaxNkL5o0QjAFmoU67HNwaMi7TEjUTmF7rfd2Ye0",moderation:"TGCoo6JDvZ7JY_E5Smz5VQiI9ncc6uXI8tU_snAodl0",zone:{id:"d4iFzJ4gxQRPHLuF13C7ncHgd-_yGGV8MtZSZmgLn7Y",version:"0.0.22"}},collectionRegistry:"zwKi27GuKS3GOlwL3EhNGH02SJDDAO5Uy43ZJwomhZ4"},Tp={defaultNode:"https://forward.computer"},Ep={"application/json":{type:"application/json",serialize:t=>JSON.stringify(t)}},Pn={arweave:"arweave.net",ao:"ao-search-gateway.goldsky.com"};var Je={keys:{access:"Access-Fee",ans110:{title:"Title",description:"Description",topic:"Topic:*",type:"Type",implements:"Implements",license:"License"},assetType:"Asset-Type",banner:"Banner",bootloader:"Bootloader",collectionId:"Collection-Id",collectionName:"Collection-Name",commericalUse:"Commercial-Use",contentType:"Content-Type",creator:"Creator",currency:"Currency",dataModelTraining:"Data-Model-Training",dataProtocol:"Data-Protocol",dateCreated:"Date-Created",derivations:"Derivations",description:"Description",displayName:"Display-Name",handle:"Handle",implements:"Implements",initialOwner:"Initial-Owner",license:"License",name:"Name",onBoot:"On-Boot",paymentAddress:"Payment-Address",paymentMode:"Payment-Mode",profileCreator:"Profile-Creator",profileIndex:"Profile-Index",protocolName:"Protocol-Name",renderWith:"Render-With",thumbnail:"Thumbnail",title:"Title",topic:"Topic",type:"Type",zoneType:"Zone-Type"},values:{dataProtocol:"ao",document:"Document",user:"User"}},hu={node1:"https://turbo.ardrive.io",batchSize:1,chunkSize:75e5,dispatchUploadSize:100*1024};var j_=A(S(),1);var K_=A(S(),1);function tr(t){return t?/^[a-z0-9_-]{43}$/i.test(t):!1}function fa(t,e){for(let r=0;r<t.length;r++)if(t[r]&&t[r].name===e)return t[r].value;return null}function _p(t){let e=t.match(/^data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+);base64,/);return e?e[1]:null}function Bp(t){return t.split(",")[1]}function Cp(t){let e;if(t instanceof Uint8Array)e=t.byteLength;else if(t instanceof ArrayBuffer)e=t.byteLength;else if(typeof t=="string")e=new TextEncoder().encode(t).byteLength;else if(typeof Buffer<"u"&&Buffer.isBuffer&&Buffer.isBuffer(t))e=t.length;else throw new Error("Input must be a string, Uint8Array, ArrayBuffer, or Buffer");return e}function pu(t){let e;return e=t.replace(/\[|\]/g,""),`[[${e}]]`}function as(t){let e;return e=t.replace(/\[|\]/g,""),e}var Ye=(...t)=>{console.log("[@permaweb/libs]",...t)};function O8(t){return t.replace(/^[a-z]/,e=>e.toUpperCase())}function Ya(t){return Array.isArray(t)?t.map(Ya):t&&typeof t=="object"?Object.entries(t).reduce((e,[r,n])=>{let i=O8(r);return e[i]=tr(n)?n:Ya(n),e},{}):t}function k8(t){return t.charAt(0).toLowerCase()+t.slice(1)}function sr(t){return Array.isArray(t)?t.map(sr):t&&typeof t=="object"?Object.entries(t).reduce((e,[r,n])=>{if(typeof r=="string"&&r.toLowerCase()==="commitments")return e;let i=tr(r)||r.includes("-")?r:k8(r);return e[i]=tr(n)?n:sr(n),e},{}):t}function fr(t,e){let r=t.charAt(0).toUpperCase()+t.slice(1);return{name:`${Je.keys.bootloader}-${r}`,value:e}}function Lf(t){return tr(t)||t.startsWith("data")}function bu(t){return t.map(e=>({...e,value:e.value?.replace(/\r?\n/g," ")??""}))}async function gu(t,e={}){let{maxRetries:r=3,delayMs:n=1e3,backoff:i=!0,validate:a}=e,l,b;for(let y=0;y<r;y++)try{let x=await t();if(!a||a(x))return y>0&&Ye(`Success on attempt ${y+1}`),x;if(b=x,y<r-1){let _=i?n*Math.pow(2,y):n;Ye(`Validation failed on attempt ${y+1}/${r}, retrying in ${_}ms...`),await new Promise(C=>setTimeout(C,_))}}catch(x){if(l=x,y<r-1){let _=i?n*Math.pow(2,y):n;Ye(`Error on attempt ${y+1}/${r}: ${l.message}, retrying in ${_}ms...`),await new Promise(C=>setTimeout(C,_))}}if(l)throw Ye(`Failed after ${r} attempts: ${l.message}`),l;return Ye(`Validation failed after ${r} attempts`),b}function Pp(t){return t.map(e=>({...e,name:e.name.toLowerCase()}))}var N8="https://arweave.net";function os(t){return`${N8}/${t}`}var Y_=A(S(),1);var Rf={p1:"P1",end:"END"},vu={default:100};function Ln(t){return async e=>{let r=e.paginator?e.paginator:vu.default,n=[],i=0,a=null;if(e.ids&&!e.ids.length)return{data:n,count:i,nextCursor:a,previousCursor:null};try{let l=U8(e),b=await H8({gateway:e.gateway??t.gateway??Pn.ao,query:J8(l)});return e.id&&b?.data?.transaction?(n=[{cursor:null,node:b.data.transaction}],i=1,a=Rf.end,{data:n,count:i,nextCursor:a,previousCursor:null}):b?.data?.transactions?.edges?.length?(n=[...b.data.transactions.edges],i=b.data.transactions.count??0,n.length<r||b.data.transactions?.pageInfo?.hasNextPage===!1?a=Rf.end:a=n[n.length-1].cursor,{data:n,count:i,nextCursor:a,previousCursor:null}):{data:n,count:i,nextCursor:a,previousCursor:null}}catch(l){return console.error(l),{data:n,count:i,nextCursor:a,previousCursor:null}}}}function Lp(t){return async(e,r)=>{let n=Ln(t),i=1,a=await n(e);if(a&&a.data.length){let l=a.data;for(r&&r(`Count: ${a.count}`),r&&r(`Pages to fetch: ${Math.ceil(a.count/(e.paginator??vu.default))}`),r&&r(`Page ${i} fetched`);a.nextCursor&&a.nextCursor!==Rf.end;)i+=1,r&&r(`Fetching page ${i}...`),a=await n({...e,cursor:a.nextCursor}),a&&a.data.length&&(l=l.concat(a.data));return r&&r("All pages fetched!"),l}else r&&r("No data found");return null}}function J8(t){let e={query:`query { ${t} }`};return JSON.stringify(e)}function U8(t){let e=t.paginator?t.paginator:vu.default,r=t.id?`"${t.id}"`:null,n=t.ids?JSON.stringify(t.ids):null,i=null;t.minBlock!==void 0&&t.minBlock!==null&&(i||(i={}),i.min=t.minBlock),t.maxBlock!==void 0&&t.maxBlock!==null&&(i||(i={}),i.max=t.maxBlock);let a=i?JSON.stringify(i).replace(/"([^"]+)":/g,"$1:"):null,l=t.tags?JSON.stringify(t.tags).replace(/"(name)":/g,"$1:").replace(/"(values)":/g,"$1:").replace(/"match"/g,"match").replace(/"FUZZY_OR"/g,"FUZZY_OR").replace(/"WILDCARD"/g,"WILDCARD"):null,b=t.owners?JSON.stringify(t.owners):null,y=t.recipients?JSON.stringify(t.recipients):null,x=t.cursor&&t.cursor!==Rf.end?`"${t.cursor}"`:null,_="";if(t.sort)switch(_+="sort: ",t.sort){case"ascending":_+="INGESTED_AT_ASC";break;case"descending":_+="INGESTED_AT_DESC";break}let C=`first: ${e}`,D="",F="data { size type } owner { address } block { height timestamp }",P="";switch(t.gateway??Pn.ao){case Pn.arweave:break;case Pn.ao:x||(D="count"),y&&(P=`recipients: ${y}`),F+=" recipient";break}if(r){let ne=`
15
15
  transaction(id: ${r}) {
16
16
  id
17
17
  tags {
@@ -36,10 +36,10 @@ ${JSON.stringify(Buffer.from(r))},${JSON.stringify(Buffer.from(n))},${a} => ${JS
36
36
  ${F}
37
37
  }
38
38
  }
39
- }`;return t.queryKey&&(X=`${t.queryKey}: ${X}`),X}async function U8(t){try{let e=t.gateway.startsWith("http://")||t.gateway.startsWith("https://")?t.gateway:`https://${t.gateway}`,r=new URL(e);(!r.pathname||r.pathname==="/")&&(r.pathname="/graphql");let n=await fetch(r.toString(),{method:"POST",headers:{"Content-Type":"application/json","Codec-Device":"json@1.0"},body:t.query});if(!n.ok)throw new Error(`HTTP ${n.status}`);return await n.json()}catch(e){throw e}}async function H8(t,e){let r=[{name:"Authority",value:t.node?.authority??yt.mu},{name:"Process-Timestamp",value:new Date().getTime().toString()}];e.tags&&e.tags.length>0&&e.tags.forEach(n=>r.push(n));try{let n=await t.ao.spawn({module:e.module,scheduler:t.node?.scheduler||e.scheduler,signer:t.signer,tags:bu(r),data:e.data});return $e(`Process ID: ${n}`),$e("Sending initial message..."),await et(t,{processId:n,action:"Init"}),n}catch(n){throw console.log(n),new Error(n.message??"Error spawning process")}}function Rp(t){return async e=>await et(t,e)}async function et(t,e){try{let r=[{name:"Action",value:e.action},{name:"Message-Timestamp",value:new Date().getTime().toString()}];e.tags&&r.push(...e.tags);let n=e.useRawData?e.data:JSON.stringify(e.data),i=await t.ao.message({process:e.processId,signer:t.signer,tags:bu(r),data:n});if(e.returnResult||e.deepResult){$e("Returning message result...");let a=await t.ao.result({process:e.processId,message:i});if(e.deepResult)if($e("Searching for nested result..."),a?.Messages?.length>0){let l=a.Messages[0],b=Ya(l.Tags,"Reference");if(!b)return $e("No reference found"),a;$e(`Reference: ${b}`);let y=[{name:"From-Process",values:[e.processId]},{name:"Reference",values:[b]}];switch(t.ao.MODE){case"mainnet":y=Pp(y);break;case"legacy":break}let x=Ln(t),_=await gu(()=>x({tags:y}),{maxRetries:100,delayMs:1e3,backoff:!0,validate:F=>F?.data?.length>0});$e("Returning nested result...");let C=_.data[0].node.id;switch(t.ao.MODE){case"mainnet":let F=[{name:"body+link",values:[C]}];$e("Searching for slot...");let z=(await gu(()=>x({tags:F}),{maxRetries:100,delayMs:1e3,backoff:!0,validate:X=>X?.data?.length>0}))?.data?.[0].node,W=Ya(z.tags,"slot");W&&($e(`Slot: ${W}`),C=W);break;case"legacy":break}return await t.ao.result({process:e.deepResult.target,message:C})}else return $e("No nested message found"),a;return a}return i}catch(r){throw new Error(r)}}function Fp(t){return async e=>await Br(t,e)}async function Br(t,e){let n=`${t.node?.url??Tp.defaultNode}/${e.processId}~process@1.0/${e.hydrate?"now":"compute"}`;e.path&&e.appendPath&&(n+=`/${e.path}`);try{let i={};i["require-codec"]="application/json",i["accept-bundle"]="true";let a=await fetch(n,{headers:i});if(a.ok){let l=await a.json();if(e.path&&!e.appendPath)try{return JSON.parse(l[e.path])}catch{return l[e.path]}return l.body??l}throw new Error("Error getting state from HyperBEAM.")}catch(i){if(e.fallbackAction)return await Ff(t,{processId:e.processId,action:e.fallbackAction,tags:e.tags});throw i}}function Dp(t){return async e=>await Ff(t,e)}async function Ff(t,e){try{let r=[{name:"Action",value:e.action}];e.tags&&r.push(...e.tags);let n;if(typeof e.data=="object")n=JSON.stringify(e.data||{});else if(typeof e.data=="string"){try{JSON.parse(e.data)}catch(a){throw console.error(a),new Error("Invalid JSON data")}n=e.data}let i=await t.ao.dryrun({process:e.processId,tags:r,data:n});if(i.Messages&&i.Messages.length){if(i.Messages[0].Data){let a=i?.Messages?.[0]?.Data;try{return JSON.parse(a)}catch{return a}}else if(i.Messages[0].Tags)return i.Messages[0].Tags.reduce((a,l)=>(a[l.name]=l.value,a),{})}}catch(r){throw new Error(r.message??"Error dryrunning process")}}async function q8(t,e){try{let{Messages:r}=await t.ao.result({message:e.messageId,process:e.processId});if(r&&r.length){let n={};return r.forEach(i=>{let a=Ya(i.Tags,"Action")||e.action,l=null,b=i.Data;if(b)try{l=JSON.parse(b)}catch{l=b}let y=Ya(i.Tags,"Status"),x=Ya(i.Tags,"Message");n[a]={id:e.messageId,status:y,message:x,data:l}}),n}else return null}catch(r){console.error(r)}}async function os(t,e){let r=null;if(e.evalSrc)r=e.evalSrc;else if(e.evalTxId)try{r=await(await fetch(Lf(e.evalTxId))).text()}catch(n){throw new Error(n)}if(r)try{let n=await et(t,{processId:e.processId,action:"Eval",data:r,tags:e.evalTags||null,useRawData:!0});return $e(`Eval: ${n}`),await q8(t,{processId:e.processId,messageId:n,action:"Eval"})}catch(n){throw new Error(n.message??"Error sending process eval")}return null}function Rn(t){return async(e,r)=>{try{let n={module:e.module||yt.module,scheduler:t.node?.scheduler||yt.scheduler};e.data&&(n.data=e.data),e.tags&&(n.tags=e.tags),r&&r("Spawning process...");let i=await H8(t,n);if(e.evalTxId||e.evalSrc){r&&r("Process retrieved!"),r&&r("Sending eval...");try{await os(t,{processId:i,evalTxId:e.evalTxId||null,evalSrc:e.evalSrc||null,evalTags:e.evalTags})&&r&&r("Eval complete")}catch(a){throw new Error(a.message??"Error creating process")}}return i}catch(n){throw new Error(n.message??"Error creating process")}}}var jN=A(S(),1);var IN=A(S(),1);var op={};yp(op,{AVSCTap:()=>Mf,AlgorandSigner:()=>pf,AptosSigner:()=>gf,ArconnectSigner:()=>xf,Arweave:()=>k1.default,ArweaveSigner:()=>da,Bundle:()=>Wc,BundleItem:()=>ap,CryptoDriver:()=>jf,Curve25519:()=>Fr,DataItem:()=>Vc,EthereumSigner:()=>Ur,HexInjectedSolanaSigner:()=>Xa,HexSolanaSigner:()=>bf,InjectedAptosSigner:()=>za,InjectedEthereumSigner:()=>ch,InjectedSolanaSigner:()=>ha,InjectedTypedEthereumSigner:()=>tp,KyveSigner:()=>yf,MAX_TAG_BYTES:()=>Zc,MIN_BINARY_SIZE:()=>jc,MultiSignatureAptosSigner:()=>Ka,NearSigner:()=>hf,PolygonSigner:()=>df,Rsa4096:()=>ua,SIG_CONFIG:()=>Je,SignatureConfig:()=>Ie,Signer:()=>mu,SolanaSigner:()=>Mi,Transaction:()=>O1.default,TypedEthereumSigner:()=>Za,bundleAndSignData:()=>y_,byteArrayToLong:()=>vt,concatBuffers:()=>tt.concatBuffers,createData:()=>_f,deepHash:()=>Ri,deserializeTags:()=>ns,exportForTesting:()=>p_,getCryptoDriver:()=>At,getSignatureAndId:()=>q3,indexToType:()=>wf,keccak256:()=>Yh,longTo16ByteArray:()=>g_,longTo32ByteArray:()=>Kc,longTo8ByteArray:()=>zc,longToNByteArray:()=>Sf,secp256k1:()=>Ga,serializeTags:()=>np,shortTo2ByteArray:()=>rp,sign:()=>Qc,stringToBuffer:()=>tt.stringToBuffer,unbundleData:()=>x_});var cN=A(S(),1);var gk=A(S(),1);var aB=A(S(),1),mu=class{publicKey;signatureType;signatureLength;ownerLength;pem;static verify(e,r,n,i){throw new Error("You must implement verify method on child")}};var ck=A(S(),1);var yB=A(S(),1),Vp=A(Hr(),1);var hB=A(S(),1),Ie;(function(t){t[t.ARWEAVE=1]="ARWEAVE",t[t.ED25519=2]="ED25519",t[t.ETHEREUM=3]="ETHEREUM",t[t.SOLANA=4]="SOLANA",t[t.INJECTEDAPTOS=5]="INJECTEDAPTOS",t[t.MULTIAPTOS=6]="MULTIAPTOS",t[t.TYPEDETHEREUM=7]="TYPEDETHEREUM",t[t.KYVE=101]="KYVE"})(Ie||(Ie={}));var Je={[Ie.ARWEAVE]:{sigLength:512,pubLength:512,sigName:"arweave"},[Ie.ED25519]:{sigLength:64,pubLength:32,sigName:"ed25519"},[Ie.ETHEREUM]:{sigLength:65,pubLength:65,sigName:"ethereum"},[Ie.SOLANA]:{sigLength:64,pubLength:32,sigName:"solana"},[Ie.INJECTEDAPTOS]:{sigLength:64,pubLength:32,sigName:"injectedAptos"},[Ie.MULTIAPTOS]:{sigLength:64*32+4,pubLength:32*32+1,sigName:"multiAptos"},[Ie.TYPEDETHEREUM]:{sigLength:65,pubLength:42,sigName:"typedEthereum"},[Ie.KYVE]:{sigLength:65,pubLength:65,sigName:"kyve"}};var gB=A(S(),1);import*as Z8 from"crypto";var rr=BigInt(0),ze=BigInt(1),eo=BigInt(2),V8=BigInt(8),Np=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),ft=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:Np,n:Np,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")});var Xp=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),ss=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),pB=BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742"),j8=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),Q8=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),W8=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),Y8=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),Ot=class t{constructor(e,r,n,i){this.x=e,this.y=r,this.z=n,this.t=i}static fromAffine(e){if(!(e instanceof wt))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return e.equals(wt.ZERO)?t.ZERO:new t(e.x,e.y,ze,he(e.x*e.y))}static toAffineBatch(e){let r=t6(e.map(n=>n.z));return e.map((n,i)=>n.toAffine(r[i]))}static normalizeZ(e){return this.toAffineBatch(e).map(this.fromAffine)}equals(e){Up(e);let{x:r,y:n,z:i}=this,{x:a,y:l,z:b}=e,y=he(r*b),x=he(a*i),_=he(n*b),C=he(l*i);return y===x&&_===C}negate(){return new t(he(-this.x),this.y,this.z,he(-this.t))}double(){let{x:e,y:r,z:n}=this,{a:i}=ft,a=he,l=a(e*e),b=a(r*r),y=a(eo*a(n*n)),x=a(i*l),_=e+r,C=a(a(_*_)-l-b),D=x+b,F=D-y,P=x-b,z=a(C*F),W=a(D*P),X=a(C*P),ne=a(F*D);return new t(z,W,ne,X)}add(e){let{x:r,y:n,z:i,t:a}=this;Up(e);let{x:l,y:b,z:y,t:x}=e,{a:_,d:C}=ft,D=he,F=D(r*l),P=D(n*b),z=D(a*C*x),W=D(i*y),X=D((r+n)*(l+b)-F-P),ne=D(W-z),$=D(W+z),ae=D(P-_*F),ie=D(X*ne),ee=D($*ae),ce=D(X*ae),te=D(ne*$);return new t(ie,ee,te,ce)}subtract(e){return this.add(e.negate())}precomputeWindow(e){let r=1+256/e,n=[],i=this,a=i;for(let l=0;l<r;l++){a=i,n.push(a);for(let b=1;b<2**(e-1);b++)a=a.add(i),n.push(a);i=a.double()}return n}wNAF(e,r){!r&&this.equals(t.BASE)&&(r=wt.BASE);let n=r&&r._WINDOW_SIZE||1;if(256%n)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let i=r&&_u.get(r);i||(i=this.precomputeWindow(n),r&&n!==1&&(i=t.normalizeZ(i),_u.set(r,i)));let a=t.ZERO,l=t.BASE,b=1+256/n,y=2**(n-1),x=BigInt(2**n-1),_=2**n,C=BigInt(n);for(let D=0;D<b;D++){let F=D*y,P=Number(e&x);e>>=C,P>y&&(P-=_,e+=ze);let z=F,W=F+Math.abs(P)-1,X=D%2!==0,ne=P<0;P===0?l=l.add(Jp(X,i[z])):a=a.add(Jp(ne,i[W]))}return t.normalizeZ([a,l])[0]}multiply(e,r){return this.wNAF(Of(e,ft.l),r)}multiplyUnsafe(e){let r=Of(e,ft.l,!1),n=t.BASE,i=t.ZERO;if(r===rr)return i;if(this.equals(i)||r===ze)return this;if(this.equals(n))return this.wNAF(r);let a=i,l=this;for(;r>rr;)r&ze&&(a=a.add(l)),l=l.double(),r>>=ze;return a}isSmallOrder(){return this.multiplyUnsafe(ft.h).equals(t.ZERO)}isTorsionFree(){let e=this.multiplyUnsafe(ft.l/eo).double();return ft.l%eo&&(e=e.add(this)),e.equals(t.ZERO)}toAffine(e){let{x:r,y:n,z:i}=this,a=this.equals(t.ZERO);e==null&&(e=a?V8:kf(i));let l=he(r*e),b=he(n*e),y=he(i*e);if(a)return wt.ZERO;if(y!==ze)throw new Error("invZ was invalid");return new wt(l,b)}fromRistrettoBytes(){Mu()}toRistrettoBytes(){Mu()}fromRistrettoHash(){Mu()}};Ot.BASE=new Ot(ft.Gx,ft.Gy,ze,he(ft.Gx*ft.Gy));Ot.ZERO=new Ot(rr,ze,ze,rr);function Jp(t,e){let r=e.negate();return t?r:e}function Up(t){if(!(t instanceof Ot))throw new TypeError("ExtendedPoint expected")}function Su(t){if(!(t instanceof fa))throw new TypeError("RistrettoPoint expected")}function Mu(){throw new Error("Legacy method: switch to RistrettoPoint")}var fa=class t{constructor(e){this.ep=e}static calcElligatorRistrettoMap(e){let{d:r}=ft,n=he(ss*e*e),i=he((n+ze)*W8),a=BigInt(-1),l=he((a-r*n)*he(n+r)),{isValid:b,value:y}=Pu(i,l),x=he(y*e);Ci(x)||(x=he(-x)),b||(y=x),b||(a=n);let _=he(a*(n-ze)*Y8-l),C=y*y,D=he((y+y)*l),F=he(_*j8),P=he(ze-C),z=he(ze+C);return new Ot(he(D*z),he(P*F),he(F*z),he(D*P))}static hashToCurve(e){e=Pi(e,64);let r=Tu(e.slice(0,32)),n=this.calcElligatorRistrettoMap(r),i=Tu(e.slice(32,64)),a=this.calcElligatorRistrettoMap(i);return new t(n.add(a))}static fromHex(e){e=Pi(e,32);let{a:r,d:n}=ft,i="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",a=Tu(e);if(!n6(cs(a),e)||Ci(a))throw new Error(i);let l=he(a*a),b=he(ze+r*l),y=he(ze-r*l),x=he(b*b),_=he(y*y),C=he(r*n*x-_),{isValid:D,value:F}=Gp(he(C*_)),P=he(F*y),z=he(F*P*C),W=he((a+a)*P);Ci(W)&&(W=he(-W));let X=he(b*z),ne=he(W*X);if(!D||Ci(ne)||X===rr)throw new Error(i);return new t(new Ot(W,X,ze,ne))}toRawBytes(){let{x:e,y:r,z:n,t:i}=this.ep,a=he(he(n+r)*he(n-r)),l=he(e*r),b=he(l*l),{value:y}=Gp(he(a*b)),x=he(y*a),_=he(y*l),C=he(x*_*i),D;if(Ci(i*C)){let P=he(r*ss),z=he(e*ss);e=P,r=z,D=he(x*Q8)}else D=_;Ci(e*C)&&(r=he(-r));let F=he((n-r)*D);return Ci(F)&&(F=he(-F)),cs(F)}toHex(){return us(this.toRawBytes())}toString(){return this.toHex()}equals(e){Su(e);let r=this.ep,n=e.ep,i=he(r.x*n.y)===he(r.y*n.x),a=he(r.y*n.y)===he(r.x*n.x);return i||a}add(e){return Su(e),new t(this.ep.add(e.ep))}subtract(e){return Su(e),new t(this.ep.subtract(e.ep))}multiply(e){return new t(this.ep.multiply(e))}multiplyUnsafe(e){return new t(this.ep.multiplyUnsafe(e))}};fa.BASE=new fa(Ot.BASE);fa.ZERO=new fa(Ot.ZERO);var _u=new WeakMap,wt=class t{constructor(e,r){this.x=e,this.y=r}_setWindowSize(e){this._WINDOW_SIZE=e,_u.delete(this)}static fromHex(e,r=!0){let{d:n,P:i}=ft;e=Pi(e,32);let a=e.slice();a[31]=e[31]&-129;let l=ls(a);if(r&&l>=i)throw new Error("Expected 0 < hex < P");if(!r&&l>=Xp)throw new Error("Expected 0 < hex < 2**256");let b=he(l*l),y=he(b-ze),x=he(n*b+ze),{isValid:_,value:C}=Pu(y,x);if(!_)throw new Error("Point.fromHex: invalid y coordinate");let D=(C&ze)===ze;return(e[31]&128)!==0!==D&&(C=he(-C)),new t(C,l)}static async fromPrivateKey(e){return(await Lu(e)).point}toRawBytes(){let e=cs(this.y);return e[31]|=this.x&ze?128:0,e}toHex(){return us(this.toRawBytes())}toX25519(){let{y:e}=this,r=he((ze+e)*kf(ze-e));return cs(r)}isTorsionFree(){return Ot.fromAffine(this).isTorsionFree()}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new t(he(-this.x),this.y)}add(e){return Ot.fromAffine(this).add(Ot.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return Ot.fromAffine(this).multiply(e,this).toAffine()}};wt.BASE=new wt(ft.Gx,ft.Gy);wt.ZERO=new wt(rr,ze);var fs=class t{constructor(e,r){this.r=e,this.s=r,this.assertValidity()}static fromHex(e){let r=Pi(e,64),n=wt.fromHex(r.slice(0,32),!1),i=ls(r.slice(32,64));return new t(n,i)}assertValidity(){let{r:e,s:r}=this;if(!(e instanceof wt))throw new Error("Expected Point instance");return Of(r,ft.l,!1),this}toRawBytes(){let e=new Uint8Array(64);return e.set(this.r.toRawBytes()),e.set(cs(this.s),32),e}toHex(){return us(this.toRawBytes())}};function zp(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Bu(t){if(!zp(t))throw new Error("Uint8Array expected")}function Hp(...t){if(t.every(Bu),t.length===1)return t[0];let e=t.reduce((n,i)=>n+i.length,0),r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let a=t[n];r.set(a,i),i+=a.length}return r}var $8=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function us(t){Bu(t);let e="";for(let r=0;r<t.length;r++)e+=$8[t[r]];return e}var ui={_0:48,_9:57,A:65,F:70,a:97,f:102};function qp(t){if(t>=ui._0&&t<=ui._9)return t-ui._0;if(t>=ui.A&&t<=ui.F)return t-(ui.A-10);if(t>=ui.a&&t<=ui.f)return t-(ui.a-10)}function Cu(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let i=0,a=0;i<r;i++,a+=2){let l=qp(t.charCodeAt(a)),b=qp(t.charCodeAt(a+1));if(l===void 0||b===void 0){let y=t[a]+t[a+1];throw new Error('hex string expected, got non-hex character "'+y+'" at index '+a)}n[i]=l*16+b}return n}function Kp(t){let r=t.toString(16).padStart(64,"0");return Cu(r)}function cs(t){return Kp(t).reverse()}function Ci(t){return(he(t)&ze)===ze}function ls(t){return Bu(t),BigInt("0x"+us(Uint8Array.from(t).reverse()))}var e6=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Tu(t){return he(ls(t)&e6)}function he(t,e=ft.P){let r=t%e;return r>=rr?r:e+r}function kf(t,e=ft.P){if(t===rr||e<=rr)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=he(t,e),n=e,i=rr,a=ze,l=ze,b=rr;for(;r!==rr;){let x=n/r,_=n%r,C=i-l*x,D=a-b*x;n=r,r=_,i=l,a=b,l=C,b=D}if(n!==ze)throw new Error("invert: does not exist");return he(i,e)}function t6(t,e=ft.P){let r=new Array(t.length),n=t.reduce((a,l,b)=>l===rr?a:(r[b]=a,he(a*l,e)),ze),i=kf(n,e);return t.reduceRight((a,l,b)=>l===rr?a:(r[b]=he(a*r[b],e),he(a*l,e)),i),r}function Fn(t,e){let{P:r}=ft,n=t;for(;e-- >rr;)n*=n,n%=r;return n}function r6(t){let{P:e}=ft,r=BigInt(5),n=BigInt(10),i=BigInt(20),a=BigInt(40),l=BigInt(80),y=t*t%e*t%e,x=Fn(y,eo)*y%e,_=Fn(x,ze)*t%e,C=Fn(_,r)*_%e,D=Fn(C,n)*C%e,F=Fn(D,i)*D%e,P=Fn(F,a)*F%e,z=Fn(P,l)*P%e,W=Fn(z,l)*P%e,X=Fn(W,n)*C%e;return{pow_p_5_8:Fn(X,eo)*t%e,b2:y}}function Pu(t,e){let r=he(e*e*e),n=he(r*r*e),i=r6(t*n).pow_p_5_8,a=he(t*r*i),l=he(e*a*a),b=a,y=he(a*ss),x=l===t,_=l===he(-t),C=l===he(-t*ss);return x&&(a=b),(_||C)&&(a=y),Ci(a)&&(a=he(-a)),{isValid:x||_,value:a}}function Gp(t){return Pu(ze,t)}function If(t){return he(ls(t),ft.l)}function n6(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function Pi(t,e){let r=zp(t)?Uint8Array.from(t):Cu(t);if(typeof e=="number"&&r.length!==e)throw new Error(`Expected ${e} bytes`);return r}function Of(t,e,r=!0){if(!e)throw new TypeError("Specify max value");if(typeof t=="number"&&Number.isSafeInteger(t)&&(t=BigInt(t)),typeof t=="bigint"&&t<e){if(r){if(rr<t)return t}else if(rr<=t)return t}throw new TypeError("Expected valid scalar: 0 < scalar < max")}function i6(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function a6(t){if(t=typeof t=="bigint"||typeof t=="number"?Kp(Of(t,Xp)):Pi(t),t.length!==32)throw new Error("Expected 32 bytes");return t}function o6(t){let e=i6(t.slice(0,32)),r=t.slice(32,64),n=If(e),i=wt.BASE.multiply(n),a=i.toRawBytes();return{head:e,prefix:r,scalar:n,point:i,pointBytes:a}}var Eu;async function Lu(t){return o6(await to.sha512(a6(t)))}async function Zp(t,e){t=Pi(t);let{prefix:r,scalar:n,pointBytes:i}=await Lu(e),a=If(await to.sha512(r,t)),l=wt.BASE.multiply(a),b=If(await to.sha512(l.toRawBytes(),i,t)),y=he(a+b*n,ft.l);return new fs(l,y).toRawBytes()}function s6(t,e,r){e=Pi(e),r instanceof wt||(r=wt.fromHex(r,!1));let{r:n,s:i}=t instanceof fs?t.assertValidity():fs.fromHex(t),a=Ot.BASE.multiplyUnsafe(i);return{r:n,s:i,SB:a,pub:r,msg:e}}function f6(t,e,r,n){let i=If(n),a=Ot.fromAffine(t).multiplyUnsafe(i);return Ot.fromAffine(e).add(a).subtract(r).multiplyUnsafe(ft.h).equals(Ot.ZERO)}async function Li(t,e,r){let{r:n,SB:i,msg:a,pub:l}=s6(t,e,r),b=await to.sha512(n.toRawBytes(),l.toRawBytes(),a);return f6(l,n,i,b)}wt.BASE._setWindowSize(8);var Bi={node:Z8,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},to={bytesToHex:us,hexToBytes:Cu,concatBytes:Hp,getExtendedPublicKey:Lu,mod:he,invert:kf,TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],hashToPrivateScalar:t=>{if(t=Pi(t),t.length<40||t.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return he(ls(t),ft.l-ze)+ze},randomBytes:(t=32)=>{if(Bi.web)return Bi.web.getRandomValues(new Uint8Array(t));if(Bi.node){let{randomBytes:e}=Bi.node;return new Uint8Array(e(t).buffer)}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>to.randomBytes(32),sha512:async(...t)=>{let e=Hp(...t);if(Bi.web){let r=await Bi.web.subtle.digest("SHA-512",e.buffer);return new Uint8Array(r)}else{if(Bi.node)return Uint8Array.from(Bi.node.createHash("sha512").update(e).digest());throw new Error("The environment doesn't have sha512 function")}},precompute(t=8,e=wt.BASE){let r=e.equals(wt.BASE)?e:new wt(e.x,e.y);return r._setWindowSize(t),r.multiply(eo),r},sha512Sync:void 0};Object.defineProperties(to,{sha512Sync:{configurable:!1,get(){return Eu},set(t){Eu||(Eu=t)}}});var Fr=class{_key;pk;ownerLength=Je[2].pubLength;signatureLength=Je[2].sigLength;_publicKey;get publicKey(){return this._publicKey}signatureType=2;constructor(e,r){this._key=e,this.pk=r}get key(){throw new Error("You must implement `key`")}sign(e){return Zp(Buffer.from(e),Buffer.from(this.key))}static async verify(e,r,n){let i=e;return typeof e=="string"&&(i=Vp.default.toBuffer(e)),Li(Buffer.from(n),Buffer.from(r),Buffer.from(i))}};var qO=A(S(),1);var fP=A(S(),1);var xC=A(S(),1);var hC=A(S(),1),tt=A(gn(),1);var BB=A(S(),1);import{createHash as x6}from"crypto";async function Ri(t){if(typeof t[Symbol.asyncIterator]=="function"){let i=t,a=x6("sha384"),l=0;for await(let x of i)l+=x.byteLength,a.update(x);let b=(0,tt.concatBuffers)([(0,tt.stringToBuffer)("blob"),(0,tt.stringToBuffer)(l.toString())]),y=(0,tt.concatBuffers)([await At().hash(b,"SHA-384"),a.digest()]);return await At().hash(y,"SHA-384")}else if(Array.isArray(t)){let i=(0,tt.concatBuffers)([(0,tt.stringToBuffer)("list"),(0,tt.stringToBuffer)(t.length.toString())]);return await o1(t,await At().hash(i,"SHA-384"))}let e=t,r=(0,tt.concatBuffers)([(0,tt.stringToBuffer)("blob"),(0,tt.stringToBuffer)(e.byteLength.toString())]),n=(0,tt.concatBuffers)([await At().hash(r,"SHA-384"),await At().hash(e,"SHA-384")]);return await At().hash(n,"SHA-384")}async function o1(t,e){if(t.length<1)return e;let r=(0,tt.concatBuffers)([e,await Ri(t[0])]),n=await At().hash(r,"SHA-384");return await o1(t.slice(1),n)}var Vf=A(Iu(),1),O1=A(vs(),1),k1=A(I1(),1),j6=Vf.default.default?Vf.default.default:Vf.default,jf=class extends j6{getPublicKey(e){throw new Error("Unimplemented")}},Q6;function At(){return Q6??=new jf}var N1=A(Hr(),1);import{constants as W6,createSign as Y6}from"crypto";var ua=class{_key;pk;signatureType=1;ownerLength=Je[1].pubLength;signatureLength=Je[1].sigLength;_publicKey;get publicKey(){return this._publicKey}constructor(e,r){this._key=e,this.pk=r,r||(this.pk=At().getPublicKey(JSON.parse(e)))}sign(e){return Y6("sha256").update(e).sign({key:this._key,padding:W6.RSA_PKCS1_PSS_PADDING})}static async verify(e,r,n){return await At().verify(Buffer.isBuffer(e)?N1.default.encode(e):e,r,n)}};var Bb=A(_b(),1),Cb=A(Hr(),1);var da=class extends ua{jwk;constructor(e){super((0,Bb.jwkTopem)(e),e.n),this.jwk=e}get publicKey(){if(!this.pk)throw new Error("ArweaveSigner - pk is undefined");return Cb.default.toBuffer(this.pk)}sign(e){return At().sign(this.jwk,e)}static async verify(e,r,n){return await At().verify(e,r,n)}};var dP=A(S(),1),Pb=A(Hr(),1);var ha=class{_publicKey;ownerLength=Je[2].pubLength;signatureLength=Je[2].sigLength;signatureType=2;pem;provider;constructor(e){if(this.provider=e,!this.provider.publicKey)throw new Error("InjectedSolanaSigner - provider.publicKey is undefined");this._publicKey=this.provider.publicKey.toBuffer()}get publicKey(){return this._publicKey}async sign(e){if(!this.provider.signMessage)throw new Error("Selected Wallet does not support message signing");return await this.provider.signMessage(e)}static async verify(e,r,n){let i=e;return typeof e=="string"&&(i=Pb.default.toBuffer(e)),Li(Buffer.from(n),Buffer.from(r),Buffer.from(i))}};var yD=A(S(),1),_y=A(Cs(),1),By=A(ks(),1);var fh=A(at(),1),Cy=A(Js(),1),Py=A(ef(),1),ch=class{signer;publicKey;ownerLength=Je[Ie.ETHEREUM].pubLength;signatureLength=Je[Ie.ETHEREUM].sigLength;signatureType=Ie.ETHEREUM;constructor(e){this.signer=e.getSigner()}async setPublicKey(){let e="sign this message to connect to Bundlr.Network",r=await this.signer.signMessage(e),n=await(0,_y.hashMessage)(e),i=(0,By.recoverPublicKey)((0,fh.arrayify)(n),r);this.publicKey=Buffer.from((0,fh.arrayify)(i))}async sign(e){this.publicKey||await this.setPublicKey();let r=await this.signer.signMessage(e);return Buffer.from(r.slice(2),"hex")}static verify(e,r,n){let i=(0,Cy.computeAddress)(e);return(0,Py.verifyMessage)(r,n)===i}};var BD=A(S(),1);var jo=A(ky(),1),Mi=class extends Fr{get publicKey(){return jo.default.decode(this.pk)}get key(){return jo.default.decode(this._key)}constructor(e){let r=jo.default.decode(e);super(jo.default.encode(r.subarray(0,32)),jo.default.encode(r.subarray(32,64)))}};var eO=A(S(),1);var WI=A(S(),1);var VI=A(S(),1),I3=A(Hr(),1),$h=A(wh(),1);var XI=A(S(),1),B3=A(_3(),1);import{Buffer as qa}from"buffer";function Yh(t){return t=C3(t),(0,B3.default)("keccak256").update(t).digest()}function C3(t){if(!qa.isBuffer(t))if(Array.isArray(t))t=qa.from(t);else if(typeof t=="string")P3(t)?t=qa.from(Gc(L3(t)),"hex"):t=qa.from(t);else if(typeof t=="number")t=F3(t);else if(typeof t=="bigint")t=h_(t);else if(t==null)t=qa.allocUnsafe(0);else throw new Error("invalid type");return t}function P3(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}function Gc(t){if(typeof t!="string")throw new Error(`while padding to even, value must be string, is currently ${typeof t}, while padToEven.`);return t.length%2&&(t=`0${t}`),t}function L3(t){return typeof t!="string"?t:R3(t)?t.slice(2):t}function R3(t){if(typeof t!="string")throw new Error("value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return t.startsWith("0x")}function F3(t){let e=D3(t);return qa.from(Gc(e.slice(2)),"hex")}function D3(t){return`0x${t.toString(16)}`}function h_(t){let e=t.toString(16);return qa.from(Gc(e),"hex")}typeof window<"u"&&(window.keccak256=Yh);var lf=Yh,p_={intToBuffer:F3,intToHex:D3,isHexPrefixed:R3,stripHexPrefix:L3,padToEven:Gc,isHexString:P3,toBuffer:C3};var Ga=class{_key;ownerLength=Je[Ie.ETHEREUM].pubLength;signatureLength=Je[Ie.ETHEREUM].sigLength;signatureType=Ie.ETHEREUM;pk;constructor(e,r){this._key=e,this.pk=r.toString("hex")}get publicKey(){throw new Error("You must implement `publicKey`")}get key(){return Buffer.from(this._key,"hex")}static async verify(e,r,n){let i=e;typeof e=="string"&&(i=I3.default.toBuffer(e));let a=!1;try{a=$h.default.ecdsaVerify(n,lf(Buffer.from(r)),i)}catch{}return a}async sign(e){return $h.default.ecdsaSign(lf(Buffer.from(e)),Buffer.from(this.key)).signature}};var ep=A(wh(),1),O3=A(Hr(),1),k3=A(at(),1),N3=A(ef(),1),J3=A(Cs(),1),Ur=class extends Ga{get publicKey(){return Buffer.from(this.pk,"hex")}constructor(e){e.startsWith("0x")&&(e=e.slice(2));let r=Buffer.from(e,"hex"),n=ep.default.publicKeyCreate(r,!1);super(e,Buffer.from(n))}async sign(e){return new N3.Wallet(this._key).signMessage(e).then(n=>Buffer.from(n.slice(2),"hex"))}static async verify(e,r,n){return ep.default.ecdsaVerify(n.length===65?n.slice(0,-1):n,(0,k3.arrayify)((0,J3.hashMessage)(r)),typeof e=="string"?O3.default.toBuffer(e):e)}};var df=class extends Ur{};var nO=A(S(),1);var hf=class extends Mi{constructor(e){super(e.replace("ed25519:",""))}};var oO=A(S(),1);var pf=class extends Fr{get publicKey(){return Buffer.from(this.pk)}get key(){return Buffer.from(this._key)}constructor(e,r){super(e.subarray(0,32),r)}};var cO=A(S(),1);var Xa=class extends ha{signatureType=4;constructor(e){super(e)}async sign(e){return super.sign(Buffer.from(Buffer.from(e).toString("hex")))}static async verify(e,r,n){return super.verify(e,Buffer.from(Buffer.from(r).toString("hex")),n)}};var dO=A(S(),1);var bf=class extends Mi{signatureType=4;constructor(e){super(e)}async sign(e){return super.sign(Buffer.from(Buffer.from(e).toString("hex")))}static async verify(e,r,n){return super.verify(e,Buffer.from(Buffer.from(r).toString("hex")),n)}};var bO=A(S(),1);var gf=class extends Fr{constructor(e,r){super(e,r)}get publicKey(){return Buffer.from(this.pk.slice(2),"hex")}get key(){return Buffer.from(this._key.slice(2),"hex")}};var xO=A(S(),1);var za=class{_publicKey;ownerLength=Je[Ie.INJECTEDAPTOS].pubLength;signatureLength=Je[Ie.INJECTEDAPTOS].sigLength;signatureType=Ie.INJECTEDAPTOS;pem;provider;constructor(e,r){this.provider=e,this._publicKey=r}get publicKey(){return this._publicKey}async sign(e){if(!this.provider.signMessage)throw new Error("Selected Wallet does not support message signing");let n=(await this.provider.signMessage({message:Buffer.from(e).toString("hex"),nonce:"bundlr"})).signature;return typeof n=="string"?Buffer.from(n,"hex"):n.data.toUint8Array()}static async verify(e,r,n){let i=e;return Li(Buffer.from(n),Buffer.from(`APTOS
39
+ }`;return t.queryKey&&(X=`${t.queryKey}: ${X}`),X}async function H8(t){try{let e=t.gateway.startsWith("http://")||t.gateway.startsWith("https://")?t.gateway:`https://${t.gateway}`,r=new URL(e);(!r.pathname||r.pathname==="/")&&(r.pathname="/graphql");let n=await fetch(r.toString(),{method:"POST",headers:{"Content-Type":"application/json","Codec-Device":"json@1.0"},body:t.query});if(!n.ok)throw new Error(`HTTP ${n.status}`);return await n.json()}catch(e){throw e}}var Rp=!0;async function q8(t,e){let r=fa(e.tags??[],Je.keys.onBoot),n=[{name:"Authority",value:t.node?.authority??dt.mu},{name:"Process-Timestamp",value:new Date().getTime().toString()}];e.tags&&e.tags.length>0&&(r&&Rp?e.tags.filter(a=>a.name!==Je.keys.onBoot).forEach(a=>n.push(a)):e.tags.forEach(i=>n.push(i)));try{let i=await t.ao.spawn({module:e.module,scheduler:t.node?.scheduler||e.scheduler,signer:t.signer,tags:bu(n),data:e.data});if(Ye(`Process ID: ${i}`),Ye("Sending initial message..."),r&&Rp){Ye(`Evaluating: ${r}...`);let l=await(await fetch(os(r))).text();await et(t,{processId:i,action:"Eval",data:l,useRawData:!0})}return await et(t,{processId:i,action:"Init"}),i}catch(i){throw console.log(i),new Error(i.message??"Error spawning process")}}function Fp(t){return async e=>await et(t,e)}async function et(t,e){try{let r=[{name:"Action",value:e.action},{name:"Message-Timestamp",value:new Date().getTime().toString()}];e.tags&&r.push(...e.tags);let n=e.useRawData?e.data:JSON.stringify(e.data),i=await t.ao.message({process:e.processId,signer:t.signer,tags:bu(r),data:n});if(e.returnResult||e.deepResult){Ye("Returning message result...");let a=await t.ao.result({process:e.processId,message:i});if(e.deepResult)if(Ye("Searching for nested result..."),a?.Messages?.length>0){let l=a.Messages[0],b=fa(l.Tags,"Reference");if(!b)return Ye("No reference found"),a;Ye(`Reference: ${b}`);let y=[{name:"From-Process",values:[e.processId]},{name:"Reference",values:[b]}];switch(t.ao.MODE){case"mainnet":y=Pp(y);break;case"legacy":break}let x=Ln(t),_=await gu(()=>x({tags:y}),{maxRetries:100,delayMs:1e3,backoff:!0,validate:F=>F?.data?.length>0});Ye("Returning nested result...");let C=_.data[0].node.id;switch(t.ao.MODE){case"mainnet":let F=[{name:"body+link",values:[C]}];Ye("Searching for slot...");let z=(await gu(()=>x({tags:F}),{maxRetries:100,delayMs:1e3,backoff:!0,validate:X=>X?.data?.length>0}))?.data?.[0].node,W=fa(z.tags,"slot");W&&(Ye(`Slot: ${W}`),C=W);break;case"legacy":break}return await t.ao.result({process:e.deepResult.target,message:C})}else return Ye("No nested message found"),a;return a}return i}catch(r){throw new Error(r)}}function Dp(t){return async e=>await Br(t,e)}async function Br(t,e){let n=`${t.node?.url??Tp.defaultNode}/${e.processId}~process@1.0/${e.hydrate?"now":"compute"}`;e.path&&e.appendPath&&(n+=`/${e.path}`);try{let i={};i["require-codec"]="application/json",i["accept-bundle"]="true";let a=await fetch(n,{headers:i});if(a.ok){let l=await a.json();if(e.path&&!e.appendPath)try{return JSON.parse(l[e.path])}catch{return l[e.path]}return l.body??l}throw new Error("Error getting state from HyperBEAM.")}catch(i){if(e.fallbackAction)return await Ff(t,{processId:e.processId,action:e.fallbackAction,tags:e.tags});throw i}}function Ip(t){return async e=>await Ff(t,e)}async function Ff(t,e){try{let r=[{name:"Action",value:e.action}];e.tags&&r.push(...e.tags);let n;if(typeof e.data=="object")n=JSON.stringify(e.data||{});else if(typeof e.data=="string"){try{JSON.parse(e.data)}catch(a){throw console.error(a),new Error("Invalid JSON data")}n=e.data}let i=await t.ao.dryrun({process:e.processId,tags:r,data:n});if(i.Messages&&i.Messages.length){if(i.Messages[0].Data){let a=i?.Messages?.[0]?.Data;try{return JSON.parse(a)}catch{return a}}else if(i.Messages[0].Tags)return i.Messages[0].Tags.reduce((a,l)=>(a[l.name]=l.value,a),{})}}catch(r){throw new Error(r.message??"Error dryrunning process")}}async function G8(t,e){try{let{Messages:r}=await t.ao.result({message:e.messageId,process:e.processId});if(r&&r.length){let n={};return r.forEach(i=>{let a=fa(i.Tags,"Action")||e.action,l=null,b=i.Data;if(b)try{l=JSON.parse(b)}catch{l=b}let y=fa(i.Tags,"Status"),x=fa(i.Tags,"Message");n[a]={id:e.messageId,status:y,message:x,data:l}}),n}else return null}catch(r){console.error(r)}}async function ss(t,e){let r=null;if(e.evalSrc)r=e.evalSrc;else if(e.evalTxId)try{r=await(await fetch(os(e.evalTxId))).text()}catch(n){throw new Error(n)}if(r)try{let n=await et(t,{processId:e.processId,action:"Eval",data:r,tags:e.evalTags||null,useRawData:!0});return Ye(`Eval: ${n}`),await G8(t,{processId:e.processId,messageId:n,action:"Eval"})}catch(n){throw new Error(n.message??"Error sending process eval")}return null}function Rn(t){return async(e,r)=>{try{let n={module:e.module||dt.module,scheduler:t.node?.scheduler||dt.scheduler};e.data&&(n.data=e.data),e.tags&&(n.tags=e.tags),r&&r("Spawning process...");let i=await q8(t,n);if(e.evalTxId||e.evalSrc){r&&r("Process retrieved!"),r&&r("Sending eval...");try{await ss(t,{processId:i,evalTxId:e.evalTxId||null,evalSrc:e.evalSrc||null,evalTags:e.evalTags})&&r&&r("Eval complete")}catch(a){throw new Error(a.message??"Error creating process")}}return i}catch(n){throw new Error(n.message??"Error creating process")}}}var QN=A(S(),1);var ON=A(S(),1);var op={};yp(op,{AVSCTap:()=>Tf,AlgorandSigner:()=>bf,AptosSigner:()=>vf,ArconnectSigner:()=>yf,Arweave:()=>N1.default,ArweaveSigner:()=>ha,Bundle:()=>Wc,BundleItem:()=>ap,CryptoDriver:()=>jf,Curve25519:()=>Fr,DataItem:()=>Vc,EthereumSigner:()=>Ur,HexInjectedSolanaSigner:()=>za,HexSolanaSigner:()=>gf,InjectedAptosSigner:()=>Ka,InjectedEthereumSigner:()=>ch,InjectedSolanaSigner:()=>pa,InjectedTypedEthereumSigner:()=>tp,KyveSigner:()=>wf,MAX_TAG_BYTES:()=>Zc,MIN_BINARY_SIZE:()=>jc,MultiSignatureAptosSigner:()=>Za,NearSigner:()=>pf,PolygonSigner:()=>hf,Rsa4096:()=>la,SIG_CONFIG:()=>Ue,SignatureConfig:()=>Ie,Signer:()=>mu,SolanaSigner:()=>Mi,Transaction:()=>k1.default,TypedEthereumSigner:()=>Va,bundleAndSignData:()=>w_,byteArrayToLong:()=>mt,concatBuffers:()=>tt.concatBuffers,createData:()=>Bf,deepHash:()=>Ri,deserializeTags:()=>ns,exportForTesting:()=>b_,getCryptoDriver:()=>At,getSignatureAndId:()=>G3,indexToType:()=>Af,keccak256:()=>Yh,longTo16ByteArray:()=>v_,longTo32ByteArray:()=>Kc,longTo8ByteArray:()=>zc,longToNByteArray:()=>Mf,secp256k1:()=>Xa,serializeTags:()=>np,shortTo2ByteArray:()=>rp,sign:()=>Qc,stringToBuffer:()=>tt.stringToBuffer,unbundleData:()=>y_});var uN=A(S(),1);var vk=A(S(),1);var oB=A(S(),1),mu=class{publicKey;signatureType;signatureLength;ownerLength;pem;static verify(e,r,n,i){throw new Error("You must implement verify method on child")}};var uk=A(S(),1);var wB=A(S(),1),jp=A(Hr(),1);var pB=A(S(),1),Ie;(function(t){t[t.ARWEAVE=1]="ARWEAVE",t[t.ED25519=2]="ED25519",t[t.ETHEREUM=3]="ETHEREUM",t[t.SOLANA=4]="SOLANA",t[t.INJECTEDAPTOS=5]="INJECTEDAPTOS",t[t.MULTIAPTOS=6]="MULTIAPTOS",t[t.TYPEDETHEREUM=7]="TYPEDETHEREUM",t[t.KYVE=101]="KYVE"})(Ie||(Ie={}));var Ue={[Ie.ARWEAVE]:{sigLength:512,pubLength:512,sigName:"arweave"},[Ie.ED25519]:{sigLength:64,pubLength:32,sigName:"ed25519"},[Ie.ETHEREUM]:{sigLength:65,pubLength:65,sigName:"ethereum"},[Ie.SOLANA]:{sigLength:64,pubLength:32,sigName:"solana"},[Ie.INJECTEDAPTOS]:{sigLength:64,pubLength:32,sigName:"injectedAptos"},[Ie.MULTIAPTOS]:{sigLength:64*32+4,pubLength:32*32+1,sigName:"multiAptos"},[Ie.TYPEDETHEREUM]:{sigLength:65,pubLength:42,sigName:"typedEthereum"},[Ie.KYVE]:{sigLength:65,pubLength:65,sigName:"kyve"}};var vB=A(S(),1);import*as V8 from"crypto";var rr=BigInt(0),Ke=BigInt(1),eo=BigInt(2),j8=BigInt(8),Jp=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),ft=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:Jp,n:Jp,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")});var zp=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),fs=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752"),bB=BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742"),Q8=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),W8=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),Y8=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),$8=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952"),Ot=class t{constructor(e,r,n,i){this.x=e,this.y=r,this.z=n,this.t=i}static fromAffine(e){if(!(e instanceof wt))throw new TypeError("ExtendedPoint#fromAffine: expected Point");return e.equals(wt.ZERO)?t.ZERO:new t(e.x,e.y,Ke,he(e.x*e.y))}static toAffineBatch(e){let r=r6(e.map(n=>n.z));return e.map((n,i)=>n.toAffine(r[i]))}static normalizeZ(e){return this.toAffineBatch(e).map(this.fromAffine)}equals(e){Hp(e);let{x:r,y:n,z:i}=this,{x:a,y:l,z:b}=e,y=he(r*b),x=he(a*i),_=he(n*b),C=he(l*i);return y===x&&_===C}negate(){return new t(he(-this.x),this.y,this.z,he(-this.t))}double(){let{x:e,y:r,z:n}=this,{a:i}=ft,a=he,l=a(e*e),b=a(r*r),y=a(eo*a(n*n)),x=a(i*l),_=e+r,C=a(a(_*_)-l-b),D=x+b,F=D-y,P=x-b,z=a(C*F),W=a(D*P),X=a(C*P),ne=a(F*D);return new t(z,W,ne,X)}add(e){let{x:r,y:n,z:i,t:a}=this;Hp(e);let{x:l,y:b,z:y,t:x}=e,{a:_,d:C}=ft,D=he,F=D(r*l),P=D(n*b),z=D(a*C*x),W=D(i*y),X=D((r+n)*(l+b)-F-P),ne=D(W-z),$=D(W+z),ae=D(P-_*F),ie=D(X*ne),ee=D($*ae),ce=D(X*ae),te=D(ne*$);return new t(ie,ee,te,ce)}subtract(e){return this.add(e.negate())}precomputeWindow(e){let r=1+256/e,n=[],i=this,a=i;for(let l=0;l<r;l++){a=i,n.push(a);for(let b=1;b<2**(e-1);b++)a=a.add(i),n.push(a);i=a.double()}return n}wNAF(e,r){!r&&this.equals(t.BASE)&&(r=wt.BASE);let n=r&&r._WINDOW_SIZE||1;if(256%n)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let i=r&&_u.get(r);i||(i=this.precomputeWindow(n),r&&n!==1&&(i=t.normalizeZ(i),_u.set(r,i)));let a=t.ZERO,l=t.BASE,b=1+256/n,y=2**(n-1),x=BigInt(2**n-1),_=2**n,C=BigInt(n);for(let D=0;D<b;D++){let F=D*y,P=Number(e&x);e>>=C,P>y&&(P-=_,e+=Ke);let z=F,W=F+Math.abs(P)-1,X=D%2!==0,ne=P<0;P===0?l=l.add(Up(X,i[z])):a=a.add(Up(ne,i[W]))}return t.normalizeZ([a,l])[0]}multiply(e,r){return this.wNAF(Of(e,ft.l),r)}multiplyUnsafe(e){let r=Of(e,ft.l,!1),n=t.BASE,i=t.ZERO;if(r===rr)return i;if(this.equals(i)||r===Ke)return this;if(this.equals(n))return this.wNAF(r);let a=i,l=this;for(;r>rr;)r&Ke&&(a=a.add(l)),l=l.double(),r>>=Ke;return a}isSmallOrder(){return this.multiplyUnsafe(ft.h).equals(t.ZERO)}isTorsionFree(){let e=this.multiplyUnsafe(ft.l/eo).double();return ft.l%eo&&(e=e.add(this)),e.equals(t.ZERO)}toAffine(e){let{x:r,y:n,z:i}=this,a=this.equals(t.ZERO);e==null&&(e=a?j8:kf(i));let l=he(r*e),b=he(n*e),y=he(i*e);if(a)return wt.ZERO;if(y!==Ke)throw new Error("invZ was invalid");return new wt(l,b)}fromRistrettoBytes(){Mu()}toRistrettoBytes(){Mu()}fromRistrettoHash(){Mu()}};Ot.BASE=new Ot(ft.Gx,ft.Gy,Ke,he(ft.Gx*ft.Gy));Ot.ZERO=new Ot(rr,Ke,Ke,rr);function Up(t,e){let r=e.negate();return t?r:e}function Hp(t){if(!(t instanceof Ot))throw new TypeError("ExtendedPoint expected")}function Su(t){if(!(t instanceof ca))throw new TypeError("RistrettoPoint expected")}function Mu(){throw new Error("Legacy method: switch to RistrettoPoint")}var ca=class t{constructor(e){this.ep=e}static calcElligatorRistrettoMap(e){let{d:r}=ft,n=he(fs*e*e),i=he((n+Ke)*Y8),a=BigInt(-1),l=he((a-r*n)*he(n+r)),{isValid:b,value:y}=Pu(i,l),x=he(y*e);Ci(x)||(x=he(-x)),b||(y=x),b||(a=n);let _=he(a*(n-Ke)*$8-l),C=y*y,D=he((y+y)*l),F=he(_*Q8),P=he(Ke-C),z=he(Ke+C);return new Ot(he(D*z),he(P*F),he(F*z),he(D*P))}static hashToCurve(e){e=Pi(e,64);let r=Tu(e.slice(0,32)),n=this.calcElligatorRistrettoMap(r),i=Tu(e.slice(32,64)),a=this.calcElligatorRistrettoMap(i);return new t(n.add(a))}static fromHex(e){e=Pi(e,32);let{a:r,d:n}=ft,i="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",a=Tu(e);if(!i6(us(a),e)||Ci(a))throw new Error(i);let l=he(a*a),b=he(Ke+r*l),y=he(Ke-r*l),x=he(b*b),_=he(y*y),C=he(r*n*x-_),{isValid:D,value:F}=Xp(he(C*_)),P=he(F*y),z=he(F*P*C),W=he((a+a)*P);Ci(W)&&(W=he(-W));let X=he(b*z),ne=he(W*X);if(!D||Ci(ne)||X===rr)throw new Error(i);return new t(new Ot(W,X,Ke,ne))}toRawBytes(){let{x:e,y:r,z:n,t:i}=this.ep,a=he(he(n+r)*he(n-r)),l=he(e*r),b=he(l*l),{value:y}=Xp(he(a*b)),x=he(y*a),_=he(y*l),C=he(x*_*i),D;if(Ci(i*C)){let P=he(r*fs),z=he(e*fs);e=P,r=z,D=he(x*W8)}else D=_;Ci(e*C)&&(r=he(-r));let F=he((n-r)*D);return Ci(F)&&(F=he(-F)),us(F)}toHex(){return ls(this.toRawBytes())}toString(){return this.toHex()}equals(e){Su(e);let r=this.ep,n=e.ep,i=he(r.x*n.y)===he(r.y*n.x),a=he(r.y*n.y)===he(r.x*n.x);return i||a}add(e){return Su(e),new t(this.ep.add(e.ep))}subtract(e){return Su(e),new t(this.ep.subtract(e.ep))}multiply(e){return new t(this.ep.multiply(e))}multiplyUnsafe(e){return new t(this.ep.multiplyUnsafe(e))}};ca.BASE=new ca(Ot.BASE);ca.ZERO=new ca(Ot.ZERO);var _u=new WeakMap,wt=class t{constructor(e,r){this.x=e,this.y=r}_setWindowSize(e){this._WINDOW_SIZE=e,_u.delete(this)}static fromHex(e,r=!0){let{d:n,P:i}=ft;e=Pi(e,32);let a=e.slice();a[31]=e[31]&-129;let l=ds(a);if(r&&l>=i)throw new Error("Expected 0 < hex < P");if(!r&&l>=zp)throw new Error("Expected 0 < hex < 2**256");let b=he(l*l),y=he(b-Ke),x=he(n*b+Ke),{isValid:_,value:C}=Pu(y,x);if(!_)throw new Error("Point.fromHex: invalid y coordinate");let D=(C&Ke)===Ke;return(e[31]&128)!==0!==D&&(C=he(-C)),new t(C,l)}static async fromPrivateKey(e){return(await Lu(e)).point}toRawBytes(){let e=us(this.y);return e[31]|=this.x&Ke?128:0,e}toHex(){return ls(this.toRawBytes())}toX25519(){let{y:e}=this,r=he((Ke+e)*kf(Ke-e));return us(r)}isTorsionFree(){return Ot.fromAffine(this).isTorsionFree()}equals(e){return this.x===e.x&&this.y===e.y}negate(){return new t(he(-this.x),this.y)}add(e){return Ot.fromAffine(this).add(Ot.fromAffine(e)).toAffine()}subtract(e){return this.add(e.negate())}multiply(e){return Ot.fromAffine(this).multiply(e,this).toAffine()}};wt.BASE=new wt(ft.Gx,ft.Gy);wt.ZERO=new wt(rr,Ke);var cs=class t{constructor(e,r){this.r=e,this.s=r,this.assertValidity()}static fromHex(e){let r=Pi(e,64),n=wt.fromHex(r.slice(0,32),!1),i=ds(r.slice(32,64));return new t(n,i)}assertValidity(){let{r:e,s:r}=this;if(!(e instanceof wt))throw new Error("Expected Point instance");return Of(r,ft.l,!1),this}toRawBytes(){let e=new Uint8Array(64);return e.set(this.r.toRawBytes()),e.set(us(this.s),32),e}toHex(){return ls(this.toRawBytes())}};function Kp(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function Bu(t){if(!Kp(t))throw new Error("Uint8Array expected")}function qp(...t){if(t.every(Bu),t.length===1)return t[0];let e=t.reduce((n,i)=>n+i.length,0),r=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let a=t[n];r.set(a,i),i+=a.length}return r}var e6=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function ls(t){Bu(t);let e="";for(let r=0;r<t.length;r++)e+=e6[t[r]];return e}var ui={_0:48,_9:57,A:65,F:70,a:97,f:102};function Gp(t){if(t>=ui._0&&t<=ui._9)return t-ui._0;if(t>=ui.A&&t<=ui.F)return t-(ui.A-10);if(t>=ui.a&&t<=ui.f)return t-(ui.a-10)}function Cu(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let e=t.length,r=e/2;if(e%2)throw new Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let i=0,a=0;i<r;i++,a+=2){let l=Gp(t.charCodeAt(a)),b=Gp(t.charCodeAt(a+1));if(l===void 0||b===void 0){let y=t[a]+t[a+1];throw new Error('hex string expected, got non-hex character "'+y+'" at index '+a)}n[i]=l*16+b}return n}function Zp(t){let r=t.toString(16).padStart(64,"0");return Cu(r)}function us(t){return Zp(t).reverse()}function Ci(t){return(he(t)&Ke)===Ke}function ds(t){return Bu(t),BigInt("0x"+ls(Uint8Array.from(t).reverse()))}var t6=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Tu(t){return he(ds(t)&t6)}function he(t,e=ft.P){let r=t%e;return r>=rr?r:e+r}function kf(t,e=ft.P){if(t===rr||e<=rr)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let r=he(t,e),n=e,i=rr,a=Ke,l=Ke,b=rr;for(;r!==rr;){let x=n/r,_=n%r,C=i-l*x,D=a-b*x;n=r,r=_,i=l,a=b,l=C,b=D}if(n!==Ke)throw new Error("invert: does not exist");return he(i,e)}function r6(t,e=ft.P){let r=new Array(t.length),n=t.reduce((a,l,b)=>l===rr?a:(r[b]=a,he(a*l,e)),Ke),i=kf(n,e);return t.reduceRight((a,l,b)=>l===rr?a:(r[b]=he(a*r[b],e),he(a*l,e)),i),r}function Fn(t,e){let{P:r}=ft,n=t;for(;e-- >rr;)n*=n,n%=r;return n}function n6(t){let{P:e}=ft,r=BigInt(5),n=BigInt(10),i=BigInt(20),a=BigInt(40),l=BigInt(80),y=t*t%e*t%e,x=Fn(y,eo)*y%e,_=Fn(x,Ke)*t%e,C=Fn(_,r)*_%e,D=Fn(C,n)*C%e,F=Fn(D,i)*D%e,P=Fn(F,a)*F%e,z=Fn(P,l)*P%e,W=Fn(z,l)*P%e,X=Fn(W,n)*C%e;return{pow_p_5_8:Fn(X,eo)*t%e,b2:y}}function Pu(t,e){let r=he(e*e*e),n=he(r*r*e),i=n6(t*n).pow_p_5_8,a=he(t*r*i),l=he(e*a*a),b=a,y=he(a*fs),x=l===t,_=l===he(-t),C=l===he(-t*fs);return x&&(a=b),(_||C)&&(a=y),Ci(a)&&(a=he(-a)),{isValid:x||_,value:a}}function Xp(t){return Pu(Ke,t)}function If(t){return he(ds(t),ft.l)}function i6(t,e){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}function Pi(t,e){let r=Kp(t)?Uint8Array.from(t):Cu(t);if(typeof e=="number"&&r.length!==e)throw new Error(`Expected ${e} bytes`);return r}function Of(t,e,r=!0){if(!e)throw new TypeError("Specify max value");if(typeof t=="number"&&Number.isSafeInteger(t)&&(t=BigInt(t)),typeof t=="bigint"&&t<e){if(r){if(rr<t)return t}else if(rr<=t)return t}throw new TypeError("Expected valid scalar: 0 < scalar < max")}function a6(t){return t[0]&=248,t[31]&=127,t[31]|=64,t}function o6(t){if(t=typeof t=="bigint"||typeof t=="number"?Zp(Of(t,zp)):Pi(t),t.length!==32)throw new Error("Expected 32 bytes");return t}function s6(t){let e=a6(t.slice(0,32)),r=t.slice(32,64),n=If(e),i=wt.BASE.multiply(n),a=i.toRawBytes();return{head:e,prefix:r,scalar:n,point:i,pointBytes:a}}var Eu;async function Lu(t){return s6(await to.sha512(o6(t)))}async function Vp(t,e){t=Pi(t);let{prefix:r,scalar:n,pointBytes:i}=await Lu(e),a=If(await to.sha512(r,t)),l=wt.BASE.multiply(a),b=If(await to.sha512(l.toRawBytes(),i,t)),y=he(a+b*n,ft.l);return new cs(l,y).toRawBytes()}function f6(t,e,r){e=Pi(e),r instanceof wt||(r=wt.fromHex(r,!1));let{r:n,s:i}=t instanceof cs?t.assertValidity():cs.fromHex(t),a=Ot.BASE.multiplyUnsafe(i);return{r:n,s:i,SB:a,pub:r,msg:e}}function c6(t,e,r,n){let i=If(n),a=Ot.fromAffine(t).multiplyUnsafe(i);return Ot.fromAffine(e).add(a).subtract(r).multiplyUnsafe(ft.h).equals(Ot.ZERO)}async function Li(t,e,r){let{r:n,SB:i,msg:a,pub:l}=f6(t,e,r),b=await to.sha512(n.toRawBytes(),l.toRawBytes(),a);return c6(l,n,i,b)}wt.BASE._setWindowSize(8);var Bi={node:V8,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},to={bytesToHex:ls,hexToBytes:Cu,concatBytes:qp,getExtendedPublicKey:Lu,mod:he,invert:kf,TORSION_SUBGROUP:["0100000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac037a","0000000000000000000000000000000000000000000000000000000000000080","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc05","ecffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7f","26e8958fc2b227b045c3f489f2ef98f0d5dfac05d3c63339b13802886d53fc85","0000000000000000000000000000000000000000000000000000000000000000","c7176a703d4dd84fba3c0b760d10670f2a2053fa2c39ccc64ec7fd7792ac03fa"],hashToPrivateScalar:t=>{if(t=Pi(t),t.length<40||t.length>1024)throw new Error("Expected 40-1024 bytes of private key as per FIPS 186");return he(ds(t),ft.l-Ke)+Ke},randomBytes:(t=32)=>{if(Bi.web)return Bi.web.getRandomValues(new Uint8Array(t));if(Bi.node){let{randomBytes:e}=Bi.node;return new Uint8Array(e(t).buffer)}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>to.randomBytes(32),sha512:async(...t)=>{let e=qp(...t);if(Bi.web){let r=await Bi.web.subtle.digest("SHA-512",e.buffer);return new Uint8Array(r)}else{if(Bi.node)return Uint8Array.from(Bi.node.createHash("sha512").update(e).digest());throw new Error("The environment doesn't have sha512 function")}},precompute(t=8,e=wt.BASE){let r=e.equals(wt.BASE)?e:new wt(e.x,e.y);return r._setWindowSize(t),r.multiply(eo),r},sha512Sync:void 0};Object.defineProperties(to,{sha512Sync:{configurable:!1,get(){return Eu},set(t){Eu||(Eu=t)}}});var Fr=class{_key;pk;ownerLength=Ue[2].pubLength;signatureLength=Ue[2].sigLength;_publicKey;get publicKey(){return this._publicKey}signatureType=2;constructor(e,r){this._key=e,this.pk=r}get key(){throw new Error("You must implement `key`")}sign(e){return Vp(Buffer.from(e),Buffer.from(this.key))}static async verify(e,r,n){let i=e;return typeof e=="string"&&(i=jp.default.toBuffer(e)),Li(Buffer.from(n),Buffer.from(r),Buffer.from(i))}};var GO=A(S(),1);var cP=A(S(),1);var yC=A(S(),1);var pC=A(S(),1),tt=A(gn(),1);var CB=A(S(),1);import{createHash as y6}from"crypto";async function Ri(t){if(typeof t[Symbol.asyncIterator]=="function"){let i=t,a=y6("sha384"),l=0;for await(let x of i)l+=x.byteLength,a.update(x);let b=(0,tt.concatBuffers)([(0,tt.stringToBuffer)("blob"),(0,tt.stringToBuffer)(l.toString())]),y=(0,tt.concatBuffers)([await At().hash(b,"SHA-384"),a.digest()]);return await At().hash(y,"SHA-384")}else if(Array.isArray(t)){let i=(0,tt.concatBuffers)([(0,tt.stringToBuffer)("list"),(0,tt.stringToBuffer)(t.length.toString())]);return await s1(t,await At().hash(i,"SHA-384"))}let e=t,r=(0,tt.concatBuffers)([(0,tt.stringToBuffer)("blob"),(0,tt.stringToBuffer)(e.byteLength.toString())]),n=(0,tt.concatBuffers)([await At().hash(r,"SHA-384"),await At().hash(e,"SHA-384")]);return await At().hash(n,"SHA-384")}async function s1(t,e){if(t.length<1)return e;let r=(0,tt.concatBuffers)([e,await Ri(t[0])]),n=await At().hash(r,"SHA-384");return await s1(t.slice(1),n)}var Vf=A(Iu(),1),k1=A(ms(),1),N1=A(O1(),1),Q6=Vf.default.default?Vf.default.default:Vf.default,jf=class extends Q6{getPublicKey(e){throw new Error("Unimplemented")}},W6;function At(){return W6??=new jf}var J1=A(Hr(),1);import{constants as Y6,createSign as $6}from"crypto";var la=class{_key;pk;signatureType=1;ownerLength=Ue[1].pubLength;signatureLength=Ue[1].sigLength;_publicKey;get publicKey(){return this._publicKey}constructor(e,r){this._key=e,this.pk=r,r||(this.pk=At().getPublicKey(JSON.parse(e)))}sign(e){return $6("sha256").update(e).sign({key:this._key,padding:Y6.RSA_PKCS1_PSS_PADDING})}static async verify(e,r,n){return await At().verify(Buffer.isBuffer(e)?J1.default.encode(e):e,r,n)}};var Cb=A(Bb(),1),Pb=A(Hr(),1);var ha=class extends la{jwk;constructor(e){super((0,Cb.jwkTopem)(e),e.n),this.jwk=e}get publicKey(){if(!this.pk)throw new Error("ArweaveSigner - pk is undefined");return Pb.default.toBuffer(this.pk)}sign(e){return At().sign(this.jwk,e)}static async verify(e,r,n){return await At().verify(e,r,n)}};var hP=A(S(),1),Lb=A(Hr(),1);var pa=class{_publicKey;ownerLength=Ue[2].pubLength;signatureLength=Ue[2].sigLength;signatureType=2;pem;provider;constructor(e){if(this.provider=e,!this.provider.publicKey)throw new Error("InjectedSolanaSigner - provider.publicKey is undefined");this._publicKey=this.provider.publicKey.toBuffer()}get publicKey(){return this._publicKey}async sign(e){if(!this.provider.signMessage)throw new Error("Selected Wallet does not support message signing");return await this.provider.signMessage(e)}static async verify(e,r,n){let i=e;return typeof e=="string"&&(i=Lb.default.toBuffer(e)),Li(Buffer.from(n),Buffer.from(r),Buffer.from(i))}};var wD=A(S(),1),By=A(Ps(),1),Cy=A(Ns(),1);var fh=A(at(),1),Py=A(Us(),1),Ly=A(tf(),1),ch=class{signer;publicKey;ownerLength=Ue[Ie.ETHEREUM].pubLength;signatureLength=Ue[Ie.ETHEREUM].sigLength;signatureType=Ie.ETHEREUM;constructor(e){this.signer=e.getSigner()}async setPublicKey(){let e="sign this message to connect to Bundlr.Network",r=await this.signer.signMessage(e),n=await(0,By.hashMessage)(e),i=(0,Cy.recoverPublicKey)((0,fh.arrayify)(n),r);this.publicKey=Buffer.from((0,fh.arrayify)(i))}async sign(e){this.publicKey||await this.setPublicKey();let r=await this.signer.signMessage(e);return Buffer.from(r.slice(2),"hex")}static verify(e,r,n){let i=(0,Py.computeAddress)(e);return(0,Ly.verifyMessage)(r,n)===i}};var CD=A(S(),1);var jo=A(Ny(),1),Mi=class extends Fr{get publicKey(){return jo.default.decode(this.pk)}get key(){return jo.default.decode(this._key)}constructor(e){let r=jo.default.decode(e);super(jo.default.encode(r.subarray(0,32)),jo.default.encode(r.subarray(32,64)))}};var tO=A(S(),1);var YI=A(S(),1);var jI=A(S(),1),O3=A(Hr(),1),$h=A(wh(),1);var zI=A(S(),1),C3=A(B3(),1);import{Buffer as Ga}from"buffer";function Yh(t){return t=P3(t),(0,C3.default)("keccak256").update(t).digest()}function P3(t){if(!Ga.isBuffer(t))if(Array.isArray(t))t=Ga.from(t);else if(typeof t=="string")L3(t)?t=Ga.from(Gc(R3(t)),"hex"):t=Ga.from(t);else if(typeof t=="number")t=D3(t);else if(typeof t=="bigint")t=p_(t);else if(t==null)t=Ga.allocUnsafe(0);else throw new Error("invalid type");return t}function L3(t,e){return!(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}function Gc(t){if(typeof t!="string")throw new Error(`while padding to even, value must be string, is currently ${typeof t}, while padToEven.`);return t.length%2&&(t=`0${t}`),t}function R3(t){return typeof t!="string"?t:F3(t)?t.slice(2):t}function F3(t){if(typeof t!="string")throw new Error("value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return t.startsWith("0x")}function D3(t){let e=I3(t);return Ga.from(Gc(e.slice(2)),"hex")}function I3(t){return`0x${t.toString(16)}`}function p_(t){let e=t.toString(16);return Ga.from(Gc(e),"hex")}typeof window<"u"&&(window.keccak256=Yh);var df=Yh,b_={intToBuffer:D3,intToHex:I3,isHexPrefixed:F3,stripHexPrefix:R3,padToEven:Gc,isHexString:L3,toBuffer:P3};var Xa=class{_key;ownerLength=Ue[Ie.ETHEREUM].pubLength;signatureLength=Ue[Ie.ETHEREUM].sigLength;signatureType=Ie.ETHEREUM;pk;constructor(e,r){this._key=e,this.pk=r.toString("hex")}get publicKey(){throw new Error("You must implement `publicKey`")}get key(){return Buffer.from(this._key,"hex")}static async verify(e,r,n){let i=e;typeof e=="string"&&(i=O3.default.toBuffer(e));let a=!1;try{a=$h.default.ecdsaVerify(n,df(Buffer.from(r)),i)}catch{}return a}async sign(e){return $h.default.ecdsaSign(df(Buffer.from(e)),Buffer.from(this.key)).signature}};var ep=A(wh(),1),k3=A(Hr(),1),N3=A(at(),1),J3=A(tf(),1),U3=A(Ps(),1),Ur=class extends Xa{get publicKey(){return Buffer.from(this.pk,"hex")}constructor(e){e.startsWith("0x")&&(e=e.slice(2));let r=Buffer.from(e,"hex"),n=ep.default.publicKeyCreate(r,!1);super(e,Buffer.from(n))}async sign(e){return new J3.Wallet(this._key).signMessage(e).then(n=>Buffer.from(n.slice(2),"hex"))}static async verify(e,r,n){return ep.default.ecdsaVerify(n.length===65?n.slice(0,-1):n,(0,N3.arrayify)((0,U3.hashMessage)(r)),typeof e=="string"?k3.default.toBuffer(e):e)}};var hf=class extends Ur{};var iO=A(S(),1);var pf=class extends Mi{constructor(e){super(e.replace("ed25519:",""))}};var sO=A(S(),1);var bf=class extends Fr{get publicKey(){return Buffer.from(this.pk)}get key(){return Buffer.from(this._key)}constructor(e,r){super(e.subarray(0,32),r)}};var uO=A(S(),1);var za=class extends pa{signatureType=4;constructor(e){super(e)}async sign(e){return super.sign(Buffer.from(Buffer.from(e).toString("hex")))}static async verify(e,r,n){return super.verify(e,Buffer.from(Buffer.from(r).toString("hex")),n)}};var hO=A(S(),1);var gf=class extends Mi{signatureType=4;constructor(e){super(e)}async sign(e){return super.sign(Buffer.from(Buffer.from(e).toString("hex")))}static async verify(e,r,n){return super.verify(e,Buffer.from(Buffer.from(r).toString("hex")),n)}};var gO=A(S(),1);var vf=class extends Fr{constructor(e,r){super(e,r)}get publicKey(){return Buffer.from(this.pk.slice(2),"hex")}get key(){return Buffer.from(this._key.slice(2),"hex")}};var yO=A(S(),1);var Ka=class{_publicKey;ownerLength=Ue[Ie.INJECTEDAPTOS].pubLength;signatureLength=Ue[Ie.INJECTEDAPTOS].sigLength;signatureType=Ie.INJECTEDAPTOS;pem;provider;constructor(e,r){this.provider=e,this._publicKey=r}get publicKey(){return this._publicKey}async sign(e){if(!this.provider.signMessage)throw new Error("Selected Wallet does not support message signing");let n=(await this.provider.signMessage({message:Buffer.from(e).toString("hex"),nonce:"bundlr"})).signature;return typeof n=="string"?Buffer.from(n,"hex"):n.data.toUint8Array()}static async verify(e,r,n){let i=e;return Li(Buffer.from(n),Buffer.from(`APTOS
40
40
  message: ${Buffer.from(r).toString("hex")}
41
- nonce: bundlr`),Buffer.from(i))}};var SO=A(S(),1);var Ka=class{_publicKey;ownerLength=Je[Ie.MULTIAPTOS].pubLength;signatureLength=Je[Ie.MULTIAPTOS].sigLength;signatureType=Ie.MULTIAPTOS;collectSignatures;provider;constructor(e,r){this._publicKey=e,this.collectSignatures=r}get publicKey(){return this._publicKey}async sign(e){let{signatures:r,bitmap:n}=await this.collectSignatures(e),i=128,a=new Uint8Array([0,0,0,0]),l=new Set;n.forEach(x=>{if(x>=32)throw new Error(`Invalid bit value ${x}.`);if(l.has(x))throw new Error("Duplicated bits detected.");l.add(x);let _=Math.floor(x/8),C=a[_];C|=i>>x%8,a[_]=C});let b=Buffer.alloc(this.signatureLength),y=0;for(let x=0;x<32;x++)n.includes(x)&&b.set(r[y++],x*64);return b.set(a,this.signatureLength-4),b}static async verify(e,r,n){let a=Je[Ie.MULTIAPTOS].sigLength-4,l=n.slice(0,a),b=n.slice(a),y=!1;for(let x=0;x<32;x++){let _=Math.floor(x/8),C=x-_*8;if((b[_]&128>>C)!==0){let F=l.slice(x*64,(x+1)*64),P=e.slice(x*32,(x+1)*32);await Li(Buffer.from(F),Buffer.from(r),Buffer.from(P))||(y=!0)}}return!y}};var BO=A(S(),1),Xc=A(ef(),1);var Za=class extends Ur{ownerLength=Je[Ie.TYPEDETHEREUM].pubLength;signatureLength=Je[Ie.TYPEDETHEREUM].sigLength;signatureType=Ie.TYPEDETHEREUM;address;signer;constructor(e){super(e),this.address="0x"+lf(super.publicKey.slice(1)).slice(-20).toString("hex"),this.signer=new Xc.Wallet(e)}get publicKey(){return Buffer.from(this.address)}async sign(e){let r=await this.signer._signTypedData(vf,mf,{address:this.address,"Transaction hash":e});return Buffer.from(r.slice(2),"hex")}static async verify(e,r,n){let i=e.toString(),a=(0,Xc.verifyTypedData)(vf,mf,{address:i,"Transaction hash":r},n);return i.toLowerCase()===a.toLowerCase()}},vf={name:"Bundlr",version:"1"},mf={Bundlr:[{name:"Transaction hash",type:"bytes"},{name:"address",type:"address"}]};var RO=A(S(),1);var U3=A(ef(),1);var tp=class{ownerLength=Je[Ie.TYPEDETHEREUM].pubLength;signatureLength=Je[Ie.TYPEDETHEREUM].sigLength;signatureType=Ie.TYPEDETHEREUM;address;signer;publicKey;constructor(e){this.signer=e.getSigner()}async ready(){this.address=(await this.signer.getAddress()).toString().toLowerCase(),this.publicKey=Buffer.from(this.address)}async sign(e){let r=await this.signer._signTypedData(vf,mf,{address:this.address,"Transaction hash":e});return Buffer.from(r.slice(2),"hex")}static verify(e,r,n){let i=e.toString(),a=(0,U3.verifyTypedData)(vf,mf,{address:i,"Transaction hash":r},n);return i.toLowerCase()===a.toLowerCase()}};var OO=A(S(),1);var H3=A(Hr(),1);var xf=class{signer;publicKey;ownerLength=Je[Ie.ARWEAVE].pubLength;signatureLength=Je[Ie.ARWEAVE].sigLength;signatureType=Ie.ARWEAVE;constructor(e){this.signer=e}async setPublicKey(){let e=await this.signer.getActivePublicKey();this.publicKey=H3.default.toBuffer(e)}async sign(e){this.publicKey||await this.setPublicKey();let r={name:"RSA-PSS",saltLength:32},n=await this.signer.signature(e,r);return new Uint8Array(Object.values(n).map(a=>+a))}static async verify(e,r,n){return await At().verify(e,r,n)}};var UO=A(S(),1);var yf=class extends Ur{signatureType=Ie.KYVE};var wf={1:da,2:Fr,3:Ur,4:Xa,5:za,6:Ka,7:Za};var lk=A(S(),1);var Mk=A(S(),1);async function b_(t){return Ri([(0,tt.stringToBuffer)("dataitem"),(0,tt.stringToBuffer)("1"),(0,tt.stringToBuffer)(t.signatureType.toString()),t.rawOwner,t.rawTarget,t.rawAnchor,t.rawTags,t.rawData])}var Af=b_;var Wk=A(S(),1);var Ek=A(S(),1);function Sf(t,e){let r=new Uint8Array(t);if(e<0)throw new Error("Array is unsigned, cannot represent -ve numbers");if(e>2**(t*8)-1)throw new Error(`Number ${e} is too large for an array of ${t} bytes`);for(let n=0;n<r.length;n++){let i=e&255;r[n]=i,e=(e-i)/256}return r}function zc(t){return Sf(8,t)}function rp(t){return Sf(2,t)}function g_(t){return Sf(16,t)}function Kc(t){return Sf(32,t)}function vt(t){let e=0;for(let r=t.length-1;r>=0;r--)e=e*256+t[r];return e}var zk=A(S(),1),Ef=A(Hr(),1);var Uk=A(S(),1);var hn=A(Hr(),1);import{Buffer as Tf}from"buffer";var Ck=A(S(),1);var Mf=class{buf;pos;constructor(e=Buffer.alloc(Zc),r=0){this.buf=e,this.pos=r}writeTags(e){if(!Array.isArray(e))throw new Error("input must be array");let r=e.length,n;if(r)for(this.writeLong(r),n=0;n<r;n++){let i=e[n];if(typeof i?.name!="string"||typeof i?.value!="string")throw new Error(`Invalid tag format for ${i}, expected {name:string, value: string}`);this.writeString(i.name),this.writeString(i.value)}this.writeLong(0)}toBuffer(){let e=Buffer.alloc(this.pos);if(this.pos>this.buf.length)throw new Error(`Too many tag bytes (${this.pos} > ${this.buf.length})`);return this.buf.copy(e,0,0,this.pos),e}writeLong(e){let r=this.buf,n,i;if(e>=-1073741824&&e<1073741824){i=e>=0?e<<1:~e<<1|1;do r[this.pos]=i&127,i>>=7;while(i&&(r[this.pos++]|=128))}else{n=e>=0?e*2:-e*2-1;do r[this.pos]=n&127,n/=128;while(n>=1&&(r[this.pos++]|=128))}this.pos++,this.buf=r}writeString(e){let r=Buffer.byteLength(e),n=this.buf;this.writeLong(r);let i=this.pos;if(this.pos+=r,!(this.pos>n.length)){if(r>64)this.buf.write(e,this.pos-r,r,"utf8");else{let a,l,b,y;for(a=0,l=r;a<l;a++)b=e.charCodeAt(a),b<128?n[i++]=b:b<2048?(n[i++]=b>>6|192,n[i++]=b&63|128):(b&64512)===55296&&((y=e.charCodeAt(a+1))&64512)===56320?(b=65536+((b&1023)<<10)+(y&1023),a++,n[i++]=b>>18|240,n[i++]=b>>12&63|128,n[i++]=b>>6&63|128,n[i++]=b&63|128):(n[i++]=b>>12|224,n[i++]=b>>6&63|128,n[i++]=b&63|128)}this.buf=n}}readLong(){let e=0,r=0,n=this.buf,i,a,l,b;do i=n[this.pos++],a=i&128,e|=(i&127)<<r,r+=7;while(a&&r<28);if(a){l=e,b=268435456;do i=n[this.pos++],l+=(i&127)*b,b*=128;while(i&128);return(l%2?-(l+1):l)/2}return e>>1^-(e&1)}skipLong(){let e=this.buf;for(;e[this.pos++]&128;);}readTags(){let e=[],r;for(;r=this.readLong();)for(r<0&&(r=-r,this.skipLong());r--;){let n=this.readString(),i=this.readString();e.push({name:n,value:i})}return e}readString(){let e=this.readLong(),r=this.pos,n=this.buf;if(this.pos+=e,this.pos>n.length)throw new Error("TAP Position out of range");return this.buf.slice(r,r+e).toString()}};function np(t){if(t?.length===0)return Buffer.allocUnsafe(0);let e=new Mf;return e.writeTags(t),e.toBuffer()}function ns(t){return new Mf(t).readTags()}import{createHash as v_}from"crypto";var jc=80,Zc=4096,Vc=class t{binary;_id;constructor(e){this.binary=e}static isDataItem(e){return e.binary!==void 0}get signatureType(){let e=vt(this.binary.subarray(0,2));if(Ie?.[e]!==void 0)return e;throw new Error("Unknown signature type: "+e)}async isValid(){return t.verify(this.binary)}get id(){return hn.default.encode(this.rawId)}set id(e){this._id=hn.default.toBuffer(e)}get rawId(){return v_("sha256").update(this.rawSignature).digest()}set rawId(e){this._id=e}get rawSignature(){return this.binary.subarray(2,2+this.signatureLength)}get signature(){return hn.default.encode(this.rawSignature)}set rawOwner(e){if(e.byteLength!=this.ownerLength)throw new Error(`Expected raw owner (pubkey) to be ${this.ownerLength} bytes, got ${e.byteLength} bytes.`);this.binary.set(e,2+this.signatureLength)}get rawOwner(){return this.binary.subarray(2+this.signatureLength,2+this.signatureLength+this.ownerLength)}get signatureLength(){return Je[this.signatureType].sigLength}get owner(){return hn.default.encode(this.rawOwner)}get ownerLength(){return Je[this.signatureType].pubLength}get rawTarget(){let e=this.getTargetStart();return this.binary[e]==1?this.binary.subarray(e+1,e+33):Tf.alloc(0)}get target(){return hn.default.encode(this.rawTarget)}get rawAnchor(){let e=this.getAnchorStart();return this.binary[e]==1?this.binary.subarray(e+1,e+33):Tf.alloc(0)}get anchor(){return hn.default.encode(this.rawAnchor)}get rawTags(){let e=this.getTagsStart(),r=vt(this.binary.subarray(e+8,e+16));return this.binary.subarray(e+16,e+16+r)}get tags(){let e=this.getTagsStart();if(vt(this.binary.subarray(e,e+8))==0)return[];let n=vt(this.binary.subarray(e+8,e+16));return ns(Tf.from(this.binary.subarray(e+16,e+16+n)))}get tagsB64Url(){return this.tags.map(r=>({name:hn.default.encode(r.name),value:hn.default.encode(r.value)}))}getStartOfData(){let e=this.getTagsStart(),r=this.binary.subarray(e+8,e+16),n=vt(r);return e+16+n}get rawData(){let e=this.getTagsStart(),r=this.binary.subarray(e+8,e+16),n=vt(r),i=e+16+n;return this.binary.subarray(i,this.binary.length)}get data(){return hn.default.encode(this.rawData)}getRaw(){return this.binary}async sign(e){return this._id=await Qc(this,e),this.rawId}async setSignature(e){this.binary.set(e,2),this._id=Tf.from(await At().hash(e))}isSigned(){return(this._id?.length??0)>0}toJSON(){return{signature:this.signature,owner:this.owner,target:this.target,tags:this.tags.map(e=>({name:hn.default.encode(e.name),value:hn.default.encode(e.value)})),data:this.data}}static async verify(e){if(e.byteLength<jc)return!1;let r=new t(e),n=r.signatureType,i=r.getTagsStart(),a=vt(e.subarray(i,i+8)),l=e.subarray(i+8,i+16),b=vt(l);if(b>Zc)return!1;if(a>0)try{if(ns(Tf.from(e.subarray(i+16,i+16+b))).length!==a)return!1}catch{return!1}let y=wf[n],x=await Af(r);return await y.verify(r.rawOwner,x,r.rawSignature)}async getSignatureData(){return Af(this)}getTagsStart(){let e=this.getTargetStart(),r=this.binary[e]==1,n=e+(r?33:1),i=this.binary[n]==1;return n+=i?33:1,n}getTargetStart(){return 2+this.signatureLength+this.ownerLength}getAnchorStart(){let e=this.getTargetStart()+1,r=this.binary[this.getTargetStart()]==1;return e+=r?32:0,e}},is=Vc;import{createHash as m_}from"crypto";var si=32,Wc=class{length;items;binary;constructor(e){this.binary=e,this.length=this.getDataItemCount(),this.items=this.getItems()}getRaw(){return this.binary}get(e){if(typeof e=="number"){if(e>=this.length)throw new RangeError("Index out of range");return this.getByIndex(e)}else return this.getById(e)}getSizes(){let e=[];for(let r=si;r<si+64*this.length;r+=64)e.push(vt(this.binary.subarray(r,r+32)));return e}getIds(){let e=[];for(let r=si;r<si+64*this.length;r+=64){let n=this.binary.subarray(r+32,r+64);if(n.length===0)throw new Error("Invalid bundle, id specified in headers doesn't exist");e.push(Ef.default.encode(n))}return e}getIdBy(e){if(e>this.length-1)throw new RangeError("Index of bundle out of range");let r=64+64*e;return Ef.default.encode(this.binary.subarray(r,r+32))}async toTransaction(e,r,n){let i=await r.createTransaction({data:this.binary,...e},n);return i.addTag("Bundle-Format","binary"),i.addTag("Bundle-Version","2.0.0"),i}async verify(){for(let e of this.items){let r=await e.isValid(),n=(0,Ef.default)(m_("sha256").update(e.rawSignature).digest());if(!(r&&e.id===n))return!1}return!0}getOffset(e){let r=0;for(let n=si;n<si+64*this.length;n+=64){let i=vt(this.binary.subarray(n,n+32));r+=i;let a=this.binary.subarray(n+32,n+64);if(Buffer.compare(a,e)===0)return{startOffset:r,size:i}}return{startOffset:-1,size:-1}}getByIndex(e){let r=0,n=this.getBundleStart(),i=0,a,l;for(let _=si;_<si+64*this.length;_+=64){if(a=vt(this.binary.subarray(_,_+32)),i++===e){l=this.binary.subarray(_+32,_+64);break}r+=a}let b=n+r,y=this.binary.subarray(b,b+a),x=new is(y);return x.rawId=l,x}getById(e){let r=Ef.default.toBuffer(e),n=this.getOffset(r);if(n.startOffset===-1)throw new Error("Transaction not found");let a=this.getBundleStart()+n.startOffset;return new is(this.binary.subarray(a,a+n.size))}getDataItemCount(){return vt(this.binary.subarray(0,32))}getBundleStart(){return 32+64*this.length}getItems(){let e=new Array(this.length),r=0,n=this.getBundleStart(),i=0;for(let a=si;a<si+64*this.length;a+=64){let l=vt(this.binary.subarray(a,a+32)),b=this.binary.subarray(a+32,a+64);if(b.length===0)throw new Error("Invalid bundle, id specified in headers doesn't exist");let y=n+r,x=this.binary.subarray(y,y+l);r+=l;let _=new is(x);_.rawId=b,e[i]=_,i++}return e}},ip=Wc;function x_(t){return new ip(t)}async function y_(t,e){let r=new Uint8Array(64*t.length),n=await Promise.all(t.map(async(a,l)=>{let b=a.isSigned()?a.rawId:await Qc(a,e),y=new Uint8Array(64);return y.set(Kc(a.getRaw().byteLength),0),y.set(b,32),r.set(y,64*l),a.getRaw()})).then(a=>Buffer.concat(a)),i=Buffer.concat([Buffer.from(Kc(t.length)),Buffer.from(r),n]);return new ip(i)}async function q3(t,e){let r=await Af(t),n=await e.sign(r),i=await At().hash(n);return{signature:Buffer.from(n),id:Buffer.from(i)}}async function Qc(t,e){let{signature:r,id:n}=await q3(t,e);return t.getRaw().set(r,2),n}var rN=A(S(),1),G3=A(Hr(),1);function _f(t,e,r){let n=e.publicKey,i=r?.target?G3.default.toBuffer(r.target):null,a=1+(i?.byteLength??0),l=r?.anchor?Buffer.from(r.anchor):null,b=1+(l?.byteLength??0),y=(r?.tags?.length??0)>0?np(r?.tags):null,x=16+(y?y.byteLength:0),_=Buffer.from(t),C=_.byteLength,D=2+e.signatureLength+e.ownerLength+a+b+x+C,F=Buffer.alloc(D);if(F.set(rp(e.signatureType),0),F.set(new Uint8Array(e.signatureLength).fill(0),2),n.byteLength!==e.ownerLength)throw new Error(`Owner must be ${e.ownerLength} bytes, but was incorrectly ${n.byteLength}`);F.set(n,2+e.signatureLength);let P=2+e.signatureLength+e.ownerLength;if(F[P]=i?1:0,i){if(i.byteLength!==32)throw new Error(`Target must be 32 bytes but was incorrectly ${i.byteLength}`);F.set(i,P+1)}let z=P+a,W=z+1;if(F[z]=l?1:0,l){if(W+=l.byteLength,l.byteLength!==32)throw new Error("Anchor must be 32 bytes");F.set(l,z+1)}F.set(zc(r?.tags?.length??0),W);let X=zc(y?.byteLength??0);F.set(X,W+8),y&&F.set(y,W+16);let ne=W+x;return F.set(_,ne),new is(F)}var nN=A(S(),1);var aN=A(S(),1),ap=class{signatureType;rawSignature;signature;signatureLength;rawOwner;owner;ownerLength;rawTarget;target;rawAnchor;anchor;rawTags;tags;rawData;data;static async verify(...e){throw new Error("You must implement `verify`")}};var sN=A(S(),1);var fN=A(S(),1);var sp={};yp(sp,{default:()=>T_,processStream:()=>X3,streamExportForTesting:()=>E_,streamSigner:()=>M_});var FN=A(S(),1);import{PassThrough as w_,Transform as A_}from"stream";var Va=A(Hr(),1);import{createHash as S_}from"crypto";async function X3(t){let e=z3(t),r=(await e.next()).value;r=await _r(e,r,32);let n=vt(r.subarray(0,32));r=r.subarray(32);let i=64*n;r=await _r(e,r,i);let a=new Array(n);for(let y=0;y<i;y+=64)a[y/64]=[vt(r.subarray(y,y+32)),(0,Va.default)(Buffer.from(r.subarray(y+32,y+64)))];r=r.subarray(i);let l=32+i,b=[];for(let[y,x]of a){r=await _r(e,r,jc),r=await _r(e,r,2);let _=vt(r.subarray(0,2));r=r.subarray(2);let{sigLength:C,pubLength:D,sigName:F}=Je[_];r=await _r(e,r,C);let P=r.subarray(0,C);r=r.subarray(C),r=await _r(e,r,D);let z=r.subarray(0,D);r=r.subarray(D),r=await _r(e,r,1);let W=r[0]===1;W&&(r=await _r(e,r,33));let X=W?r.subarray(1,33):Buffer.allocUnsafe(0);r=r.subarray(W?33:1),r=await _r(e,r,1);let ne=r[0]===1;ne&&(r=await _r(e,r,33));let $=ne?r.subarray(1,33):Buffer.allocUnsafe(0);r=r.subarray(ne?33:1),r=await _r(e,r,8);let ae=vt(r.subarray(0,8));r=r.subarray(8),r=await _r(e,r,8);let ie=vt(r.subarray(0,8));r=r.subarray(8),r=await _r(e,r,ie);let ee=r.subarray(0,ie),ce=ae!==0&&ie!==0?ns(Buffer.from(ee)):[];if(ce.length!==ae)throw new Error("Tags lengths don't match");r=r.subarray(ie);let te=new A_;te._transform=function(d,f,c){this.push(d),c()};let Y=Ri([(0,tt.stringToBuffer)("dataitem"),(0,tt.stringToBuffer)("1"),(0,tt.stringToBuffer)(_.toString()),z,X,$,ee,te]),T=2+C+D+(W?33:1)+(ne?33:1)+16+ie,s=y-T;if(r.byteLength>s)te.write(r.subarray(0,s)),r=r.subarray(s);else{let d=r.byteLength;for(te.write(r);s>d;){if(r=(await e.next()).value,!r)throw new Error(`Not enough data bytes expected: ${s} received: ${d}`);d+=r.byteLength,d>s?te.write(r.subarray(0,r.byteLength-(d-s))):te.write(r)}r=r.subarray(r.byteLength-(d-s))}if(te.end(),x!==(0,Va.default)(S_("sha256").update(P).digest()))throw new Error("ID doesn't match signature");if(!await wf[_].verify(z,await Y,P))throw new Error("Invalid signature");b.push({id:x,sigName:F,signature:(0,Va.default)(Buffer.from(P)),target:(0,Va.default)(Buffer.from(X)),anchor:(0,Va.default)(Buffer.from($)),owner:(0,Va.default)(Buffer.from(z)),tags:ce,dataOffset:l+T,dataSize:s}),l+=T+s}return b}async function M_(t,e,r,n){let i=_f("",r,n),a=new w_,l=[(0,tt.stringToBuffer)("dataitem"),(0,tt.stringToBuffer)("1"),(0,tt.stringToBuffer)(i.signatureType.toString()),i.rawOwner,i.rawTarget,i.rawAnchor,i.rawTags,t],b=await Ri(l),y=Buffer.from(await r.sign(b));return i.setSignature(y),a.write(i.getRaw()),e.pipe(a)}async function _r(t,e,r){if(e.byteLength>=r)return e;let{done:n,value:i}=await t.next();if(n&&!i)throw new Error("Invalid buffer");return _r(t,Buffer.concat([Buffer.from(e),Buffer.from(i)]),r)}async function*z3(t){for await(let e of t)yield e}var T_=X3,E_={readBytes:_r,getReader:z3};var __={...op,stream:sp};globalThis.arbundles??=__;var qN=A(S(),1);var JN=A(S(),1);function fp(){return typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative"?"react-native":typeof window<"u"&&typeof window.document<"u"?"browser":"node"}var cp=class{async dispatch(e){if(typeof window>"u"||!window.arweaveWallet)throw new Error("ArConnect wallet not found");return window.arweaveWallet.dispatch(e)}async sign(e){if(typeof window>"u"||!window.arweaveWallet)throw new Error("ArConnect wallet not found");let r=await window.arweaveWallet.signature(e,{name:"RSA-PSS",saltLength:32});return new Uint8Array(r)}async getActivePublicKey(){if(typeof window>"u"||!window.arweaveWallet)throw new Error("ArConnect wallet not found");return window.arweaveWallet.getActivePublicKey()}async getAddress(){if(typeof window>"u"||!window.arweaveWallet)throw new Error("ArConnect wallet not found");return window.arweaveWallet.getActiveAddress()}async isConnected(){return typeof window<"u"&&!!window.arweaveWallet}},Yc=class{async readAsArrayBuffer(e){if(e instanceof File)return await e.arrayBuffer();if(e instanceof ArrayBuffer)return e;if(e instanceof Uint8Array)return e.buffer.slice(0);if(typeof e=="string"){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n.buffer.slice(0)}throw new Error("Unsupported file type")}getContentType(e){return e instanceof File?e.type:"application/octet-stream"}getSize(e){return e instanceof File?e.size:e instanceof ArrayBuffer||e instanceof Uint8Array?e.byteLength:0}createFile(e,r,n){let i;if(e instanceof Uint8Array)i=e;else if(e instanceof ArrayBuffer)i=new Uint8Array(e);else{let a=atob(e);i=new Uint8Array(a.length);for(let l=0;l<a.length;l++)i[l]=a.charCodeAt(l)}return{data:i,type:r||"application/octet-stream",size:i.byteLength,name:n||"file"}}isFile(e){return e instanceof File}},$c=class{createBlob(e,r){let n=e instanceof Uint8Array?e:new Uint8Array(e);return new Blob([n],{type:r||"application/octet-stream"})}async readAsArrayBuffer(e){return await e.arrayBuffer()}slice(e,r,n){return e.slice(r,n)}getSize(e){return e.size}},eu=class{randomUUID(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}getRandomValues(e){return crypto.getRandomValues(e)}randomBytes(e){let r=new Uint8Array(e);return this.getRandomValues(r)}},up=class{async getItem(e){return localStorage.getItem(e)}async setItem(e,r){localStorage.setItem(e,r)}async removeItem(e){localStorage.removeItem(e)}async clear(){localStorage.clear()}},tu=class{encode(e){if(typeof e=="string")return btoa(e);let r=e instanceof Uint8Array?e:new Uint8Array(e);return btoa(String.fromCharCode(...Array.from(r)))}decode(e){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}btoa(e){return btoa(e)}atob(e){return atob(e)}},lp=class{async dispatch(e){throw new Error("React Native wallet provider not configured. Please provide a custom WalletProvider implementation.")}async sign(e){throw new Error("React Native wallet provider not configured. Please provide a custom WalletProvider implementation.")}async getActivePublicKey(){throw new Error("React Native wallet provider not configured. Please provide a custom WalletProvider implementation.")}async getAddress(){throw new Error("React Native wallet provider not configured. Please provide a custom WalletProvider implementation.")}async isConnected(){return!1}},dp=class{async readAsArrayBuffer(e){if(e instanceof ArrayBuffer)return e;if(e instanceof Uint8Array)return e.buffer.slice(0);if(typeof e=="string")return this.base64ToUint8Array(e).buffer.slice(0);if(e?.data)return this.readAsArrayBuffer(e.data);throw new Error("Unsupported file type for React Native")}getContentType(e){return e?.type?e.type:"application/octet-stream"}getSize(e){return e?.size?e.size:e instanceof ArrayBuffer||e instanceof Uint8Array?e.byteLength:e?.data?this.getSize(e.data):0}createFile(e,r,n){let i;return e instanceof Uint8Array?i=e:e instanceof ArrayBuffer?i=new Uint8Array(e):i=this.base64ToUint8Array(e),{data:i,type:r||"application/octet-stream",size:i.byteLength,name:n||"file"}}isFile(e){return e?.data!==void 0&&e?.type!==void 0}base64ToUint8Array(e){let r=e.includes(",")?e.split(",")[1]:e,n=this.atobPolyfill(r),i=new Uint8Array(n.length);for(let a=0;a<n.length;a++)i[a]=n.charCodeAt(a);return i}atobPolyfill(e){let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="",i=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");i<e.length;){let a=r.indexOf(e.charAt(i++)),l=r.indexOf(e.charAt(i++)),b=r.indexOf(e.charAt(i++)),y=r.indexOf(e.charAt(i++)),x=a<<2|l>>4,_=(l&15)<<4|b>>2,C=(b&3)<<6|y;n+=String.fromCharCode(x),b!==64&&(n+=String.fromCharCode(_)),y!==64&&(n+=String.fromCharCode(C))}return n}},hp=class{createBlob(e,r){return e instanceof Uint8Array?e:new Uint8Array(e)}async readAsArrayBuffer(e){if(e instanceof ArrayBuffer)return e;if(e instanceof Uint8Array)return e.buffer.slice(0);throw new Error("Unsupported blob type for React Native")}slice(e,r,n){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return e.slice(r,n);throw new Error("Unsupported blob type for slicing")}getSize(e){return e instanceof Uint8Array||e instanceof ArrayBuffer?e.byteLength:0}},pp=class{randomUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}getRandomValues(e){if(typeof crypto<"u"&&crypto.getRandomValues)return crypto.getRandomValues(e);for(let r=0;r<e.length;r++)e[r]=Math.floor(Math.random()*256);return e}randomBytes(e){let r=new Uint8Array(e);return this.getRandomValues(r)}},bp=class{constructor(){this.cache=new Map}async getItem(e){return this.cache.get(e)||null}async setItem(e,r){this.cache.set(e,r)}async removeItem(e){this.cache.delete(e)}async clear(){this.cache.clear()}},gp=class{encode(e){if(typeof e=="string")return this.btoaPolyfill(e);let r=e instanceof Uint8Array?e:new Uint8Array(e);return this.btoaPolyfill(String.fromCharCode(...Array.from(r)))}decode(e){let r=this.atobPolyfill(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}btoa(e){return this.btoaPolyfill(e)}atob(e){return this.atobPolyfill(e)}btoaPolyfill(e){let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="",i=0;for(;i<e.length;){let a=e.charCodeAt(i++),l=i<e.length?e.charCodeAt(i++):NaN,b=i<e.length?e.charCodeAt(i++):NaN,y=a>>2,x=(a&3)<<4|l>>4,_=(l&15)<<2|b>>6,C=b&63;isNaN(l)?n+=r.charAt(y)+r.charAt(x)+"==":isNaN(b)?n+=r.charAt(y)+r.charAt(x)+r.charAt(_)+"=":n+=r.charAt(y)+r.charAt(x)+r.charAt(_)+r.charAt(C)}return n}atobPolyfill(e){let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="",i=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");i<e.length;){let a=r.indexOf(e.charAt(i++)),l=r.indexOf(e.charAt(i++)),b=r.indexOf(e.charAt(i++)),y=r.indexOf(e.charAt(i++)),x=a<<2|l>>4,_=(l&15)<<4|b>>2,C=(b&3)<<6|y;n+=String.fromCharCode(x),b!==64&&(n+=String.fromCharCode(_)),y!==64&&(n+=String.fromCharCode(C))}return n}};function Bf(t){let e=fp(),r;switch(e){case"browser":r={wallet:new cp,file:new Yc,blob:new $c,crypto:new eu,storage:new up,base64:new tu};break;case"react-native":r={wallet:new lp,file:new dp,blob:new hp,crypto:new pp,storage:new bp,base64:new gp};break;case"node":default:r={file:new Yc,blob:new $c,crypto:new eu,base64:new tu};break}return{...r,...t}}function ja(t){return async e=>{if(tr(e))return e;if(!t.arweave)throw new Error("Must initialize with Arweave in order to create transactions");try{return await B_(t,{data:e})}catch(r){throw new Error(r.message??"Error resolving transaction")}}}async function B_(t,e){let n=t.platform||Bf(),i=null,a=null,l=null;if(typeof e.data=="string"){let b=Bp(e.data);i=n.base64.decode(b),a=_p(e.data),l=Cp(i)}else if(n.file.isFile(e.data)){let b=await n.file.readAsArrayBuffer(e.data);i=new Uint8Array(b),a=n.file.getContentType(e.data),l=n.file.getSize(e.data)}else{let b=await n.file.readAsArrayBuffer(e.data);i=new Uint8Array(b),a=n.file.getContentType(e.data),l=n.file.getSize(e.data)}if(i&&a&&l)if(l<Number(hu.dispatchUploadSize))try{if(!n.wallet)throw new Error("Wallet provider not available");let b=await t.arweave.createTransaction({data:i},"use_wallet");return b.addTag(Ve.keys.contentType,a),e.tags&&e.tags.length>0&&e.tags.forEach(x=>b.addTag(x.name,x.value)),(await n.wallet.dispatch(b)).id}catch(b){throw new Error(b.message??"Error dispatching transaction")}else try{let b=n.blob.createBlob(i,a),y=await C_(b,n,{tags:[{name:"Content-Type",value:a},{name:"App-Name",value:"@permaweb/libs"}]},{apiUrl:hu.node1,token:"arweave",chunkSize:5*1024*1024,batchSize:3});return console.log(y),console.log("Uploaded dataItem ID:",y.id),y.id}catch(b){throw new Error(b.message??"Error uploading transaction")}else throw new Error("Error preparing transaction data")}async function C_(t,e,r,n){let{apiUrl:i,token:a,chunkSize:l,batchSize:b=3}=n;if(!e.wallet)throw new Error("Wallet provider not available");let y=e.crypto.randomUUID(),x=new TextEncoder().encode(y),_=await e.wallet.getActivePublicKey(),C=await e.wallet.sign(x),F=(o=>e.base64.encode(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""))(C),W=((await(await fetch("https://payment.ardrive.io/v1/balance",{headers:{"x-nonce":y,"x-signature":F,"x-public-key":_}})).json()).receivedApprovals||[]).map(o=>o.payingAddress),X=new Uint8Array(await e.blob.readAsArrayBuffer(t)),ne={publicKey:e.base64.decode(_),sign:async o=>e.wallet.sign(o),getActivePublicKey:async()=>_},$=_f(X,ne,{...r,anchor:r.anchor||(()=>{let o=e.crypto.randomBytes(32);return e.base64.encode(o).replace(/\+/g,"-").replace(/\//g,"_").slice(0,32)})()});await $.sign(ne);let ae=$.getRaw(),ie=e.blob.createBlob(new Uint8Array(ae),"application/octet-stream"),ee={"x-chunking-version":"2","x-paid-by":W.join(",")},ce=await fetch(`${i}/chunks/${a}/-1/-1`,{headers:ee});if(!ce.ok)throw new Error(`Failed to get upload ID: ${ce.status} ${await ce.text()}`);let te=await ce.json(),Y=te.id;if(l<te.min||l>te.max)throw new Error(`Configured chunkSize ${l} is out of allowed range ${te.min}-${te.max}`);let T=e.blob.getSize(ie),s=[];for(let o=0;o<T;o+=l)s.push(o);let u=new Set;(te.chunks??[]).forEach(([o])=>u.add(Number(o)));let d=s.filter(o=>o>0&&!u.has(o)),f=u.has(0)?[]:[0],c=d.concat(f),v=o=>new Promise(p=>setTimeout(p,o));for(let o=0;o<c.length;o+=b){let p=c.slice(o,o+b);await Promise.all(p.map(async E=>{let g=e.blob.slice(ie,E,E+l),w=await e.blob.readAsArrayBuffer(g),U=null;for(let M=1;M<=3;M++)try{let k=await fetch(`${i}/chunks/${a}/${Y}/${E}`,{method:"POST",headers:{"Content-Type":"application/octet-stream",...ee},body:w});if(!k.ok){let G=await k.text();throw k.status===402?new Error(`402 payment required: ${G}`):new Error(`Chunk upload error ${k.status}: ${G}`)}return}catch(k){if(U=k,M<3){await v(1e3*M);continue}}throw U}))}let m={"Content-Type":"application/octet-stream",...ee},h=await fetch(`${i}/chunks/${a}/${Y}/-1`,{method:"POST",headers:m});if(!h.ok){let o=await h.text();throw new Error(`Finalizing upload failed ${h.status}: ${o}`)}return h.json()}var tJ=A(S(),1);var L_={},eJ=A(S(),1);var qJ=A(S(),1);var pJ=A(S(),1);function K3(t){return async(e,r)=>{let n=I_(e);if(n)throw new Error(n);let i=null;if(e.spawnComments)try{let y=[{name:Ve.keys.onBoot,value:yt.src.comments},{name:Ve.keys.dateCreated,value:new Date().getTime().toString()}];e.users&&y.push({name:"Auth-Users",value:JSON.stringify(e.users)}),i=await Rn(t)({tags:y},r?_=>r(_):void 0),$e(`Comments ID: ${i}`),await new Promise(_=>setTimeout(_,500))}catch(y){console.error(y)}let a=Ep[e.contentType]?.serialize(e.data)??e.data,l={...e};i&&(l.commentsId=i);let b=D_(l);try{return await Rn(t)({tags:b,data:a},r?_=>r(_):void 0)}catch(y){throw new Error(y.message??"Error creating asset")}}}async function F_(t,e,r){try{let n=sr(await Br(t,{processId:e,path:"asset",fallbackAction:"Info"}));if(r?.useGateway){let a=await Ln(t)({gateway:Pn.ao,ids:[e],tags:null,owners:null,cursor:null});return{...a?.data?.[0]?j3(a.data[0]):{},...n}}return{id:e,...n}}catch(n){throw new Error(n.message||"Error fetching atomic asset")}}function Z3(t){return async(e,r)=>await F_(t,e,r)}function V3(t){return async e=>{try{let n=await Ln(t)({gateway:Pn.arweave,ids:e??null,tags:null,owners:null,cursor:null});return n&&n.data.length?n.data.map(i=>j3(i)):null}catch(r){throw new Error(r)}}}function j3(t){let e={id:t.node.id,owner:t.node.owner.address};for(let r of t.node.tags){let n=r.name,a=(n.startsWith(`${Ve.keys.bootloader}-`)?n.slice(`${Ve.keys.bootloader}-`.length):n).split("-").map((b,y)=>y===0?b.toLowerCase():b.charAt(0).toUpperCase()+b.slice(1).toLowerCase()).join(""),l;try{l=JSON.parse(r.value)}catch{l=r.value.toString()}e[a]=l}return e}function D_(t){let e=[{name:Ve.keys.onBoot,value:t.src??yt.src.asset},{name:Ve.keys.creator,value:t.creator},{name:Ve.keys.assetType,value:t.assetType},{name:Ve.keys.contentType,value:t.contentType},{name:Ve.keys.implements,value:"ANS-110"},{name:Ve.keys.dateCreated,value:new Date().getTime().toString()},fr("Name",t.name),fr("Description",t.description),fr("Topics",JSON.stringify(t.topics)),fr("Ticker","ATOMIC"),fr("Denomination",t.denomination?.toString()??"1"),fr("TotalSupply",t.supply?.toString()??"1"),fr("Transferable",t.transferable?.toString()??"true"),fr("Creator",t.creator)];if(t.metadata)for(let r in t.metadata)e.push(fr(Wa(r),t.metadata[r].toString()));return t.users&&e.push({name:"Auth-Users",value:JSON.stringify(t.users)}),t.commentsId&&e.push(fr("Comments",t.commentsId)),t.tags&&t.tags.forEach(r=>e.push(r)),e}function I_(t){if(typeof t!="object"||t===null)return"The provided arguments are invalid or empty.";let e=["name","description","topics","creator","data","contentType","assetType"];for(let r of e)if(!(r in t))return`Missing field '${r}'`;return typeof t.name!="string"||t.name.trim()===""?"Name is required":typeof t.description!="string"?"The description must be a valid string":!Array.isArray(t.topics)||t.topics.length===0?"Topics are required":typeof t.creator!="string"||t.creator.trim()===""?"Creator is required":t.data===void 0||t.data===null?"Data field is required":typeof t.contentType!="string"||t.contentType.trim()===""?"Content type must be a non-empty string":typeof t.assetType!="string"||t.assetType.trim()===""?"Type must be a non-empty string":"supply"in t&&(typeof t.supply!="number"||t.supply<=0)?"Supply must be a positive number":"denomination"in t&&(typeof t.denomination!="number"||t.denomination<=0)?"Denomination must be a positive number":"transferable"in t&&typeof t.transferable!="boolean"?"Transferable must be a boolean value":"metadata"in t&&typeof t.metadata!="object"?"Metadata must be an object":"tags"in t&&(!Array.isArray(t.tags)||t.tags.some(r=>typeof r!="object"))?"Tags must be an array of objects":"src"in t&&typeof t.src!="string"?"Source must be a valid string":null}var wJ=A(S(),1);var O_="eXCtpVbcd_jZ0dmU2PZ8focaKxBGECBQ8wMib7sIVPo",vp="lJovHqM9hwNjHV5JoY9NGWtt0WD-5D4gOqNL2VWW5jk";function Q3(t){return async(e,r)=>{if(!t.signer)throw new Error("No signer provided");let n=ja(t),i=new Date().getTime().toString(),a=[{name:Ve.keys.creator,value:e.creator},{name:Ve.keys.ans110.title,value:as(e.title)},{name:Ve.keys.name,value:as(e.title)},{name:Ve.keys.ans110.description,value:as(e.description)}],l=null,b=null;try{l=e.banner?await n(e.thumbnail):vp,b=e.banner?await n(e.banner):O_,e.thumbnail&&a.push({name:Ve.keys.thumbnail,value:l}),e.banner&&a.push({name:Ve.keys.banner,value:b})}catch(_){console.error(_)}let y=await fetch(Lf(yt.src.collection));if(!y.ok)throw new Error("Unable to fetch process src");let x=await y.text();x=x.replace(/'<NAME>'/g,pu(e.title)),x=x.replace(/'<DESCRIPTION>'/g,pu(e.description)),x=x.replace(/<CREATOR>/g,e.creator),x=x.replace(/<THUMBNAIL>/g,l||vp),x=x.replace(/<BANNER>/g,b||vp),x=x.replace(/<DATECREATED>/g,i),x=x.replace(/<LASTUPDATE>/g,i);try{let _=Rn(t),C=await _({tags:a},r?D=>r(D):void 0);if($e("Sending eval message to collection..."),r&&r("Sending eval message to collection..."),await t.ao.message({process:C,signer:t.signer,tags:[{name:"Action",value:"Eval"}],data:x}),!e.skipRegistry){$e("Sending collection to registry..."),r&&r("Sending collection to registry...");let D=[{name:"Action",value:"Add-Collection"},{name:"CollectionId",value:C},{name:"Name",value:as(e.title)},{name:"Creator",value:e.creator},{name:"DateCreated",value:i}];b&&D.push({name:"Banner",value:b}),l&&D.push({name:"Thumbnail",value:l}),await t.ao.message({process:yt.collectionRegistry,signer:t.signer,tags:D})}if(!e.skipActivity){$e("Creating collection activity process..."),r&&r("Creating collection activity process...");let D=[{name:"CollectionId",value:C},{name:"DateCreated",value:i},{name:"UCM-Process",value:"Collection-Activity"},{name:"On-Boot",value:yt.src.collectionActivity}],F=await _({tags:D},r?P=>r(P):void 0);$e("Adding activity to collection process..."),r&&r("Adding activity to collection process..."),await t.ao.message({process:C,signer:t.signer,tags:[{name:"Action",value:"Eval"}],data:`ActivityProcess = '${F}'`})}return C}catch(_){throw new Error(_.message??"Error creating collection")}}}function W3(t){return async e=>await et(t,{processId:e.creator,action:"Run-Action",tags:[{name:"Forward-To",value:e.collectionId},{name:"Forward-Action",value:"Update-Assets"}],data:{Target:e.collectionId,Action:"Update-Assets",Input:{AssetIds:e.assetIds,UpdateType:e.updateType}}})}function Y3(t){return async e=>{let r=await Br(t,{processId:e,path:"collection",fallbackAction:"Info"});return r?sr(r):null}}function $3(t){return async e=>{let r=e.creator?"Get-Collections-By-User":"Get-Collections",n=await Ff(t,{processId:yt.collectionRegistry,action:r,tags:e.creator?[{name:"Creator",value:e.creator}]:null});return n&&n.Collections&&n.Collections.length?n.Collections.map(a=>({id:a.Id,title:a.Name.replace(/\[|\]/g,""),description:a.Description,creator:a.Creator,dateCreated:a.DateCreated,banner:a.Banner,thumbnail:a.Thumbnail})):null}}var TJ=A(S(),1);function e8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.content)throw new Error("Content cannot be empty");let r=[];return e.parentId&&r.push({name:"Parent-Id",value:e.parentId}),e.metadata&&r.push({name:"Metadata",value:JSON.stringify(e.metadata)}),await et(t,{processId:e.commentsId,action:"Add-Comment",tags:r,data:e.content,useRawData:!0})}catch(r){throw new Error(r.message??"Error creating comment")}}}function t8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");return sr(await Br(t,{processId:e.commentsId,path:"comments",fallbackAction:"Get-Comments"}))}catch(r){throw new Error(r.message??"Error getting comments")}}}function r8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");return await et(t,{processId:e.commentsId,action:"Update-Comment-Status",tags:[{name:"Comment-Id",value:e.commentId},{name:"Status",value:e.status}]})}catch(r){throw new Error(r.message??"Error updating comment status")}}}function n8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");if(!e.content)throw new Error("Content cannot be empty");return await et(t,{processId:e.commentsId,action:"Update-Comment-Content",tags:[{name:"Comment-Id",value:e.commentId}],data:e.content,useRawData:!0})}catch(r){throw new Error(`Error at 'updateCommentContentWith' doing 'Update-Comment-Content': ${r?.message??String(r)}`)}}}function i8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");return await et(t,{processId:e.commentsId,action:"Remove-Comment",tags:[{name:"Comment-Id",value:e.commentId}]})}catch(r){throw new Error(`Error at 'removeCommentWith' doing 'Remove-Comment': ${r?.message??String(r)}`)}}}function a8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");return await et(t,{processId:e.commentsId,action:"Remove-Own-Comment",tags:[{name:"Comment-Id",value:e.commentId}]})}catch(r){throw new Error(`Error at 'removeUserCommentWith' doing 'Remove-Own-Comment': ${r?.message??String(r)}`)}}}function o8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");return await et(t,{processId:e.commentsId,action:"Pin-Comment",tags:[{name:"Comment-Id",value:e.commentId}]})}catch(r){throw new Error(`Error at 'pinCommentWith' doing 'Pin-Comment': ${r?.message??String(r)}`)}}}function s8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");return await et(t,{processId:e.commentsId,action:"Unpin-Comment",tags:[{name:"Comment-Id",value:e.commentId}]})}catch(r){throw new Error(`Error at 'unpinCommentWith' doing 'Unpin-Comment': ${r?.message??String(r)}`)}}}function f8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");return sr(await Br(t,{processId:e.commentsId,path:"rules",fallbackAction:"Get-Rules"}))}catch(r){throw new Error(`Error at 'getRulesWith' doing 'Get-Rules': ${r?.message??String(r)}`)}}}function c8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.rules)throw new Error("Must provide rules");let r={ProfileAgeRequired:e.rules.profileAgeRequired,MutedWords:e.rules.mutedWords,RequireProfileThumbnail:e.rules.requireProfileThumbnail};return await et(t,{processId:e.commentsId,action:"Update-Rules",data:JSON.stringify(r)})}catch(r){throw new Error(`Error at 'updateRulesWith' doing 'Update-Rules': ${r?.message??String(r)}`)}}}var CJ=A(S(),1);function mp(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.targetId)throw new Error("Must provide targetId");if(!e.status)throw new Error("Must provide status");if(!e.moderator)throw new Error("Must provide moderator");let r=[{name:"Target-Type",value:e.targetType},{name:"Target-Id",value:e.targetId},{name:"Status",value:e.status},{name:"Moderator",value:e.moderator}];e.targetContext&&r.push({name:"Target-Context",value:e.targetContext}),e.reason&&r.push({name:"Reason",value:e.reason});let n=e.metadata?JSON.stringify(e.metadata):void 0;return await et(t,{processId:e.moderationId,action:"Add-Moderation-Entry",tags:r,data:n})}catch(r){throw new Error(r.message??"Error adding moderation entry")}}}function ru(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.targetType)throw new Error("Must provide targetType");let r=[{name:"Target-Type",value:e.targetType}];e.targetId&&r.push({name:"Target-Id",value:e.targetId}),e.status&&r.push({name:"Status",value:e.status}),e.targetContext&&r.push({name:"Target-Context",value:e.targetContext}),e.moderator&&r.push({name:"Moderator",value:e.moderator});let n=await Br(t,{processId:e.moderationId,path:"moderation/entries",fallbackAction:"Get-Moderation-Entries",tags:r});return n?sr(n):[]}catch(r){throw new Error(r.message??"Error getting moderation entries")}}}function u8(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.targetId)throw new Error("Must provide targetId");if(!e.status)throw new Error("Must provide status");if(!e.moderator)throw new Error("Must provide moderator");let n=await ru(t)({moderationId:e.moderationId,targetType:e.targetType,targetId:e.targetId});if(!n||n.length===0)return await mp(t)({moderationId:e.moderationId,targetType:e.targetType,targetId:e.targetId,status:e.status,moderator:e.moderator,reason:e.reason});let a=[{name:"Entry-Id",value:n[0].id},{name:"Status",value:e.status},{name:"Moderator",value:e.moderator}];return e.reason&&a.push({name:"Reason",value:e.reason}),await et(t,{processId:e.moderationId,action:"Update-Moderation-Entry",tags:a})}catch(r){throw new Error(r.message??"Error updating moderation entry")}}}function l8(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.targetId)throw new Error("Must provide targetId");let n=await ru(t)({moderationId:e.moderationId,targetType:e.targetType,targetId:e.targetId});if(!n||n.length===0)throw new Error("Moderation entry not found");let i=n[0].id;return await et(t,{processId:e.moderationId,action:"Remove-Moderation-Entry",tags:[{name:"Entry-Id",value:i}]})}catch(r){throw new Error(r.message??"Error removing moderation entry")}}}function d8(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.originZone)throw new Error("Must provide originZone");let r=[{name:"Zone-Id",value:e.originZone},{name:"Moderation-Process-Id",value:e.moderationId}];return e.subscriptionType&&r.push({name:"Subscription-Type",value:e.subscriptionType}),await et(t,{processId:e.moderationId,action:"Add-Moderation-Subscription",tags:r})}catch(r){throw new Error(r.message??"Error adding moderation subscription")}}}function h8(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.originZone)throw new Error("Must provide originZone");return await et(t,{processId:e.moderationId,action:"Remove-Moderation-Subscription",tags:[{name:"Zone-Id",value:e.originZone}]})}catch(r){throw new Error(r.message??"Error removing moderation subscription")}}}function p8(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");let r=await Br(t,{processId:e.moderationId,path:"moderation/subscriptions",fallbackAction:"Get-Moderation-Subscriptions"});if(!r)return[];if(typeof r=="string")try{return JSON.parse(r)}catch{return[]}return r}catch(r){throw new Error(r.message??"Error getting moderation subscriptions")}}}var HJ=A(S(),1);var DJ=A(S(),1);function nu(t){return async(e,r)=>{try{let n=null;if(!e.skipModeration)try{let b=[{name:Ve.keys.onBoot,value:yt.src.moderation},{name:Ve.keys.dateCreated,value:new Date().getTime().toString()}];e.authUsers&&b.push({name:"Auth-Users",value:JSON.stringify(e.authUsers)}),n=await Rn(t)({tags:b},r?x=>r(x):void 0),$e(`Moderation Process ID: ${n}`),await new Promise(x=>setTimeout(x,500))}catch(b){throw console.error("Error creating moderation process:",b),new Error(`Failed to create mandatory moderation process: ${b.message}`)}let i=[{name:Ve.keys.onBoot,value:yt.src.zone.id}];return n&&i.push({name:"Bootloader-Moderation",value:n}),e.tags&&e.tags.length&&e.tags.forEach(b=>i.push(b)),await Rn(t)({data:e.data,tags:i},r?b=>r(b):void 0)}catch(n){throw new Error(n.message??"Error creating zone")}}}function iu(t){return async(e,r)=>{try{let n=Object.entries(e).map(([a,l])=>({key:a,value:l}));return await et(t,{processId:r,action:"Zone-Update",data:n})}catch(n){throw new Error(n)}}}function b8(t){return async(e,r)=>{try{return await et(t,{processId:r,action:"Zone-Append",tags:[{name:"Store-Path",value:e.path}],data:e.data})}catch(n){throw new Error(n)}}}function g8(t){return async(e,r)=>{try{return $e(`Updating zone patch map in process ${r}`),await et(t,{processId:r,action:"Zone-Update-Patch-Map",data:e})}catch(n){throw new Error(n)}}}function v8(t){return async(e,r)=>{if(!tr(r))throw new Error("Invalid zone address");let i=[];for(let a of e){if(!tr(a.granteeId))throw new Error("Invalid granteeId address");if(a.type!=="wallet"&&a.type!=="process")throw new Error("Invalid role type");let b={Id:a.granteeId,Roles:a.roles,Type:a.type,SendInvite:a.sendInvite};a.remoteZonePath&&(b.RemoteZonePath=a.remoteZonePath),i.push(b)}try{return await et(t,{processId:r,action:"Role-Set",tags:[],data:i})}catch(a){throw new Error(a)}}}function m8(t){return async(e,r)=>{if(!(tr(r)&&tr(e.zoneToJoinId)))throw new Error("Invalid zone address");let i=[{name:"Zone-Id",value:e.zoneToJoinId}];e.storePath&&i.push({name:"Store-Path",value:e.storePath});try{return await et(t,{processId:r,action:"Zone-Join",tags:i})}catch(a){throw new Error(a)}}}function au(t){return async e=>{try{return $e(`Updating zone to version ${yt.src.zone.version} with source ${yt.src.zone.id}`),await os(t,{processId:e.zoneId,evalTxId:yt.src.zone.id}),await os(t,{processId:e.zoneId,evalSrc:`
42
- Zone.Version = '${yt.src.zone.version}'
41
+ nonce: bundlr`),Buffer.from(i))}};var MO=A(S(),1);var Za=class{_publicKey;ownerLength=Ue[Ie.MULTIAPTOS].pubLength;signatureLength=Ue[Ie.MULTIAPTOS].sigLength;signatureType=Ie.MULTIAPTOS;collectSignatures;provider;constructor(e,r){this._publicKey=e,this.collectSignatures=r}get publicKey(){return this._publicKey}async sign(e){let{signatures:r,bitmap:n}=await this.collectSignatures(e),i=128,a=new Uint8Array([0,0,0,0]),l=new Set;n.forEach(x=>{if(x>=32)throw new Error(`Invalid bit value ${x}.`);if(l.has(x))throw new Error("Duplicated bits detected.");l.add(x);let _=Math.floor(x/8),C=a[_];C|=i>>x%8,a[_]=C});let b=Buffer.alloc(this.signatureLength),y=0;for(let x=0;x<32;x++)n.includes(x)&&b.set(r[y++],x*64);return b.set(a,this.signatureLength-4),b}static async verify(e,r,n){let a=Ue[Ie.MULTIAPTOS].sigLength-4,l=n.slice(0,a),b=n.slice(a),y=!1;for(let x=0;x<32;x++){let _=Math.floor(x/8),C=x-_*8;if((b[_]&128>>C)!==0){let F=l.slice(x*64,(x+1)*64),P=e.slice(x*32,(x+1)*32);await Li(Buffer.from(F),Buffer.from(r),Buffer.from(P))||(y=!0)}}return!y}};var CO=A(S(),1),Xc=A(tf(),1);var Va=class extends Ur{ownerLength=Ue[Ie.TYPEDETHEREUM].pubLength;signatureLength=Ue[Ie.TYPEDETHEREUM].sigLength;signatureType=Ie.TYPEDETHEREUM;address;signer;constructor(e){super(e),this.address="0x"+df(super.publicKey.slice(1)).slice(-20).toString("hex"),this.signer=new Xc.Wallet(e)}get publicKey(){return Buffer.from(this.address)}async sign(e){let r=await this.signer._signTypedData(mf,xf,{address:this.address,"Transaction hash":e});return Buffer.from(r.slice(2),"hex")}static async verify(e,r,n){let i=e.toString(),a=(0,Xc.verifyTypedData)(mf,xf,{address:i,"Transaction hash":r},n);return i.toLowerCase()===a.toLowerCase()}},mf={name:"Bundlr",version:"1"},xf={Bundlr:[{name:"Transaction hash",type:"bytes"},{name:"address",type:"address"}]};var FO=A(S(),1);var H3=A(tf(),1);var tp=class{ownerLength=Ue[Ie.TYPEDETHEREUM].pubLength;signatureLength=Ue[Ie.TYPEDETHEREUM].sigLength;signatureType=Ie.TYPEDETHEREUM;address;signer;publicKey;constructor(e){this.signer=e.getSigner()}async ready(){this.address=(await this.signer.getAddress()).toString().toLowerCase(),this.publicKey=Buffer.from(this.address)}async sign(e){let r=await this.signer._signTypedData(mf,xf,{address:this.address,"Transaction hash":e});return Buffer.from(r.slice(2),"hex")}static verify(e,r,n){let i=e.toString(),a=(0,H3.verifyTypedData)(mf,xf,{address:i,"Transaction hash":r},n);return i.toLowerCase()===a.toLowerCase()}};var kO=A(S(),1);var q3=A(Hr(),1);var yf=class{signer;publicKey;ownerLength=Ue[Ie.ARWEAVE].pubLength;signatureLength=Ue[Ie.ARWEAVE].sigLength;signatureType=Ie.ARWEAVE;constructor(e){this.signer=e}async setPublicKey(){let e=await this.signer.getActivePublicKey();this.publicKey=q3.default.toBuffer(e)}async sign(e){this.publicKey||await this.setPublicKey();let r={name:"RSA-PSS",saltLength:32},n=await this.signer.signature(e,r);return new Uint8Array(Object.values(n).map(a=>+a))}static async verify(e,r,n){return await At().verify(e,r,n)}};var HO=A(S(),1);var wf=class extends Ur{signatureType=Ie.KYVE};var Af={1:ha,2:Fr,3:Ur,4:za,5:Ka,6:Za,7:Va};var dk=A(S(),1);var Tk=A(S(),1);async function g_(t){return Ri([(0,tt.stringToBuffer)("dataitem"),(0,tt.stringToBuffer)("1"),(0,tt.stringToBuffer)(t.signatureType.toString()),t.rawOwner,t.rawTarget,t.rawAnchor,t.rawTags,t.rawData])}var Sf=g_;var Yk=A(S(),1);var _k=A(S(),1);function Mf(t,e){let r=new Uint8Array(t);if(e<0)throw new Error("Array is unsigned, cannot represent -ve numbers");if(e>2**(t*8)-1)throw new Error(`Number ${e} is too large for an array of ${t} bytes`);for(let n=0;n<r.length;n++){let i=e&255;r[n]=i,e=(e-i)/256}return r}function zc(t){return Mf(8,t)}function rp(t){return Mf(2,t)}function v_(t){return Mf(16,t)}function Kc(t){return Mf(32,t)}function mt(t){let e=0;for(let r=t.length-1;r>=0;r--)e=e*256+t[r];return e}var Kk=A(S(),1),_f=A(Hr(),1);var Hk=A(S(),1);var hn=A(Hr(),1);import{Buffer as Ef}from"buffer";var Pk=A(S(),1);var Tf=class{buf;pos;constructor(e=Buffer.alloc(Zc),r=0){this.buf=e,this.pos=r}writeTags(e){if(!Array.isArray(e))throw new Error("input must be array");let r=e.length,n;if(r)for(this.writeLong(r),n=0;n<r;n++){let i=e[n];if(typeof i?.name!="string"||typeof i?.value!="string")throw new Error(`Invalid tag format for ${i}, expected {name:string, value: string}`);this.writeString(i.name),this.writeString(i.value)}this.writeLong(0)}toBuffer(){let e=Buffer.alloc(this.pos);if(this.pos>this.buf.length)throw new Error(`Too many tag bytes (${this.pos} > ${this.buf.length})`);return this.buf.copy(e,0,0,this.pos),e}writeLong(e){let r=this.buf,n,i;if(e>=-1073741824&&e<1073741824){i=e>=0?e<<1:~e<<1|1;do r[this.pos]=i&127,i>>=7;while(i&&(r[this.pos++]|=128))}else{n=e>=0?e*2:-e*2-1;do r[this.pos]=n&127,n/=128;while(n>=1&&(r[this.pos++]|=128))}this.pos++,this.buf=r}writeString(e){let r=Buffer.byteLength(e),n=this.buf;this.writeLong(r);let i=this.pos;if(this.pos+=r,!(this.pos>n.length)){if(r>64)this.buf.write(e,this.pos-r,r,"utf8");else{let a,l,b,y;for(a=0,l=r;a<l;a++)b=e.charCodeAt(a),b<128?n[i++]=b:b<2048?(n[i++]=b>>6|192,n[i++]=b&63|128):(b&64512)===55296&&((y=e.charCodeAt(a+1))&64512)===56320?(b=65536+((b&1023)<<10)+(y&1023),a++,n[i++]=b>>18|240,n[i++]=b>>12&63|128,n[i++]=b>>6&63|128,n[i++]=b&63|128):(n[i++]=b>>12|224,n[i++]=b>>6&63|128,n[i++]=b&63|128)}this.buf=n}}readLong(){let e=0,r=0,n=this.buf,i,a,l,b;do i=n[this.pos++],a=i&128,e|=(i&127)<<r,r+=7;while(a&&r<28);if(a){l=e,b=268435456;do i=n[this.pos++],l+=(i&127)*b,b*=128;while(i&128);return(l%2?-(l+1):l)/2}return e>>1^-(e&1)}skipLong(){let e=this.buf;for(;e[this.pos++]&128;);}readTags(){let e=[],r;for(;r=this.readLong();)for(r<0&&(r=-r,this.skipLong());r--;){let n=this.readString(),i=this.readString();e.push({name:n,value:i})}return e}readString(){let e=this.readLong(),r=this.pos,n=this.buf;if(this.pos+=e,this.pos>n.length)throw new Error("TAP Position out of range");return this.buf.slice(r,r+e).toString()}};function np(t){if(t?.length===0)return Buffer.allocUnsafe(0);let e=new Tf;return e.writeTags(t),e.toBuffer()}function ns(t){return new Tf(t).readTags()}import{createHash as m_}from"crypto";var jc=80,Zc=4096,Vc=class t{binary;_id;constructor(e){this.binary=e}static isDataItem(e){return e.binary!==void 0}get signatureType(){let e=mt(this.binary.subarray(0,2));if(Ie?.[e]!==void 0)return e;throw new Error("Unknown signature type: "+e)}async isValid(){return t.verify(this.binary)}get id(){return hn.default.encode(this.rawId)}set id(e){this._id=hn.default.toBuffer(e)}get rawId(){return m_("sha256").update(this.rawSignature).digest()}set rawId(e){this._id=e}get rawSignature(){return this.binary.subarray(2,2+this.signatureLength)}get signature(){return hn.default.encode(this.rawSignature)}set rawOwner(e){if(e.byteLength!=this.ownerLength)throw new Error(`Expected raw owner (pubkey) to be ${this.ownerLength} bytes, got ${e.byteLength} bytes.`);this.binary.set(e,2+this.signatureLength)}get rawOwner(){return this.binary.subarray(2+this.signatureLength,2+this.signatureLength+this.ownerLength)}get signatureLength(){return Ue[this.signatureType].sigLength}get owner(){return hn.default.encode(this.rawOwner)}get ownerLength(){return Ue[this.signatureType].pubLength}get rawTarget(){let e=this.getTargetStart();return this.binary[e]==1?this.binary.subarray(e+1,e+33):Ef.alloc(0)}get target(){return hn.default.encode(this.rawTarget)}get rawAnchor(){let e=this.getAnchorStart();return this.binary[e]==1?this.binary.subarray(e+1,e+33):Ef.alloc(0)}get anchor(){return hn.default.encode(this.rawAnchor)}get rawTags(){let e=this.getTagsStart(),r=mt(this.binary.subarray(e+8,e+16));return this.binary.subarray(e+16,e+16+r)}get tags(){let e=this.getTagsStart();if(mt(this.binary.subarray(e,e+8))==0)return[];let n=mt(this.binary.subarray(e+8,e+16));return ns(Ef.from(this.binary.subarray(e+16,e+16+n)))}get tagsB64Url(){return this.tags.map(r=>({name:hn.default.encode(r.name),value:hn.default.encode(r.value)}))}getStartOfData(){let e=this.getTagsStart(),r=this.binary.subarray(e+8,e+16),n=mt(r);return e+16+n}get rawData(){let e=this.getTagsStart(),r=this.binary.subarray(e+8,e+16),n=mt(r),i=e+16+n;return this.binary.subarray(i,this.binary.length)}get data(){return hn.default.encode(this.rawData)}getRaw(){return this.binary}async sign(e){return this._id=await Qc(this,e),this.rawId}async setSignature(e){this.binary.set(e,2),this._id=Ef.from(await At().hash(e))}isSigned(){return(this._id?.length??0)>0}toJSON(){return{signature:this.signature,owner:this.owner,target:this.target,tags:this.tags.map(e=>({name:hn.default.encode(e.name),value:hn.default.encode(e.value)})),data:this.data}}static async verify(e){if(e.byteLength<jc)return!1;let r=new t(e),n=r.signatureType,i=r.getTagsStart(),a=mt(e.subarray(i,i+8)),l=e.subarray(i+8,i+16),b=mt(l);if(b>Zc)return!1;if(a>0)try{if(ns(Ef.from(e.subarray(i+16,i+16+b))).length!==a)return!1}catch{return!1}let y=Af[n],x=await Sf(r);return await y.verify(r.rawOwner,x,r.rawSignature)}async getSignatureData(){return Sf(this)}getTagsStart(){let e=this.getTargetStart(),r=this.binary[e]==1,n=e+(r?33:1),i=this.binary[n]==1;return n+=i?33:1,n}getTargetStart(){return 2+this.signatureLength+this.ownerLength}getAnchorStart(){let e=this.getTargetStart()+1,r=this.binary[this.getTargetStart()]==1;return e+=r?32:0,e}},is=Vc;import{createHash as x_}from"crypto";var si=32,Wc=class{length;items;binary;constructor(e){this.binary=e,this.length=this.getDataItemCount(),this.items=this.getItems()}getRaw(){return this.binary}get(e){if(typeof e=="number"){if(e>=this.length)throw new RangeError("Index out of range");return this.getByIndex(e)}else return this.getById(e)}getSizes(){let e=[];for(let r=si;r<si+64*this.length;r+=64)e.push(mt(this.binary.subarray(r,r+32)));return e}getIds(){let e=[];for(let r=si;r<si+64*this.length;r+=64){let n=this.binary.subarray(r+32,r+64);if(n.length===0)throw new Error("Invalid bundle, id specified in headers doesn't exist");e.push(_f.default.encode(n))}return e}getIdBy(e){if(e>this.length-1)throw new RangeError("Index of bundle out of range");let r=64+64*e;return _f.default.encode(this.binary.subarray(r,r+32))}async toTransaction(e,r,n){let i=await r.createTransaction({data:this.binary,...e},n);return i.addTag("Bundle-Format","binary"),i.addTag("Bundle-Version","2.0.0"),i}async verify(){for(let e of this.items){let r=await e.isValid(),n=(0,_f.default)(x_("sha256").update(e.rawSignature).digest());if(!(r&&e.id===n))return!1}return!0}getOffset(e){let r=0;for(let n=si;n<si+64*this.length;n+=64){let i=mt(this.binary.subarray(n,n+32));r+=i;let a=this.binary.subarray(n+32,n+64);if(Buffer.compare(a,e)===0)return{startOffset:r,size:i}}return{startOffset:-1,size:-1}}getByIndex(e){let r=0,n=this.getBundleStart(),i=0,a,l;for(let _=si;_<si+64*this.length;_+=64){if(a=mt(this.binary.subarray(_,_+32)),i++===e){l=this.binary.subarray(_+32,_+64);break}r+=a}let b=n+r,y=this.binary.subarray(b,b+a),x=new is(y);return x.rawId=l,x}getById(e){let r=_f.default.toBuffer(e),n=this.getOffset(r);if(n.startOffset===-1)throw new Error("Transaction not found");let a=this.getBundleStart()+n.startOffset;return new is(this.binary.subarray(a,a+n.size))}getDataItemCount(){return mt(this.binary.subarray(0,32))}getBundleStart(){return 32+64*this.length}getItems(){let e=new Array(this.length),r=0,n=this.getBundleStart(),i=0;for(let a=si;a<si+64*this.length;a+=64){let l=mt(this.binary.subarray(a,a+32)),b=this.binary.subarray(a+32,a+64);if(b.length===0)throw new Error("Invalid bundle, id specified in headers doesn't exist");let y=n+r,x=this.binary.subarray(y,y+l);r+=l;let _=new is(x);_.rawId=b,e[i]=_,i++}return e}},ip=Wc;function y_(t){return new ip(t)}async function w_(t,e){let r=new Uint8Array(64*t.length),n=await Promise.all(t.map(async(a,l)=>{let b=a.isSigned()?a.rawId:await Qc(a,e),y=new Uint8Array(64);return y.set(Kc(a.getRaw().byteLength),0),y.set(b,32),r.set(y,64*l),a.getRaw()})).then(a=>Buffer.concat(a)),i=Buffer.concat([Buffer.from(Kc(t.length)),Buffer.from(r),n]);return new ip(i)}async function G3(t,e){let r=await Sf(t),n=await e.sign(r),i=await At().hash(n);return{signature:Buffer.from(n),id:Buffer.from(i)}}async function Qc(t,e){let{signature:r,id:n}=await G3(t,e);return t.getRaw().set(r,2),n}var nN=A(S(),1),X3=A(Hr(),1);function Bf(t,e,r){let n=e.publicKey,i=r?.target?X3.default.toBuffer(r.target):null,a=1+(i?.byteLength??0),l=r?.anchor?Buffer.from(r.anchor):null,b=1+(l?.byteLength??0),y=(r?.tags?.length??0)>0?np(r?.tags):null,x=16+(y?y.byteLength:0),_=Buffer.from(t),C=_.byteLength,D=2+e.signatureLength+e.ownerLength+a+b+x+C,F=Buffer.alloc(D);if(F.set(rp(e.signatureType),0),F.set(new Uint8Array(e.signatureLength).fill(0),2),n.byteLength!==e.ownerLength)throw new Error(`Owner must be ${e.ownerLength} bytes, but was incorrectly ${n.byteLength}`);F.set(n,2+e.signatureLength);let P=2+e.signatureLength+e.ownerLength;if(F[P]=i?1:0,i){if(i.byteLength!==32)throw new Error(`Target must be 32 bytes but was incorrectly ${i.byteLength}`);F.set(i,P+1)}let z=P+a,W=z+1;if(F[z]=l?1:0,l){if(W+=l.byteLength,l.byteLength!==32)throw new Error("Anchor must be 32 bytes");F.set(l,z+1)}F.set(zc(r?.tags?.length??0),W);let X=zc(y?.byteLength??0);F.set(X,W+8),y&&F.set(y,W+16);let ne=W+x;return F.set(_,ne),new is(F)}var iN=A(S(),1);var oN=A(S(),1),ap=class{signatureType;rawSignature;signature;signatureLength;rawOwner;owner;ownerLength;rawTarget;target;rawAnchor;anchor;rawTags;tags;rawData;data;static async verify(...e){throw new Error("You must implement `verify`")}};var fN=A(S(),1);var cN=A(S(),1);var sp={};yp(sp,{default:()=>E_,processStream:()=>z3,streamExportForTesting:()=>__,streamSigner:()=>T_});var DN=A(S(),1);import{PassThrough as A_,Transform as S_}from"stream";var ja=A(Hr(),1);import{createHash as M_}from"crypto";async function z3(t){let e=K3(t),r=(await e.next()).value;r=await _r(e,r,32);let n=mt(r.subarray(0,32));r=r.subarray(32);let i=64*n;r=await _r(e,r,i);let a=new Array(n);for(let y=0;y<i;y+=64)a[y/64]=[mt(r.subarray(y,y+32)),(0,ja.default)(Buffer.from(r.subarray(y+32,y+64)))];r=r.subarray(i);let l=32+i,b=[];for(let[y,x]of a){r=await _r(e,r,jc),r=await _r(e,r,2);let _=mt(r.subarray(0,2));r=r.subarray(2);let{sigLength:C,pubLength:D,sigName:F}=Ue[_];r=await _r(e,r,C);let P=r.subarray(0,C);r=r.subarray(C),r=await _r(e,r,D);let z=r.subarray(0,D);r=r.subarray(D),r=await _r(e,r,1);let W=r[0]===1;W&&(r=await _r(e,r,33));let X=W?r.subarray(1,33):Buffer.allocUnsafe(0);r=r.subarray(W?33:1),r=await _r(e,r,1);let ne=r[0]===1;ne&&(r=await _r(e,r,33));let $=ne?r.subarray(1,33):Buffer.allocUnsafe(0);r=r.subarray(ne?33:1),r=await _r(e,r,8);let ae=mt(r.subarray(0,8));r=r.subarray(8),r=await _r(e,r,8);let ie=mt(r.subarray(0,8));r=r.subarray(8),r=await _r(e,r,ie);let ee=r.subarray(0,ie),ce=ae!==0&&ie!==0?ns(Buffer.from(ee)):[];if(ce.length!==ae)throw new Error("Tags lengths don't match");r=r.subarray(ie);let te=new S_;te._transform=function(d,f,c){this.push(d),c()};let Y=Ri([(0,tt.stringToBuffer)("dataitem"),(0,tt.stringToBuffer)("1"),(0,tt.stringToBuffer)(_.toString()),z,X,$,ee,te]),T=2+C+D+(W?33:1)+(ne?33:1)+16+ie,s=y-T;if(r.byteLength>s)te.write(r.subarray(0,s)),r=r.subarray(s);else{let d=r.byteLength;for(te.write(r);s>d;){if(r=(await e.next()).value,!r)throw new Error(`Not enough data bytes expected: ${s} received: ${d}`);d+=r.byteLength,d>s?te.write(r.subarray(0,r.byteLength-(d-s))):te.write(r)}r=r.subarray(r.byteLength-(d-s))}if(te.end(),x!==(0,ja.default)(M_("sha256").update(P).digest()))throw new Error("ID doesn't match signature");if(!await Af[_].verify(z,await Y,P))throw new Error("Invalid signature");b.push({id:x,sigName:F,signature:(0,ja.default)(Buffer.from(P)),target:(0,ja.default)(Buffer.from(X)),anchor:(0,ja.default)(Buffer.from($)),owner:(0,ja.default)(Buffer.from(z)),tags:ce,dataOffset:l+T,dataSize:s}),l+=T+s}return b}async function T_(t,e,r,n){let i=Bf("",r,n),a=new A_,l=[(0,tt.stringToBuffer)("dataitem"),(0,tt.stringToBuffer)("1"),(0,tt.stringToBuffer)(i.signatureType.toString()),i.rawOwner,i.rawTarget,i.rawAnchor,i.rawTags,t],b=await Ri(l),y=Buffer.from(await r.sign(b));return i.setSignature(y),a.write(i.getRaw()),e.pipe(a)}async function _r(t,e,r){if(e.byteLength>=r)return e;let{done:n,value:i}=await t.next();if(n&&!i)throw new Error("Invalid buffer");return _r(t,Buffer.concat([Buffer.from(e),Buffer.from(i)]),r)}async function*K3(t){for await(let e of t)yield e}var E_=z3,__={readBytes:_r,getReader:K3};var B_={...op,stream:sp};globalThis.arbundles??=B_;var GN=A(S(),1);var UN=A(S(),1);function fp(){return typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative"?"react-native":typeof window<"u"&&typeof window.document<"u"?"browser":"node"}var cp=class{async dispatch(e){if(typeof window>"u"||!window.arweaveWallet)throw new Error("ArConnect wallet not found");return window.arweaveWallet.dispatch(e)}async sign(e){if(typeof window>"u"||!window.arweaveWallet)throw new Error("ArConnect wallet not found");let r=await window.arweaveWallet.signature(e,{name:"RSA-PSS",saltLength:32});return new Uint8Array(r)}async getActivePublicKey(){if(typeof window>"u"||!window.arweaveWallet)throw new Error("ArConnect wallet not found");return window.arweaveWallet.getActivePublicKey()}async getAddress(){if(typeof window>"u"||!window.arweaveWallet)throw new Error("ArConnect wallet not found");return window.arweaveWallet.getActiveAddress()}async isConnected(){return typeof window<"u"&&!!window.arweaveWallet}},Yc=class{async readAsArrayBuffer(e){if(e instanceof File)return await e.arrayBuffer();if(e instanceof ArrayBuffer)return e;if(e instanceof Uint8Array)return e.buffer.slice(0);if(typeof e=="string"){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n.buffer.slice(0)}throw new Error("Unsupported file type")}getContentType(e){return e instanceof File?e.type:"application/octet-stream"}getSize(e){return e instanceof File?e.size:e instanceof ArrayBuffer||e instanceof Uint8Array?e.byteLength:0}createFile(e,r,n){let i;if(e instanceof Uint8Array)i=e;else if(e instanceof ArrayBuffer)i=new Uint8Array(e);else{let a=atob(e);i=new Uint8Array(a.length);for(let l=0;l<a.length;l++)i[l]=a.charCodeAt(l)}return{data:i,type:r||"application/octet-stream",size:i.byteLength,name:n||"file"}}isFile(e){return e instanceof File}},$c=class{createBlob(e,r){let n=e instanceof Uint8Array?e:new Uint8Array(e);return new Blob([n],{type:r||"application/octet-stream"})}async readAsArrayBuffer(e){return await e.arrayBuffer()}slice(e,r,n){return e.slice(r,n)}getSize(e){return e.size}},eu=class{randomUUID(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}getRandomValues(e){return crypto.getRandomValues(e)}randomBytes(e){let r=new Uint8Array(e);return this.getRandomValues(r)}},up=class{async getItem(e){return localStorage.getItem(e)}async setItem(e,r){localStorage.setItem(e,r)}async removeItem(e){localStorage.removeItem(e)}async clear(){localStorage.clear()}},tu=class{encode(e){if(typeof e=="string")return btoa(e);let r=e instanceof Uint8Array?e:new Uint8Array(e);return btoa(String.fromCharCode(...Array.from(r)))}decode(e){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}btoa(e){return btoa(e)}atob(e){return atob(e)}},lp=class{async dispatch(e){throw new Error("React Native wallet provider not configured. Please provide a custom WalletProvider implementation.")}async sign(e){throw new Error("React Native wallet provider not configured. Please provide a custom WalletProvider implementation.")}async getActivePublicKey(){throw new Error("React Native wallet provider not configured. Please provide a custom WalletProvider implementation.")}async getAddress(){throw new Error("React Native wallet provider not configured. Please provide a custom WalletProvider implementation.")}async isConnected(){return!1}},dp=class{async readAsArrayBuffer(e){if(e instanceof ArrayBuffer)return e;if(e instanceof Uint8Array)return e.buffer.slice(0);if(typeof e=="string")return this.base64ToUint8Array(e).buffer.slice(0);if(e?.data)return this.readAsArrayBuffer(e.data);throw new Error("Unsupported file type for React Native")}getContentType(e){return e?.type?e.type:"application/octet-stream"}getSize(e){return e?.size?e.size:e instanceof ArrayBuffer||e instanceof Uint8Array?e.byteLength:e?.data?this.getSize(e.data):0}createFile(e,r,n){let i;return e instanceof Uint8Array?i=e:e instanceof ArrayBuffer?i=new Uint8Array(e):i=this.base64ToUint8Array(e),{data:i,type:r||"application/octet-stream",size:i.byteLength,name:n||"file"}}isFile(e){return e?.data!==void 0&&e?.type!==void 0}base64ToUint8Array(e){let r=e.includes(",")?e.split(",")[1]:e,n=this.atobPolyfill(r),i=new Uint8Array(n.length);for(let a=0;a<n.length;a++)i[a]=n.charCodeAt(a);return i}atobPolyfill(e){let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="",i=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");i<e.length;){let a=r.indexOf(e.charAt(i++)),l=r.indexOf(e.charAt(i++)),b=r.indexOf(e.charAt(i++)),y=r.indexOf(e.charAt(i++)),x=a<<2|l>>4,_=(l&15)<<4|b>>2,C=(b&3)<<6|y;n+=String.fromCharCode(x),b!==64&&(n+=String.fromCharCode(_)),y!==64&&(n+=String.fromCharCode(C))}return n}},hp=class{createBlob(e,r){return e instanceof Uint8Array?e:new Uint8Array(e)}async readAsArrayBuffer(e){if(e instanceof ArrayBuffer)return e;if(e instanceof Uint8Array)return e.buffer.slice(0);throw new Error("Unsupported blob type for React Native")}slice(e,r,n){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return e.slice(r,n);throw new Error("Unsupported blob type for slicing")}getSize(e){return e instanceof Uint8Array||e instanceof ArrayBuffer?e.byteLength:0}},pp=class{randomUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let r=Math.random()*16|0;return(e==="x"?r:r&3|8).toString(16)})}getRandomValues(e){if(typeof crypto<"u"&&crypto.getRandomValues)return crypto.getRandomValues(e);for(let r=0;r<e.length;r++)e[r]=Math.floor(Math.random()*256);return e}randomBytes(e){let r=new Uint8Array(e);return this.getRandomValues(r)}},bp=class{constructor(){this.cache=new Map}async getItem(e){return this.cache.get(e)||null}async setItem(e,r){this.cache.set(e,r)}async removeItem(e){this.cache.delete(e)}async clear(){this.cache.clear()}},gp=class{encode(e){if(typeof e=="string")return this.btoaPolyfill(e);let r=e instanceof Uint8Array?e:new Uint8Array(e);return this.btoaPolyfill(String.fromCharCode(...Array.from(r)))}decode(e){let r=this.atobPolyfill(e),n=new Uint8Array(r.length);for(let i=0;i<r.length;i++)n[i]=r.charCodeAt(i);return n}btoa(e){return this.btoaPolyfill(e)}atob(e){return this.atobPolyfill(e)}btoaPolyfill(e){let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="",i=0;for(;i<e.length;){let a=e.charCodeAt(i++),l=i<e.length?e.charCodeAt(i++):NaN,b=i<e.length?e.charCodeAt(i++):NaN,y=a>>2,x=(a&3)<<4|l>>4,_=(l&15)<<2|b>>6,C=b&63;isNaN(l)?n+=r.charAt(y)+r.charAt(x)+"==":isNaN(b)?n+=r.charAt(y)+r.charAt(x)+r.charAt(_)+"=":n+=r.charAt(y)+r.charAt(x)+r.charAt(_)+r.charAt(C)}return n}atobPolyfill(e){let r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="",i=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");i<e.length;){let a=r.indexOf(e.charAt(i++)),l=r.indexOf(e.charAt(i++)),b=r.indexOf(e.charAt(i++)),y=r.indexOf(e.charAt(i++)),x=a<<2|l>>4,_=(l&15)<<4|b>>2,C=(b&3)<<6|y;n+=String.fromCharCode(x),b!==64&&(n+=String.fromCharCode(_)),y!==64&&(n+=String.fromCharCode(C))}return n}};function Cf(t){let e=fp(),r;switch(e){case"browser":r={wallet:new cp,file:new Yc,blob:new $c,crypto:new eu,storage:new up,base64:new tu};break;case"react-native":r={wallet:new lp,file:new dp,blob:new hp,crypto:new pp,storage:new bp,base64:new gp};break;case"node":default:r={file:new Yc,blob:new $c,crypto:new eu,base64:new tu};break}return{...r,...t}}function Qa(t){return async e=>{if(tr(e))return e;if(!t.arweave)throw new Error("Must initialize with Arweave in order to create transactions");try{return await C_(t,{data:e})}catch(r){throw new Error(r.message??"Error resolving transaction")}}}async function C_(t,e){let n=t.platform||Cf(),i=null,a=null,l=null;if(typeof e.data=="string"){let b=Bp(e.data);i=n.base64.decode(b),a=_p(e.data),l=Cp(i)}else if(n.file.isFile(e.data)){let b=await n.file.readAsArrayBuffer(e.data);i=new Uint8Array(b),a=n.file.getContentType(e.data),l=n.file.getSize(e.data)}else{let b=await n.file.readAsArrayBuffer(e.data);i=new Uint8Array(b),a=n.file.getContentType(e.data),l=n.file.getSize(e.data)}if(i&&a&&l)if(l<Number(hu.dispatchUploadSize))try{if(!n.wallet)throw new Error("Wallet provider not available");let b=await t.arweave.createTransaction({data:i},"use_wallet");return b.addTag(Je.keys.contentType,a),e.tags&&e.tags.length>0&&e.tags.forEach(x=>b.addTag(x.name,x.value)),(await n.wallet.dispatch(b)).id}catch(b){throw new Error(b.message??"Error dispatching transaction")}else try{let b=n.blob.createBlob(i,a),y=await P_(b,n,{tags:[{name:"Content-Type",value:a},{name:"App-Name",value:"@permaweb/libs"}]},{apiUrl:hu.node1,token:"arweave",chunkSize:5*1024*1024,batchSize:3});return console.log(y),console.log("Uploaded dataItem ID:",y.id),y.id}catch(b){throw new Error(b.message??"Error uploading transaction")}else throw new Error("Error preparing transaction data")}async function P_(t,e,r,n){let{apiUrl:i,token:a,chunkSize:l,batchSize:b=3}=n;if(!e.wallet)throw new Error("Wallet provider not available");let y=e.crypto.randomUUID(),x=new TextEncoder().encode(y),_=await e.wallet.getActivePublicKey(),C=await e.wallet.sign(x),F=(o=>e.base64.encode(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""))(C),W=((await(await fetch("https://payment.ardrive.io/v1/balance",{headers:{"x-nonce":y,"x-signature":F,"x-public-key":_}})).json()).receivedApprovals||[]).map(o=>o.payingAddress),X=new Uint8Array(await e.blob.readAsArrayBuffer(t)),ne={publicKey:e.base64.decode(_),sign:async o=>e.wallet.sign(o),getActivePublicKey:async()=>_},$=Bf(X,ne,{...r,anchor:r.anchor||(()=>{let o=e.crypto.randomBytes(32);return e.base64.encode(o).replace(/\+/g,"-").replace(/\//g,"_").slice(0,32)})()});await $.sign(ne);let ae=$.getRaw(),ie=e.blob.createBlob(new Uint8Array(ae),"application/octet-stream"),ee={"x-chunking-version":"2","x-paid-by":W.join(",")},ce=await fetch(`${i}/chunks/${a}/-1/-1`,{headers:ee});if(!ce.ok)throw new Error(`Failed to get upload ID: ${ce.status} ${await ce.text()}`);let te=await ce.json(),Y=te.id;if(l<te.min||l>te.max)throw new Error(`Configured chunkSize ${l} is out of allowed range ${te.min}-${te.max}`);let T=e.blob.getSize(ie),s=[];for(let o=0;o<T;o+=l)s.push(o);let u=new Set;(te.chunks??[]).forEach(([o])=>u.add(Number(o)));let d=s.filter(o=>o>0&&!u.has(o)),f=u.has(0)?[]:[0],c=d.concat(f),v=o=>new Promise(p=>setTimeout(p,o));for(let o=0;o<c.length;o+=b){let p=c.slice(o,o+b);await Promise.all(p.map(async E=>{let g=e.blob.slice(ie,E,E+l),w=await e.blob.readAsArrayBuffer(g),U=null;for(let M=1;M<=3;M++)try{let k=await fetch(`${i}/chunks/${a}/${Y}/${E}`,{method:"POST",headers:{"Content-Type":"application/octet-stream",...ee},body:w});if(!k.ok){let G=await k.text();throw k.status===402?new Error(`402 payment required: ${G}`):new Error(`Chunk upload error ${k.status}: ${G}`)}return}catch(k){if(U=k,M<3){await v(1e3*M);continue}}throw U}))}let m={"Content-Type":"application/octet-stream",...ee},h=await fetch(`${i}/chunks/${a}/${Y}/-1`,{method:"POST",headers:m});if(!h.ok){let o=await h.text();throw new Error(`Finalizing upload failed ${h.status}: ${o}`)}return h.json()}var rJ=A(S(),1);var R_={},tJ=A(S(),1);var GJ=A(S(),1);var bJ=A(S(),1);function Z3(t){return async(e,r)=>{let n=O_(e);if(n)throw new Error(n);let i=null;if(e.spawnComments)try{let y=[{name:Je.keys.onBoot,value:dt.src.comments},{name:Je.keys.dateCreated,value:new Date().getTime().toString()}];e.users&&y.push({name:"Auth-Users",value:JSON.stringify(e.users)}),i=await Rn(t)({tags:y},r?_=>r(_):void 0),Ye(`Comments ID: ${i}`),await new Promise(_=>setTimeout(_,500))}catch(y){console.error(y)}let a=Ep[e.contentType]?.serialize(e.data)??e.data,l={...e};i&&(l.commentsId=i);let b=I_(l);try{return await Rn(t)({tags:b,data:a},r?_=>r(_):void 0)}catch(y){throw new Error(y.message??"Error creating asset")}}}async function D_(t,e,r){try{let n=sr(await Br(t,{processId:e,path:"asset",fallbackAction:"Info"}));if(r?.useGateway){let a=await Ln(t)({gateway:Pn.ao,ids:[e],tags:null,owners:null,cursor:null});return{...a?.data?.[0]?Q3(a.data[0]):{},...n}}return{id:e,...n}}catch(n){throw new Error(n.message||"Error fetching atomic asset")}}function V3(t){return async(e,r)=>await D_(t,e,r)}function j3(t){return async e=>{try{let n=await Ln(t)({gateway:Pn.arweave,ids:e??null,tags:null,owners:null,cursor:null});return n&&n.data.length?n.data.map(i=>Q3(i)):null}catch(r){throw new Error(r)}}}function Q3(t){let e={id:t.node.id,owner:t.node.owner.address};for(let r of t.node.tags){let n=r.name,a=(n.startsWith(`${Je.keys.bootloader}-`)?n.slice(`${Je.keys.bootloader}-`.length):n).split("-").map((b,y)=>y===0?b.toLowerCase():b.charAt(0).toUpperCase()+b.slice(1).toLowerCase()).join(""),l;try{l=JSON.parse(r.value)}catch{l=r.value.toString()}e[a]=l}return e}function I_(t){let e=[{name:Je.keys.onBoot,value:t.src??dt.src.asset},{name:Je.keys.creator,value:t.creator},{name:Je.keys.assetType,value:t.assetType},{name:Je.keys.contentType,value:t.contentType},{name:Je.keys.implements,value:"ANS-110"},{name:Je.keys.dateCreated,value:new Date().getTime().toString()},fr("Name",t.name),fr("Description",t.description),fr("Topics",JSON.stringify(t.topics)),fr("Ticker","ATOMIC"),fr("Denomination",t.denomination?.toString()??"1"),fr("TotalSupply",t.supply?.toString()??"1"),fr("Transferable",t.transferable?.toString()??"true"),fr("Creator",t.creator)];if(t.metadata)for(let r in t.metadata)e.push(fr(Ya(r),t.metadata[r].toString()));return t.users&&e.push({name:"Auth-Users",value:JSON.stringify(t.users)}),t.commentsId&&e.push(fr("Comments",t.commentsId)),t.tags&&t.tags.forEach(r=>e.push(r)),e}function O_(t){if(typeof t!="object"||t===null)return"The provided arguments are invalid or empty.";let e=["name","description","topics","creator","data","contentType","assetType"];for(let r of e)if(!(r in t))return`Missing field '${r}'`;return typeof t.name!="string"||t.name.trim()===""?"Name is required":typeof t.description!="string"?"The description must be a valid string":!Array.isArray(t.topics)||t.topics.length===0?"Topics are required":typeof t.creator!="string"||t.creator.trim()===""?"Creator is required":t.data===void 0||t.data===null?"Data field is required":typeof t.contentType!="string"||t.contentType.trim()===""?"Content type must be a non-empty string":typeof t.assetType!="string"||t.assetType.trim()===""?"Type must be a non-empty string":"supply"in t&&(typeof t.supply!="number"||t.supply<=0)?"Supply must be a positive number":"denomination"in t&&(typeof t.denomination!="number"||t.denomination<=0)?"Denomination must be a positive number":"transferable"in t&&typeof t.transferable!="boolean"?"Transferable must be a boolean value":"metadata"in t&&typeof t.metadata!="object"?"Metadata must be an object":"tags"in t&&(!Array.isArray(t.tags)||t.tags.some(r=>typeof r!="object"))?"Tags must be an array of objects":"src"in t&&typeof t.src!="string"?"Source must be a valid string":null}var AJ=A(S(),1);var k_="eXCtpVbcd_jZ0dmU2PZ8focaKxBGECBQ8wMib7sIVPo",vp="lJovHqM9hwNjHV5JoY9NGWtt0WD-5D4gOqNL2VWW5jk";function W3(t){return async(e,r)=>{if(!t.signer)throw new Error("No signer provided");let n=Qa(t),i=new Date().getTime().toString(),a=[{name:Je.keys.creator,value:e.creator},{name:Je.keys.ans110.title,value:as(e.title)},{name:Je.keys.name,value:as(e.title)},{name:Je.keys.ans110.description,value:as(e.description)}],l=null,b=null;try{l=e.banner?await n(e.thumbnail):vp,b=e.banner?await n(e.banner):k_,e.thumbnail&&a.push({name:Je.keys.thumbnail,value:l}),e.banner&&a.push({name:Je.keys.banner,value:b})}catch(_){console.error(_)}let y=await fetch(os(dt.src.collection));if(!y.ok)throw new Error("Unable to fetch process src");let x=await y.text();x=x.replace(/'<NAME>'/g,pu(e.title)),x=x.replace(/'<DESCRIPTION>'/g,pu(e.description)),x=x.replace(/<CREATOR>/g,e.creator),x=x.replace(/<THUMBNAIL>/g,l||vp),x=x.replace(/<BANNER>/g,b||vp),x=x.replace(/<DATECREATED>/g,i),x=x.replace(/<LASTUPDATE>/g,i);try{let _=Rn(t),C=await _({tags:a},r?D=>r(D):void 0);if(Ye("Sending eval message to collection..."),r&&r("Sending eval message to collection..."),await t.ao.message({process:C,signer:t.signer,tags:[{name:"Action",value:"Eval"}],data:x}),!e.skipRegistry){Ye("Sending collection to registry..."),r&&r("Sending collection to registry...");let D=[{name:"Action",value:"Add-Collection"},{name:"CollectionId",value:C},{name:"Name",value:as(e.title)},{name:"Creator",value:e.creator},{name:"DateCreated",value:i}];b&&D.push({name:"Banner",value:b}),l&&D.push({name:"Thumbnail",value:l}),await t.ao.message({process:dt.collectionRegistry,signer:t.signer,tags:D})}if(!e.skipActivity){Ye("Creating collection activity process..."),r&&r("Creating collection activity process...");let D=[{name:"CollectionId",value:C},{name:"DateCreated",value:i},{name:"UCM-Process",value:"Collection-Activity"},{name:Je.keys.onBoot,value:dt.src.collectionActivity}],F=await _({tags:D},r?P=>r(P):void 0);Ye("Adding activity to collection process..."),r&&r("Adding activity to collection process..."),await t.ao.message({process:C,signer:t.signer,tags:[{name:"Action",value:"Eval"}],data:`ActivityProcess = '${F}'`})}return C}catch(_){throw new Error(_.message??"Error creating collection")}}}function Y3(t){return async e=>await et(t,{processId:e.creator,action:"Run-Action",tags:[{name:"Forward-To",value:e.collectionId},{name:"Forward-Action",value:"Update-Assets"}],data:{Target:e.collectionId,Action:"Update-Assets",Input:{AssetIds:e.assetIds,UpdateType:e.updateType}}})}function $3(t){return async e=>{let r=await Br(t,{processId:e,path:"collection",fallbackAction:"Info"});return r?sr(r):null}}function e8(t){return async e=>{let r=e.creator?"Get-Collections-By-User":"Get-Collections",n=await Ff(t,{processId:dt.collectionRegistry,action:r,tags:e.creator?[{name:"Creator",value:e.creator}]:null});return n&&n.Collections&&n.Collections.length?n.Collections.map(a=>({id:a.Id,title:a.Name.replace(/\[|\]/g,""),description:a.Description,creator:a.Creator,dateCreated:a.DateCreated,banner:a.Banner,thumbnail:a.Thumbnail})):null}}var EJ=A(S(),1);function t8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.content)throw new Error("Content cannot be empty");let r=[];return e.parentId&&r.push({name:"Parent-Id",value:e.parentId}),e.metadata&&r.push({name:"Metadata",value:JSON.stringify(e.metadata)}),await et(t,{processId:e.commentsId,action:"Add-Comment",tags:r,data:e.content,useRawData:!0})}catch(r){throw new Error(r.message??"Error creating comment")}}}function r8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");return sr(await Br(t,{processId:e.commentsId,path:"comments",fallbackAction:"Get-Comments"}))}catch(r){throw new Error(r.message??"Error getting comments")}}}function n8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");return await et(t,{processId:e.commentsId,action:"Update-Comment-Status",tags:[{name:"Comment-Id",value:e.commentId},{name:"Status",value:e.status}]})}catch(r){throw new Error(r.message??"Error updating comment status")}}}function i8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");if(!e.content)throw new Error("Content cannot be empty");return await et(t,{processId:e.commentsId,action:"Update-Comment-Content",tags:[{name:"Comment-Id",value:e.commentId}],data:e.content,useRawData:!0})}catch(r){throw new Error(`Error at 'updateCommentContentWith' doing 'Update-Comment-Content': ${r?.message??String(r)}`)}}}function a8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");return await et(t,{processId:e.commentsId,action:"Remove-Comment",tags:[{name:"Comment-Id",value:e.commentId}]})}catch(r){throw new Error(`Error at 'removeCommentWith' doing 'Remove-Comment': ${r?.message??String(r)}`)}}}function o8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");return await et(t,{processId:e.commentsId,action:"Remove-Own-Comment",tags:[{name:"Comment-Id",value:e.commentId}]})}catch(r){throw new Error(`Error at 'removeUserCommentWith' doing 'Remove-Own-Comment': ${r?.message??String(r)}`)}}}function s8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");return await et(t,{processId:e.commentsId,action:"Pin-Comment",tags:[{name:"Comment-Id",value:e.commentId}]})}catch(r){throw new Error(`Error at 'pinCommentWith' doing 'Pin-Comment': ${r?.message??String(r)}`)}}}function f8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.commentId)throw new Error("Must provide commentId");return await et(t,{processId:e.commentsId,action:"Unpin-Comment",tags:[{name:"Comment-Id",value:e.commentId}]})}catch(r){throw new Error(`Error at 'unpinCommentWith' doing 'Unpin-Comment': ${r?.message??String(r)}`)}}}function c8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");return sr(await Br(t,{processId:e.commentsId,path:"rules",fallbackAction:"Get-Rules"}))}catch(r){throw new Error(`Error at 'getRulesWith' doing 'Get-Rules': ${r?.message??String(r)}`)}}}function u8(t){return async e=>{try{if(!e.commentsId)throw new Error("Must provide commentsId");if(!e.rules)throw new Error("Must provide rules");let r={ProfileAgeRequired:e.rules.profileAgeRequired,MutedWords:e.rules.mutedWords,RequireProfileThumbnail:e.rules.requireProfileThumbnail};return await et(t,{processId:e.commentsId,action:"Update-Rules",data:JSON.stringify(r)})}catch(r){throw new Error(`Error at 'updateRulesWith' doing 'Update-Rules': ${r?.message??String(r)}`)}}}var PJ=A(S(),1);function mp(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.targetId)throw new Error("Must provide targetId");if(!e.status)throw new Error("Must provide status");if(!e.moderator)throw new Error("Must provide moderator");let r=[{name:"Target-Type",value:e.targetType},{name:"Target-Id",value:e.targetId},{name:"Status",value:e.status},{name:"Moderator",value:e.moderator}];e.targetContext&&r.push({name:"Target-Context",value:e.targetContext}),e.reason&&r.push({name:"Reason",value:e.reason});let n=e.metadata?JSON.stringify(e.metadata):void 0;return await et(t,{processId:e.moderationId,action:"Add-Moderation-Entry",tags:r,data:n})}catch(r){throw new Error(r.message??"Error adding moderation entry")}}}function ru(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.targetType)throw new Error("Must provide targetType");let r=[{name:"Target-Type",value:e.targetType}];e.targetId&&r.push({name:"Target-Id",value:e.targetId}),e.status&&r.push({name:"Status",value:e.status}),e.targetContext&&r.push({name:"Target-Context",value:e.targetContext}),e.moderator&&r.push({name:"Moderator",value:e.moderator});let n=await Br(t,{processId:e.moderationId,path:"moderation/entries",fallbackAction:"Get-Moderation-Entries",tags:r});return n?sr(n):[]}catch(r){throw new Error(r.message??"Error getting moderation entries")}}}function l8(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.targetId)throw new Error("Must provide targetId");if(!e.status)throw new Error("Must provide status");if(!e.moderator)throw new Error("Must provide moderator");let n=await ru(t)({moderationId:e.moderationId,targetType:e.targetType,targetId:e.targetId});if(!n||n.length===0)return await mp(t)({moderationId:e.moderationId,targetType:e.targetType,targetId:e.targetId,status:e.status,moderator:e.moderator,reason:e.reason});let a=[{name:"Entry-Id",value:n[0].id},{name:"Status",value:e.status},{name:"Moderator",value:e.moderator}];return e.reason&&a.push({name:"Reason",value:e.reason}),await et(t,{processId:e.moderationId,action:"Update-Moderation-Entry",tags:a})}catch(r){throw new Error(r.message??"Error updating moderation entry")}}}function d8(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.targetId)throw new Error("Must provide targetId");let n=await ru(t)({moderationId:e.moderationId,targetType:e.targetType,targetId:e.targetId});if(!n||n.length===0)throw new Error("Moderation entry not found");let i=n[0].id;return await et(t,{processId:e.moderationId,action:"Remove-Moderation-Entry",tags:[{name:"Entry-Id",value:i}]})}catch(r){throw new Error(r.message??"Error removing moderation entry")}}}function h8(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.originZone)throw new Error("Must provide originZone");let r=[{name:"Zone-Id",value:e.originZone},{name:"Moderation-Process-Id",value:e.moderationId}];return e.subscriptionType&&r.push({name:"Subscription-Type",value:e.subscriptionType}),await et(t,{processId:e.moderationId,action:"Add-Moderation-Subscription",tags:r})}catch(r){throw new Error(r.message??"Error adding moderation subscription")}}}function p8(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");if(!e.originZone)throw new Error("Must provide originZone");return await et(t,{processId:e.moderationId,action:"Remove-Moderation-Subscription",tags:[{name:"Zone-Id",value:e.originZone}]})}catch(r){throw new Error(r.message??"Error removing moderation subscription")}}}function b8(t){return async e=>{try{if(!e.moderationId)throw new Error("Must provide moderationId");let r=await Br(t,{processId:e.moderationId,path:"moderation/subscriptions",fallbackAction:"Get-Moderation-Subscriptions"});if(!r)return[];if(typeof r=="string")try{return JSON.parse(r)}catch{return[]}return r}catch(r){throw new Error(r.message??"Error getting moderation subscriptions")}}}var qJ=A(S(),1);var IJ=A(S(),1);function nu(t){return async(e,r)=>{try{let n=null;if(!e.skipModeration)try{let b=[{name:Je.keys.onBoot,value:dt.src.moderation},{name:Je.keys.dateCreated,value:new Date().getTime().toString()}];e.authUsers&&b.push({name:"Auth-Users",value:JSON.stringify(e.authUsers)}),n=await Rn(t)({tags:b},r?x=>r(x):void 0),Ye(`Moderation Process ID: ${n}`),await new Promise(x=>setTimeout(x,500))}catch(b){throw console.error("Error creating moderation process:",b),new Error(`Failed to create mandatory moderation process: ${b.message}`)}let i=[{name:Je.keys.onBoot,value:dt.src.zone.id}];return n&&i.push({name:"Bootloader-Moderation",value:n}),e.tags&&e.tags.length&&e.tags.forEach(b=>i.push(b)),Ye(`Creating zone with source: ${dt.src.zone.id} v${dt.src.zone.version}`),await Rn(t)({data:e.data,tags:i},r?b=>r(b):void 0)}catch(n){throw new Error(n.message??"Error creating zone")}}}function iu(t){return async(e,r)=>{try{let n=Object.entries(e).map(([a,l])=>({key:a,value:l}));return await et(t,{processId:r,action:"Zone-Update",data:n})}catch(n){throw new Error(n)}}}function g8(t){return async(e,r)=>{try{return await et(t,{processId:r,action:"Zone-Append",tags:[{name:"Store-Path",value:e.path}],data:e.data})}catch(n){throw new Error(n)}}}function v8(t){return async(e,r)=>{try{return Ye(`Updating zone patch map in process ${r}`),await et(t,{processId:r,action:"Zone-Update-Patch-Map",data:e})}catch(n){throw new Error(n)}}}function m8(t){return async(e,r)=>{if(!tr(r))throw new Error("Invalid zone address");let i=[];for(let a of e){if(!tr(a.granteeId))throw new Error("Invalid granteeId address");if(a.type!=="wallet"&&a.type!=="process")throw new Error("Invalid role type");let b={Id:a.granteeId,Roles:a.roles,Type:a.type,SendInvite:a.sendInvite};a.remoteZonePath&&(b.RemoteZonePath=a.remoteZonePath),i.push(b)}try{return await et(t,{processId:r,action:"Role-Set",tags:[],data:i})}catch(a){throw new Error(a)}}}function x8(t){return async(e,r)=>{if(!(tr(r)&&tr(e.zoneToJoinId)))throw new Error("Invalid zone address");let i=[{name:"Zone-Id",value:e.zoneToJoinId}];e.storePath&&i.push({name:"Store-Path",value:e.storePath});try{return await et(t,{processId:r,action:"Zone-Join",tags:i})}catch(a){throw new Error(a)}}}function au(t){return async e=>{try{return Ye(`Updating zone to version ${dt.src.zone.version} with source ${dt.src.zone.id}`),await ss(t,{processId:e.zoneId,evalTxId:dt.src.zone.id}),await ss(t,{processId:e.zoneId,evalSrc:`
42
+ Zone.Version = '${dt.src.zone.version}'
43
43
  local patchMapLength = Zone.Functions.tableLength(Zone.PatchMap)
44
44
  if patchMapLength > 0 then
45
45
  local patchData = Zone.Functions.getPatchData('overview')
@@ -48,7 +48,7 @@ nonce: bundlr`),Buffer.from(i))}};var SO=A(S(),1);var Ka=class{_publicKey;ownerL
48
48
  local json = require('json')
49
49
  SyncState(nil)
50
50
  end
51
- `})}catch(r){throw new Error(r)}}}function x8(t){return async e=>{try{return $e(`Adding authority ${e.authorityId} to process ${e.zoneId}`),await os(t,{processId:e.zoneId,evalSrc:`table.insert(ao.authorities, '${e.authorityId}'); SyncState(nil)`})}catch(r){throw new Error(r)}}}function ou(t){return async(e,r)=>{let n=async()=>{let i=await Br(t,{processId:e,path:"zone",hydrate:r?.hydrate,fallbackAction:"Info"});if(i.body)return sr(JSON.parse(i.body));throw new Error("Zone data not found in process")};try{let i=await Br(t,{processId:e,hydrate:r?.hydrate});if(i?.zone){let a=i.zone;if(typeof a=="string")try{a=JSON.parse(a)}catch{}return a={...a,...a.Store??{}},sr(a)}return await n()}catch{try{return await n()}catch(a){throw new Error(a.message??"Error getting zone")}}}}function y8(t){return async e=>{let{zoneId:r,op:n,to:i}=e;if(!tr(r))throw new Error("Invalid zone address");if((n==="Invite"||n==="Cancel")&&(!i||!tr(i)))throw new Error('Invalid or missing "to" address');try{let a=[{name:"Update-Type",value:n}];return i&&a.push({name:"To",value:i}),await et(t,{processId:r,action:"Zone-Transfer-Ownership",tags:a})}catch(a){throw new Error(a?.message??a??"Error sending transfer ownership request")}}}function w8(t){return async e=>{if(!tr(e))throw new Error("Invalid zone address");try{return await et(t,{processId:e,action:"Zone-Leave"})}catch(r){throw new Error(r?.message??r??"Error leaving zone")}}}function A8(t){return async(e,r)=>{if(!tr(r))throw new Error("Invalid zone address");if(!tr(e.indexId))throw new Error("Invalid index ID");try{return await et(t,{processId:r,action:"Remove-From-Index",tags:[{name:"Index-Id",value:e.indexId}]})}catch(n){throw new Error(n?.message??n??"Error removing from index")}}}function S8(t){let e=nu(t),r=ja(t);return async(n,i)=>{let a=null,l=[{name:Ve.keys.zoneType,value:Ve.values.user}],b=async y=>{let x=y.toLowerCase(),_=n[x];if(_&&Pf(_))try{let C=await r(n[x]);l.push(fr(y,C))}catch(C){i?i(`Failed to resolve ${y}: ${C.message}`):console.error(C)}};n.username&&l.push(fr("Username",n.username)),n.displayName&&l.push(fr("DisplayName",n.displayName)),n.description&&l.push(fr("Description",n.description)),await Promise.all([b("Thumbnail"),b("Banner")]);try{a=await e({tags:l,skipModeration:!0},i)}catch(y){throw new Error(y.message??"Error creating profile")}return a}}function M8(t){let e=iu(t),r=ja(t);return async(n,i,a)=>{if(i){let l={Username:n.username,DisplayName:n.displayName,Description:n.description};if(n.thumbnail&&Pf(n.thumbnail))try{l.Thumbnail=await r(n.thumbnail)}catch(b){a&&a(`Failed to resolve thumbnail: ${b.message}`)}else l.Thumbnail="None";if(n.banner&&Pf(n.banner))try{l.Banner=await r(n.banner)}catch(b){a&&a(`Failed to resolve banner: ${b.message}`)}else l.Banner="None";try{return await e(l,i)}catch(b){throw new Error(b.message??"Error creating profile")}}else throw new Error("No profile provided")}}function T8(t){let e=au(t);return async r=>{try{return await e({zoneId:r.profileId})}catch(n){throw new Error(n)}}}function xp(t){let e=ou(t);return async(r,n)=>{try{let i=await e(r,n);if(!i)throw new Error("Error fetching profile - Not found");return{id:r,owner:i.owner,assets:i.assets,roles:i.roles,invites:i.invites,version:i.version,authorities:i.authorities,collections:i.collections,...i.store}}catch(i){throw new Error(i.message??"Error fetching profile")}}}function E8(t){let e=xp(t);return async r=>{try{let i=await Ln(t)({gateway:Pn.ao,tags:[{name:Ve.keys.dataProtocol,values:[Ve.values.dataProtocol]},{name:Ve.keys.zoneType,values:[Ve.values.user]}],owners:[r]});return i?.data?.length>0?(i.data.sort((a,l)=>{let b=a.node.block?.timestamp??0;return(l.node.block?.timestamp??0)-b}),await e(i.data[0].node.id)):{id:null}}catch(n){throw new Error(n.message??"Error fetching profile")}}}var QJ=yt.src.zone.version;function N_(t){let e=t;return e.platform||(e.platform=Bf()),{createZone:nu(t),updateZone:iu(t),addToZone:b8(t),getZone:ou(t),setZoneRoles:v8(t),joinZone:m8(t),updateZonePatchMap:g8(t),updateZoneVersion:au(t),updateZoneAuthorities:x8(t),transferZoneOwnership:y8(t),leaveZone:w8(t),removeFromIndex:A8(t),createProfile:S8(t),updateProfile:M8(t),updateProfileVersion:T8(t),getProfileById:xp(t),getProfileByWalletAddress:E8(t),createAtomicAsset:K3(t),getAtomicAsset:Z3(t),getAtomicAssets:V3(t),createComment:e8(t),getComments:t8(t),updateCommentStatus:r8(t),removeComment:i8(t),updateCommentContent:n8(t),userRemoveComment:a8(t),pinComment:o8(t),unpinComment:s8(t),getRules:f8(t),updateRules:c8(t),createCollection:Q3(t),updateCollectionAssets:W3(t),getCollection:Y3(t),getCollections:$3(t),addModerationEntry:mp(t),getModerationEntries:ru(t),updateModerationEntry:u8(t),removeModerationEntry:l8(t),addModerationSubscription:d8(t),removeModerationSubscription:h8(t),getModerationSubscriptions:p8(t),resolveTransaction:ja(t),getGQLData:Ln(t),getAggregatedGQLData:Lp(t),createProcess:Rn(t),readProcess:Dp(t),readState:Fp(t),sendMessage:Rp(t),mapFromProcessCase:sr,mapToProcessCase:Wa}}var WJ={init:N_};export{QJ as CurrentZoneVersion,L_ as Types,Bf as createPlatformContext,WJ as default,fp as detectPlatform};
51
+ `})}catch(r){throw new Error(r)}}}function y8(t){return async e=>{try{return Ye(`Adding authority ${e.authorityId} to process ${e.zoneId}`),await ss(t,{processId:e.zoneId,evalSrc:`table.insert(ao.authorities, '${e.authorityId}'); SyncState(nil)`})}catch(r){throw new Error(r)}}}function ou(t){return async(e,r)=>{let n=async()=>{let i=await Br(t,{processId:e,path:"zone",hydrate:r?.hydrate,fallbackAction:"Info"});if(i.body)return sr(JSON.parse(i.body));throw new Error("Zone data not found in process")};try{let i=await Br(t,{processId:e,hydrate:r?.hydrate});if(i?.zone){let a=i.zone;if(typeof a=="string")try{a=JSON.parse(a)}catch{}return a={...a,...a.Store??{}},sr(a)}return await n()}catch{try{return await n()}catch(a){throw new Error(a.message??"Error getting zone")}}}}function w8(t){return async e=>{let{zoneId:r,op:n,to:i}=e;if(!tr(r))throw new Error("Invalid zone address");if((n==="Invite"||n==="Cancel")&&(!i||!tr(i)))throw new Error('Invalid or missing "to" address');try{let a=[{name:"Update-Type",value:n}];return i&&a.push({name:"To",value:i}),await et(t,{processId:r,action:"Zone-Transfer-Ownership",tags:a})}catch(a){throw new Error(a?.message??a??"Error sending transfer ownership request")}}}function A8(t){return async e=>{if(!tr(e))throw new Error("Invalid zone address");try{return await et(t,{processId:e,action:"Zone-Leave"})}catch(r){throw new Error(r?.message??r??"Error leaving zone")}}}function S8(t){return async(e,r)=>{if(!tr(r))throw new Error("Invalid zone address");if(!tr(e.indexId))throw new Error("Invalid index ID");try{return await et(t,{processId:r,action:"Remove-From-Index",tags:[{name:"Index-Id",value:e.indexId}]})}catch(n){throw new Error(n?.message??n??"Error removing from index")}}}function M8(t){let e=nu(t),r=Qa(t);return async(n,i)=>{let a=null,l=[{name:Je.keys.zoneType,value:Je.values.user}],b=async y=>{let x=y.toLowerCase(),_=n[x];if(_&&Lf(_))try{let C=await r(n[x]);l.push(fr(y,C))}catch(C){i?i(`Failed to resolve ${y}: ${C.message}`):console.error(C)}};n.username&&l.push(fr("Username",n.username)),n.displayName&&l.push(fr("DisplayName",n.displayName)),n.description&&l.push(fr("Description",n.description)),await Promise.all([b("Thumbnail"),b("Banner")]);try{a=await e({tags:l,skipModeration:!0},i)}catch(y){throw new Error(y.message??"Error creating profile")}return a}}function T8(t){let e=iu(t),r=Qa(t);return async(n,i,a)=>{if(i){let l={Username:n.username,DisplayName:n.displayName,Description:n.description};if(n.thumbnail&&Lf(n.thumbnail))try{l.Thumbnail=await r(n.thumbnail)}catch(b){a&&a(`Failed to resolve thumbnail: ${b.message}`)}else l.Thumbnail="None";if(n.banner&&Lf(n.banner))try{l.Banner=await r(n.banner)}catch(b){a&&a(`Failed to resolve banner: ${b.message}`)}else l.Banner="None";try{return await e(l,i)}catch(b){throw new Error(b.message??"Error creating profile")}}else throw new Error("No profile provided")}}function E8(t){let e=au(t);return async r=>{try{return await e({zoneId:r.profileId})}catch(n){throw new Error(n)}}}function xp(t){let e=ou(t);return async(r,n)=>{try{let i=await e(r,n);if(!i)throw new Error("Error fetching profile - Not found");return{id:r,owner:i.owner,assets:i.assets,roles:i.roles,invites:i.invites,version:i.version,authorities:i.authorities,collections:i.collections,...i.store}}catch(i){throw new Error(i.message??"Error fetching profile")}}}function _8(t){let e=xp(t);return async r=>{try{let i=await Ln(t)({gateway:Pn.ao,tags:[{name:Je.keys.dataProtocol,values:[Je.values.dataProtocol]},{name:Je.keys.zoneType,values:[Je.values.user]}],owners:[r]});return i?.data?.length>0?(i.data.sort((a,l)=>{let b=a.node.block?.timestamp??0;return(l.node.block?.timestamp??0)-b}),await e(i.data[0].node.id)):{id:null}}catch(n){throw new Error(n.message??"Error fetching profile")}}}var WJ=dt.src.zone.version;function J_(t){let e=t;return e.platform||(e.platform=Cf()),{createZone:nu(t),updateZone:iu(t),addToZone:g8(t),getZone:ou(t),setZoneRoles:m8(t),joinZone:x8(t),updateZonePatchMap:v8(t),updateZoneVersion:au(t),updateZoneAuthorities:y8(t),transferZoneOwnership:w8(t),leaveZone:A8(t),removeFromIndex:S8(t),createProfile:M8(t),updateProfile:T8(t),updateProfileVersion:E8(t),getProfileById:xp(t),getProfileByWalletAddress:_8(t),createAtomicAsset:Z3(t),getAtomicAsset:V3(t),getAtomicAssets:j3(t),createComment:t8(t),getComments:r8(t),updateCommentStatus:n8(t),removeComment:a8(t),updateCommentContent:i8(t),userRemoveComment:o8(t),pinComment:s8(t),unpinComment:f8(t),getRules:c8(t),updateRules:u8(t),createCollection:W3(t),updateCollectionAssets:Y3(t),getCollection:$3(t),getCollections:e8(t),addModerationEntry:mp(t),getModerationEntries:ru(t),updateModerationEntry:l8(t),removeModerationEntry:d8(t),addModerationSubscription:h8(t),removeModerationSubscription:p8(t),getModerationSubscriptions:b8(t),resolveTransaction:Qa(t),getGQLData:Ln(t),getAggregatedGQLData:Lp(t),createProcess:Rn(t),readProcess:Ip(t),readState:Dp(t),sendMessage:Fp(t),mapFromProcessCase:sr,mapToProcessCase:Ya}}var YJ={init:J_};export{WJ as CurrentZoneVersion,R_ as Types,Cf as createPlatformContext,YJ as default,fp as detectPlatform};
52
52
  /*! Bundled license information:
53
53
 
54
54
  js-sha3/src/sha3.js: