@peerbit/server 5.4.14 → 5.4.15

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.
@@ -63,4 +63,4 @@ Error generating stack: `+ye.message+`
63
63
  `,_w=f=>new Uint8Array(Hy.keccak256.update(p2([Gi(xw),Gi(String(f.length)),f])).arrayBuffer());var Ra;(function(f){f[f.NONE=0]="NONE",f[f.SHA_256=1]="SHA_256",f[f.ETH_KECCAK_256=3]="ETH_KECCAK_256"})(Ra||(Ra={}));const ec=(f,o)=>{if(o===Ra.NONE)return f;if(o===Ra.SHA_256)return x_(f);if(o===Ra.ETH_KECCAK_256)return _w(f);throw new Error("Unsupported")};function BA(f){return"0x"+Hy.keccak_256(Nt(f))}const ww="rlp/5.8.0",Bw=new zt(ww);function G8(f){const o=[];for(;f;)o.unshift(f&255),f>>=8;return o}function Gy(f){if(Array.isArray(f)){let l=[];if(f.forEach(function(y){l=l.concat(Gy(y))}),l.length<=55)return l.unshift(192+l.length),l;const b=G8(l.length);return b.unshift(247+b.length),b.concat(l)}fg(f)||Bw.throwArgumentError("RLP object must be BytesLike","object",f);const o=Array.prototype.slice.call(Nt(f));if(o.length===1&&o[0]<=127)return o;if(o.length<=55)return o.unshift(128+o.length),o;const c=G8(o.length);return c.unshift(183+c.length),c.concat(o)}function Q1(f){return sr(Gy(f))}const mw="address/5.8.0",df=new zt(mw);function Y8(f){mA(f,20)||df.throwArgumentError("invalid address","address",f),f=f.toLowerCase();const o=f.substring(2).split(""),c=new Uint8Array(40);for(let b=0;b<40;b++)c[b]=o[b].charCodeAt(0);const l=Nt(BA(c));for(let b=0;b<40;b+=2)l[b>>1]>>4>=8&&(o[b]=o[b].toUpperCase()),(l[b>>1]&15)>=8&&(o[b+1]=o[b+1].toUpperCase());return"0x"+o.join("")}const Qw=9007199254740991;function Sw(f){return Math.log10?Math.log10(f):Math.log(f)/Math.LN10}const cg={};for(let f=0;f<10;f++)cg[String(f)]=String(f);for(let f=0;f<26;f++)cg[String.fromCharCode(65+f)]=String(10+f);const L8=Math.floor(Sw(Qw));function Dw(f){f=f.toUpperCase(),f=f.substring(4)+f.substring(0,2)+"00";let o=f.split("").map(l=>cg[l]).join("");for(;o.length>=L8;){let l=o.substring(0,L8);o=parseInt(l,10)%97+o.substring(l.length)}let c=String(98-parseInt(o,10)%97);for(;c.length<2;)c="0"+c;return c}function Yi(f){let o=null;if(typeof f!="string"&&df.throwArgumentError("invalid address","address",f),f.match(/^(0x)?[0-9a-fA-F]{40}$/))f.substring(0,2)!=="0x"&&(f="0x"+f),o=Y8(f),f.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&o!==f&&df.throwArgumentError("bad address checksum","address",f);else if(f.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(f.substring(2,4)!==Dw(f)&&df.throwArgumentError("bad icap checksum","address",f),o=Cw(f.substring(4));o.length<40;)o="0"+o;o=Y8("0x"+o)}else df.throwArgumentError("invalid address","address",f);return o}const kw="properties/5.8.0";var Mw=function(f,o,c,l){function b(y){return y instanceof c?y:new c(function(C){C(y)})}return new(c||(c=Promise))(function(y,C){function S(L){try{M(l.next(L))}catch(w){C(w)}}function k(L){try{M(l.throw(L))}catch(w){C(w)}}function M(L){L.done?y(L.value):b(L.value).then(S,k)}M((l=l.apply(f,o||[])).next())})};const S1=new zt(kw);function lr(f,o,c){Object.defineProperty(f,o,{enumerable:!0,value:c,writable:!1})}function us(f){return Mw(this,void 0,void 0,function*(){const o=Object.keys(f).map(l=>{const b=f[l];return Promise.resolve(b).then(y=>({key:l,value:y}))});return(yield Promise.all(o)).reduce((l,b)=>(l[b.key]=b.value,l),{})})}function Nw(f,o){(!f||typeof f!="object")&&S1.throwArgumentError("invalid object","object",f),Object.keys(f).forEach(c=>{o[c]||S1.throwArgumentError("invalid object key - "+c,"transaction:"+c,f)})}function ad(f){const o={};for(const c in f)o[c]=f[c];return o}const Fw={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function Yy(f){if(f==null||Fw[typeof f])return!0;if(Array.isArray(f)||typeof f=="object"){if(!Object.isFrozen(f))return!1;const o=Object.keys(f);for(let c=0;c<o.length;c++){let l=null;try{l=f[o[c]]}catch{continue}if(!Yy(l))return!1}return!0}return S1.throwArgumentError(`Cannot deepCopy ${typeof f}`,"object",f)}function Pw(f){if(Yy(f))return f;if(Array.isArray(f))return Object.freeze(f.map(o=>D1(o)));if(typeof f=="object"){const o={};for(const c in f){const l=f[c];l!==void 0&&lr(o,c,D1(l))}return o}return S1.throwArgumentError(`Cannot deepCopy ${typeof f}`,"object",f)}function D1(f){return Pw(f)}class Ly{constructor(o){for(const c in o)this[c]=D1(o[c])}}const Kw="abstract-provider/5.8.0";var Uw=function(f,o,c,l){function b(y){return y instanceof c?y:new c(function(C){C(y)})}return new(c||(c=Promise))(function(y,C){function S(L){try{M(l.next(L))}catch(w){C(w)}}function k(L){try{M(l.throw(L))}catch(w){C(w)}}function M(L){L.done?y(L.value):b(L.value).then(S,k)}M((l=l.apply(f,o||[])).next())})};const Rw=new zt(Kw);class ug{constructor(){Rw.checkAbstract(new.target,ug),lr(this,"_isProvider",!0)}getFeeData(){return Uw(this,void 0,void 0,function*(){const{block:o,gasPrice:c}=yield us({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(C=>null)});let l=null,b=null,y=null;return o&&o.baseFeePerGas&&(l=o.baseFeePerGas,y=Wr.from("1500000000"),b=o.baseFeePerGas.mul(2).add(y)),{lastBaseFeePerGas:l,maxFeePerGas:b,maxPriorityFeePerGas:y,gasPrice:c}})}addListener(o,c){return this.on(o,c)}removeListener(o,c){return this.off(o,c)}static isProvider(o){return!!(o&&o._isProvider)}}const Hw="abstract-signer/5.8.0";var Fi=function(f,o,c,l){function b(y){return y instanceof c?y:new c(function(C){C(y)})}return new(c||(c=Promise))(function(y,C){function S(L){try{M(l.next(L))}catch(w){C(w)}}function k(L){try{M(l.throw(L))}catch(w){C(w)}}function M(L){L.done?y(L.value):b(L.value).then(S,k)}M((l=l.apply(f,o||[])).next())})};const Pi=new zt(Hw),Gw=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Yw=[zt.errors.INSUFFICIENT_FUNDS,zt.errors.NONCE_EXPIRED,zt.errors.REPLACEMENT_UNDERPRICED];class lg{constructor(){Pi.checkAbstract(new.target,lg),lr(this,"_isSigner",!0)}getBalance(o){return Fi(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),o)})}getTransactionCount(o){return Fi(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),o)})}estimateGas(o){return Fi(this,void 0,void 0,function*(){this._checkProvider("estimateGas");const c=yield us(this.checkTransaction(o));return yield this.provider.estimateGas(c)})}call(o,c){return Fi(this,void 0,void 0,function*(){this._checkProvider("call");const l=yield us(this.checkTransaction(o));return yield this.provider.call(l,c)})}sendTransaction(o){return Fi(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");const c=yield this.populateTransaction(o),l=yield this.signTransaction(c);return yield this.provider.sendTransaction(l)})}getChainId(){return Fi(this,void 0,void 0,function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId})}getGasPrice(){return Fi(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return Fi(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(o){return Fi(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(o)})}checkTransaction(o){for(const l in o)Gw.indexOf(l)===-1&&Pi.throwArgumentError("invalid transaction key: "+l,"transaction",o);const c=ad(o);return c.from==null?c.from=this.getAddress():c.from=Promise.all([Promise.resolve(c.from),this.getAddress()]).then(l=>(l[0].toLowerCase()!==l[1].toLowerCase()&&Pi.throwArgumentError("from address mismatch","transaction",o),l[0])),c}populateTransaction(o){return Fi(this,void 0,void 0,function*(){const c=yield us(this.checkTransaction(o));c.to!=null&&(c.to=Promise.resolve(c.to).then(b=>Fi(this,void 0,void 0,function*(){if(b==null)return null;const y=yield this.resolveName(b);return y==null&&Pi.throwArgumentError("provided ENS name resolves to null","tx.to",b),y})),c.to.catch(b=>{}));const l=c.maxFeePerGas!=null||c.maxPriorityFeePerGas!=null;if(c.gasPrice!=null&&(c.type===2||l)?Pi.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",o):(c.type===0||c.type===1)&&l&&Pi.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",o),(c.type===2||c.type==null)&&c.maxFeePerGas!=null&&c.maxPriorityFeePerGas!=null)c.type=2;else if(c.type===0||c.type===1)c.gasPrice==null&&(c.gasPrice=this.getGasPrice());else{const b=yield this.getFeeData();if(c.type==null)if(b.maxFeePerGas!=null&&b.maxPriorityFeePerGas!=null)if(c.type=2,c.gasPrice!=null){const y=c.gasPrice;delete c.gasPrice,c.maxFeePerGas=y,c.maxPriorityFeePerGas=y}else c.maxFeePerGas==null&&(c.maxFeePerGas=b.maxFeePerGas),c.maxPriorityFeePerGas==null&&(c.maxPriorityFeePerGas=b.maxPriorityFeePerGas);else b.gasPrice!=null?(l&&Pi.throwError("network does not support EIP-1559",zt.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),c.gasPrice==null&&(c.gasPrice=b.gasPrice),c.type=0):Pi.throwError("failed to get consistent fee data",zt.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else c.type===2&&(c.maxFeePerGas==null&&(c.maxFeePerGas=b.maxFeePerGas),c.maxPriorityFeePerGas==null&&(c.maxPriorityFeePerGas=b.maxPriorityFeePerGas))}return c.nonce==null&&(c.nonce=this.getTransactionCount("pending")),c.gasLimit==null&&(c.gasLimit=this.estimateGas(c).catch(b=>{if(Yw.indexOf(b.code)>=0)throw b;return Pi.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",zt.errors.UNPREDICTABLE_GAS_LIMIT,{error:b,tx:c})})),c.chainId==null?c.chainId=this.getChainId():c.chainId=Promise.all([Promise.resolve(c.chainId),this.getChainId()]).then(b=>(b[1]!==0&&b[0]!==b[1]&&Pi.throwArgumentError("chainId address mismatch","transaction",o),b[0])),yield us(c)})}_checkProvider(o){this.provider||Pi.throwError("missing provider",zt.errors.UNSUPPORTED_OPERATION,{operation:o||"_checkProvider"})}static isSigner(o){return!!(o&&o._isSigner)}}function hg(f){return BA(Gi(f))}const Lw="hash/5.8.0",Tw=`Ethereum Signed Message:
64
64
  `;function Jw(f){return typeof f=="string"&&(f=Gi(f)),BA(Do([Gi(Tw),Gi(String(f.length)),f]))}var Ow=function(f,o,c,l){function b(y){return y instanceof c?y:new c(function(C){C(y)})}return new(c||(c=Promise))(function(y,C){function S(L){try{M(l.next(L))}catch(w){C(w)}}function k(L){try{M(l.throw(L))}catch(w){C(w)}}function M(L){L.done?y(L.value):b(L.value).then(S,k)}M((l=l.apply(f,o||[])).next())})};const cn=new zt(Lw),Ty=new Uint8Array(32);Ty.fill(0);const zw=Wr.from(-1),Jy=Wr.from(0),Oy=Wr.from(1),qw=Wr.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function jw(f){const o=Nt(f),c=o.length%32;return c?xs([o,Ty.slice(c)]):sr(o)}const Vw=pi(Oy.toHexString(),32),Xw=pi(Jy.toHexString(),32),T8={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Xl=["name","version","chainId","verifyingContract","salt"];function J8(f){return function(o){return typeof o!="string"&&cn.throwArgumentError(`invalid domain value for ${JSON.stringify(f)}`,`domain.${f}`,o),o}}const Ww={name:J8("name"),version:J8("version"),chainId:function(f){try{return Wr.from(f).toString()}catch{}return cn.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",f)},verifyingContract:function(f){try{return Yi(f).toLowerCase()}catch{}return cn.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",f)},salt:function(f){try{const o=Nt(f);if(o.length!==32)throw new Error("bad length");return sr(o)}catch{}return cn.throwArgumentError('invalid domain value "salt"',"domain.salt",f)}};function Wl(f){{const o=f.match(/^(u?)int(\d*)$/);if(o){const c=o[1]==="",l=parseInt(o[2]||"256");(l%8!==0||l>256||o[2]&&o[2]!==String(l))&&cn.throwArgumentError("invalid numeric width","type",f);const b=qw.mask(c?l-1:l),y=c?b.add(Oy).mul(zw):Jy;return function(C){const S=Wr.from(C);return(S.lt(y)||S.gt(b))&&cn.throwArgumentError(`value out-of-bounds for ${f}`,"value",C),pi(S.toTwos(256).toHexString(),32)}}}{const o=f.match(/^bytes(\d+)$/);if(o){const c=parseInt(o[1]);return(c===0||c>32||o[1]!==String(c))&&cn.throwArgumentError("invalid bytes width","type",f),function(l){return Nt(l).length!==c&&cn.throwArgumentError(`invalid length for ${f}`,"value",l),jw(l)}}}switch(f){case"address":return function(o){return pi(Yi(o),32)};case"bool":return function(o){return o?Vw:Xw};case"bytes":return function(o){return BA(o)};case"string":return function(o){return hg(o)}}return null}function O8(f,o){return`${f}(${o.map(({name:c,type:l})=>l+" "+c).join(",")})`}class VA{constructor(o){lr(this,"types",Object.freeze(D1(o))),lr(this,"_encoderCache",{}),lr(this,"_types",{});const c={},l={},b={};Object.keys(o).forEach(S=>{c[S]={},l[S]=[],b[S]={}});for(const S in o){const k={};o[S].forEach(M=>{k[M.name]&&cn.throwArgumentError(`duplicate variable name ${JSON.stringify(M.name)} in ${JSON.stringify(S)}`,"types",o),k[M.name]=!0;const L=M.type.match(/^([^\x5b]*)(\x5b|$)/)[1];L===S&&cn.throwArgumentError(`circular type reference to ${JSON.stringify(L)}`,"types",o),!Wl(L)&&(l[L]||cn.throwArgumentError(`unknown type ${JSON.stringify(L)}`,"types",o),l[L].push(S),c[S][L]=!0)})}const y=Object.keys(l).filter(S=>l[S].length===0);y.length===0?cn.throwArgumentError("missing primary type","types",o):y.length>1&&cn.throwArgumentError(`ambiguous primary types or unused types: ${y.map(S=>JSON.stringify(S)).join(", ")}`,"types",o),lr(this,"primaryType",y[0]);function C(S,k){k[S]&&cn.throwArgumentError(`circular type reference to ${JSON.stringify(S)}`,"types",o),k[S]=!0,Object.keys(c[S]).forEach(M=>{l[M]&&(C(M,k),Object.keys(k).forEach(L=>{b[L][M]=!0}))}),delete k[S]}C(this.primaryType,{});for(const S in b){const k=Object.keys(b[S]);k.sort(),this._types[S]=O8(S,o[S])+k.map(M=>O8(M,o[M])).join("")}}getEncoder(o){let c=this._encoderCache[o];return c||(c=this._encoderCache[o]=this._getEncoder(o)),c}_getEncoder(o){{const b=Wl(o);if(b)return b}const c=o.match(/^(.*)(\x5b(\d*)\x5d)$/);if(c){const b=c[1],y=this.getEncoder(b),C=parseInt(c[3]);return S=>{C>=0&&S.length!==C&&cn.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",S);let k=S.map(y);return this._types[b]&&(k=k.map(BA)),BA(xs(k))}}const l=this.types[o];if(l){const b=hg(this._types[o]);return y=>{const C=l.map(({name:S,type:k})=>{const M=this.getEncoder(k)(y[S]);return this._types[k]?BA(M):M});return C.unshift(b),xs(C)}}return cn.throwArgumentError(`unknown type: ${o}`,"type",o)}encodeType(o){const c=this._types[o];return c||cn.throwArgumentError(`unknown type: ${JSON.stringify(o)}`,"name",o),c}encodeData(o,c){return this.getEncoder(o)(c)}hashStruct(o,c){return BA(this.encodeData(o,c))}encode(o){return this.encodeData(this.primaryType,o)}hash(o){return this.hashStruct(this.primaryType,o)}_visit(o,c,l){if(Wl(o))return l(o,c);const b=o.match(/^(.*)(\x5b(\d*)\x5d)$/);if(b){const C=b[1],S=parseInt(b[3]);return S>=0&&c.length!==S&&cn.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",c),c.map(k=>this._visit(C,k,l))}const y=this.types[o];return y?y.reduce((C,{name:S,type:k})=>(C[S]=this._visit(k,c[S],l),C),{}):cn.throwArgumentError(`unknown type: ${o}`,"type",o)}visit(o,c){return this._visit(this.primaryType,o,c)}static from(o){return new VA(o)}static getPrimaryType(o){return VA.from(o).primaryType}static hashStruct(o,c,l){return VA.from(c).hashStruct(o,l)}static hashDomain(o){const c=[];for(const l in o){const b=T8[l];b||cn.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(l)}`,"domain",o),c.push({name:l,type:b})}return c.sort((l,b)=>Xl.indexOf(l.name)-Xl.indexOf(b.name)),VA.hashStruct("EIP712Domain",{EIP712Domain:c},o)}static encode(o,c,l){return xs(["0x1901",VA.hashDomain(o),VA.from(c).hash(l)])}static hash(o,c,l){return BA(VA.encode(o,c,l))}static resolveNames(o,c,l,b){return Ow(this,void 0,void 0,function*(){o=ad(o);const y={};o.verifyingContract&&!mA(o.verifyingContract,20)&&(y[o.verifyingContract]="0x");const C=VA.from(c);C.visit(l,(S,k)=>(S==="address"&&!mA(k,20)&&(y[k]="0x"),k));for(const S in y)y[S]=yield b(S);return o.verifyingContract&&y[o.verifyingContract]&&(o.verifyingContract=y[o.verifyingContract]),l=C.visit(l,(S,k)=>S==="address"&&y[k]?y[k]:k),{domain:o,value:l}})}static getPayload(o,c,l){VA.hashDomain(o);const b={},y=[];Xl.forEach(k=>{const M=o[k];M!=null&&(b[k]=Ww[k](M),y.push({name:k,type:T8[k]}))});const C=VA.from(c),S=ad(c);return S.EIP712Domain?cn.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",c):S.EIP712Domain=y,C.encode(l),{types:S,domain:b,primaryType:C.primaryType,message:C.visit(l,(k,M)=>{if(k.match(/^bytes(\d*)/))return sr(Nt(M));if(k.match(/^u?int/))return Wr.from(M).toString();switch(k){case"address":return M.toLowerCase();case"bool":return!!M;case"string":return typeof M!="string"&&cn.throwArgumentError("invalid string","value",M),M}return cn.throwArgumentError("unsupported type","type",k)})}}}class zy{constructor(o){lr(this,"alphabet",o),lr(this,"base",o.length),lr(this,"_alphabetMap",{}),lr(this,"_leader",o.charAt(0));for(let c=0;c<o.length;c++)this._alphabetMap[o.charAt(c)]=c}encode(o){let c=Nt(o);if(c.length===0)return"";let l=[0];for(let y=0;y<c.length;++y){let C=c[y];for(let S=0;S<l.length;++S)C+=l[S]<<8,l[S]=C%this.base,C=C/this.base|0;for(;C>0;)l.push(C%this.base),C=C/this.base|0}let b="";for(let y=0;c[y]===0&&y<c.length-1;++y)b+=this._leader;for(let y=l.length-1;y>=0;--y)b+=this.alphabet[l[y]];return b}decode(o){if(typeof o!="string")throw new TypeError("Expected String");let c=[];if(o.length===0)return new Uint8Array(c);c.push(0);for(let l=0;l<o.length;l++){let b=this._alphabetMap[o[l]];if(b===void 0)throw new Error("Non-base"+this.base+" character");let y=b;for(let C=0;C<c.length;++C)y+=c[C]*this.base,c[C]=y&255,y>>=8;for(;y>0;)c.push(y&255),y>>=8}for(let l=0;o[l]===this._leader&&l<o.length-1;++l)c.push(0);return Nt(new Uint8Array(c.reverse()))}}new zy("abcdefghijklmnopqrstuvwxyz234567");const qy=new zy("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var Zl={},jr={},$l,z8;function E2(){if(z8)return $l;z8=1,$l=f;function f(o,c){if(!o)throw new Error(c||"Assertion failed")}return f.equal=function(c,l,b){if(c!=l)throw new Error(b||"Assertion failed: "+c+" != "+l)},$l}var Vc={exports:{}},q8;function au(){return q8||(q8=1,typeof Object.create=="function"?Vc.exports=function(o,c){c&&(o.super_=c,o.prototype=Object.create(c.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:Vc.exports=function(o,c){if(c){o.super_=c;var l=function(){};l.prototype=c.prototype,o.prototype=new l,o.prototype.constructor=o}}),Vc.exports}var j8;function ha(){if(j8)return jr;j8=1;var f=E2(),o=au();jr.inherits=o;function c(J,G){return(J.charCodeAt(G)&64512)!==55296||G<0||G+1>=J.length?!1:(J.charCodeAt(G+1)&64512)===56320}function l(J,G){if(Array.isArray(J))return J.slice();if(!J)return[];var m=[];if(typeof J=="string")if(G){if(G==="hex")for(J=J.replace(/[^a-z0-9]+/ig,""),J.length%2!==0&&(J="0"+J),X=0;X<J.length;X+=2)m.push(parseInt(J[X]+J[X+1],16))}else for(var R=0,X=0;X<J.length;X++){var oe=J.charCodeAt(X);oe<128?m[R++]=oe:oe<2048?(m[R++]=oe>>6|192,m[R++]=oe&63|128):c(J,X)?(oe=65536+((oe&1023)<<10)+(J.charCodeAt(++X)&1023),m[R++]=oe>>18|240,m[R++]=oe>>12&63|128,m[R++]=oe>>6&63|128,m[R++]=oe&63|128):(m[R++]=oe>>12|224,m[R++]=oe>>6&63|128,m[R++]=oe&63|128)}else for(X=0;X<J.length;X++)m[X]=J[X]|0;return m}jr.toArray=l;function b(J){for(var G="",m=0;m<J.length;m++)G+=S(J[m].toString(16));return G}jr.toHex=b;function y(J){var G=J>>>24|J>>>8&65280|J<<8&16711680|(J&255)<<24;return G>>>0}jr.htonl=y;function C(J,G){for(var m="",R=0;R<J.length;R++){var X=J[R];G==="little"&&(X=y(X)),m+=k(X.toString(16))}return m}jr.toHex32=C;function S(J){return J.length===1?"0"+J:J}jr.zero2=S;function k(J){return J.length===7?"0"+J:J.length===6?"00"+J:J.length===5?"000"+J:J.length===4?"0000"+J:J.length===3?"00000"+J:J.length===2?"000000"+J:J.length===1?"0000000"+J:J}jr.zero8=k;function M(J,G,m,R){var X=m-G;f(X%4===0);for(var oe=new Array(X/4),de=0,le=G;de<oe.length;de++,le+=4){var q;R==="big"?q=J[le]<<24|J[le+1]<<16|J[le+2]<<8|J[le+3]:q=J[le+3]<<24|J[le+2]<<16|J[le+1]<<8|J[le],oe[de]=q>>>0}return oe}jr.join32=M;function L(J,G){for(var m=new Array(J.length*4),R=0,X=0;R<J.length;R++,X+=4){var oe=J[R];G==="big"?(m[X]=oe>>>24,m[X+1]=oe>>>16&255,m[X+2]=oe>>>8&255,m[X+3]=oe&255):(m[X+3]=oe>>>24,m[X+2]=oe>>>16&255,m[X+1]=oe>>>8&255,m[X]=oe&255)}return m}jr.split32=L;function w(J,G){return J>>>G|J<<32-G}jr.rotr32=w;function ee(J,G){return J<<G|J>>>32-G}jr.rotl32=ee;function Ce(J,G){return J+G>>>0}jr.sum32=Ce;function ce(J,G,m){return J+G+m>>>0}jr.sum32_3=ce;function V(J,G,m,R){return J+G+m+R>>>0}jr.sum32_4=V;function Ee(J,G,m,R,X){return J+G+m+R+X>>>0}jr.sum32_5=Ee;function ge(J,G,m,R){var X=J[G],oe=J[G+1],de=R+oe>>>0,le=(de<R?1:0)+m+X;J[G]=le>>>0,J[G+1]=de}jr.sum64=ge;function _e(J,G,m,R){var X=G+R>>>0,oe=(X<G?1:0)+J+m;return oe>>>0}jr.sum64_hi=_e;function ne(J,G,m,R){var X=G+R;return X>>>0}jr.sum64_lo=ne;function r0(J,G,m,R,X,oe,de,le){var q=0,Y=G;Y=Y+R>>>0,q+=Y<G?1:0,Y=Y+oe>>>0,q+=Y<oe?1:0,Y=Y+le>>>0,q+=Y<le?1:0;var O=J+m+X+de+q;return O>>>0}jr.sum64_4_hi=r0;function xe(J,G,m,R,X,oe,de,le){var q=G+R+oe+le;return q>>>0}jr.sum64_4_lo=xe;function Me(J,G,m,R,X,oe,de,le,q,Y){var O=0,me=G;me=me+R>>>0,O+=me<G?1:0,me=me+oe>>>0,O+=me<oe?1:0,me=me+le>>>0,O+=me<le?1:0,me=me+Y>>>0,O+=me<Y?1:0;var Je=J+m+X+de+q+O;return Je>>>0}jr.sum64_5_hi=Me;function be(J,G,m,R,X,oe,de,le,q,Y){var O=G+R+oe+le+Y;return O>>>0}jr.sum64_5_lo=be;function We(J,G,m){var R=G<<32-m|J>>>m;return R>>>0}jr.rotr64_hi=We;function ae(J,G,m){var R=J<<32-m|G>>>m;return R>>>0}jr.rotr64_lo=ae;function y0(J,G,m){return J>>>m}jr.shr64_hi=y0;function Ne(J,G,m){var R=J<<32-m|G>>>m;return R>>>0}return jr.shr64_lo=Ne,jr}var eh={},V8;function tc(){if(V8)return eh;V8=1;var f=ha(),o=E2();function c(){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}return eh.BlockHash=c,c.prototype.update=function(b,y){if(b=f.toArray(b,y),this.pending?this.pending=this.pending.concat(b):this.pending=b,this.pendingTotal+=b.length,this.pending.length>=this._delta8){b=this.pending;var C=b.length%this._delta8;this.pending=b.slice(b.length-C,b.length),this.pending.length===0&&(this.pending=null),b=f.join32(b,0,b.length-C,this.endian);for(var S=0;S<b.length;S+=this._delta32)this._update(b,S,S+this._delta32)}return this},c.prototype.digest=function(b){return this.update(this._pad()),o(this.pending===null),this._digest(b)},c.prototype._pad=function(){var b=this.pendingTotal,y=this._delta8,C=y-(b+this.padLength)%y,S=new Array(C+this.padLength);S[0]=128;for(var k=1;k<C;k++)S[k]=0;if(b<<=3,this.endian==="big"){for(var M=8;M<this.padLength;M++)S[k++]=0;S[k++]=0,S[k++]=0,S[k++]=0,S[k++]=0,S[k++]=b>>>24&255,S[k++]=b>>>16&255,S[k++]=b>>>8&255,S[k++]=b&255}else for(S[k++]=b&255,S[k++]=b>>>8&255,S[k++]=b>>>16&255,S[k++]=b>>>24&255,S[k++]=0,S[k++]=0,S[k++]=0,S[k++]=0,M=8;M<this.padLength;M++)S[k++]=0;return S},eh}var A2={},ia={},X8;function jy(){if(X8)return ia;X8=1;var f=ha(),o=f.rotr32;function c(L,w,ee,Ce){if(L===0)return l(w,ee,Ce);if(L===1||L===3)return y(w,ee,Ce);if(L===2)return b(w,ee,Ce)}ia.ft_1=c;function l(L,w,ee){return L&w^~L&ee}ia.ch32=l;function b(L,w,ee){return L&w^L&ee^w&ee}ia.maj32=b;function y(L,w,ee){return L^w^ee}ia.p32=y;function C(L){return o(L,2)^o(L,13)^o(L,22)}ia.s0_256=C;function S(L){return o(L,6)^o(L,11)^o(L,25)}ia.s1_256=S;function k(L){return o(L,7)^o(L,18)^L>>>3}ia.g0_256=k;function M(L){return o(L,17)^o(L,19)^L>>>10}return ia.g1_256=M,ia}var th,W8;function Zw(){if(W8)return th;W8=1;var f=ha(),o=tc(),c=jy(),l=f.rotl32,b=f.sum32,y=f.sum32_5,C=c.ft_1,S=o.BlockHash,k=[1518500249,1859775393,2400959708,3395469782];function M(){if(!(this instanceof M))return new M;S.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return f.inherits(M,S),th=M,M.blockSize=512,M.outSize=160,M.hmacStrength=80,M.padLength=64,M.prototype._update=function(w,ee){for(var Ce=this.W,ce=0;ce<16;ce++)Ce[ce]=w[ee+ce];for(;ce<Ce.length;ce++)Ce[ce]=l(Ce[ce-3]^Ce[ce-8]^Ce[ce-14]^Ce[ce-16],1);var V=this.h[0],Ee=this.h[1],ge=this.h[2],_e=this.h[3],ne=this.h[4];for(ce=0;ce<Ce.length;ce++){var r0=~~(ce/20),xe=y(l(V,5),C(r0,Ee,ge,_e),ne,Ce[ce],k[r0]);ne=_e,_e=ge,ge=l(Ee,30),Ee=V,V=xe}this.h[0]=b(this.h[0],V),this.h[1]=b(this.h[1],Ee),this.h[2]=b(this.h[2],ge),this.h[3]=b(this.h[3],_e),this.h[4]=b(this.h[4],ne)},M.prototype._digest=function(w){return w==="hex"?f.toHex32(this.h,"big"):f.split32(this.h,"big")},th}var rh,Z8;function Vy(){if(Z8)return rh;Z8=1;var f=ha(),o=tc(),c=jy(),l=E2(),b=f.sum32,y=f.sum32_4,C=f.sum32_5,S=c.ch32,k=c.maj32,M=c.s0_256,L=c.s1_256,w=c.g0_256,ee=c.g1_256,Ce=o.BlockHash,ce=[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 V(){if(!(this instanceof V))return new V;Ce.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=ce,this.W=new Array(64)}return f.inherits(V,Ce),rh=V,V.blockSize=512,V.outSize=256,V.hmacStrength=192,V.padLength=64,V.prototype._update=function(ge,_e){for(var ne=this.W,r0=0;r0<16;r0++)ne[r0]=ge[_e+r0];for(;r0<ne.length;r0++)ne[r0]=y(ee(ne[r0-2]),ne[r0-7],w(ne[r0-15]),ne[r0-16]);var xe=this.h[0],Me=this.h[1],be=this.h[2],We=this.h[3],ae=this.h[4],y0=this.h[5],Ne=this.h[6],J=this.h[7];for(l(this.k.length===ne.length),r0=0;r0<ne.length;r0++){var G=C(J,L(ae),S(ae,y0,Ne),this.k[r0],ne[r0]),m=b(M(xe),k(xe,Me,be));J=Ne,Ne=y0,y0=ae,ae=b(We,G),We=be,be=Me,Me=xe,xe=b(G,m)}this.h[0]=b(this.h[0],xe),this.h[1]=b(this.h[1],Me),this.h[2]=b(this.h[2],be),this.h[3]=b(this.h[3],We),this.h[4]=b(this.h[4],ae),this.h[5]=b(this.h[5],y0),this.h[6]=b(this.h[6],Ne),this.h[7]=b(this.h[7],J)},V.prototype._digest=function(ge){return ge==="hex"?f.toHex32(this.h,"big"):f.split32(this.h,"big")},rh}var nh,$8;function $w(){if($8)return nh;$8=1;var f=ha(),o=Vy();function c(){if(!(this instanceof c))return new c;o.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}return f.inherits(c,o),nh=c,c.blockSize=512,c.outSize=224,c.hmacStrength=192,c.padLength=64,c.prototype._digest=function(b){return b==="hex"?f.toHex32(this.h.slice(0,7),"big"):f.split32(this.h.slice(0,7),"big")},nh}var Ah,ep;function Xy(){if(ep)return Ah;ep=1;var f=ha(),o=tc(),c=E2(),l=f.rotr64_hi,b=f.rotr64_lo,y=f.shr64_hi,C=f.shr64_lo,S=f.sum64,k=f.sum64_hi,M=f.sum64_lo,L=f.sum64_4_hi,w=f.sum64_4_lo,ee=f.sum64_5_hi,Ce=f.sum64_5_lo,ce=o.BlockHash,V=[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 Ee(){if(!(this instanceof Ee))return new Ee;ce.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=V,this.W=new Array(160)}f.inherits(Ee,ce),Ah=Ee,Ee.blockSize=1024,Ee.outSize=512,Ee.hmacStrength=192,Ee.padLength=128,Ee.prototype._prepareBlock=function(m,R){for(var X=this.W,oe=0;oe<32;oe++)X[oe]=m[R+oe];for(;oe<X.length;oe+=2){var de=Ne(X[oe-4],X[oe-3]),le=J(X[oe-4],X[oe-3]),q=X[oe-14],Y=X[oe-13],O=ae(X[oe-30],X[oe-29]),me=y0(X[oe-30],X[oe-29]),Je=X[oe-32],se=X[oe-31];X[oe]=L(de,le,q,Y,O,me,Je,se),X[oe+1]=w(de,le,q,Y,O,me,Je,se)}},Ee.prototype._update=function(m,R){this._prepareBlock(m,R);var X=this.W,oe=this.h[0],de=this.h[1],le=this.h[2],q=this.h[3],Y=this.h[4],O=this.h[5],me=this.h[6],Je=this.h[7],se=this.h[8],Ve=this.h[9],c0=this.h[10],l0=this.h[11],h0=this.h[12],R0=this.h[13],tt=this.h[14],V0=this.h[15];c(this.k.length===X.length);for(var t0=0;t0<X.length;t0+=2){var ht=tt,Ke=V0,Ze=be(se,Ve),o0=We(se,Ve),Ae=ge(se,Ve,c0,l0,h0),w0=_e(se,Ve,c0,l0,h0,R0),U0=this.k[t0],N0=this.k[t0+1],ot=X[t0],W0=X[t0+1],X0=ee(ht,Ke,Ze,o0,Ae,w0,U0,N0,ot,W0),vt=Ce(ht,Ke,Ze,o0,Ae,w0,U0,N0,ot,W0);ht=xe(oe,de),Ke=Me(oe,de),Ze=ne(oe,de,le,q,Y),o0=r0(oe,de,le,q,Y,O);var er=k(ht,Ke,Ze,o0),Yt=M(ht,Ke,Ze,o0);tt=h0,V0=R0,h0=c0,R0=l0,c0=se,l0=Ve,se=k(me,Je,X0,vt),Ve=M(Je,Je,X0,vt),me=Y,Je=O,Y=le,O=q,le=oe,q=de,oe=k(X0,vt,er,Yt),de=M(X0,vt,er,Yt)}S(this.h,0,oe,de),S(this.h,2,le,q),S(this.h,4,Y,O),S(this.h,6,me,Je),S(this.h,8,se,Ve),S(this.h,10,c0,l0),S(this.h,12,h0,R0),S(this.h,14,tt,V0)},Ee.prototype._digest=function(m){return m==="hex"?f.toHex32(this.h,"big"):f.split32(this.h,"big")};function ge(G,m,R,X,oe){var de=G&R^~G&oe;return de<0&&(de+=4294967296),de}function _e(G,m,R,X,oe,de){var le=m&X^~m&de;return le<0&&(le+=4294967296),le}function ne(G,m,R,X,oe){var de=G&R^G&oe^R&oe;return de<0&&(de+=4294967296),de}function r0(G,m,R,X,oe,de){var le=m&X^m&de^X&de;return le<0&&(le+=4294967296),le}function xe(G,m){var R=l(G,m,28),X=l(m,G,2),oe=l(m,G,7),de=R^X^oe;return de<0&&(de+=4294967296),de}function Me(G,m){var R=b(G,m,28),X=b(m,G,2),oe=b(m,G,7),de=R^X^oe;return de<0&&(de+=4294967296),de}function be(G,m){var R=l(G,m,14),X=l(G,m,18),oe=l(m,G,9),de=R^X^oe;return de<0&&(de+=4294967296),de}function We(G,m){var R=b(G,m,14),X=b(G,m,18),oe=b(m,G,9),de=R^X^oe;return de<0&&(de+=4294967296),de}function ae(G,m){var R=l(G,m,1),X=l(G,m,8),oe=y(G,m,7),de=R^X^oe;return de<0&&(de+=4294967296),de}function y0(G,m){var R=b(G,m,1),X=b(G,m,8),oe=C(G,m,7),de=R^X^oe;return de<0&&(de+=4294967296),de}function Ne(G,m){var R=l(G,m,19),X=l(m,G,29),oe=y(G,m,6),de=R^X^oe;return de<0&&(de+=4294967296),de}function J(G,m){var R=b(G,m,19),X=b(m,G,29),oe=C(G,m,6),de=R^X^oe;return de<0&&(de+=4294967296),de}return Ah}var ih,tp;function eB(){if(tp)return ih;tp=1;var f=ha(),o=Xy();function c(){if(!(this instanceof c))return new c;o.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}return f.inherits(c,o),ih=c,c.blockSize=1024,c.outSize=384,c.hmacStrength=192,c.padLength=128,c.prototype._digest=function(b){return b==="hex"?f.toHex32(this.h.slice(0,12),"big"):f.split32(this.h.slice(0,12),"big")},ih}var rp;function tB(){return rp||(rp=1,A2.sha1=Zw(),A2.sha224=$w(),A2.sha256=Vy(),A2.sha384=eB(),A2.sha512=Xy()),A2}var ah={},np;function rB(){if(np)return ah;np=1;var f=ha(),o=tc(),c=f.rotl32,l=f.sum32,b=f.sum32_3,y=f.sum32_4,C=o.BlockHash;function S(){if(!(this instanceof S))return new S;C.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}f.inherits(S,C),ah.ripemd160=S,S.blockSize=512,S.outSize=160,S.hmacStrength=192,S.padLength=64,S.prototype._update=function(Ee,ge){for(var _e=this.h[0],ne=this.h[1],r0=this.h[2],xe=this.h[3],Me=this.h[4],be=_e,We=ne,ae=r0,y0=xe,Ne=Me,J=0;J<80;J++){var G=l(c(y(_e,k(J,ne,r0,xe),Ee[w[J]+ge],M(J)),Ce[J]),Me);_e=Me,Me=xe,xe=c(r0,10),r0=ne,ne=G,G=l(c(y(be,k(79-J,We,ae,y0),Ee[ee[J]+ge],L(J)),ce[J]),Ne),be=Ne,Ne=y0,y0=c(ae,10),ae=We,We=G}G=b(this.h[1],r0,y0),this.h[1]=b(this.h[2],xe,Ne),this.h[2]=b(this.h[3],Me,be),this.h[3]=b(this.h[4],_e,We),this.h[4]=b(this.h[0],ne,ae),this.h[0]=G},S.prototype._digest=function(Ee){return Ee==="hex"?f.toHex32(this.h,"little"):f.split32(this.h,"little")};function k(V,Ee,ge,_e){return V<=15?Ee^ge^_e:V<=31?Ee&ge|~Ee&_e:V<=47?(Ee|~ge)^_e:V<=63?Ee&_e|ge&~_e:Ee^(ge|~_e)}function M(V){return V<=15?0:V<=31?1518500249:V<=47?1859775393:V<=63?2400959708:2840853838}function L(V){return V<=15?1352829926:V<=31?1548603684:V<=47?1836072691:V<=63?2053994217:0}var w=[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],ee=[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],Ce=[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],ce=[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];return ah}var oh,Ap;function nB(){if(Ap)return oh;Ap=1;var f=ha(),o=E2();function c(l,b,y){if(!(this instanceof c))return new c(l,b,y);this.Hash=l,this.blockSize=l.blockSize/8,this.outSize=l.outSize/8,this.inner=null,this.outer=null,this._init(f.toArray(b,y))}return oh=c,c.prototype._init=function(b){b.length>this.blockSize&&(b=new this.Hash().update(b).digest()),o(b.length<=this.blockSize);for(var y=b.length;y<this.blockSize;y++)b.push(0);for(y=0;y<b.length;y++)b[y]^=54;for(this.inner=new this.Hash().update(b),y=0;y<b.length;y++)b[y]^=106;this.outer=new this.Hash().update(b)},c.prototype.update=function(b,y){return this.inner.update(b,y),this},c.prototype.digest=function(b){return this.outer.update(this.inner.digest()),this.outer.digest(b)},oh}var ip;function ou(){return ip||(ip=1,(function(f){var o=f;o.utils=ha(),o.common=tc(),o.sha=tB(),o.ripemd=rB(),o.hmac=nB(),o.sha1=o.sha.sha1,o.sha256=o.sha.sha256,o.sha224=o.sha.sha224,o.sha384=o.sha.sha384,o.sha512=o.sha.sha512,o.ripemd160=o.ripemd.ripemd160})(Zl)),Zl}var AB=ou();const XA=Li(AB);var Mf;(function(f){f.sha256="sha256",f.sha512="sha512"})(Mf||(Mf={}));const iB="sha2/5.8.0",aB=new zt(iB);function oB(f){return"0x"+XA.ripemd160().update(Nt(f)).digest("hex")}function Nf(f){return"0x"+XA.sha256().update(Nt(f)).digest("hex")}function k1(f,o,c){return Mf[f]||aB.throwError("unsupported algorithm "+f,zt.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:f}),"0x"+XA.hmac(XA[f],Nt(o)).update(Nt(c)).digest("hex")}function dg(f,o,c,l,b){f=Nt(f),o=Nt(o);let y,C=1;const S=new Uint8Array(l),k=new Uint8Array(o.length+4);k.set(o);let M,L;for(let w=1;w<=C;w++){k[o.length]=w>>24&255,k[o.length+1]=w>>16&255,k[o.length+2]=w>>8&255,k[o.length+3]=w&255;let ee=Nt(k1(b,f,k));y||(y=ee.length,L=new Uint8Array(y),C=Math.ceil(l/y),M=l-(C-1)*y),L.set(ee);for(let V=1;V<c;V++){ee=Nt(k1(b,f,ee));for(let Ee=0;Ee<y;Ee++)L[Ee]^=ee[Ee]}const Ce=(w-1)*y,ce=w===C?M:y;S.set(Nt(L).slice(0,ce),Ce)}return sr(S)}function Hs(f,o,c){return c={path:o,exports:{},require:function(l,b){return sB(l,b??c.path)}},f(c,c.exports),c.exports}function sB(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var gg=Wy;function Wy(f,o){if(!f)throw new Error(o||"Assertion failed")}Wy.equal=function(o,c,l){if(o!=c)throw new Error(l||"Assertion failed: "+o+" != "+c)};var Hi=Hs(function(f,o){var c=o;function l(C,S){if(Array.isArray(C))return C.slice();if(!C)return[];var k=[];if(typeof C!="string"){for(var M=0;M<C.length;M++)k[M]=C[M]|0;return k}if(S==="hex"){C=C.replace(/[^a-z0-9]+/ig,""),C.length%2!==0&&(C="0"+C);for(var M=0;M<C.length;M+=2)k.push(parseInt(C[M]+C[M+1],16))}else for(var M=0;M<C.length;M++){var L=C.charCodeAt(M),w=L>>8,ee=L&255;w?k.push(w,ee):k.push(ee)}return k}c.toArray=l;function b(C){return C.length===1?"0"+C:C}c.zero2=b;function y(C){for(var S="",k=0;k<C.length;k++)S+=b(C[k].toString(16));return S}c.toHex=y,c.encode=function(S,k){return k==="hex"?y(S):S}}),ri=Hs(function(f,o){var c=o;c.assert=gg,c.toArray=Hi.toArray,c.zero2=Hi.zero2,c.toHex=Hi.toHex,c.encode=Hi.encode;function l(k,M,L){var w=new Array(Math.max(k.bitLength(),L)+1),ee;for(ee=0;ee<w.length;ee+=1)w[ee]=0;var Ce=1<<M+1,ce=k.clone();for(ee=0;ee<w.length;ee++){var V,Ee=ce.andln(Ce-1);ce.isOdd()?(Ee>(Ce>>1)-1?V=(Ce>>1)-Ee:V=Ee,ce.isubn(V)):V=0,w[ee]=V,ce.iushrn(1)}return w}c.getNAF=l;function b(k,M){var L=[[],[]];k=k.clone(),M=M.clone();for(var w=0,ee=0,Ce;k.cmpn(-w)>0||M.cmpn(-ee)>0;){var ce=k.andln(3)+w&3,V=M.andln(3)+ee&3;ce===3&&(ce=-1),V===3&&(V=-1);var Ee;(ce&1)===0?Ee=0:(Ce=k.andln(7)+w&7,(Ce===3||Ce===5)&&V===2?Ee=-ce:Ee=ce),L[0].push(Ee);var ge;(V&1)===0?ge=0:(Ce=M.andln(7)+ee&7,(Ce===3||Ce===5)&&ce===2?ge=-V:ge=V),L[1].push(ge),2*w===Ee+1&&(w=1-w),2*ee===ge+1&&(ee=1-ee),k.iushrn(1),M.iushrn(1)}return L}c.getJSF=b;function y(k,M,L){var w="_"+M;k.prototype[M]=function(){return this[w]!==void 0?this[w]:this[w]=L.call(this)}}c.cachedProperty=y;function C(k){return typeof k=="string"?c.toArray(k,"hex"):k}c.parseBytes=C;function S(k){return new ar(k,"hex","le")}c.intFromLE=S}),M1=ri.getNAF,fB=ri.getJSF,N1=ri.assert;function Po(f,o){this.type=f,this.p=new ar(o.p,16),this.red=o.prime?ar.red(o.prime):ar.mont(this.p),this.zero=new ar(0).toRed(this.red),this.one=new ar(1).toRed(this.red),this.two=new ar(2).toRed(this.red),this.n=o.n&&new ar(o.n,16),this.g=o.g&&this.pointFromJSON(o.g,o.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 c=this.n&&this.p.div(this.n);!c||c.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var x2=Po;Po.prototype.point=function(){throw new Error("Not implemented")};Po.prototype.validate=function(){throw new Error("Not implemented")};Po.prototype._fixedNafMul=function(o,c){N1(o.precomputed);var l=o._getDoubles(),b=M1(c,1,this._bitLength),y=(1<<l.step+1)-(l.step%2===0?2:1);y/=3;var C=[],S,k;for(S=0;S<b.length;S+=l.step){k=0;for(var M=S+l.step-1;M>=S;M--)k=(k<<1)+b[M];C.push(k)}for(var L=this.jpoint(null,null,null),w=this.jpoint(null,null,null),ee=y;ee>0;ee--){for(S=0;S<C.length;S++)k=C[S],k===ee?w=w.mixedAdd(l.points[S]):k===-ee&&(w=w.mixedAdd(l.points[S].neg()));L=L.add(w)}return L.toP()};Po.prototype._wnafMul=function(o,c){var l=4,b=o._getNAFPoints(l);l=b.wnd;for(var y=b.points,C=M1(c,l,this._bitLength),S=this.jpoint(null,null,null),k=C.length-1;k>=0;k--){for(var M=0;k>=0&&C[k]===0;k--)M++;if(k>=0&&M++,S=S.dblp(M),k<0)break;var L=C[k];N1(L!==0),o.type==="affine"?L>0?S=S.mixedAdd(y[L-1>>1]):S=S.mixedAdd(y[-L-1>>1].neg()):L>0?S=S.add(y[L-1>>1]):S=S.add(y[-L-1>>1].neg())}return o.type==="affine"?S.toP():S};Po.prototype._wnafMulAdd=function(o,c,l,b,y){var C=this._wnafT1,S=this._wnafT2,k=this._wnafT3,M=0,L,w,ee;for(L=0;L<b;L++){ee=c[L];var Ce=ee._getNAFPoints(o);C[L]=Ce.wnd,S[L]=Ce.points}for(L=b-1;L>=1;L-=2){var ce=L-1,V=L;if(C[ce]!==1||C[V]!==1){k[ce]=M1(l[ce],C[ce],this._bitLength),k[V]=M1(l[V],C[V],this._bitLength),M=Math.max(k[ce].length,M),M=Math.max(k[V].length,M);continue}var Ee=[c[ce],null,null,c[V]];c[ce].y.cmp(c[V].y)===0?(Ee[1]=c[ce].add(c[V]),Ee[2]=c[ce].toJ().mixedAdd(c[V].neg())):c[ce].y.cmp(c[V].y.redNeg())===0?(Ee[1]=c[ce].toJ().mixedAdd(c[V]),Ee[2]=c[ce].add(c[V].neg())):(Ee[1]=c[ce].toJ().mixedAdd(c[V]),Ee[2]=c[ce].toJ().mixedAdd(c[V].neg()));var ge=[-3,-1,-5,-7,0,7,5,1,3],_e=fB(l[ce],l[V]);for(M=Math.max(_e[0].length,M),k[ce]=new Array(M),k[V]=new Array(M),w=0;w<M;w++){var ne=_e[0][w]|0,r0=_e[1][w]|0;k[ce][w]=ge[(ne+1)*3+(r0+1)],k[V][w]=0,S[ce]=Ee}}var xe=this.jpoint(null,null,null),Me=this._wnafT4;for(L=M;L>=0;L--){for(var be=0;L>=0;){var We=!0;for(w=0;w<b;w++)Me[w]=k[w][L]|0,Me[w]!==0&&(We=!1);if(!We)break;be++,L--}if(L>=0&&be++,xe=xe.dblp(be),L<0)break;for(w=0;w<b;w++){var ae=Me[w];ae!==0&&(ae>0?ee=S[w][ae-1>>1]:ae<0&&(ee=S[w][-ae-1>>1].neg()),ee.type==="affine"?xe=xe.mixedAdd(ee):xe=xe.add(ee))}}for(L=0;L<b;L++)S[L]=null;return y?xe:xe.toP()};function bi(f,o){this.curve=f,this.type=o,this.precomputed=null}Po.BasePoint=bi;bi.prototype.eq=function(){throw new Error("Not implemented")};bi.prototype.validate=function(){return this.curve.validate(this)};Po.prototype.decodePoint=function(o,c){o=ri.toArray(o,c);var l=this.p.byteLength();if((o[0]===4||o[0]===6||o[0]===7)&&o.length-1===2*l){o[0]===6?N1(o[o.length-1]%2===0):o[0]===7&&N1(o[o.length-1]%2===1);var b=this.point(o.slice(1,1+l),o.slice(1+l,1+2*l));return b}else if((o[0]===2||o[0]===3)&&o.length-1===l)return this.pointFromX(o.slice(1,1+l),o[0]===3);throw new Error("Unknown point format")};bi.prototype.encodeCompressed=function(o){return this.encode(o,!0)};bi.prototype._encode=function(o){var c=this.curve.p.byteLength(),l=this.getX().toArray("be",c);return o?[this.getY().isEven()?2:3].concat(l):[4].concat(l,this.getY().toArray("be",c))};bi.prototype.encode=function(o,c){return ri.encode(this._encode(c),o)};bi.prototype.precompute=function(o){if(this.precomputed)return this;var c={doubles:null,naf:null,beta:null};return c.naf=this._getNAFPoints(8),c.doubles=this._getDoubles(4,o),c.beta=this._getBeta(),this.precomputed=c,this};bi.prototype._hasDoubles=function(o){if(!this.precomputed)return!1;var c=this.precomputed.doubles;return c?c.points.length>=Math.ceil((o.bitLength()+1)/c.step):!1};bi.prototype._getDoubles=function(o,c){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var l=[this],b=this,y=0;y<c;y+=o){for(var C=0;C<o;C++)b=b.dbl();l.push(b)}return{step:o,points:l}};bi.prototype._getNAFPoints=function(o){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var c=[this],l=(1<<o)-1,b=l===1?null:this.dbl(),y=1;y<l;y++)c[y]=c[y-1].add(b);return{wnd:o,points:c}};bi.prototype._getBeta=function(){return null};bi.prototype.dblp=function(o){for(var c=this,l=0;l<o;l++)c=c.dbl();return c};var pg=Hs(function(f){typeof Object.create=="function"?f.exports=function(c,l){l&&(c.super_=l,c.prototype=Object.create(l.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:f.exports=function(c,l){if(l){c.super_=l;var b=function(){};b.prototype=l.prototype,c.prototype=new b,c.prototype.constructor=c}}}),cB=ri.assert;function vi(f){x2.call(this,"short",f),this.a=new ar(f.a,16).toRed(this.red),this.b=new ar(f.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(f),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}pg(vi,x2);var uB=vi;vi.prototype._getEndomorphism=function(o){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var c,l;if(o.beta)c=new ar(o.beta,16).toRed(this.red);else{var b=this._getEndoRoots(this.p);c=b[0].cmp(b[1])<0?b[0]:b[1],c=c.toRed(this.red)}if(o.lambda)l=new ar(o.lambda,16);else{var y=this._getEndoRoots(this.n);this.g.mul(y[0]).x.cmp(this.g.x.redMul(c))===0?l=y[0]:(l=y[1],cB(this.g.mul(l).x.cmp(this.g.x.redMul(c))===0))}var C;return o.basis?C=o.basis.map(function(S){return{a:new ar(S.a,16),b:new ar(S.b,16)}}):C=this._getEndoBasis(l),{beta:c,lambda:l,basis:C}}};vi.prototype._getEndoRoots=function(o){var c=o===this.p?this.red:ar.mont(o),l=new ar(2).toRed(c).redInvm(),b=l.redNeg(),y=new ar(3).toRed(c).redNeg().redSqrt().redMul(l),C=b.redAdd(y).fromRed(),S=b.redSub(y).fromRed();return[C,S]};vi.prototype._getEndoBasis=function(o){for(var c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=o,b=this.n.clone(),y=new ar(1),C=new ar(0),S=new ar(0),k=new ar(1),M,L,w,ee,Ce,ce,V,Ee=0,ge,_e;l.cmpn(0)!==0;){var ne=b.div(l);ge=b.sub(ne.mul(l)),_e=S.sub(ne.mul(y));var r0=k.sub(ne.mul(C));if(!w&&ge.cmp(c)<0)M=V.neg(),L=y,w=ge.neg(),ee=_e;else if(w&&++Ee===2)break;V=ge,b=l,l=ge,S=y,y=_e,k=C,C=r0}Ce=ge.neg(),ce=_e;var xe=w.sqr().add(ee.sqr()),Me=Ce.sqr().add(ce.sqr());return Me.cmp(xe)>=0&&(Ce=M,ce=L),w.negative&&(w=w.neg(),ee=ee.neg()),Ce.negative&&(Ce=Ce.neg(),ce=ce.neg()),[{a:w,b:ee},{a:Ce,b:ce}]};vi.prototype._endoSplit=function(o){var c=this.endo.basis,l=c[0],b=c[1],y=b.b.mul(o).divRound(this.n),C=l.b.neg().mul(o).divRound(this.n),S=y.mul(l.a),k=C.mul(b.a),M=y.mul(l.b),L=C.mul(b.b),w=o.sub(S).sub(k),ee=M.add(L).neg();return{k1:w,k2:ee}};vi.prototype.pointFromX=function(o,c){o=new ar(o,16),o.red||(o=o.toRed(this.red));var l=o.redSqr().redMul(o).redIAdd(o.redMul(this.a)).redIAdd(this.b),b=l.redSqrt();if(b.redSqr().redSub(l).cmp(this.zero)!==0)throw new Error("invalid point");var y=b.fromRed().isOdd();return(c&&!y||!c&&y)&&(b=b.redNeg()),this.point(o,b)};vi.prototype.validate=function(o){if(o.inf)return!0;var c=o.x,l=o.y,b=this.a.redMul(c),y=c.redSqr().redMul(c).redIAdd(b).redIAdd(this.b);return l.redSqr().redISub(y).cmpn(0)===0};vi.prototype._endoWnafMulAdd=function(o,c,l){for(var b=this._endoWnafT1,y=this._endoWnafT2,C=0;C<o.length;C++){var S=this._endoSplit(c[C]),k=o[C],M=k._getBeta();S.k1.negative&&(S.k1.ineg(),k=k.neg(!0)),S.k2.negative&&(S.k2.ineg(),M=M.neg(!0)),b[C*2]=k,b[C*2+1]=M,y[C*2]=S.k1,y[C*2+1]=S.k2}for(var L=this._wnafMulAdd(1,b,y,C*2,l),w=0;w<C*2;w++)b[w]=null,y[w]=null;return L};function Jn(f,o,c,l){x2.BasePoint.call(this,f,"affine"),o===null&&c===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new ar(o,16),this.y=new ar(c,16),l&&(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)}pg(Jn,x2.BasePoint);vi.prototype.point=function(o,c,l){return new Jn(this,o,c,l)};vi.prototype.pointFromJSON=function(o,c){return Jn.fromJSON(this,o,c)};Jn.prototype._getBeta=function(){if(this.curve.endo){var o=this.precomputed;if(o&&o.beta)return o.beta;var c=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(o){var l=this.curve,b=function(y){return l.point(y.x.redMul(l.endo.beta),y.y)};o.beta=c,c.precomputed={beta:null,naf:o.naf&&{wnd:o.naf.wnd,points:o.naf.points.map(b)},doubles:o.doubles&&{step:o.doubles.step,points:o.doubles.points.map(b)}}}return c}};Jn.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]};Jn.fromJSON=function(o,c,l){typeof c=="string"&&(c=JSON.parse(c));var b=o.point(c[0],c[1],l);if(!c[2])return b;function y(S){return o.point(S[0],S[1],l)}var C=c[2];return b.precomputed={beta:null,doubles:C.doubles&&{step:C.doubles.step,points:[b].concat(C.doubles.points.map(y))},naf:C.naf&&{wnd:C.naf.wnd,points:[b].concat(C.naf.points.map(y))}},b};Jn.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)+">"};Jn.prototype.isInfinity=function(){return this.inf};Jn.prototype.add=function(o){if(this.inf)return o;if(o.inf)return this;if(this.eq(o))return this.dbl();if(this.neg().eq(o))return this.curve.point(null,null);if(this.x.cmp(o.x)===0)return this.curve.point(null,null);var c=this.y.redSub(o.y);c.cmpn(0)!==0&&(c=c.redMul(this.x.redSub(o.x).redInvm()));var l=c.redSqr().redISub(this.x).redISub(o.x),b=c.redMul(this.x.redSub(l)).redISub(this.y);return this.curve.point(l,b)};Jn.prototype.dbl=function(){if(this.inf)return this;var o=this.y.redAdd(this.y);if(o.cmpn(0)===0)return this.curve.point(null,null);var c=this.curve.a,l=this.x.redSqr(),b=o.redInvm(),y=l.redAdd(l).redIAdd(l).redIAdd(c).redMul(b),C=y.redSqr().redISub(this.x.redAdd(this.x)),S=y.redMul(this.x.redSub(C)).redISub(this.y);return this.curve.point(C,S)};Jn.prototype.getX=function(){return this.x.fromRed()};Jn.prototype.getY=function(){return this.y.fromRed()};Jn.prototype.mul=function(o){return o=new ar(o,16),this.isInfinity()?this:this._hasDoubles(o)?this.curve._fixedNafMul(this,o):this.curve.endo?this.curve._endoWnafMulAdd([this],[o]):this.curve._wnafMul(this,o)};Jn.prototype.mulAdd=function(o,c,l){var b=[this,c],y=[o,l];return this.curve.endo?this.curve._endoWnafMulAdd(b,y):this.curve._wnafMulAdd(1,b,y,2)};Jn.prototype.jmulAdd=function(o,c,l){var b=[this,c],y=[o,l];return this.curve.endo?this.curve._endoWnafMulAdd(b,y,!0):this.curve._wnafMulAdd(1,b,y,2,!0)};Jn.prototype.eq=function(o){return this===o||this.inf===o.inf&&(this.inf||this.x.cmp(o.x)===0&&this.y.cmp(o.y)===0)};Jn.prototype.neg=function(o){if(this.inf)return this;var c=this.curve.point(this.x,this.y.redNeg());if(o&&this.precomputed){var l=this.precomputed,b=function(y){return y.neg()};c.precomputed={naf:l.naf&&{wnd:l.naf.wnd,points:l.naf.points.map(b)},doubles:l.doubles&&{step:l.doubles.step,points:l.doubles.points.map(b)}}}return c};Jn.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var o=this.curve.jpoint(this.x,this.y,this.curve.one);return o};function $n(f,o,c,l){x2.BasePoint.call(this,f,"jacobian"),o===null&&c===null&&l===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ar(0)):(this.x=new ar(o,16),this.y=new ar(c,16),this.z=new ar(l,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}pg($n,x2.BasePoint);vi.prototype.jpoint=function(o,c,l){return new $n(this,o,c,l)};$n.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var o=this.z.redInvm(),c=o.redSqr(),l=this.x.redMul(c),b=this.y.redMul(c).redMul(o);return this.curve.point(l,b)};$n.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};$n.prototype.add=function(o){if(this.isInfinity())return o;if(o.isInfinity())return this;var c=o.z.redSqr(),l=this.z.redSqr(),b=this.x.redMul(c),y=o.x.redMul(l),C=this.y.redMul(c.redMul(o.z)),S=o.y.redMul(l.redMul(this.z)),k=b.redSub(y),M=C.redSub(S);if(k.cmpn(0)===0)return M.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var L=k.redSqr(),w=L.redMul(k),ee=b.redMul(L),Ce=M.redSqr().redIAdd(w).redISub(ee).redISub(ee),ce=M.redMul(ee.redISub(Ce)).redISub(C.redMul(w)),V=this.z.redMul(o.z).redMul(k);return this.curve.jpoint(Ce,ce,V)};$n.prototype.mixedAdd=function(o){if(this.isInfinity())return o.toJ();if(o.isInfinity())return this;var c=this.z.redSqr(),l=this.x,b=o.x.redMul(c),y=this.y,C=o.y.redMul(c).redMul(this.z),S=l.redSub(b),k=y.redSub(C);if(S.cmpn(0)===0)return k.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var M=S.redSqr(),L=M.redMul(S),w=l.redMul(M),ee=k.redSqr().redIAdd(L).redISub(w).redISub(w),Ce=k.redMul(w.redISub(ee)).redISub(y.redMul(L)),ce=this.z.redMul(S);return this.curve.jpoint(ee,Ce,ce)};$n.prototype.dblp=function(o){if(o===0)return this;if(this.isInfinity())return this;if(!o)return this.dbl();var c;if(this.curve.zeroA||this.curve.threeA){var l=this;for(c=0;c<o;c++)l=l.dbl();return l}var b=this.curve.a,y=this.curve.tinv,C=this.x,S=this.y,k=this.z,M=k.redSqr().redSqr(),L=S.redAdd(S);for(c=0;c<o;c++){var w=C.redSqr(),ee=L.redSqr(),Ce=ee.redSqr(),ce=w.redAdd(w).redIAdd(w).redIAdd(b.redMul(M)),V=C.redMul(ee),Ee=ce.redSqr().redISub(V.redAdd(V)),ge=V.redISub(Ee),_e=ce.redMul(ge);_e=_e.redIAdd(_e).redISub(Ce);var ne=L.redMul(k);c+1<o&&(M=M.redMul(Ce)),C=Ee,k=ne,L=_e}return this.curve.jpoint(C,L.redMul(y),k)};$n.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};$n.prototype._zeroDbl=function(){var o,c,l;if(this.zOne){var b=this.x.redSqr(),y=this.y.redSqr(),C=y.redSqr(),S=this.x.redAdd(y).redSqr().redISub(b).redISub(C);S=S.redIAdd(S);var k=b.redAdd(b).redIAdd(b),M=k.redSqr().redISub(S).redISub(S),L=C.redIAdd(C);L=L.redIAdd(L),L=L.redIAdd(L),o=M,c=k.redMul(S.redISub(M)).redISub(L),l=this.y.redAdd(this.y)}else{var w=this.x.redSqr(),ee=this.y.redSqr(),Ce=ee.redSqr(),ce=this.x.redAdd(ee).redSqr().redISub(w).redISub(Ce);ce=ce.redIAdd(ce);var V=w.redAdd(w).redIAdd(w),Ee=V.redSqr(),ge=Ce.redIAdd(Ce);ge=ge.redIAdd(ge),ge=ge.redIAdd(ge),o=Ee.redISub(ce).redISub(ce),c=V.redMul(ce.redISub(o)).redISub(ge),l=this.y.redMul(this.z),l=l.redIAdd(l)}return this.curve.jpoint(o,c,l)};$n.prototype._threeDbl=function(){var o,c,l;if(this.zOne){var b=this.x.redSqr(),y=this.y.redSqr(),C=y.redSqr(),S=this.x.redAdd(y).redSqr().redISub(b).redISub(C);S=S.redIAdd(S);var k=b.redAdd(b).redIAdd(b).redIAdd(this.curve.a),M=k.redSqr().redISub(S).redISub(S);o=M;var L=C.redIAdd(C);L=L.redIAdd(L),L=L.redIAdd(L),c=k.redMul(S.redISub(M)).redISub(L),l=this.y.redAdd(this.y)}else{var w=this.z.redSqr(),ee=this.y.redSqr(),Ce=this.x.redMul(ee),ce=this.x.redSub(w).redMul(this.x.redAdd(w));ce=ce.redAdd(ce).redIAdd(ce);var V=Ce.redIAdd(Ce);V=V.redIAdd(V);var Ee=V.redAdd(V);o=ce.redSqr().redISub(Ee),l=this.y.redAdd(this.z).redSqr().redISub(ee).redISub(w);var ge=ee.redSqr();ge=ge.redIAdd(ge),ge=ge.redIAdd(ge),ge=ge.redIAdd(ge),c=ce.redMul(V.redISub(o)).redISub(ge)}return this.curve.jpoint(o,c,l)};$n.prototype._dbl=function(){var o=this.curve.a,c=this.x,l=this.y,b=this.z,y=b.redSqr().redSqr(),C=c.redSqr(),S=l.redSqr(),k=C.redAdd(C).redIAdd(C).redIAdd(o.redMul(y)),M=c.redAdd(c);M=M.redIAdd(M);var L=M.redMul(S),w=k.redSqr().redISub(L.redAdd(L)),ee=L.redISub(w),Ce=S.redSqr();Ce=Ce.redIAdd(Ce),Ce=Ce.redIAdd(Ce),Ce=Ce.redIAdd(Ce);var ce=k.redMul(ee).redISub(Ce),V=l.redAdd(l).redMul(b);return this.curve.jpoint(w,ce,V)};$n.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var o=this.x.redSqr(),c=this.y.redSqr(),l=this.z.redSqr(),b=c.redSqr(),y=o.redAdd(o).redIAdd(o),C=y.redSqr(),S=this.x.redAdd(c).redSqr().redISub(o).redISub(b);S=S.redIAdd(S),S=S.redAdd(S).redIAdd(S),S=S.redISub(C);var k=S.redSqr(),M=b.redIAdd(b);M=M.redIAdd(M),M=M.redIAdd(M),M=M.redIAdd(M);var L=y.redIAdd(S).redSqr().redISub(C).redISub(k).redISub(M),w=c.redMul(L);w=w.redIAdd(w),w=w.redIAdd(w);var ee=this.x.redMul(k).redISub(w);ee=ee.redIAdd(ee),ee=ee.redIAdd(ee);var Ce=this.y.redMul(L.redMul(M.redISub(L)).redISub(S.redMul(k)));Ce=Ce.redIAdd(Ce),Ce=Ce.redIAdd(Ce),Ce=Ce.redIAdd(Ce);var ce=this.z.redAdd(S).redSqr().redISub(l).redISub(k);return this.curve.jpoint(ee,Ce,ce)};$n.prototype.mul=function(o,c){return o=new ar(o,c),this.curve._wnafMul(this,o)};$n.prototype.eq=function(o){if(o.type==="affine")return this.eq(o.toJ());if(this===o)return!0;var c=this.z.redSqr(),l=o.z.redSqr();if(this.x.redMul(l).redISub(o.x.redMul(c)).cmpn(0)!==0)return!1;var b=c.redMul(this.z),y=l.redMul(o.z);return this.y.redMul(y).redISub(o.y.redMul(b)).cmpn(0)===0};$n.prototype.eqXToP=function(o){var c=this.z.redSqr(),l=o.toRed(this.curve.red).redMul(c);if(this.x.cmp(l)===0)return!0;for(var b=o.clone(),y=this.curve.redN.redMul(c);;){if(b.iadd(this.curve.n),b.cmp(this.curve.p)>=0)return!1;if(l.redIAdd(y),this.x.cmp(l)===0)return!0}};$n.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)+">"};$n.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var a1=Hs(function(f,o){var c=o;c.base=x2,c.short=uB,c.mont=null,c.edwards=null}),o1=Hs(function(f,o){var c=o,l=ri.assert;function b(S){S.type==="short"?this.curve=new a1.short(S):S.type==="edwards"?this.curve=new a1.edwards(S):this.curve=new a1.mont(S),this.g=this.curve.g,this.n=this.curve.n,this.hash=S.hash,l(this.g.validate(),"Invalid curve"),l(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}c.PresetCurve=b;function y(S,k){Object.defineProperty(c,S,{configurable:!0,enumerable:!0,get:function(){var M=new b(k);return Object.defineProperty(c,S,{configurable:!0,enumerable:!0,value:M}),M}})}y("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:XA.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),y("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:XA.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),y("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:XA.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),y("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:XA.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"]}),y("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:XA.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"]}),y("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:XA.sha256,gRed:!1,g:["9"]}),y("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:XA.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var C;try{C=null.crash()}catch{C=void 0}y("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:XA.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",C]})});function ko(f){if(!(this instanceof ko))return new ko(f);this.hash=f.hash,this.predResist=!!f.predResist,this.outLen=this.hash.outSize,this.minEntropy=f.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var o=Hi.toArray(f.entropy,f.entropyEnc||"hex"),c=Hi.toArray(f.nonce,f.nonceEnc||"hex"),l=Hi.toArray(f.pers,f.persEnc||"hex");gg(o.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(o,c,l)}var Zy=ko;ko.prototype._init=function(o,c,l){var b=o.concat(c).concat(l);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var y=0;y<this.V.length;y++)this.K[y]=0,this.V[y]=1;this._update(b),this._reseed=1,this.reseedInterval=281474976710656};ko.prototype._hmac=function(){return new XA.hmac(this.hash,this.K)};ko.prototype._update=function(o){var c=this._hmac().update(this.V).update([0]);o&&(c=c.update(o)),this.K=c.digest(),this.V=this._hmac().update(this.V).digest(),o&&(this.K=this._hmac().update(this.V).update([1]).update(o).digest(),this.V=this._hmac().update(this.V).digest())};ko.prototype.reseed=function(o,c,l,b){typeof c!="string"&&(b=l,l=c,c=null),o=Hi.toArray(o,c),l=Hi.toArray(l,b),gg(o.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(o.concat(l||[])),this._reseed=1};ko.prototype.generate=function(o,c,l,b){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof c!="string"&&(b=l,l=c,c=null),l&&(l=Hi.toArray(l,b||"hex"),this._update(l));for(var y=[];y.length<o;)this.V=this._hmac().update(this.V).digest(),y=y.concat(this.V);var C=y.slice(0,o);return this._update(l),this._reseed++,Hi.encode(C,c)};var od=ri.assert;function dA(f,o){this.ec=f,this.priv=null,this.pub=null,o.priv&&this._importPrivate(o.priv,o.privEnc),o.pub&&this._importPublic(o.pub,o.pubEnc)}var yg=dA;dA.fromPublic=function(o,c,l){return c instanceof dA?c:new dA(o,{pub:c,pubEnc:l})};dA.fromPrivate=function(o,c,l){return c instanceof dA?c:new dA(o,{priv:c,privEnc:l})};dA.prototype.validate=function(){var o=this.getPublic();return o.isInfinity()?{result:!1,reason:"Invalid public key"}:o.validate()?o.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"}};dA.prototype.getPublic=function(o,c){return typeof o=="string"&&(c=o,o=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),c?this.pub.encode(c,o):this.pub};dA.prototype.getPrivate=function(o){return o==="hex"?this.priv.toString(16,2):this.priv};dA.prototype._importPrivate=function(o,c){this.priv=new ar(o,c||16),this.priv=this.priv.umod(this.ec.curve.n)};dA.prototype._importPublic=function(o,c){if(o.x||o.y){this.ec.curve.type==="mont"?od(o.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&od(o.x&&o.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(o.x,o.y);return}this.pub=this.ec.curve.decodePoint(o,c)};dA.prototype.derive=function(o){return o.validate()||od(o.validate(),"public point not validated"),o.mul(this.priv).getX()};dA.prototype.sign=function(o,c,l){return this.ec.sign(o,this,c,l)};dA.prototype.verify=function(o,c,l){return this.ec.verify(o,c,this,void 0,l)};dA.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var lB=ri.assert;function su(f,o){if(f instanceof su)return f;this._importDER(f,o)||(lB(f.r&&f.s,"Signature without r or s"),this.r=new ar(f.r,16),this.s=new ar(f.s,16),f.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=f.recoveryParam)}var fu=su;function hB(){this.place=0}function sh(f,o){var c=f[o.place++];if(!(c&128))return c;var l=c&15;if(l===0||l>4||f[o.place]===0)return!1;for(var b=0,y=0,C=o.place;y<l;y++,C++)b<<=8,b|=f[C],b>>>=0;return b<=127?!1:(o.place=C,b)}function ap(f){for(var o=0,c=f.length-1;!f[o]&&!(f[o+1]&128)&&o<c;)o++;return o===0?f:f.slice(o)}su.prototype._importDER=function(o,c){o=ri.toArray(o,c);var l=new hB;if(o[l.place++]!==48)return!1;var b=sh(o,l);if(b===!1||b+l.place!==o.length||o[l.place++]!==2)return!1;var y=sh(o,l);if(y===!1||(o[l.place]&128)!==0)return!1;var C=o.slice(l.place,y+l.place);if(l.place+=y,o[l.place++]!==2)return!1;var S=sh(o,l);if(S===!1||o.length!==S+l.place||(o[l.place]&128)!==0)return!1;var k=o.slice(l.place,S+l.place);if(C[0]===0)if(C[1]&128)C=C.slice(1);else return!1;if(k[0]===0)if(k[1]&128)k=k.slice(1);else return!1;return this.r=new ar(C),this.s=new ar(k),this.recoveryParam=null,!0};function fh(f,o){if(o<128){f.push(o);return}var c=1+(Math.log(o)/Math.LN2>>>3);for(f.push(c|128);--c;)f.push(o>>>(c<<3)&255);f.push(o)}su.prototype.toDER=function(o){var c=this.r.toArray(),l=this.s.toArray();for(c[0]&128&&(c=[0].concat(c)),l[0]&128&&(l=[0].concat(l)),c=ap(c),l=ap(l);!l[0]&&!(l[1]&128);)l=l.slice(1);var b=[2];fh(b,c.length),b=b.concat(c),b.push(2),fh(b,l.length);var y=b.concat(l),C=[48];return fh(C,y.length),C=C.concat(y),ri.encode(C,o)};var dB=(function(){throw new Error("unsupported")}),a2=ri.assert;function Ci(f){if(!(this instanceof Ci))return new Ci(f);typeof f=="string"&&(a2(Object.prototype.hasOwnProperty.call(o1,f),"Unknown curve "+f),f=o1[f]),f instanceof o1.PresetCurve&&(f={curve:f}),this.curve=f.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=f.curve.g,this.g.precompute(f.curve.n.bitLength()+1),this.hash=f.hash||f.curve.hash}var gB=Ci;Ci.prototype.keyPair=function(o){return new yg(this,o)};Ci.prototype.keyFromPrivate=function(o,c){return yg.fromPrivate(this,o,c)};Ci.prototype.keyFromPublic=function(o,c){return yg.fromPublic(this,o,c)};Ci.prototype.genKeyPair=function(o){o||(o={});for(var c=new Zy({hash:this.hash,pers:o.pers,persEnc:o.persEnc||"utf8",entropy:o.entropy||dB(this.hash.hmacStrength),entropyEnc:o.entropy&&o.entropyEnc||"utf8",nonce:this.n.toArray()}),l=this.n.byteLength(),b=this.n.sub(new ar(2));;){var y=new ar(c.generate(l));if(!(y.cmp(b)>0))return y.iaddn(1),this.keyFromPrivate(y)}};Ci.prototype._truncateToN=function(o,c,l){var b;if(ar.isBN(o)||typeof o=="number")o=new ar(o,16),b=o.byteLength();else if(typeof o=="object")b=o.length,o=new ar(o,16);else{var y=o.toString();b=y.length+1>>>1,o=new ar(y,16)}typeof l!="number"&&(l=b*8);var C=l-this.n.bitLength();return C>0&&(o=o.ushrn(C)),!c&&o.cmp(this.n)>=0?o.sub(this.n):o};Ci.prototype.sign=function(o,c,l,b){if(typeof l=="object"&&(b=l,l=null),b||(b={}),typeof o!="string"&&typeof o!="number"&&!ar.isBN(o)){a2(typeof o=="object"&&o&&typeof o.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),a2(o.length>>>0===o.length);for(var y=0;y<o.length;y++)a2((o[y]&255)===o[y])}c=this.keyFromPrivate(c,l),o=this._truncateToN(o,!1,b.msgBitLength),a2(!o.isNeg(),"Can not sign a negative message");var C=this.n.byteLength(),S=c.getPrivate().toArray("be",C),k=o.toArray("be",C);a2(new ar(k).eq(o),"Can not sign message");for(var M=new Zy({hash:this.hash,entropy:S,nonce:k,pers:b.pers,persEnc:b.persEnc||"utf8"}),L=this.n.sub(new ar(1)),w=0;;w++){var ee=b.k?b.k(w):new ar(M.generate(this.n.byteLength()));if(ee=this._truncateToN(ee,!0),!(ee.cmpn(1)<=0||ee.cmp(L)>=0)){var Ce=this.g.mul(ee);if(!Ce.isInfinity()){var ce=Ce.getX(),V=ce.umod(this.n);if(V.cmpn(0)!==0){var Ee=ee.invm(this.n).mul(V.mul(c.getPrivate()).iadd(o));if(Ee=Ee.umod(this.n),Ee.cmpn(0)!==0){var ge=(Ce.getY().isOdd()?1:0)|(ce.cmp(V)!==0?2:0);return b.canonical&&Ee.cmp(this.nh)>0&&(Ee=this.n.sub(Ee),ge^=1),new fu({r:V,s:Ee,recoveryParam:ge})}}}}}};Ci.prototype.verify=function(o,c,l,b,y){y||(y={}),o=this._truncateToN(o,!1,y.msgBitLength),l=this.keyFromPublic(l,b),c=new fu(c,"hex");var C=c.r,S=c.s;if(C.cmpn(1)<0||C.cmp(this.n)>=0||S.cmpn(1)<0||S.cmp(this.n)>=0)return!1;var k=S.invm(this.n),M=k.mul(o).umod(this.n),L=k.mul(C).umod(this.n),w;return this.curve._maxwellTrick?(w=this.g.jmulAdd(M,l.getPublic(),L),w.isInfinity()?!1:w.eqXToP(C)):(w=this.g.mulAdd(M,l.getPublic(),L),w.isInfinity()?!1:w.getX().umod(this.n).cmp(C)===0)};Ci.prototype.recoverPubKey=function(f,o,c,l){a2((3&c)===c,"The recovery param is more than two bits"),o=new fu(o,l);var b=this.n,y=new ar(f),C=o.r,S=o.s,k=c&1,M=c>>1;if(C.cmp(this.curve.p.umod(this.curve.n))>=0&&M)throw new Error("Unable to find sencond key candinate");M?C=this.curve.pointFromX(C.add(this.curve.n),k):C=this.curve.pointFromX(C,k);var L=o.r.invm(b),w=b.sub(y).mul(L).umod(b),ee=S.mul(L).umod(b);return this.g.mulAdd(w,C,ee)};Ci.prototype.getKeyRecoveryParam=function(f,o,c,l){if(o=new fu(o,l),o.recoveryParam!==null)return o.recoveryParam;for(var b=0;b<4;b++){var y;try{y=this.recoverPubKey(f,o,b)}catch{continue}if(y.eq(c))return b}throw new Error("Unable to find valid recovery factor")};var pB=Hs(function(f,o){var c=o;c.version="6.6.1",c.utils=ri,c.rand=(function(){throw new Error("unsupported")}),c.curve=a1,c.curves=o1,c.ec=gB,c.eddsa=null}),yB=pB.ec;const CB="signing-key/5.8.0",sd=new zt(CB);let ch=null;function i2(){return ch||(ch=new yB("secp256k1")),ch}class _s{constructor(o){lr(this,"curve","secp256k1"),lr(this,"privateKey",sr(o)),Ry(this.privateKey)!==32&&sd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const c=i2().keyFromPrivate(Nt(this.privateKey));lr(this,"publicKey","0x"+c.getPublic(!1,"hex")),lr(this,"compressedPublicKey","0x"+c.getPublic(!0,"hex")),lr(this,"_isSigningKey",!0)}_addPoint(o){const c=i2().keyFromPublic(Nt(this.publicKey)),l=i2().keyFromPublic(Nt(o));return"0x"+c.pub.add(l.pub).encodeCompressed("hex")}signDigest(o){const c=i2().keyFromPrivate(Nt(this.privateKey)),l=Nt(o);l.length!==32&&sd.throwArgumentError("bad digest length","digest",o);const b=c.sign(l,{canonical:!0});return Rs({recoveryParam:b.recoveryParam,r:pi("0x"+b.r.toString(16),32),s:pi("0x"+b.s.toString(16),32)})}computeSharedSecret(o){const c=i2().keyFromPrivate(Nt(this.privateKey)),l=i2().keyFromPublic(Nt($y(o)));return pi("0x"+c.derive(l.getPublic()).toString(16),32)}static isSigningKey(o){return!!(o&&o._isSigningKey)}}function $y(f,o){const c=Nt(f);return c.length===32?new _s(c).publicKey:c.length===33?"0x"+i2().keyFromPublic(c).getPublic(!1,"hex"):c.length===65?sr(c):sd.throwArgumentError("invalid public or private key","key","[REDACTED]")}const IB="transactions/5.8.0",Ui=new zt(IB);var op;(function(f){f[f.legacy=0]="legacy",f[f.eip2930=1]="eip2930",f[f.eip1559=2]="eip1559"})(op||(op={}));const bB=[{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"}],vB={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function ws(f){const o=$y(f);return Yi(Df(BA(Df(o,1)),12))}function WA(f,o){const c=Qo(Wr.from(f).toHexString());return c.length>32&&Ui.throwArgumentError("invalid length for "+o,"transaction:"+o,f),c}function uh(f,o){return{address:Yi(f),storageKeys:(o||[]).map((c,l)=>(Ry(c)!==32&&Ui.throwArgumentError("invalid access list storageKey",`accessList[${f}:${l}]`,c),c.toLowerCase()))}}function EB(f){if(Array.isArray(f))return f.map((c,l)=>Array.isArray(c)?(c.length>2&&Ui.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${l}]`,c),uh(c[0],c[1])):uh(c.address,c.storageKeys));const o=Object.keys(f).map(c=>{const l=f[c].reduce((b,y)=>(b[y]=!0,b),{});return uh(c,Object.keys(l).sort())});return o.sort((c,l)=>c.address.localeCompare(l.address)),o}function eC(f){return EB(f).map(o=>[o.address,o.storageKeys])}function xB(f,o){if(f.gasPrice!=null){const l=Wr.from(f.gasPrice),b=Wr.from(f.maxFeePerGas||0);l.eq(b)||Ui.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:l,maxFeePerGas:b})}const c=[WA(f.chainId||0,"chainId"),WA(f.nonce||0,"nonce"),WA(f.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),WA(f.maxFeePerGas||0,"maxFeePerGas"),WA(f.gasLimit||0,"gasLimit"),f.to!=null?Yi(f.to):"0x",WA(f.value||0,"value"),f.data||"0x",eC(f.accessList||[])];if(o){const l=Rs(o);c.push(WA(l.recoveryParam,"recoveryParam")),c.push(Qo(l.r)),c.push(Qo(l.s))}return xs(["0x02",Q1(c)])}function _B(f,o){const c=[WA(f.chainId||0,"chainId"),WA(f.nonce||0,"nonce"),WA(f.gasPrice||0,"gasPrice"),WA(f.gasLimit||0,"gasLimit"),f.to!=null?Yi(f.to):"0x",WA(f.value||0,"value"),f.data||"0x",eC(f.accessList||[])];if(o){const l=Rs(o);c.push(WA(l.recoveryParam,"recoveryParam")),c.push(Qo(l.r)),c.push(Qo(l.s))}return xs(["0x01",Q1(c)])}function wB(f,o){Nw(f,vB);const c=[];bB.forEach(function(C){let S=f[C.name]||[];const k={};C.numeric&&(k.hexPad="left"),S=Nt(sr(S,k)),C.length&&S.length!==C.length&&S.length>0&&Ui.throwArgumentError("invalid length for "+C.name,"transaction:"+C.name,S),C.maxLength&&(S=Qo(S),S.length>C.maxLength&&Ui.throwArgumentError("invalid length for "+C.name,"transaction:"+C.name,S)),c.push(sr(S))});let l=0;if(f.chainId!=null?(l=f.chainId,typeof l!="number"&&Ui.throwArgumentError("invalid transaction.chainId","transaction",f)):o&&!fg(o)&&o.v>28&&(l=Math.floor((o.v-35)/2)),l!==0&&(c.push(sr(l)),c.push("0x"),c.push("0x")),!o)return Q1(c);const b=Rs(o);let y=27+b.recoveryParam;return l!==0?(c.pop(),c.pop(),c.pop(),y+=l*2+8,b.v>28&&b.v!==y&&Ui.throwArgumentError("transaction.chainId/signature.v mismatch","signature",o)):b.v!==y&&Ui.throwArgumentError("transaction.chainId/signature.v mismatch","signature",o),c.push(sr(y)),c.push(Qo(Nt(b.r))),c.push(Qo(Nt(b.s))),Q1(c)}function sp(f,o){if(f.type==null||f.type===0)return f.accessList!=null&&Ui.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",f),wB(f,o);switch(f.type){case 1:return _B(f,o);case 2:return xB(f,o)}return Ui.throwError(`unsupported transaction type: ${f.type}`,zt.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:f.type})}const BB="wordlists/5.8.0",mB=new zt(BB);class rc{constructor(o){mB.checkAbstract(new.target,rc),lr(this,"locale",o)}split(o){return o.toLowerCase().split(/ +/g)}join(o){return o.join(" ")}static check(o){const c=[];for(let l=0;l<2048;l++){const b=o.getWord(l);if(l!==o.getWordIndex(b))return"0x";c.push(b)}return hg(c.join(`
65
65
  `)+`
66
- `)}static register(o,c){c||(c=o.locale)}}const QB="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let vf=null;function fp(f){if(vf==null&&(vf=QB.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),rc.check(f)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw vf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class SB extends rc{constructor(){super("en")}getWord(o){return fp(this),vf[o]}getWordIndex(o){return fp(this),vf.indexOf(o)}}const tC=new SB;rc.register(tC);const cp={en:tC},DB="hdnode/5.8.0",F1=new zt(DB),kB=Wr.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),MB=Gi("Bitcoin seed"),cf=2147483648;function rC(f){return(1<<f)-1<<8-f}function NB(f){return(1<<f)-1}function Xc(f){return pi(sr(f),32)}function up(f){return qy.encode(Do([f,Df(Nf(Nf(f)),0,4)]))}function Cg(f){if(f==null)return cp.en;if(typeof f=="string"){const o=cp[f];return o==null&&F1.throwArgumentError("unknown locale","wordlist",f),o}return f}const os={},Ff="m/44'/60'/0'/0/0";class hi{constructor(o,c,l,b,y,C,S,k){if(o!==os)throw new Error("HDNode constructor cannot be called directly");if(c){const M=new _s(c);lr(this,"privateKey",M.privateKey),lr(this,"publicKey",M.compressedPublicKey)}else lr(this,"privateKey",null),lr(this,"publicKey",sr(l));lr(this,"parentFingerprint",b),lr(this,"fingerprint",Df(oB(Nf(this.publicKey)),0,4)),lr(this,"address",ws(this.publicKey)),lr(this,"chainCode",y),lr(this,"index",C),lr(this,"depth",S),k==null?(lr(this,"mnemonic",null),lr(this,"path",null)):typeof k=="string"?(lr(this,"mnemonic",null),lr(this,"path",k)):(lr(this,"mnemonic",k),lr(this,"path",k.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return up(Do([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",sr(this.depth),this.parentFingerprint,pi(sr(this.index),4),this.chainCode,this.privateKey!=null?Do(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new hi(os,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(o){if(o>4294967295)throw new Error("invalid index - "+String(o));let c=this.path;c&&(c+="/"+(o&~cf));const l=new Uint8Array(37);if(o&cf){if(!this.privateKey)throw new Error("cannot derive child of neutered node");l.set(Nt(this.privateKey),1),c&&(c+="'")}else l.set(Nt(this.publicKey));for(let w=24;w>=0;w-=8)l[33+(w>>3)]=o>>24-w&255;const b=Nt(k1(Mf.sha512,this.chainCode,l)),y=b.slice(0,32),C=b.slice(32);let S=null,k=null;this.privateKey?S=Xc(Wr.from(y).add(this.privateKey).mod(kB)):k=new _s(sr(y))._addPoint(this.publicKey);let M=c;const L=this.mnemonic;return L&&(M=Object.freeze({phrase:L.phrase,path:c,locale:L.locale||"en"})),new hi(os,S,k,this.fingerprint,Xc(C),o,this.depth+1,M)}derivePath(o){const c=o.split("/");if(c.length===0||c[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+o);c[0]==="m"&&c.shift();let l=this;for(let b=0;b<c.length;b++){const y=c[b];if(y.match(/^[0-9]+'$/)){const C=parseInt(y.substring(0,y.length-1));if(C>=cf)throw new Error("invalid path index - "+y);l=l._derive(cf+C)}else if(y.match(/^[0-9]+$/)){const C=parseInt(y);if(C>=cf)throw new Error("invalid path index - "+y);l=l._derive(C)}else throw new Error("invalid path component - "+y)}return l}static _fromSeed(o,c){const l=Nt(o);if(l.length<16||l.length>64)throw new Error("invalid seed");const b=Nt(k1(Mf.sha512,MB,l));return new hi(os,Xc(b.slice(0,32)),null,"0x00000000",Xc(b.slice(32)),0,0,c)}static fromMnemonic(o,c,l){return l=Cg(l),o=Ig(nC(o,l),l),hi._fromSeed(FB(o,c),{phrase:o,path:"m",locale:l.locale})}static fromSeed(o){return hi._fromSeed(o,null)}static fromExtendedKey(o){const c=qy.decode(o);(c.length!==82||up(c.slice(0,78))!==o)&&F1.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const l=c[4],b=sr(c.slice(5,9)),y=parseInt(sr(c.slice(9,13)).substring(2),16),C=sr(c.slice(13,45)),S=c.slice(45,78);switch(sr(c.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new hi(os,null,sr(S),b,C,y,l,null);case"0x0488ade4":case"0x04358394 ":if(S[0]!==0)break;return new hi(os,sr(S.slice(1)),null,b,C,y,l,null)}return F1.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function FB(f,o){o||(o="");const c=Gi("mnemonic"+o,I2.NFKD);return dg(Gi(f,I2.NFKD),c,2048,64,"sha512")}function nC(f,o){o=Cg(o),F1.checkNormalize();const c=o.split(f);if(c.length%3!==0)throw new Error("invalid mnemonic");const l=Nt(new Uint8Array(Math.ceil(11*c.length/8)));let b=0;for(let M=0;M<c.length;M++){let L=o.getWordIndex(c[M].normalize("NFKD"));if(L===-1)throw new Error("invalid mnemonic");for(let w=0;w<11;w++)L&1<<10-w&&(l[b>>3]|=1<<7-b%8),b++}const y=32*c.length/3,C=c.length/3,S=rC(C);if((Nt(Nf(l.slice(0,y/8)))[0]&S)!==(l[l.length-1]&S))throw new Error("invalid checksum");return sr(l.slice(0,y/8))}function Ig(f,o){if(o=Cg(o),f=Nt(f),f.length%4!==0||f.length<16||f.length>32)throw new Error("invalid entropy");const c=[0];let l=11;for(let C=0;C<f.length;C++)l>8?(c[c.length-1]<<=8,c[c.length-1]|=f[C],l-=8):(c[c.length-1]<<=l,c[c.length-1]|=f[C]>>8-l,c.push(f[C]&NB(8-l)),l+=3);const b=f.length/4,y=Nt(Nf(f))[0]&rC(b);return c[c.length-1]<<=b,c[c.length-1]|=y>>8-b,o.join(c.map(C=>o.getWord(C)))}const PB="random/5.8.0",fd=new zt(PB);function KB(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const lp=KB();let s1=lp.crypto||lp.msCrypto;(!s1||!s1.getRandomValues)&&(fd.warn("WARNING: Missing strong random number source"),s1={getRandomValues:function(f){return fd.throwError("no secure random source avaialble",zt.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function gf(f){(f<=0||f>1024||f%1||f!=f)&&fd.throwArgumentError("invalid length","length",f);const o=new Uint8Array(f);return s1.getRandomValues(o),Nt(o)}var lh={exports:{}},hp;function UB(){return hp||(hp=1,(function(f,o){(function(c){function l(Y){return parseInt(Y)===Y}function b(Y){if(!l(Y.length))return!1;for(var O=0;O<Y.length;O++)if(!l(Y[O])||Y[O]<0||Y[O]>255)return!1;return!0}function y(Y,O){if(Y.buffer&&ArrayBuffer.isView(Y)&&Y.name==="Uint8Array")return O&&(Y.slice?Y=Y.slice():Y=Array.prototype.slice.call(Y)),Y;if(Array.isArray(Y)){if(!b(Y))throw new Error("Array contains invalid value: "+Y);return new Uint8Array(Y)}if(l(Y.length)&&b(Y))return new Uint8Array(Y);throw new Error("unsupported array-like object")}function C(Y){return new Uint8Array(Y)}function S(Y,O,me,Je,se){(Je!=null||se!=null)&&(Y.slice?Y=Y.slice(Je,se):Y=Array.prototype.slice.call(Y,Je,se)),O.set(Y,me)}var k=(function(){function Y(me){var Je=[],se=0;for(me=encodeURI(me);se<me.length;){var Ve=me.charCodeAt(se++);Ve===37?(Je.push(parseInt(me.substr(se,2),16)),se+=2):Je.push(Ve)}return y(Je)}function O(me){for(var Je=[],se=0;se<me.length;){var Ve=me[se];Ve<128?(Je.push(String.fromCharCode(Ve)),se++):Ve>191&&Ve<224?(Je.push(String.fromCharCode((Ve&31)<<6|me[se+1]&63)),se+=2):(Je.push(String.fromCharCode((Ve&15)<<12|(me[se+1]&63)<<6|me[se+2]&63)),se+=3)}return Je.join("")}return{toBytes:Y,fromBytes:O}})(),M=(function(){function Y(Je){for(var se=[],Ve=0;Ve<Je.length;Ve+=2)se.push(parseInt(Je.substr(Ve,2),16));return se}var O="0123456789abcdef";function me(Je){for(var se=[],Ve=0;Ve<Je.length;Ve++){var c0=Je[Ve];se.push(O[(c0&240)>>4]+O[c0&15])}return se.join("")}return{toBytes:Y,fromBytes:me}})(),L={16:10,24:12,32:14},w=[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],ee=[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],Ce=[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],ce=[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],V=[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],Ee=[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],ge=[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],_e=[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],ne=[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],r0=[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],xe=[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],Me=[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],be=[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],We=[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],ae=[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 y0(Y){for(var O=[],me=0;me<Y.length;me+=4)O.push(Y[me]<<24|Y[me+1]<<16|Y[me+2]<<8|Y[me+3]);return O}var Ne=function(Y){if(!(this instanceof Ne))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:y(Y,!0)}),this._prepare()};Ne.prototype._prepare=function(){var Y=L[this.key.length];if(Y==null)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var O=0;O<=Y;O++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var me=(Y+1)*4,Je=this.key.length/4,se=y0(this.key),Ve,O=0;O<Je;O++)Ve=O>>2,this._Ke[Ve][O%4]=se[O],this._Kd[Y-Ve][O%4]=se[O];for(var c0=0,l0=Je,h0;l0<me;){if(h0=se[Je-1],se[0]^=ee[h0>>16&255]<<24^ee[h0>>8&255]<<16^ee[h0&255]<<8^ee[h0>>24&255]^w[c0]<<24,c0+=1,Je!=8)for(var O=1;O<Je;O++)se[O]^=se[O-1];else{for(var O=1;O<Je/2;O++)se[O]^=se[O-1];h0=se[Je/2-1],se[Je/2]^=ee[h0&255]^ee[h0>>8&255]<<8^ee[h0>>16&255]<<16^ee[h0>>24&255]<<24;for(var O=Je/2+1;O<Je;O++)se[O]^=se[O-1]}for(var O=0,R0,tt;O<Je&&l0<me;)R0=l0>>2,tt=l0%4,this._Ke[R0][tt]=se[O],this._Kd[Y-R0][tt]=se[O++],l0++}for(var R0=1;R0<Y;R0++)for(var tt=0;tt<4;tt++)h0=this._Kd[R0][tt],this._Kd[R0][tt]=Me[h0>>24&255]^be[h0>>16&255]^We[h0>>8&255]^ae[h0&255]},Ne.prototype.encrypt=function(Y){if(Y.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var O=this._Ke.length-1,me=[0,0,0,0],Je=y0(Y),se=0;se<4;se++)Je[se]^=this._Ke[0][se];for(var Ve=1;Ve<O;Ve++){for(var se=0;se<4;se++)me[se]=ce[Je[se]>>24&255]^V[Je[(se+1)%4]>>16&255]^Ee[Je[(se+2)%4]>>8&255]^ge[Je[(se+3)%4]&255]^this._Ke[Ve][se];Je=me.slice()}for(var c0=C(16),l0,se=0;se<4;se++)l0=this._Ke[O][se],c0[4*se]=(ee[Je[se]>>24&255]^l0>>24)&255,c0[4*se+1]=(ee[Je[(se+1)%4]>>16&255]^l0>>16)&255,c0[4*se+2]=(ee[Je[(se+2)%4]>>8&255]^l0>>8)&255,c0[4*se+3]=(ee[Je[(se+3)%4]&255]^l0)&255;return c0},Ne.prototype.decrypt=function(Y){if(Y.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var O=this._Kd.length-1,me=[0,0,0,0],Je=y0(Y),se=0;se<4;se++)Je[se]^=this._Kd[0][se];for(var Ve=1;Ve<O;Ve++){for(var se=0;se<4;se++)me[se]=_e[Je[se]>>24&255]^ne[Je[(se+3)%4]>>16&255]^r0[Je[(se+2)%4]>>8&255]^xe[Je[(se+1)%4]&255]^this._Kd[Ve][se];Je=me.slice()}for(var c0=C(16),l0,se=0;se<4;se++)l0=this._Kd[O][se],c0[4*se]=(Ce[Je[se]>>24&255]^l0>>24)&255,c0[4*se+1]=(Ce[Je[(se+3)%4]>>16&255]^l0>>16)&255,c0[4*se+2]=(Ce[Je[(se+2)%4]>>8&255]^l0>>8)&255,c0[4*se+3]=(Ce[Je[(se+1)%4]&255]^l0)&255;return c0};var J=function(Y){if(!(this instanceof J))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Ne(Y)};J.prototype.encrypt=function(Y){if(Y=y(Y),Y.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var O=C(Y.length),me=C(16),Je=0;Je<Y.length;Je+=16)S(Y,me,0,Je,Je+16),me=this._aes.encrypt(me),S(me,O,Je);return O},J.prototype.decrypt=function(Y){if(Y=y(Y),Y.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var O=C(Y.length),me=C(16),Je=0;Je<Y.length;Je+=16)S(Y,me,0,Je,Je+16),me=this._aes.decrypt(me),S(me,O,Je);return O};var G=function(Y,O){if(!(this instanceof G))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",!O)O=C(16);else if(O.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastCipherblock=y(O,!0),this._aes=new Ne(Y)};G.prototype.encrypt=function(Y){if(Y=y(Y),Y.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var O=C(Y.length),me=C(16),Je=0;Je<Y.length;Je+=16){S(Y,me,0,Je,Je+16);for(var se=0;se<16;se++)me[se]^=this._lastCipherblock[se];this._lastCipherblock=this._aes.encrypt(me),S(this._lastCipherblock,O,Je)}return O},G.prototype.decrypt=function(Y){if(Y=y(Y),Y.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var O=C(Y.length),me=C(16),Je=0;Je<Y.length;Je+=16){S(Y,me,0,Je,Je+16),me=this._aes.decrypt(me);for(var se=0;se<16;se++)O[Je+se]=me[se]^this._lastCipherblock[se];S(Y,this._lastCipherblock,0,Je,Je+16)}return O};var m=function(Y,O,me){if(!(this instanceof m))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",!O)O=C(16);else if(O.length!=16)throw new Error("invalid initialation vector size (must be 16 size)");me||(me=1),this.segmentSize=me,this._shiftRegister=y(O,!0),this._aes=new Ne(Y)};m.prototype.encrypt=function(Y){if(Y.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var O=y(Y,!0),me,Je=0;Je<O.length;Je+=this.segmentSize){me=this._aes.encrypt(this._shiftRegister);for(var se=0;se<this.segmentSize;se++)O[Je+se]^=me[se];S(this._shiftRegister,this._shiftRegister,0,this.segmentSize),S(O,this._shiftRegister,16-this.segmentSize,Je,Je+this.segmentSize)}return O},m.prototype.decrypt=function(Y){if(Y.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var O=y(Y,!0),me,Je=0;Je<O.length;Je+=this.segmentSize){me=this._aes.encrypt(this._shiftRegister);for(var se=0;se<this.segmentSize;se++)O[Je+se]^=me[se];S(this._shiftRegister,this._shiftRegister,0,this.segmentSize),S(Y,this._shiftRegister,16-this.segmentSize,Je,Je+this.segmentSize)}return O};var R=function(Y,O){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",!O)O=C(16);else if(O.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastPrecipher=y(O,!0),this._lastPrecipherIndex=16,this._aes=new Ne(Y)};R.prototype.encrypt=function(Y){for(var O=y(Y,!0),me=0;me<O.length;me++)this._lastPrecipherIndex===16&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),O[me]^=this._lastPrecipher[this._lastPrecipherIndex++];return O},R.prototype.decrypt=R.prototype.encrypt;var X=function(Y){if(!(this instanceof X))throw Error("Counter must be instanitated with `new`");Y!==0&&!Y&&(Y=1),typeof Y=="number"?(this._counter=C(16),this.setValue(Y)):this.setBytes(Y)};X.prototype.setValue=function(Y){if(typeof Y!="number"||parseInt(Y)!=Y)throw new Error("invalid counter value (must be an integer)");for(var O=15;O>=0;--O)this._counter[O]=Y%256,Y=Y>>8},X.prototype.setBytes=function(Y){if(Y=y(Y,!0),Y.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=Y},X.prototype.increment=function(){for(var Y=15;Y>=0;Y--)if(this._counter[Y]===255)this._counter[Y]=0;else{this._counter[Y]++;break}};var oe=function(Y,O){if(!(this instanceof oe))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",O instanceof X||(O=new X(O)),this._counter=O,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Ne(Y)};oe.prototype.encrypt=function(Y){for(var O=y(Y,!0),me=0;me<O.length;me++)this._remainingCounterIndex===16&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),O[me]^=this._remainingCounter[this._remainingCounterIndex++];return O},oe.prototype.decrypt=oe.prototype.encrypt;function de(Y){Y=y(Y,!0);var O=16-Y.length%16,me=C(Y.length+O);S(Y,me);for(var Je=Y.length;Je<me.length;Je++)me[Je]=O;return me}function le(Y){if(Y=y(Y,!0),Y.length<16)throw new Error("PKCS#7 invalid length");var O=Y[Y.length-1];if(O>16)throw new Error("PKCS#7 padding byte out of range");for(var me=Y.length-O,Je=0;Je<O;Je++)if(Y[me+Je]!==O)throw new Error("PKCS#7 invalid padding byte");var se=C(me);return S(Y,se,0,0,me),se}var q={AES:Ne,Counter:X,ModeOfOperation:{ecb:J,cbc:G,cfb:m,ofb:R,ctr:oe},utils:{hex:M,utf8:k},padding:{pkcs7:{pad:de,strip:le}},_arrayTest:{coerceArray:y,createArray:C,copyArray:S}};f.exports=q})()})(lh)),lh.exports}var RB=UB();const fa=Li(RB),AC="json-wallets/5.8.0";function h2(f){return typeof f=="string"&&f.substring(0,2)!=="0x"&&(f="0x"+f),Nt(f)}function uf(f,o){for(f=String(f);f.length<o;)f="0"+f;return f}function bg(f){return typeof f=="string"?Gi(f,I2.NFKC):Nt(f)}function _n(f,o){let c=f;const l=o.toLowerCase().split("/");for(let b=0;b<l.length;b++){let y=null;for(const C in c)if(C.toLowerCase()===l[b]){y=c[C];break}if(y===null)return null;c=y}return c}function HB(f){const o=Nt(f);o[6]=o[6]&15|64,o[8]=o[8]&63|128;const c=sr(o);return[c.substring(2,10),c.substring(10,14),c.substring(14,18),c.substring(18,22),c.substring(22,34)].join("-")}const GB=new zt(AC);class YB extends Ly{isCrowdsaleAccount(o){return!!(o&&o._isCrowdsaleAccount)}}function iC(f,o){const c=JSON.parse(f);o=bg(o);const l=Yi(_n(c,"ethaddr")),b=h2(_n(c,"encseed"));(!b||b.length%16!==0)&&GB.throwArgumentError("invalid encseed","json",f);const y=Nt(dg(o,o,2e3,32,"sha256")).slice(0,16),C=b.slice(0,16),S=b.slice(16),k=new fa.ModeOfOperation.cbc(y,C),M=fa.padding.pkcs7.strip(Nt(k.decrypt(S)));let L="";for(let Ce=0;Ce<M.length;Ce++)L+=String.fromCharCode(M[Ce]);const w=Gi(L),ee=BA(w);return new YB({_isCrowdsaleAccount:!0,address:l,privateKey:ee})}function aC(f){let o=null;try{o=JSON.parse(f)}catch{return!1}return o.encseed&&o.ethaddr}function oC(f){let o=null;try{o=JSON.parse(f)}catch{return!1}return!(!o.version||parseInt(o.version)!==o.version||parseInt(o.version)!==3)}var hh={exports:{}},dp;function LB(){return dp||(dp=1,(function(f,o){(function(c){function b(V){const Ee=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]);let ge=1779033703,_e=3144134277,ne=1013904242,r0=2773480762,xe=1359893119,Me=2600822924,be=528734635,We=1541459225;const ae=new Uint32Array(64);function y0(oe){let de=0,le=oe.length;for(;le>=64;){let q=ge,Y=_e,O=ne,me=r0,Je=xe,se=Me,Ve=be,c0=We,l0,h0,R0,tt,V0;for(h0=0;h0<16;h0++)R0=de+h0*4,ae[h0]=(oe[R0]&255)<<24|(oe[R0+1]&255)<<16|(oe[R0+2]&255)<<8|oe[R0+3]&255;for(h0=16;h0<64;h0++)l0=ae[h0-2],tt=(l0>>>17|l0<<15)^(l0>>>19|l0<<13)^l0>>>10,l0=ae[h0-15],V0=(l0>>>7|l0<<25)^(l0>>>18|l0<<14)^l0>>>3,ae[h0]=(tt+ae[h0-7]|0)+(V0+ae[h0-16]|0)|0;for(h0=0;h0<64;h0++)tt=(((Je>>>6|Je<<26)^(Je>>>11|Je<<21)^(Je>>>25|Je<<7))+(Je&se^~Je&Ve)|0)+(c0+(Ee[h0]+ae[h0]|0)|0)|0,V0=((q>>>2|q<<30)^(q>>>13|q<<19)^(q>>>22|q<<10))+(q&Y^q&O^Y&O)|0,c0=Ve,Ve=se,se=Je,Je=me+tt|0,me=O,O=Y,Y=q,q=tt+V0|0;ge=ge+q|0,_e=_e+Y|0,ne=ne+O|0,r0=r0+me|0,xe=xe+Je|0,Me=Me+se|0,be=be+Ve|0,We=We+c0|0,de+=64,le-=64}}y0(V);let Ne,J=V.length%64,G=V.length/536870912|0,m=V.length<<3,R=J<56?56:120,X=V.slice(V.length-J,V.length);for(X.push(128),Ne=J+1;Ne<R;Ne++)X.push(0);return X.push(G>>>24&255),X.push(G>>>16&255),X.push(G>>>8&255),X.push(G>>>0&255),X.push(m>>>24&255),X.push(m>>>16&255),X.push(m>>>8&255),X.push(m>>>0&255),y0(X),[ge>>>24&255,ge>>>16&255,ge>>>8&255,ge>>>0&255,_e>>>24&255,_e>>>16&255,_e>>>8&255,_e>>>0&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne>>>0&255,r0>>>24&255,r0>>>16&255,r0>>>8&255,r0>>>0&255,xe>>>24&255,xe>>>16&255,xe>>>8&255,xe>>>0&255,Me>>>24&255,Me>>>16&255,Me>>>8&255,Me>>>0&255,be>>>24&255,be>>>16&255,be>>>8&255,be>>>0&255,We>>>24&255,We>>>16&255,We>>>8&255,We>>>0&255]}function y(V,Ee,ge){V=V.length<=64?V:b(V);const _e=64+Ee.length+4,ne=new Array(_e),r0=new Array(64);let xe,Me=[];for(xe=0;xe<64;xe++)ne[xe]=54;for(xe=0;xe<V.length;xe++)ne[xe]^=V[xe];for(xe=0;xe<Ee.length;xe++)ne[64+xe]=Ee[xe];for(xe=_e-4;xe<_e;xe++)ne[xe]=0;for(xe=0;xe<64;xe++)r0[xe]=92;for(xe=0;xe<V.length;xe++)r0[xe]^=V[xe];function be(){for(let We=_e-1;We>=_e-4;We--){if(ne[We]++,ne[We]<=255)return;ne[We]=0}}for(;ge>=32;)be(),Me=Me.concat(b(r0.concat(b(ne)))),ge-=32;return ge>0&&(be(),Me=Me.concat(b(r0.concat(b(ne))).slice(0,ge))),Me}function C(V,Ee,ge,_e,ne){let r0;for(L(V,(2*ge-1)*16,ne,0,16),r0=0;r0<2*ge;r0++)M(V,r0*16,ne,16),k(ne,_e),L(ne,0,V,Ee+r0*16,16);for(r0=0;r0<ge;r0++)L(V,Ee+r0*2*16,V,r0*16,16);for(r0=0;r0<ge;r0++)L(V,Ee+(r0*2+1)*16,V,(r0+ge)*16,16)}function S(V,Ee){return V<<Ee|V>>>32-Ee}function k(V,Ee){L(V,0,Ee,0,16);for(let ge=8;ge>0;ge-=2)Ee[4]^=S(Ee[0]+Ee[12],7),Ee[8]^=S(Ee[4]+Ee[0],9),Ee[12]^=S(Ee[8]+Ee[4],13),Ee[0]^=S(Ee[12]+Ee[8],18),Ee[9]^=S(Ee[5]+Ee[1],7),Ee[13]^=S(Ee[9]+Ee[5],9),Ee[1]^=S(Ee[13]+Ee[9],13),Ee[5]^=S(Ee[1]+Ee[13],18),Ee[14]^=S(Ee[10]+Ee[6],7),Ee[2]^=S(Ee[14]+Ee[10],9),Ee[6]^=S(Ee[2]+Ee[14],13),Ee[10]^=S(Ee[6]+Ee[2],18),Ee[3]^=S(Ee[15]+Ee[11],7),Ee[7]^=S(Ee[3]+Ee[15],9),Ee[11]^=S(Ee[7]+Ee[3],13),Ee[15]^=S(Ee[11]+Ee[7],18),Ee[1]^=S(Ee[0]+Ee[3],7),Ee[2]^=S(Ee[1]+Ee[0],9),Ee[3]^=S(Ee[2]+Ee[1],13),Ee[0]^=S(Ee[3]+Ee[2],18),Ee[6]^=S(Ee[5]+Ee[4],7),Ee[7]^=S(Ee[6]+Ee[5],9),Ee[4]^=S(Ee[7]+Ee[6],13),Ee[5]^=S(Ee[4]+Ee[7],18),Ee[11]^=S(Ee[10]+Ee[9],7),Ee[8]^=S(Ee[11]+Ee[10],9),Ee[9]^=S(Ee[8]+Ee[11],13),Ee[10]^=S(Ee[9]+Ee[8],18),Ee[12]^=S(Ee[15]+Ee[14],7),Ee[13]^=S(Ee[12]+Ee[15],9),Ee[14]^=S(Ee[13]+Ee[12],13),Ee[15]^=S(Ee[14]+Ee[13],18);for(let ge=0;ge<16;++ge)V[ge]+=Ee[ge]}function M(V,Ee,ge,_e){for(let ne=0;ne<_e;ne++)ge[ne]^=V[Ee+ne]}function L(V,Ee,ge,_e,ne){for(;ne--;)ge[_e++]=V[Ee++]}function w(V){if(!V||typeof V.length!="number")return!1;for(let Ee=0;Ee<V.length;Ee++){const ge=V[Ee];if(typeof ge!="number"||ge%1||ge<0||ge>=256)return!1}return!0}function ee(V,Ee){if(typeof V!="number"||V%1)throw new Error("invalid "+Ee);return V}function Ce(V,Ee,ge,_e,ne,r0,xe){if(ge=ee(ge,"N"),_e=ee(_e,"r"),ne=ee(ne,"p"),r0=ee(r0,"dkLen"),ge===0||(ge&ge-1)!==0)throw new Error("N must be power of 2");if(ge>2147483647/128/_e)throw new Error("N too large");if(_e>2147483647/128/ne)throw new Error("r too large");if(!w(V))throw new Error("password must be an array or buffer");if(V=Array.prototype.slice.call(V),!w(Ee))throw new Error("salt must be an array or buffer");Ee=Array.prototype.slice.call(Ee);let Me=y(V,Ee,ne*128*_e);const be=new Uint32Array(ne*32*_e);for(let Je=0;Je<be.length;Je++){const se=Je*4;be[Je]=(Me[se+3]&255)<<24|(Me[se+2]&255)<<16|(Me[se+1]&255)<<8|(Me[se+0]&255)<<0}const We=new Uint32Array(64*_e),ae=new Uint32Array(32*_e*ge),y0=32*_e,Ne=new Uint32Array(16),J=new Uint32Array(16),G=ne*ge*2;let m=0,R=null,X=!1,oe=0,de=0,le,q;const Y=xe?parseInt(1e3/_e):4294967295,O=typeof setImmediate<"u"?setImmediate:setTimeout,me=function(){if(X)return xe(new Error("cancelled"),m/G);let Je;switch(oe){case 0:q=de*32*_e,L(be,q,We,0,y0),oe=1,le=0;case 1:Je=ge-le,Je>Y&&(Je=Y);for(let Ve=0;Ve<Je;Ve++)L(We,0,ae,(le+Ve)*y0,y0),C(We,y0,_e,Ne,J);if(le+=Je,m+=Je,xe){const Ve=parseInt(1e3*m/G);if(Ve!==R){if(X=xe(null,m/G),X)break;R=Ve}}if(le<ge)break;le=0,oe=2;case 2:Je=ge-le,Je>Y&&(Je=Y);for(let Ve=0;Ve<Je;Ve++){const c0=(2*_e-1)*16,l0=We[c0]&ge-1;M(ae,l0*y0,We,y0),C(We,y0,_e,Ne,J)}if(le+=Je,m+=Je,xe){const Ve=parseInt(1e3*m/G);if(Ve!==R){if(X=xe(null,m/G),X)break;R=Ve}}if(le<ge)break;if(L(We,0,be,q,y0),de++,de<ne){oe=0;break}Me=[];for(let Ve=0;Ve<be.length;Ve++)Me.push(be[Ve]>>0&255),Me.push(be[Ve]>>8&255),Me.push(be[Ve]>>16&255),Me.push(be[Ve]>>24&255);const se=y(V,Me,r0);return xe&&xe(null,1,se),se}xe&&O(me)};if(!xe)for(;;){const Je=me();if(Je!=null)return Je}me()}const ce={scrypt:function(V,Ee,ge,_e,ne,r0,xe){return new Promise(function(Me,be){let We=0;xe&&xe(0),Ce(V,Ee,ge,_e,ne,r0,function(ae,y0,Ne){if(ae)be(ae);else if(Ne)xe&&We!==1&&xe(1),Me(new Uint8Array(Ne));else if(xe&&y0!==We)return We=y0,xe(y0)})})},syncScrypt:function(V,Ee,ge,_e,ne,r0){return new Uint8Array(Ce(V,Ee,ge,_e,ne,r0))}};f.exports=ce})()})(hh)),hh.exports}var TB=LB();const vg=Li(TB);var JB=function(f,o,c,l){function b(y){return y instanceof c?y:new c(function(C){C(y)})}return new(c||(c=Promise))(function(y,C){function S(L){try{M(l.next(L))}catch(w){C(w)}}function k(L){try{M(l.throw(L))}catch(w){C(w)}}function M(L){L.done?y(L.value):b(L.value).then(S,k)}M((l=l.apply(f,o||[])).next())})};const cd=new zt(AC);function gp(f){return f!=null&&f.mnemonic&&f.mnemonic.phrase}class OB extends Ly{isKeystoreAccount(o){return!!(o&&o._isKeystoreAccount)}}function zB(f,o,c){if(_n(f,"crypto/cipher")==="aes-128-ctr"){const b=h2(_n(f,"crypto/cipherparams/iv")),y=new fa.Counter(b),C=new fa.ModeOfOperation.ctr(o,y);return Nt(C.decrypt(c))}return null}function sC(f,o){const c=h2(_n(f,"crypto/ciphertext"));if(sr(BA(Do([o.slice(16,32),c]))).substring(2)!==_n(f,"crypto/mac").toLowerCase())throw new Error("invalid password");const b=zB(f,o.slice(0,16),c);b||cd.throwError("unsupported cipher",zt.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const y=o.slice(32,64),C=ws(b);if(f.address){let k=f.address.toLowerCase();if(k.substring(0,2)!=="0x"&&(k="0x"+k),Yi(k)!==C)throw new Error("address mismatch")}const S={_isKeystoreAccount:!0,address:C,privateKey:sr(b)};if(_n(f,"x-ethers/version")==="0.1"){const k=h2(_n(f,"x-ethers/mnemonicCiphertext")),M=h2(_n(f,"x-ethers/mnemonicCounter")),L=new fa.Counter(M),w=new fa.ModeOfOperation.ctr(y,L),ee=_n(f,"x-ethers/path")||Ff,Ce=_n(f,"x-ethers/locale")||"en",ce=Nt(w.decrypt(k));try{const V=Ig(ce,Ce),Ee=hi.fromMnemonic(V,null,Ce).derivePath(ee);if(Ee.privateKey!=S.privateKey)throw new Error("mnemonic mismatch");S.mnemonic=Ee.mnemonic}catch(V){if(V.code!==zt.errors.INVALID_ARGUMENT||V.argument!=="wordlist")throw V}}return new OB(S)}function fC(f,o,c,l,b){return Nt(dg(f,o,c,l,b))}function qB(f,o,c,l,b){return Promise.resolve(fC(f,o,c,l,b))}function cC(f,o,c,l,b){const y=bg(o),C=_n(f,"crypto/kdf");if(C&&typeof C=="string"){const S=function(k,M){return cd.throwArgumentError("invalid key-derivation function parameters",k,M)};if(C.toLowerCase()==="scrypt"){const k=h2(_n(f,"crypto/kdfparams/salt")),M=parseInt(_n(f,"crypto/kdfparams/n")),L=parseInt(_n(f,"crypto/kdfparams/r")),w=parseInt(_n(f,"crypto/kdfparams/p"));(!M||!L||!w)&&S("kdf",C),(M&M-1)!==0&&S("N",M);const ee=parseInt(_n(f,"crypto/kdfparams/dklen"));return ee!==32&&S("dklen",ee),l(y,k,M,L,w,64,b)}else if(C.toLowerCase()==="pbkdf2"){const k=h2(_n(f,"crypto/kdfparams/salt"));let M=null;const L=_n(f,"crypto/kdfparams/prf");L==="hmac-sha256"?M="sha256":L==="hmac-sha512"?M="sha512":S("prf",L);const w=parseInt(_n(f,"crypto/kdfparams/c")),ee=parseInt(_n(f,"crypto/kdfparams/dklen"));return ee!==32&&S("dklen",ee),c(y,k,w,ee,M)}}return cd.throwArgumentError("unsupported key-derivation function","kdf",C)}function jB(f,o){const c=JSON.parse(f),l=cC(c,o,fC,vg.syncScrypt);return sC(c,l)}function VB(f,o,c){return JB(this,void 0,void 0,function*(){const l=JSON.parse(f),b=yield cC(l,o,qB,vg.scrypt,c);return sC(l,b)})}function XB(f,o,c,l){try{if(Yi(f.address)!==ws(f.privateKey))throw new Error("address/privateKey mismatch");if(gp(f)){const Ee=f.mnemonic;if(hi.fromMnemonic(Ee.phrase,null,Ee.locale).derivePath(Ee.path||Ff).privateKey!=f.privateKey)throw new Error("mnemonic mismatch")}}catch(Ee){return Promise.reject(Ee)}typeof c=="function"&&!l&&(l=c,c={}),c||(c={});const b=Nt(f.privateKey),y=bg(o);let C=null,S=null,k=null;if(gp(f)){const Ee=f.mnemonic;C=Nt(nC(Ee.phrase,Ee.locale||"en")),S=Ee.path||Ff,k=Ee.locale||"en"}let M=c.client;M||(M="ethers.js");let L=null;c.salt?L=Nt(c.salt):L=gf(32);let w=null;if(c.iv){if(w=Nt(c.iv),w.length!==16)throw new Error("invalid iv")}else w=gf(16);let ee=null;if(c.uuid){if(ee=Nt(c.uuid),ee.length!==16)throw new Error("invalid uuid")}else ee=gf(16);let Ce=1<<17,ce=8,V=1;return c.scrypt&&(c.scrypt.N&&(Ce=c.scrypt.N),c.scrypt.r&&(ce=c.scrypt.r),c.scrypt.p&&(V=c.scrypt.p)),vg.scrypt(y,L,Ce,ce,V,64,l).then(Ee=>{Ee=Nt(Ee);const ge=Ee.slice(0,16),_e=Ee.slice(16,32),ne=Ee.slice(32,64),r0=new fa.Counter(w),xe=new fa.ModeOfOperation.ctr(ge,r0),Me=Nt(xe.encrypt(b)),be=BA(Do([_e,Me])),We={address:f.address.substring(2).toLowerCase(),id:HB(ee),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:sr(w).substring(2)},ciphertext:sr(Me).substring(2),kdf:"scrypt",kdfparams:{salt:sr(L).substring(2),n:Ce,dklen:32,p:V,r:ce},mac:be.substring(2)}};if(C){const ae=gf(16),y0=new fa.Counter(ae),Ne=new fa.ModeOfOperation.ctr(ne,y0),J=Nt(Ne.encrypt(C)),G=new Date,m=G.getUTCFullYear()+"-"+uf(G.getUTCMonth()+1,2)+"-"+uf(G.getUTCDate(),2)+"T"+uf(G.getUTCHours(),2)+"-"+uf(G.getUTCMinutes(),2)+"-"+uf(G.getUTCSeconds(),2)+".0Z";We["x-ethers"]={client:M,gethFilename:"UTC--"+m+"--"+We.address,mnemonicCounter:sr(ae).substring(2),mnemonicCiphertext:sr(J).substring(2),path:S,locale:k,version:"0.1"}}return JSON.stringify(We)})}function WB(f,o,c){if(aC(f)){c&&c(0);const l=iC(f,o);return c&&c(1),Promise.resolve(l)}return oC(f)?VB(f,o,c):Promise.reject(new Error("invalid JSON wallet"))}function ZB(f,o){if(aC(f))return iC(f,o);if(oC(f))return jB(f,o);throw new Error("invalid JSON wallet")}const $B="wallet/5.8.0";var pp=function(f,o,c,l){function b(y){return y instanceof c?y:new c(function(C){C(y)})}return new(c||(c=Promise))(function(y,C){function S(L){try{M(l.next(L))}catch(w){C(w)}}function k(L){try{M(l.throw(L))}catch(w){C(w)}}function M(L){L.done?y(L.value):b(L.value).then(S,k)}M((l=l.apply(f,o||[])).next())})};const ss=new zt($B);function em(f){return f!=null&&mA(f.privateKey,32)&&f.address!=null}function tm(f){const o=f.mnemonic;return o&&o.phrase}class o2 extends lg{constructor(o,c){if(super(),em(o)){const l=new _s(o.privateKey);if(lr(this,"_signingKey",()=>l),lr(this,"address",ws(this.publicKey)),this.address!==Yi(o.address)&&ss.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),tm(o)){const b=o.mnemonic;lr(this,"_mnemonic",()=>({phrase:b.phrase,path:b.path||Ff,locale:b.locale||"en"}));const y=this.mnemonic,C=hi.fromMnemonic(y.phrase,null,y.locale).derivePath(y.path);ws(C.privateKey)!==this.address&&ss.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else lr(this,"_mnemonic",()=>null)}else{if(_s.isSigningKey(o))o.curve!=="secp256k1"&&ss.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),lr(this,"_signingKey",()=>o);else{typeof o=="string"&&o.match(/^[0-9a-f]*$/i)&&o.length===64&&(o="0x"+o);const l=new _s(o);lr(this,"_signingKey",()=>l)}lr(this,"_mnemonic",()=>null),lr(this,"address",ws(this.publicKey))}c&&!ug.isProvider(c)&&ss.throwArgumentError("invalid provider","provider",c),lr(this,"provider",c||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(o){return new o2(this,o)}signTransaction(o){return us(o).then(c=>{c.from!=null&&(Yi(c.from)!==this.address&&ss.throwArgumentError("transaction from address mismatch","transaction.from",o.from),delete c.from);const l=this._signingKey().signDigest(BA(sp(c)));return sp(c,l)})}signMessage(o){return pp(this,void 0,void 0,function*(){return id(this._signingKey().signDigest(Jw(o)))})}_signTypedData(o,c,l){return pp(this,void 0,void 0,function*(){const b=yield VA.resolveNames(o,c,l,y=>(this.provider==null&&ss.throwError("cannot resolve ENS names without a provider",zt.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:y}),this.provider.resolveName(y)));return id(this._signingKey().signDigest(VA.hash(b.domain,c,b.value)))})}encrypt(o,c,l){if(typeof c=="function"&&!l&&(l=c,c={}),l&&typeof l!="function")throw new Error("invalid callback");return c||(c={}),XB(this,o,c,l)}static createRandom(o){let c=gf(16);o||(o={}),o.extraEntropy&&(c=Nt(Df(BA(Do([c,o.extraEntropy])),0,16)));const l=Ig(c,o.locale);return o2.fromMnemonic(l,o.path,o.locale)}static fromEncryptedJson(o,c,l){return WB(o,c,l).then(b=>new o2(b))}static fromEncryptedJsonSync(o,c){return new o2(ZB(o,c))}static fromMnemonic(o,c,l){return c||(c=Ff),new o2(hi.fromMnemonic(o,null,l).derivePath(c))}}var dh={};const rm="6.6.1",nm={version:rm};var gh={},f1={exports:{}},Am=f1.exports,yp;function Ja(){return yp||(yp=1,(function(f){(function(o,c){function l(Ne,J){if(!Ne)throw new Error(J||"Assertion failed")}function b(Ne,J){Ne.super_=J;var G=function(){};G.prototype=J.prototype,Ne.prototype=new G,Ne.prototype.constructor=Ne}function y(Ne,J,G){if(y.isBN(Ne))return Ne;this.negative=0,this.words=null,this.length=0,this.red=null,Ne!==null&&((J==="le"||J==="be")&&(G=J,J=10),this._init(Ne||0,J||10,G||"be"))}typeof o=="object"?o.exports=y:c.BN=y,y.BN=y,y.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=Pa.Buffer}catch{}y.isBN=function(J){return J instanceof y?!0:J!==null&&typeof J=="object"&&J.constructor.wordSize===y.wordSize&&Array.isArray(J.words)},y.max=function(J,G){return J.cmp(G)>0?J:G},y.min=function(J,G){return J.cmp(G)<0?J:G},y.prototype._init=function(J,G,m){if(typeof J=="number")return this._initNumber(J,G,m);if(typeof J=="object")return this._initArray(J,G,m);G==="hex"&&(G=16),l(G===(G|0)&&G>=2&&G<=36),J=J.toString().replace(/\s+/g,"");var R=0;J[0]==="-"&&(R++,this.negative=1),R<J.length&&(G===16?this._parseHex(J,R,m):(this._parseBase(J,G,R),m==="le"&&this._initArray(this.toArray(),G,m)))},y.prototype._initNumber=function(J,G,m){J<0&&(this.negative=1,J=-J),J<67108864?(this.words=[J&67108863],this.length=1):J<4503599627370496?(this.words=[J&67108863,J/67108864&67108863],this.length=2):(l(J<9007199254740992),this.words=[J&67108863,J/67108864&67108863,1],this.length=3),m==="le"&&this._initArray(this.toArray(),G,m)},y.prototype._initArray=function(J,G,m){if(l(typeof J.length=="number"),J.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(J.length/3),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var X,oe,de=0;if(m==="be")for(R=J.length-1,X=0;R>=0;R-=3)oe=J[R]|J[R-1]<<8|J[R-2]<<16,this.words[X]|=oe<<de&67108863,this.words[X+1]=oe>>>26-de&67108863,de+=24,de>=26&&(de-=26,X++);else if(m==="le")for(R=0,X=0;R<J.length;R+=3)oe=J[R]|J[R+1]<<8|J[R+2]<<16,this.words[X]|=oe<<de&67108863,this.words[X+1]=oe>>>26-de&67108863,de+=24,de>=26&&(de-=26,X++);return this.strip()};function S(Ne,J){var G=Ne.charCodeAt(J);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function k(Ne,J,G){var m=S(Ne,G);return G-1>=J&&(m|=S(Ne,G-1)<<4),m}y.prototype._parseHex=function(J,G,m){this.length=Math.ceil((J.length-G)/6),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var X=0,oe=0,de;if(m==="be")for(R=J.length-1;R>=G;R-=2)de=k(J,G,R)<<X,this.words[oe]|=de&67108863,X>=18?(X-=18,oe+=1,this.words[oe]|=de>>>26):X+=8;else{var le=J.length-G;for(R=le%2===0?G+1:G;R<J.length;R+=2)de=k(J,G,R)<<X,this.words[oe]|=de&67108863,X>=18?(X-=18,oe+=1,this.words[oe]|=de>>>26):X+=8}this.strip()};function M(Ne,J,G,m){for(var R=0,X=Math.min(Ne.length,G),oe=J;oe<X;oe++){var de=Ne.charCodeAt(oe)-48;R*=m,de>=49?R+=de-49+10:de>=17?R+=de-17+10:R+=de}return R}y.prototype._parseBase=function(J,G,m){this.words=[0],this.length=1;for(var R=0,X=1;X<=67108863;X*=G)R++;R--,X=X/G|0;for(var oe=J.length-m,de=oe%R,le=Math.min(oe,oe-de)+m,q=0,Y=m;Y<le;Y+=R)q=M(J,Y,Y+R,G),this.imuln(X),this.words[0]+q<67108864?this.words[0]+=q:this._iaddn(q);if(de!==0){var O=1;for(q=M(J,Y,J.length,G),Y=0;Y<de;Y++)O*=G;this.imuln(O),this.words[0]+q<67108864?this.words[0]+=q:this._iaddn(q)}this.strip()},y.prototype.copy=function(J){J.words=new Array(this.length);for(var G=0;G<this.length;G++)J.words[G]=this.words[G];J.length=this.length,J.negative=this.negative,J.red=this.red},y.prototype.clone=function(){var J=new y(null);return this.copy(J),J},y.prototype._expand=function(J){for(;this.length<J;)this.words[this.length++]=0;return this},y.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},y.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},y.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var L=["","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"],w=[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],ee=[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];y.prototype.toString=function(J,G){J=J||10,G=G|0||1;var m;if(J===16||J==="hex"){m="";for(var R=0,X=0,oe=0;oe<this.length;oe++){var de=this.words[oe],le=((de<<R|X)&16777215).toString(16);X=de>>>24-R&16777215,R+=2,R>=26&&(R-=26,oe--),X!==0||oe!==this.length-1?m=L[6-le.length]+le+m:m=le+m}for(X!==0&&(m=X.toString(16)+m);m.length%G!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}if(J===(J|0)&&J>=2&&J<=36){var q=w[J],Y=ee[J];m="";var O=this.clone();for(O.negative=0;!O.isZero();){var me=O.modn(Y).toString(J);O=O.idivn(Y),O.isZero()?m=me+m:m=L[q-me.length]+me+m}for(this.isZero()&&(m="0"+m);m.length%G!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}l(!1,"Base should be between 2 and 36")},y.prototype.toNumber=function(){var J=this.words[0];return this.length===2?J+=this.words[1]*67108864:this.length===3&&this.words[2]===1?J+=4503599627370496+this.words[1]*67108864:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-J:J},y.prototype.toJSON=function(){return this.toString(16)},y.prototype.toBuffer=function(J,G){return l(typeof C<"u"),this.toArrayLike(C,J,G)},y.prototype.toArray=function(J,G){return this.toArrayLike(Array,J,G)},y.prototype.toArrayLike=function(J,G,m){var R=this.byteLength(),X=m||Math.max(1,R);l(R<=X,"byte array longer than desired length"),l(X>0,"Requested array length <= 0"),this.strip();var oe=G==="le",de=new J(X),le,q,Y=this.clone();if(oe){for(q=0;!Y.isZero();q++)le=Y.andln(255),Y.iushrn(8),de[q]=le;for(;q<X;q++)de[q]=0}else{for(q=0;q<X-R;q++)de[q]=0;for(q=0;!Y.isZero();q++)le=Y.andln(255),Y.iushrn(8),de[X-q-1]=le}return de},Math.clz32?y.prototype._countBits=function(J){return 32-Math.clz32(J)}:y.prototype._countBits=function(J){var G=J,m=0;return G>=4096&&(m+=13,G>>>=13),G>=64&&(m+=7,G>>>=7),G>=8&&(m+=4,G>>>=4),G>=2&&(m+=2,G>>>=2),m+G},y.prototype._zeroBits=function(J){if(J===0)return 26;var G=J,m=0;return(G&8191)===0&&(m+=13,G>>>=13),(G&127)===0&&(m+=7,G>>>=7),(G&15)===0&&(m+=4,G>>>=4),(G&3)===0&&(m+=2,G>>>=2),(G&1)===0&&m++,m},y.prototype.bitLength=function(){var J=this.words[this.length-1],G=this._countBits(J);return(this.length-1)*26+G};function Ce(Ne){for(var J=new Array(Ne.bitLength()),G=0;G<J.length;G++){var m=G/26|0,R=G%26;J[G]=(Ne.words[m]&1<<R)>>>R}return J}y.prototype.zeroBits=function(){if(this.isZero())return 0;for(var J=0,G=0;G<this.length;G++){var m=this._zeroBits(this.words[G]);if(J+=m,m!==26)break}return J},y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},y.prototype.toTwos=function(J){return this.negative!==0?this.abs().inotn(J).iaddn(1):this.clone()},y.prototype.fromTwos=function(J){return this.testn(J-1)?this.notn(J).iaddn(1).ineg():this.clone()},y.prototype.isNeg=function(){return this.negative!==0},y.prototype.neg=function(){return this.clone().ineg()},y.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},y.prototype.iuor=function(J){for(;this.length<J.length;)this.words[this.length++]=0;for(var G=0;G<J.length;G++)this.words[G]=this.words[G]|J.words[G];return this.strip()},y.prototype.ior=function(J){return l((this.negative|J.negative)===0),this.iuor(J)},y.prototype.or=function(J){return this.length>J.length?this.clone().ior(J):J.clone().ior(this)},y.prototype.uor=function(J){return this.length>J.length?this.clone().iuor(J):J.clone().iuor(this)},y.prototype.iuand=function(J){var G;this.length>J.length?G=J:G=this;for(var m=0;m<G.length;m++)this.words[m]=this.words[m]&J.words[m];return this.length=G.length,this.strip()},y.prototype.iand=function(J){return l((this.negative|J.negative)===0),this.iuand(J)},y.prototype.and=function(J){return this.length>J.length?this.clone().iand(J):J.clone().iand(this)},y.prototype.uand=function(J){return this.length>J.length?this.clone().iuand(J):J.clone().iuand(this)},y.prototype.iuxor=function(J){var G,m;this.length>J.length?(G=this,m=J):(G=J,m=this);for(var R=0;R<m.length;R++)this.words[R]=G.words[R]^m.words[R];if(this!==G)for(;R<G.length;R++)this.words[R]=G.words[R];return this.length=G.length,this.strip()},y.prototype.ixor=function(J){return l((this.negative|J.negative)===0),this.iuxor(J)},y.prototype.xor=function(J){return this.length>J.length?this.clone().ixor(J):J.clone().ixor(this)},y.prototype.uxor=function(J){return this.length>J.length?this.clone().iuxor(J):J.clone().iuxor(this)},y.prototype.inotn=function(J){l(typeof J=="number"&&J>=0);var G=Math.ceil(J/26)|0,m=J%26;this._expand(G),m>0&&G--;for(var R=0;R<G;R++)this.words[R]=~this.words[R]&67108863;return m>0&&(this.words[R]=~this.words[R]&67108863>>26-m),this.strip()},y.prototype.notn=function(J){return this.clone().inotn(J)},y.prototype.setn=function(J,G){l(typeof J=="number"&&J>=0);var m=J/26|0,R=J%26;return this._expand(m+1),G?this.words[m]=this.words[m]|1<<R:this.words[m]=this.words[m]&~(1<<R),this.strip()},y.prototype.iadd=function(J){var G;if(this.negative!==0&&J.negative===0)return this.negative=0,G=this.isub(J),this.negative^=1,this._normSign();if(this.negative===0&&J.negative!==0)return J.negative=0,G=this.isub(J),J.negative=1,G._normSign();var m,R;this.length>J.length?(m=this,R=J):(m=J,R=this);for(var X=0,oe=0;oe<R.length;oe++)G=(m.words[oe]|0)+(R.words[oe]|0)+X,this.words[oe]=G&67108863,X=G>>>26;for(;X!==0&&oe<m.length;oe++)G=(m.words[oe]|0)+X,this.words[oe]=G&67108863,X=G>>>26;if(this.length=m.length,X!==0)this.words[this.length]=X,this.length++;else if(m!==this)for(;oe<m.length;oe++)this.words[oe]=m.words[oe];return this},y.prototype.add=function(J){var G;return J.negative!==0&&this.negative===0?(J.negative=0,G=this.sub(J),J.negative^=1,G):J.negative===0&&this.negative!==0?(this.negative=0,G=J.sub(this),this.negative=1,G):this.length>J.length?this.clone().iadd(J):J.clone().iadd(this)},y.prototype.isub=function(J){if(J.negative!==0){J.negative=0;var G=this.iadd(J);return J.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(J),this.negative=1,this._normSign();var m=this.cmp(J);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,X;m>0?(R=this,X=J):(R=J,X=this);for(var oe=0,de=0;de<X.length;de++)G=(R.words[de]|0)-(X.words[de]|0)+oe,oe=G>>26,this.words[de]=G&67108863;for(;oe!==0&&de<R.length;de++)G=(R.words[de]|0)+oe,oe=G>>26,this.words[de]=G&67108863;if(oe===0&&de<R.length&&R!==this)for(;de<R.length;de++)this.words[de]=R.words[de];return this.length=Math.max(this.length,de),R!==this&&(this.negative=1),this.strip()},y.prototype.sub=function(J){return this.clone().isub(J)};function ce(Ne,J,G){G.negative=J.negative^Ne.negative;var m=Ne.length+J.length|0;G.length=m,m=m-1|0;var R=Ne.words[0]|0,X=J.words[0]|0,oe=R*X,de=oe&67108863,le=oe/67108864|0;G.words[0]=de;for(var q=1;q<m;q++){for(var Y=le>>>26,O=le&67108863,me=Math.min(q,J.length-1),Je=Math.max(0,q-Ne.length+1);Je<=me;Je++){var se=q-Je|0;R=Ne.words[se]|0,X=J.words[Je]|0,oe=R*X+O,Y+=oe/67108864|0,O=oe&67108863}G.words[q]=O|0,le=Y|0}return le!==0?G.words[q]=le|0:G.length--,G.strip()}var V=function(J,G,m){var R=J.words,X=G.words,oe=m.words,de=0,le,q,Y,O=R[0]|0,me=O&8191,Je=O>>>13,se=R[1]|0,Ve=se&8191,c0=se>>>13,l0=R[2]|0,h0=l0&8191,R0=l0>>>13,tt=R[3]|0,V0=tt&8191,t0=tt>>>13,ht=R[4]|0,Ke=ht&8191,Ze=ht>>>13,o0=R[5]|0,Ae=o0&8191,w0=o0>>>13,U0=R[6]|0,N0=U0&8191,ot=U0>>>13,W0=R[7]|0,X0=W0&8191,vt=W0>>>13,er=R[8]|0,Yt=er&8191,yr=er>>>13,Er=R[9]|0,Lt=Er&8191,hr=Er>>>13,kr=X[0]|0,qt=kr&8191,xr=kr>>>13,Mr=X[1]|0,Jt=Mr&8191,Qr=Mr>>>13,Sr=X[2]|0,$t=Sr&8191,Dr=Sr>>>13,Cr=X[3]|0,Ut=Cr&8191,br=Cr>>>13,dr=X[4]|0,jt=dr&8191,Fr=dr>>>13,Pr=X[5]|0,Vt=Pr&8191,_r=Pr>>>13,vr=X[6]|0,Ot=vr&8191,Ir=vr>>>13,Kr=X[7]|0,Xt=Kr&8191,a0=Kr>>>13,wr=X[8]|0,Ye=wr&8191,n0=wr>>>13,u0=X[9]|0,g0=u0&8191,x0=u0>>>13;m.negative=J.negative^G.negative,m.length=19,le=Math.imul(me,qt),q=Math.imul(me,xr),q=q+Math.imul(Je,qt)|0,Y=Math.imul(Je,xr);var P0=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(P0>>>26)|0,P0&=67108863,le=Math.imul(Ve,qt),q=Math.imul(Ve,xr),q=q+Math.imul(c0,qt)|0,Y=Math.imul(c0,xr),le=le+Math.imul(me,Jt)|0,q=q+Math.imul(me,Qr)|0,q=q+Math.imul(Je,Jt)|0,Y=Y+Math.imul(Je,Qr)|0;var Y0=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,le=Math.imul(h0,qt),q=Math.imul(h0,xr),q=q+Math.imul(R0,qt)|0,Y=Math.imul(R0,xr),le=le+Math.imul(Ve,Jt)|0,q=q+Math.imul(Ve,Qr)|0,q=q+Math.imul(c0,Jt)|0,Y=Y+Math.imul(c0,Qr)|0,le=le+Math.imul(me,$t)|0,q=q+Math.imul(me,Dr)|0,q=q+Math.imul(Je,$t)|0,Y=Y+Math.imul(Je,Dr)|0;var it=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(it>>>26)|0,it&=67108863,le=Math.imul(V0,qt),q=Math.imul(V0,xr),q=q+Math.imul(t0,qt)|0,Y=Math.imul(t0,xr),le=le+Math.imul(h0,Jt)|0,q=q+Math.imul(h0,Qr)|0,q=q+Math.imul(R0,Jt)|0,Y=Y+Math.imul(R0,Qr)|0,le=le+Math.imul(Ve,$t)|0,q=q+Math.imul(Ve,Dr)|0,q=q+Math.imul(c0,$t)|0,Y=Y+Math.imul(c0,Dr)|0,le=le+Math.imul(me,Ut)|0,q=q+Math.imul(me,br)|0,q=q+Math.imul(Je,Ut)|0,Y=Y+Math.imul(Je,br)|0;var xt=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(xt>>>26)|0,xt&=67108863,le=Math.imul(Ke,qt),q=Math.imul(Ke,xr),q=q+Math.imul(Ze,qt)|0,Y=Math.imul(Ze,xr),le=le+Math.imul(V0,Jt)|0,q=q+Math.imul(V0,Qr)|0,q=q+Math.imul(t0,Jt)|0,Y=Y+Math.imul(t0,Qr)|0,le=le+Math.imul(h0,$t)|0,q=q+Math.imul(h0,Dr)|0,q=q+Math.imul(R0,$t)|0,Y=Y+Math.imul(R0,Dr)|0,le=le+Math.imul(Ve,Ut)|0,q=q+Math.imul(Ve,br)|0,q=q+Math.imul(c0,Ut)|0,Y=Y+Math.imul(c0,br)|0,le=le+Math.imul(me,jt)|0,q=q+Math.imul(me,Fr)|0,q=q+Math.imul(Je,jt)|0,Y=Y+Math.imul(Je,Fr)|0;var wt=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(wt>>>26)|0,wt&=67108863,le=Math.imul(Ae,qt),q=Math.imul(Ae,xr),q=q+Math.imul(w0,qt)|0,Y=Math.imul(w0,xr),le=le+Math.imul(Ke,Jt)|0,q=q+Math.imul(Ke,Qr)|0,q=q+Math.imul(Ze,Jt)|0,Y=Y+Math.imul(Ze,Qr)|0,le=le+Math.imul(V0,$t)|0,q=q+Math.imul(V0,Dr)|0,q=q+Math.imul(t0,$t)|0,Y=Y+Math.imul(t0,Dr)|0,le=le+Math.imul(h0,Ut)|0,q=q+Math.imul(h0,br)|0,q=q+Math.imul(R0,Ut)|0,Y=Y+Math.imul(R0,br)|0,le=le+Math.imul(Ve,jt)|0,q=q+Math.imul(Ve,Fr)|0,q=q+Math.imul(c0,jt)|0,Y=Y+Math.imul(c0,Fr)|0,le=le+Math.imul(me,Vt)|0,q=q+Math.imul(me,_r)|0,q=q+Math.imul(Je,Vt)|0,Y=Y+Math.imul(Je,_r)|0;var I=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(I>>>26)|0,I&=67108863,le=Math.imul(N0,qt),q=Math.imul(N0,xr),q=q+Math.imul(ot,qt)|0,Y=Math.imul(ot,xr),le=le+Math.imul(Ae,Jt)|0,q=q+Math.imul(Ae,Qr)|0,q=q+Math.imul(w0,Jt)|0,Y=Y+Math.imul(w0,Qr)|0,le=le+Math.imul(Ke,$t)|0,q=q+Math.imul(Ke,Dr)|0,q=q+Math.imul(Ze,$t)|0,Y=Y+Math.imul(Ze,Dr)|0,le=le+Math.imul(V0,Ut)|0,q=q+Math.imul(V0,br)|0,q=q+Math.imul(t0,Ut)|0,Y=Y+Math.imul(t0,br)|0,le=le+Math.imul(h0,jt)|0,q=q+Math.imul(h0,Fr)|0,q=q+Math.imul(R0,jt)|0,Y=Y+Math.imul(R0,Fr)|0,le=le+Math.imul(Ve,Vt)|0,q=q+Math.imul(Ve,_r)|0,q=q+Math.imul(c0,Vt)|0,Y=Y+Math.imul(c0,_r)|0,le=le+Math.imul(me,Ot)|0,q=q+Math.imul(me,Ir)|0,q=q+Math.imul(Je,Ot)|0,Y=Y+Math.imul(Je,Ir)|0;var e=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(e>>>26)|0,e&=67108863,le=Math.imul(X0,qt),q=Math.imul(X0,xr),q=q+Math.imul(vt,qt)|0,Y=Math.imul(vt,xr),le=le+Math.imul(N0,Jt)|0,q=q+Math.imul(N0,Qr)|0,q=q+Math.imul(ot,Jt)|0,Y=Y+Math.imul(ot,Qr)|0,le=le+Math.imul(Ae,$t)|0,q=q+Math.imul(Ae,Dr)|0,q=q+Math.imul(w0,$t)|0,Y=Y+Math.imul(w0,Dr)|0,le=le+Math.imul(Ke,Ut)|0,q=q+Math.imul(Ke,br)|0,q=q+Math.imul(Ze,Ut)|0,Y=Y+Math.imul(Ze,br)|0,le=le+Math.imul(V0,jt)|0,q=q+Math.imul(V0,Fr)|0,q=q+Math.imul(t0,jt)|0,Y=Y+Math.imul(t0,Fr)|0,le=le+Math.imul(h0,Vt)|0,q=q+Math.imul(h0,_r)|0,q=q+Math.imul(R0,Vt)|0,Y=Y+Math.imul(R0,_r)|0,le=le+Math.imul(Ve,Ot)|0,q=q+Math.imul(Ve,Ir)|0,q=q+Math.imul(c0,Ot)|0,Y=Y+Math.imul(c0,Ir)|0,le=le+Math.imul(me,Xt)|0,q=q+Math.imul(me,a0)|0,q=q+Math.imul(Je,Xt)|0,Y=Y+Math.imul(Je,a0)|0;var s=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(s>>>26)|0,s&=67108863,le=Math.imul(Yt,qt),q=Math.imul(Yt,xr),q=q+Math.imul(yr,qt)|0,Y=Math.imul(yr,xr),le=le+Math.imul(X0,Jt)|0,q=q+Math.imul(X0,Qr)|0,q=q+Math.imul(vt,Jt)|0,Y=Y+Math.imul(vt,Qr)|0,le=le+Math.imul(N0,$t)|0,q=q+Math.imul(N0,Dr)|0,q=q+Math.imul(ot,$t)|0,Y=Y+Math.imul(ot,Dr)|0,le=le+Math.imul(Ae,Ut)|0,q=q+Math.imul(Ae,br)|0,q=q+Math.imul(w0,Ut)|0,Y=Y+Math.imul(w0,br)|0,le=le+Math.imul(Ke,jt)|0,q=q+Math.imul(Ke,Fr)|0,q=q+Math.imul(Ze,jt)|0,Y=Y+Math.imul(Ze,Fr)|0,le=le+Math.imul(V0,Vt)|0,q=q+Math.imul(V0,_r)|0,q=q+Math.imul(t0,Vt)|0,Y=Y+Math.imul(t0,_r)|0,le=le+Math.imul(h0,Ot)|0,q=q+Math.imul(h0,Ir)|0,q=q+Math.imul(R0,Ot)|0,Y=Y+Math.imul(R0,Ir)|0,le=le+Math.imul(Ve,Xt)|0,q=q+Math.imul(Ve,a0)|0,q=q+Math.imul(c0,Xt)|0,Y=Y+Math.imul(c0,a0)|0,le=le+Math.imul(me,Ye)|0,q=q+Math.imul(me,n0)|0,q=q+Math.imul(Je,Ye)|0,Y=Y+Math.imul(Je,n0)|0;var nn=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(nn>>>26)|0,nn&=67108863,le=Math.imul(Lt,qt),q=Math.imul(Lt,xr),q=q+Math.imul(hr,qt)|0,Y=Math.imul(hr,xr),le=le+Math.imul(Yt,Jt)|0,q=q+Math.imul(Yt,Qr)|0,q=q+Math.imul(yr,Jt)|0,Y=Y+Math.imul(yr,Qr)|0,le=le+Math.imul(X0,$t)|0,q=q+Math.imul(X0,Dr)|0,q=q+Math.imul(vt,$t)|0,Y=Y+Math.imul(vt,Dr)|0,le=le+Math.imul(N0,Ut)|0,q=q+Math.imul(N0,br)|0,q=q+Math.imul(ot,Ut)|0,Y=Y+Math.imul(ot,br)|0,le=le+Math.imul(Ae,jt)|0,q=q+Math.imul(Ae,Fr)|0,q=q+Math.imul(w0,jt)|0,Y=Y+Math.imul(w0,Fr)|0,le=le+Math.imul(Ke,Vt)|0,q=q+Math.imul(Ke,_r)|0,q=q+Math.imul(Ze,Vt)|0,Y=Y+Math.imul(Ze,_r)|0,le=le+Math.imul(V0,Ot)|0,q=q+Math.imul(V0,Ir)|0,q=q+Math.imul(t0,Ot)|0,Y=Y+Math.imul(t0,Ir)|0,le=le+Math.imul(h0,Xt)|0,q=q+Math.imul(h0,a0)|0,q=q+Math.imul(R0,Xt)|0,Y=Y+Math.imul(R0,a0)|0,le=le+Math.imul(Ve,Ye)|0,q=q+Math.imul(Ve,n0)|0,q=q+Math.imul(c0,Ye)|0,Y=Y+Math.imul(c0,n0)|0,le=le+Math.imul(me,g0)|0,q=q+Math.imul(me,x0)|0,q=q+Math.imul(Je,g0)|0,Y=Y+Math.imul(Je,x0)|0;var gt=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(gt>>>26)|0,gt&=67108863,le=Math.imul(Lt,Jt),q=Math.imul(Lt,Qr),q=q+Math.imul(hr,Jt)|0,Y=Math.imul(hr,Qr),le=le+Math.imul(Yt,$t)|0,q=q+Math.imul(Yt,Dr)|0,q=q+Math.imul(yr,$t)|0,Y=Y+Math.imul(yr,Dr)|0,le=le+Math.imul(X0,Ut)|0,q=q+Math.imul(X0,br)|0,q=q+Math.imul(vt,Ut)|0,Y=Y+Math.imul(vt,br)|0,le=le+Math.imul(N0,jt)|0,q=q+Math.imul(N0,Fr)|0,q=q+Math.imul(ot,jt)|0,Y=Y+Math.imul(ot,Fr)|0,le=le+Math.imul(Ae,Vt)|0,q=q+Math.imul(Ae,_r)|0,q=q+Math.imul(w0,Vt)|0,Y=Y+Math.imul(w0,_r)|0,le=le+Math.imul(Ke,Ot)|0,q=q+Math.imul(Ke,Ir)|0,q=q+Math.imul(Ze,Ot)|0,Y=Y+Math.imul(Ze,Ir)|0,le=le+Math.imul(V0,Xt)|0,q=q+Math.imul(V0,a0)|0,q=q+Math.imul(t0,Xt)|0,Y=Y+Math.imul(t0,a0)|0,le=le+Math.imul(h0,Ye)|0,q=q+Math.imul(h0,n0)|0,q=q+Math.imul(R0,Ye)|0,Y=Y+Math.imul(R0,n0)|0,le=le+Math.imul(Ve,g0)|0,q=q+Math.imul(Ve,x0)|0,q=q+Math.imul(c0,g0)|0,Y=Y+Math.imul(c0,x0)|0;var An=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(An>>>26)|0,An&=67108863,le=Math.imul(Lt,$t),q=Math.imul(Lt,Dr),q=q+Math.imul(hr,$t)|0,Y=Math.imul(hr,Dr),le=le+Math.imul(Yt,Ut)|0,q=q+Math.imul(Yt,br)|0,q=q+Math.imul(yr,Ut)|0,Y=Y+Math.imul(yr,br)|0,le=le+Math.imul(X0,jt)|0,q=q+Math.imul(X0,Fr)|0,q=q+Math.imul(vt,jt)|0,Y=Y+Math.imul(vt,Fr)|0,le=le+Math.imul(N0,Vt)|0,q=q+Math.imul(N0,_r)|0,q=q+Math.imul(ot,Vt)|0,Y=Y+Math.imul(ot,_r)|0,le=le+Math.imul(Ae,Ot)|0,q=q+Math.imul(Ae,Ir)|0,q=q+Math.imul(w0,Ot)|0,Y=Y+Math.imul(w0,Ir)|0,le=le+Math.imul(Ke,Xt)|0,q=q+Math.imul(Ke,a0)|0,q=q+Math.imul(Ze,Xt)|0,Y=Y+Math.imul(Ze,a0)|0,le=le+Math.imul(V0,Ye)|0,q=q+Math.imul(V0,n0)|0,q=q+Math.imul(t0,Ye)|0,Y=Y+Math.imul(t0,n0)|0,le=le+Math.imul(h0,g0)|0,q=q+Math.imul(h0,x0)|0,q=q+Math.imul(R0,g0)|0,Y=Y+Math.imul(R0,x0)|0;var bn=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(bn>>>26)|0,bn&=67108863,le=Math.imul(Lt,Ut),q=Math.imul(Lt,br),q=q+Math.imul(hr,Ut)|0,Y=Math.imul(hr,br),le=le+Math.imul(Yt,jt)|0,q=q+Math.imul(Yt,Fr)|0,q=q+Math.imul(yr,jt)|0,Y=Y+Math.imul(yr,Fr)|0,le=le+Math.imul(X0,Vt)|0,q=q+Math.imul(X0,_r)|0,q=q+Math.imul(vt,Vt)|0,Y=Y+Math.imul(vt,_r)|0,le=le+Math.imul(N0,Ot)|0,q=q+Math.imul(N0,Ir)|0,q=q+Math.imul(ot,Ot)|0,Y=Y+Math.imul(ot,Ir)|0,le=le+Math.imul(Ae,Xt)|0,q=q+Math.imul(Ae,a0)|0,q=q+Math.imul(w0,Xt)|0,Y=Y+Math.imul(w0,a0)|0,le=le+Math.imul(Ke,Ye)|0,q=q+Math.imul(Ke,n0)|0,q=q+Math.imul(Ze,Ye)|0,Y=Y+Math.imul(Ze,n0)|0,le=le+Math.imul(V0,g0)|0,q=q+Math.imul(V0,x0)|0,q=q+Math.imul(t0,g0)|0,Y=Y+Math.imul(t0,x0)|0;var Pn=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,le=Math.imul(Lt,jt),q=Math.imul(Lt,Fr),q=q+Math.imul(hr,jt)|0,Y=Math.imul(hr,Fr),le=le+Math.imul(Yt,Vt)|0,q=q+Math.imul(Yt,_r)|0,q=q+Math.imul(yr,Vt)|0,Y=Y+Math.imul(yr,_r)|0,le=le+Math.imul(X0,Ot)|0,q=q+Math.imul(X0,Ir)|0,q=q+Math.imul(vt,Ot)|0,Y=Y+Math.imul(vt,Ir)|0,le=le+Math.imul(N0,Xt)|0,q=q+Math.imul(N0,a0)|0,q=q+Math.imul(ot,Xt)|0,Y=Y+Math.imul(ot,a0)|0,le=le+Math.imul(Ae,Ye)|0,q=q+Math.imul(Ae,n0)|0,q=q+Math.imul(w0,Ye)|0,Y=Y+Math.imul(w0,n0)|0,le=le+Math.imul(Ke,g0)|0,q=q+Math.imul(Ke,x0)|0,q=q+Math.imul(Ze,g0)|0,Y=Y+Math.imul(Ze,x0)|0;var Mn=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,le=Math.imul(Lt,Vt),q=Math.imul(Lt,_r),q=q+Math.imul(hr,Vt)|0,Y=Math.imul(hr,_r),le=le+Math.imul(Yt,Ot)|0,q=q+Math.imul(Yt,Ir)|0,q=q+Math.imul(yr,Ot)|0,Y=Y+Math.imul(yr,Ir)|0,le=le+Math.imul(X0,Xt)|0,q=q+Math.imul(X0,a0)|0,q=q+Math.imul(vt,Xt)|0,Y=Y+Math.imul(vt,a0)|0,le=le+Math.imul(N0,Ye)|0,q=q+Math.imul(N0,n0)|0,q=q+Math.imul(ot,Ye)|0,Y=Y+Math.imul(ot,n0)|0,le=le+Math.imul(Ae,g0)|0,q=q+Math.imul(Ae,x0)|0,q=q+Math.imul(w0,g0)|0,Y=Y+Math.imul(w0,x0)|0;var LA=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(LA>>>26)|0,LA&=67108863,le=Math.imul(Lt,Ot),q=Math.imul(Lt,Ir),q=q+Math.imul(hr,Ot)|0,Y=Math.imul(hr,Ir),le=le+Math.imul(Yt,Xt)|0,q=q+Math.imul(Yt,a0)|0,q=q+Math.imul(yr,Xt)|0,Y=Y+Math.imul(yr,a0)|0,le=le+Math.imul(X0,Ye)|0,q=q+Math.imul(X0,n0)|0,q=q+Math.imul(vt,Ye)|0,Y=Y+Math.imul(vt,n0)|0,le=le+Math.imul(N0,g0)|0,q=q+Math.imul(N0,x0)|0,q=q+Math.imul(ot,g0)|0,Y=Y+Math.imul(ot,x0)|0;var QA=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(QA>>>26)|0,QA&=67108863,le=Math.imul(Lt,Xt),q=Math.imul(Lt,a0),q=q+Math.imul(hr,Xt)|0,Y=Math.imul(hr,a0),le=le+Math.imul(Yt,Ye)|0,q=q+Math.imul(Yt,n0)|0,q=q+Math.imul(yr,Ye)|0,Y=Y+Math.imul(yr,n0)|0,le=le+Math.imul(X0,g0)|0,q=q+Math.imul(X0,x0)|0,q=q+Math.imul(vt,g0)|0,Y=Y+Math.imul(vt,x0)|0;var je=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(je>>>26)|0,je&=67108863,le=Math.imul(Lt,Ye),q=Math.imul(Lt,n0),q=q+Math.imul(hr,Ye)|0,Y=Math.imul(hr,n0),le=le+Math.imul(Yt,g0)|0,q=q+Math.imul(Yt,x0)|0,q=q+Math.imul(yr,g0)|0,Y=Y+Math.imul(yr,x0)|0;var B=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(B>>>26)|0,B&=67108863,le=Math.imul(Lt,g0),q=Math.imul(Lt,x0),q=q+Math.imul(hr,g0)|0,Y=Math.imul(hr,x0);var eA=(de+le|0)+((q&8191)<<13)|0;return de=(Y+(q>>>13)|0)+(eA>>>26)|0,eA&=67108863,oe[0]=P0,oe[1]=Y0,oe[2]=it,oe[3]=xt,oe[4]=wt,oe[5]=I,oe[6]=e,oe[7]=s,oe[8]=nn,oe[9]=gt,oe[10]=An,oe[11]=bn,oe[12]=Pn,oe[13]=Mn,oe[14]=LA,oe[15]=QA,oe[16]=je,oe[17]=B,oe[18]=eA,de!==0&&(oe[19]=de,m.length++),m};Math.imul||(V=ce);function Ee(Ne,J,G){G.negative=J.negative^Ne.negative,G.length=Ne.length+J.length;for(var m=0,R=0,X=0;X<G.length-1;X++){var oe=R;R=0;for(var de=m&67108863,le=Math.min(X,J.length-1),q=Math.max(0,X-Ne.length+1);q<=le;q++){var Y=X-q,O=Ne.words[Y]|0,me=J.words[q]|0,Je=O*me,se=Je&67108863;oe=oe+(Je/67108864|0)|0,se=se+de|0,de=se&67108863,oe=oe+(se>>>26)|0,R+=oe>>>26,oe&=67108863}G.words[X]=de,m=oe,oe=R}return m!==0?G.words[X]=m:G.length--,G.strip()}function ge(Ne,J,G){var m=new _e;return m.mulp(Ne,J,G)}y.prototype.mulTo=function(J,G){var m,R=this.length+J.length;return this.length===10&&J.length===10?m=V(this,J,G):R<63?m=ce(this,J,G):R<1024?m=Ee(this,J,G):m=ge(this,J,G),m};function _e(Ne,J){this.x=Ne,this.y=J}_e.prototype.makeRBT=function(J){for(var G=new Array(J),m=y.prototype._countBits(J)-1,R=0;R<J;R++)G[R]=this.revBin(R,m,J);return G},_e.prototype.revBin=function(J,G,m){if(J===0||J===m-1)return J;for(var R=0,X=0;X<G;X++)R|=(J&1)<<G-X-1,J>>=1;return R},_e.prototype.permute=function(J,G,m,R,X,oe){for(var de=0;de<oe;de++)R[de]=G[J[de]],X[de]=m[J[de]]},_e.prototype.transform=function(J,G,m,R,X,oe){this.permute(oe,J,G,m,R,X);for(var de=1;de<X;de<<=1)for(var le=de<<1,q=Math.cos(2*Math.PI/le),Y=Math.sin(2*Math.PI/le),O=0;O<X;O+=le)for(var me=q,Je=Y,se=0;se<de;se++){var Ve=m[O+se],c0=R[O+se],l0=m[O+se+de],h0=R[O+se+de],R0=me*l0-Je*h0;h0=me*h0+Je*l0,l0=R0,m[O+se]=Ve+l0,R[O+se]=c0+h0,m[O+se+de]=Ve-l0,R[O+se+de]=c0-h0,se!==le&&(R0=q*me-Y*Je,Je=q*Je+Y*me,me=R0)}},_e.prototype.guessLen13b=function(J,G){var m=Math.max(G,J)|1,R=m&1,X=0;for(m=m/2|0;m;m=m>>>1)X++;return 1<<X+1+R},_e.prototype.conjugate=function(J,G,m){if(!(m<=1))for(var R=0;R<m/2;R++){var X=J[R];J[R]=J[m-R-1],J[m-R-1]=X,X=G[R],G[R]=-G[m-R-1],G[m-R-1]=-X}},_e.prototype.normalize13b=function(J,G){for(var m=0,R=0;R<G/2;R++){var X=Math.round(J[2*R+1]/G)*8192+Math.round(J[2*R]/G)+m;J[R]=X&67108863,X<67108864?m=0:m=X/67108864|0}return J},_e.prototype.convert13b=function(J,G,m,R){for(var X=0,oe=0;oe<G;oe++)X=X+(J[oe]|0),m[2*oe]=X&8191,X=X>>>13,m[2*oe+1]=X&8191,X=X>>>13;for(oe=2*G;oe<R;++oe)m[oe]=0;l(X===0),l((X&-8192)===0)},_e.prototype.stub=function(J){for(var G=new Array(J),m=0;m<J;m++)G[m]=0;return G},_e.prototype.mulp=function(J,G,m){var R=2*this.guessLen13b(J.length,G.length),X=this.makeRBT(R),oe=this.stub(R),de=new Array(R),le=new Array(R),q=new Array(R),Y=new Array(R),O=new Array(R),me=new Array(R),Je=m.words;Je.length=R,this.convert13b(J.words,J.length,de,R),this.convert13b(G.words,G.length,Y,R),this.transform(de,oe,le,q,R,X),this.transform(Y,oe,O,me,R,X);for(var se=0;se<R;se++){var Ve=le[se]*O[se]-q[se]*me[se];q[se]=le[se]*me[se]+q[se]*O[se],le[se]=Ve}return this.conjugate(le,q,R),this.transform(le,q,Je,oe,R,X),this.conjugate(Je,oe,R),this.normalize13b(Je,R),m.negative=J.negative^G.negative,m.length=J.length+G.length,m.strip()},y.prototype.mul=function(J){var G=new y(null);return G.words=new Array(this.length+J.length),this.mulTo(J,G)},y.prototype.mulf=function(J){var G=new y(null);return G.words=new Array(this.length+J.length),ge(this,J,G)},y.prototype.imul=function(J){return this.clone().mulTo(J,this)},y.prototype.imuln=function(J){l(typeof J=="number"),l(J<67108864);for(var G=0,m=0;m<this.length;m++){var R=(this.words[m]|0)*J,X=(R&67108863)+(G&67108863);G>>=26,G+=R/67108864|0,G+=X>>>26,this.words[m]=X&67108863}return G!==0&&(this.words[m]=G,this.length++),this.length=J===0?1:this.length,this},y.prototype.muln=function(J){return this.clone().imuln(J)},y.prototype.sqr=function(){return this.mul(this)},y.prototype.isqr=function(){return this.imul(this.clone())},y.prototype.pow=function(J){var G=Ce(J);if(G.length===0)return new y(1);for(var m=this,R=0;R<G.length&&G[R]===0;R++,m=m.sqr());if(++R<G.length)for(var X=m.sqr();R<G.length;R++,X=X.sqr())G[R]!==0&&(m=m.mul(X));return m},y.prototype.iushln=function(J){l(typeof J=="number"&&J>=0);var G=J%26,m=(J-G)/26,R=67108863>>>26-G<<26-G,X;if(G!==0){var oe=0;for(X=0;X<this.length;X++){var de=this.words[X]&R,le=(this.words[X]|0)-de<<G;this.words[X]=le|oe,oe=de>>>26-G}oe&&(this.words[X]=oe,this.length++)}if(m!==0){for(X=this.length-1;X>=0;X--)this.words[X+m]=this.words[X];for(X=0;X<m;X++)this.words[X]=0;this.length+=m}return this.strip()},y.prototype.ishln=function(J){return l(this.negative===0),this.iushln(J)},y.prototype.iushrn=function(J,G,m){l(typeof J=="number"&&J>=0);var R;G?R=(G-G%26)/26:R=0;var X=J%26,oe=Math.min((J-X)/26,this.length),de=67108863^67108863>>>X<<X,le=m;if(R-=oe,R=Math.max(0,R),le){for(var q=0;q<oe;q++)le.words[q]=this.words[q];le.length=oe}if(oe!==0)if(this.length>oe)for(this.length-=oe,q=0;q<this.length;q++)this.words[q]=this.words[q+oe];else this.words[0]=0,this.length=1;var Y=0;for(q=this.length-1;q>=0&&(Y!==0||q>=R);q--){var O=this.words[q]|0;this.words[q]=Y<<26-X|O>>>X,Y=O&de}return le&&Y!==0&&(le.words[le.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},y.prototype.ishrn=function(J,G,m){return l(this.negative===0),this.iushrn(J,G,m)},y.prototype.shln=function(J){return this.clone().ishln(J)},y.prototype.ushln=function(J){return this.clone().iushln(J)},y.prototype.shrn=function(J){return this.clone().ishrn(J)},y.prototype.ushrn=function(J){return this.clone().iushrn(J)},y.prototype.testn=function(J){l(typeof J=="number"&&J>=0);var G=J%26,m=(J-G)/26,R=1<<G;if(this.length<=m)return!1;var X=this.words[m];return!!(X&R)},y.prototype.imaskn=function(J){l(typeof J=="number"&&J>=0);var G=J%26,m=(J-G)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=m)return this;if(G!==0&&m++,this.length=Math.min(m,this.length),G!==0){var R=67108863^67108863>>>G<<G;this.words[this.length-1]&=R}return this.strip()},y.prototype.maskn=function(J){return this.clone().imaskn(J)},y.prototype.iaddn=function(J){return l(typeof J=="number"),l(J<67108864),J<0?this.isubn(-J):this.negative!==0?this.length===1&&(this.words[0]|0)<J?(this.words[0]=J-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(J),this.negative=1,this):this._iaddn(J)},y.prototype._iaddn=function(J){this.words[0]+=J;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},y.prototype.isubn=function(J){if(l(typeof J=="number"),l(J<67108864),J<0)return this.iaddn(-J);if(this.negative!==0)return this.negative=0,this.iaddn(J),this.negative=1,this;if(this.words[0]-=J,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},y.prototype.addn=function(J){return this.clone().iaddn(J)},y.prototype.subn=function(J){return this.clone().isubn(J)},y.prototype.iabs=function(){return this.negative=0,this},y.prototype.abs=function(){return this.clone().iabs()},y.prototype._ishlnsubmul=function(J,G,m){var R=J.length+m,X;this._expand(R);var oe,de=0;for(X=0;X<J.length;X++){oe=(this.words[X+m]|0)+de;var le=(J.words[X]|0)*G;oe-=le&67108863,de=(oe>>26)-(le/67108864|0),this.words[X+m]=oe&67108863}for(;X<this.length-m;X++)oe=(this.words[X+m]|0)+de,de=oe>>26,this.words[X+m]=oe&67108863;if(de===0)return this.strip();for(l(de===-1),de=0,X=0;X<this.length;X++)oe=-(this.words[X]|0)+de,de=oe>>26,this.words[X]=oe&67108863;return this.negative=1,this.strip()},y.prototype._wordDiv=function(J,G){var m=this.length-J.length,R=this.clone(),X=J,oe=X.words[X.length-1]|0,de=this._countBits(oe);m=26-de,m!==0&&(X=X.ushln(m),R.iushln(m),oe=X.words[X.length-1]|0);var le=R.length-X.length,q;if(G!=="mod"){q=new y(null),q.length=le+1,q.words=new Array(q.length);for(var Y=0;Y<q.length;Y++)q.words[Y]=0}var O=R.clone()._ishlnsubmul(X,1,le);O.negative===0&&(R=O,q&&(q.words[le]=1));for(var me=le-1;me>=0;me--){var Je=(R.words[X.length+me]|0)*67108864+(R.words[X.length+me-1]|0);for(Je=Math.min(Je/oe|0,67108863),R._ishlnsubmul(X,Je,me);R.negative!==0;)Je--,R.negative=0,R._ishlnsubmul(X,1,me),R.isZero()||(R.negative^=1);q&&(q.words[me]=Je)}return q&&q.strip(),R.strip(),G!=="div"&&m!==0&&R.iushrn(m),{div:q||null,mod:R}},y.prototype.divmod=function(J,G,m){if(l(!J.isZero()),this.isZero())return{div:new y(0),mod:new y(0)};var R,X,oe;return this.negative!==0&&J.negative===0?(oe=this.neg().divmod(J,G),G!=="mod"&&(R=oe.div.neg()),G!=="div"&&(X=oe.mod.neg(),m&&X.negative!==0&&X.iadd(J)),{div:R,mod:X}):this.negative===0&&J.negative!==0?(oe=this.divmod(J.neg(),G),G!=="mod"&&(R=oe.div.neg()),{div:R,mod:oe.mod}):(this.negative&J.negative)!==0?(oe=this.neg().divmod(J.neg(),G),G!=="div"&&(X=oe.mod.neg(),m&&X.negative!==0&&X.isub(J)),{div:oe.div,mod:X}):J.length>this.length||this.cmp(J)<0?{div:new y(0),mod:this}:J.length===1?G==="div"?{div:this.divn(J.words[0]),mod:null}:G==="mod"?{div:null,mod:new y(this.modn(J.words[0]))}:{div:this.divn(J.words[0]),mod:new y(this.modn(J.words[0]))}:this._wordDiv(J,G)},y.prototype.div=function(J){return this.divmod(J,"div",!1).div},y.prototype.mod=function(J){return this.divmod(J,"mod",!1).mod},y.prototype.umod=function(J){return this.divmod(J,"mod",!0).mod},y.prototype.divRound=function(J){var G=this.divmod(J);if(G.mod.isZero())return G.div;var m=G.div.negative!==0?G.mod.isub(J):G.mod,R=J.ushrn(1),X=J.andln(1),oe=m.cmp(R);return oe<0||X===1&&oe===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},y.prototype.modn=function(J){l(J<=67108863);for(var G=(1<<26)%J,m=0,R=this.length-1;R>=0;R--)m=(G*m+(this.words[R]|0))%J;return m},y.prototype.idivn=function(J){l(J<=67108863);for(var G=0,m=this.length-1;m>=0;m--){var R=(this.words[m]|0)+G*67108864;this.words[m]=R/J|0,G=R%J}return this.strip()},y.prototype.divn=function(J){return this.clone().idivn(J)},y.prototype.egcd=function(J){l(J.negative===0),l(!J.isZero());var G=this,m=J.clone();G.negative!==0?G=G.umod(J):G=G.clone();for(var R=new y(1),X=new y(0),oe=new y(0),de=new y(1),le=0;G.isEven()&&m.isEven();)G.iushrn(1),m.iushrn(1),++le;for(var q=m.clone(),Y=G.clone();!G.isZero();){for(var O=0,me=1;(G.words[0]&me)===0&&O<26;++O,me<<=1);if(O>0)for(G.iushrn(O);O-- >0;)(R.isOdd()||X.isOdd())&&(R.iadd(q),X.isub(Y)),R.iushrn(1),X.iushrn(1);for(var Je=0,se=1;(m.words[0]&se)===0&&Je<26;++Je,se<<=1);if(Je>0)for(m.iushrn(Je);Je-- >0;)(oe.isOdd()||de.isOdd())&&(oe.iadd(q),de.isub(Y)),oe.iushrn(1),de.iushrn(1);G.cmp(m)>=0?(G.isub(m),R.isub(oe),X.isub(de)):(m.isub(G),oe.isub(R),de.isub(X))}return{a:oe,b:de,gcd:m.iushln(le)}},y.prototype._invmp=function(J){l(J.negative===0),l(!J.isZero());var G=this,m=J.clone();G.negative!==0?G=G.umod(J):G=G.clone();for(var R=new y(1),X=new y(0),oe=m.clone();G.cmpn(1)>0&&m.cmpn(1)>0;){for(var de=0,le=1;(G.words[0]&le)===0&&de<26;++de,le<<=1);if(de>0)for(G.iushrn(de);de-- >0;)R.isOdd()&&R.iadd(oe),R.iushrn(1);for(var q=0,Y=1;(m.words[0]&Y)===0&&q<26;++q,Y<<=1);if(q>0)for(m.iushrn(q);q-- >0;)X.isOdd()&&X.iadd(oe),X.iushrn(1);G.cmp(m)>=0?(G.isub(m),R.isub(X)):(m.isub(G),X.isub(R))}var O;return G.cmpn(1)===0?O=R:O=X,O.cmpn(0)<0&&O.iadd(J),O},y.prototype.gcd=function(J){if(this.isZero())return J.abs();if(J.isZero())return this.abs();var G=this.clone(),m=J.clone();G.negative=0,m.negative=0;for(var R=0;G.isEven()&&m.isEven();R++)G.iushrn(1),m.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;m.isEven();)m.iushrn(1);var X=G.cmp(m);if(X<0){var oe=G;G=m,m=oe}else if(X===0||m.cmpn(1)===0)break;G.isub(m)}while(!0);return m.iushln(R)},y.prototype.invm=function(J){return this.egcd(J).a.umod(J)},y.prototype.isEven=function(){return(this.words[0]&1)===0},y.prototype.isOdd=function(){return(this.words[0]&1)===1},y.prototype.andln=function(J){return this.words[0]&J},y.prototype.bincn=function(J){l(typeof J=="number");var G=J%26,m=(J-G)/26,R=1<<G;if(this.length<=m)return this._expand(m+1),this.words[m]|=R,this;for(var X=R,oe=m;X!==0&&oe<this.length;oe++){var de=this.words[oe]|0;de+=X,X=de>>>26,de&=67108863,this.words[oe]=de}return X!==0&&(this.words[oe]=X,this.length++),this},y.prototype.isZero=function(){return this.length===1&&this.words[0]===0},y.prototype.cmpn=function(J){var G=J<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var m;if(this.length>1)m=1;else{G&&(J=-J),l(J<=67108863,"Number is too big");var R=this.words[0]|0;m=R===J?0:R<J?-1:1}return this.negative!==0?-m|0:m},y.prototype.cmp=function(J){if(this.negative!==0&&J.negative===0)return-1;if(this.negative===0&&J.negative!==0)return 1;var G=this.ucmp(J);return this.negative!==0?-G|0:G},y.prototype.ucmp=function(J){if(this.length>J.length)return 1;if(this.length<J.length)return-1;for(var G=0,m=this.length-1;m>=0;m--){var R=this.words[m]|0,X=J.words[m]|0;if(R!==X){R<X?G=-1:R>X&&(G=1);break}}return G},y.prototype.gtn=function(J){return this.cmpn(J)===1},y.prototype.gt=function(J){return this.cmp(J)===1},y.prototype.gten=function(J){return this.cmpn(J)>=0},y.prototype.gte=function(J){return this.cmp(J)>=0},y.prototype.ltn=function(J){return this.cmpn(J)===-1},y.prototype.lt=function(J){return this.cmp(J)===-1},y.prototype.lten=function(J){return this.cmpn(J)<=0},y.prototype.lte=function(J){return this.cmp(J)<=0},y.prototype.eqn=function(J){return this.cmpn(J)===0},y.prototype.eq=function(J){return this.cmp(J)===0},y.red=function(J){return new ae(J)},y.prototype.toRed=function(J){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),J.convertTo(this)._forceRed(J)},y.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},y.prototype._forceRed=function(J){return this.red=J,this},y.prototype.forceRed=function(J){return l(!this.red,"Already a number in reduction context"),this._forceRed(J)},y.prototype.redAdd=function(J){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,J)},y.prototype.redIAdd=function(J){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,J)},y.prototype.redSub=function(J){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,J)},y.prototype.redISub=function(J){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,J)},y.prototype.redShl=function(J){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,J)},y.prototype.redMul=function(J){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,J),this.red.mul(this,J)},y.prototype.redIMul=function(J){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,J),this.red.imul(this,J)},y.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},y.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},y.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},y.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},y.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},y.prototype.redPow=function(J){return l(this.red&&!J.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,J)};var ne={k256:null,p224:null,p192:null,p25519:null};function r0(Ne,J){this.name=Ne,this.p=new y(J,16),this.n=this.p.bitLength(),this.k=new y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}r0.prototype._tmp=function(){var J=new y(null);return J.words=new Array(Math.ceil(this.n/13)),J},r0.prototype.ireduce=function(J){var G=J,m;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),m=G.bitLength();while(m>this.n);var R=m<this.n?-1:G.ucmp(this.p);return R===0?(G.words[0]=0,G.length=1):R>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},r0.prototype.split=function(J,G){J.iushrn(this.n,0,G)},r0.prototype.imulK=function(J){return J.imul(this.k)};function xe(){r0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}b(xe,r0),xe.prototype.split=function(J,G){for(var m=4194303,R=Math.min(J.length,9),X=0;X<R;X++)G.words[X]=J.words[X];if(G.length=R,J.length<=9){J.words[0]=0,J.length=1;return}var oe=J.words[9];for(G.words[G.length++]=oe&m,X=10;X<J.length;X++){var de=J.words[X]|0;J.words[X-10]=(de&m)<<4|oe>>>22,oe=de}oe>>>=22,J.words[X-10]=oe,oe===0&&J.length>10?J.length-=10:J.length-=9},xe.prototype.imulK=function(J){J.words[J.length]=0,J.words[J.length+1]=0,J.length+=2;for(var G=0,m=0;m<J.length;m++){var R=J.words[m]|0;G+=R*977,J.words[m]=G&67108863,G=R*64+(G/67108864|0)}return J.words[J.length-1]===0&&(J.length--,J.words[J.length-1]===0&&J.length--),J};function Me(){r0.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}b(Me,r0);function be(){r0.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}b(be,r0);function We(){r0.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}b(We,r0),We.prototype.imulK=function(J){for(var G=0,m=0;m<J.length;m++){var R=(J.words[m]|0)*19+G,X=R&67108863;R>>>=26,J.words[m]=X,G=R}return G!==0&&(J.words[J.length++]=G),J},y._prime=function(J){if(ne[J])return ne[J];var G;if(J==="k256")G=new xe;else if(J==="p224")G=new Me;else if(J==="p192")G=new be;else if(J==="p25519")G=new We;else throw new Error("Unknown prime "+J);return ne[J]=G,G};function ae(Ne){if(typeof Ne=="string"){var J=y._prime(Ne);this.m=J.p,this.prime=J}else l(Ne.gtn(1),"modulus must be greater than 1"),this.m=Ne,this.prime=null}ae.prototype._verify1=function(J){l(J.negative===0,"red works only with positives"),l(J.red,"red works only with red numbers")},ae.prototype._verify2=function(J,G){l((J.negative|G.negative)===0,"red works only with positives"),l(J.red&&J.red===G.red,"red works only with red numbers")},ae.prototype.imod=function(J){return this.prime?this.prime.ireduce(J)._forceRed(this):J.umod(this.m)._forceRed(this)},ae.prototype.neg=function(J){return J.isZero()?J.clone():this.m.sub(J)._forceRed(this)},ae.prototype.add=function(J,G){this._verify2(J,G);var m=J.add(G);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},ae.prototype.iadd=function(J,G){this._verify2(J,G);var m=J.iadd(G);return m.cmp(this.m)>=0&&m.isub(this.m),m},ae.prototype.sub=function(J,G){this._verify2(J,G);var m=J.sub(G);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},ae.prototype.isub=function(J,G){this._verify2(J,G);var m=J.isub(G);return m.cmpn(0)<0&&m.iadd(this.m),m},ae.prototype.shl=function(J,G){return this._verify1(J),this.imod(J.ushln(G))},ae.prototype.imul=function(J,G){return this._verify2(J,G),this.imod(J.imul(G))},ae.prototype.mul=function(J,G){return this._verify2(J,G),this.imod(J.mul(G))},ae.prototype.isqr=function(J){return this.imul(J,J.clone())},ae.prototype.sqr=function(J){return this.mul(J,J)},ae.prototype.sqrt=function(J){if(J.isZero())return J.clone();var G=this.m.andln(3);if(l(G%2===1),G===3){var m=this.m.add(new y(1)).iushrn(2);return this.pow(J,m)}for(var R=this.m.subn(1),X=0;!R.isZero()&&R.andln(1)===0;)X++,R.iushrn(1);l(!R.isZero());var oe=new y(1).toRed(this),de=oe.redNeg(),le=this.m.subn(1).iushrn(1),q=this.m.bitLength();for(q=new y(2*q*q).toRed(this);this.pow(q,le).cmp(de)!==0;)q.redIAdd(de);for(var Y=this.pow(q,R),O=this.pow(J,R.addn(1).iushrn(1)),me=this.pow(J,R),Je=X;me.cmp(oe)!==0;){for(var se=me,Ve=0;se.cmp(oe)!==0;Ve++)se=se.redSqr();l(Ve<Je);var c0=this.pow(Y,new y(1).iushln(Je-Ve-1));O=O.redMul(c0),Y=c0.redSqr(),me=me.redMul(Y),Je=Ve}return O},ae.prototype.invm=function(J){var G=J._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},ae.prototype.pow=function(J,G){if(G.isZero())return new y(1).toRed(this);if(G.cmpn(1)===0)return J.clone();var m=4,R=new Array(1<<m);R[0]=new y(1).toRed(this),R[1]=J;for(var X=2;X<R.length;X++)R[X]=this.mul(R[X-1],J);var oe=R[0],de=0,le=0,q=G.bitLength()%26;for(q===0&&(q=26),X=G.length-1;X>=0;X--){for(var Y=G.words[X],O=q-1;O>=0;O--){var me=Y>>O&1;if(oe!==R[0]&&(oe=this.sqr(oe)),me===0&&de===0){le=0;continue}de<<=1,de|=me,le++,!(le!==m&&(X!==0||O!==0))&&(oe=this.mul(oe,R[de]),le=0,de=0)}q=26}return oe},ae.prototype.convertTo=function(J){var G=J.umod(this.m);return G===J?G.clone():G},ae.prototype.convertFrom=function(J){var G=J.clone();return G.red=null,G},y.mont=function(J){return new y0(J)};function y0(Ne){ae.call(this,Ne),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new y(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)}b(y0,ae),y0.prototype.convertTo=function(J){return this.imod(J.ushln(this.shift))},y0.prototype.convertFrom=function(J){var G=this.imod(J.mul(this.rinv));return G.red=null,G},y0.prototype.imul=function(J,G){if(J.isZero()||G.isZero())return J.words[0]=0,J.length=1,J;var m=J.imul(G),R=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=m.isub(R).iushrn(this.shift),oe=X;return X.cmp(this.m)>=0?oe=X.isub(this.m):X.cmpn(0)<0&&(oe=X.iadd(this.m)),oe._forceRed(this)},y0.prototype.mul=function(J,G){if(J.isZero()||G.isZero())return new y(0)._forceRed(this);var m=J.mul(G),R=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=m.isub(R).iushrn(this.shift),oe=X;return X.cmp(this.m)>=0?oe=X.isub(this.m):X.cmpn(0)<0&&(oe=X.iadd(this.m)),oe._forceRed(this)},y0.prototype.invm=function(J){var G=this.imod(J._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(f,Am)})(f1)),f1.exports}var ph={},Cp;function uC(){return Cp||(Cp=1,(function(f){var o=f;function c(y,C){if(Array.isArray(y))return y.slice();if(!y)return[];var S=[];if(typeof y!="string"){for(var k=0;k<y.length;k++)S[k]=y[k]|0;return S}if(C==="hex"){y=y.replace(/[^a-z0-9]+/ig,""),y.length%2!==0&&(y="0"+y);for(var k=0;k<y.length;k+=2)S.push(parseInt(y[k]+y[k+1],16))}else for(var k=0;k<y.length;k++){var M=y.charCodeAt(k),L=M>>8,w=M&255;L?S.push(L,w):S.push(w)}return S}o.toArray=c;function l(y){return y.length===1?"0"+y:y}o.zero2=l;function b(y){for(var C="",S=0;S<y.length;S++)C+=l(y[S].toString(16));return C}o.toHex=b,o.encode=function(C,S){return S==="hex"?b(C):C}})(ph)),ph}var Ip;function Ei(){return Ip||(Ip=1,(function(f){var o=f,c=Ja(),l=E2(),b=uC();o.assert=l,o.toArray=b.toArray,o.zero2=b.zero2,o.toHex=b.toHex,o.encode=b.encode;function y(L,w,ee){var Ce=new Array(Math.max(L.bitLength(),ee)+1),ce;for(ce=0;ce<Ce.length;ce+=1)Ce[ce]=0;var V=1<<w+1,Ee=L.clone();for(ce=0;ce<Ce.length;ce++){var ge,_e=Ee.andln(V-1);Ee.isOdd()?(_e>(V>>1)-1?ge=(V>>1)-_e:ge=_e,Ee.isubn(ge)):ge=0,Ce[ce]=ge,Ee.iushrn(1)}return Ce}o.getNAF=y;function C(L,w){var ee=[[],[]];L=L.clone(),w=w.clone();for(var Ce=0,ce=0,V;L.cmpn(-Ce)>0||w.cmpn(-ce)>0;){var Ee=L.andln(3)+Ce&3,ge=w.andln(3)+ce&3;Ee===3&&(Ee=-1),ge===3&&(ge=-1);var _e;(Ee&1)===0?_e=0:(V=L.andln(7)+Ce&7,(V===3||V===5)&&ge===2?_e=-Ee:_e=Ee),ee[0].push(_e);var ne;(ge&1)===0?ne=0:(V=w.andln(7)+ce&7,(V===3||V===5)&&Ee===2?ne=-ge:ne=ge),ee[1].push(ne),2*Ce===_e+1&&(Ce=1-Ce),2*ce===ne+1&&(ce=1-ce),L.iushrn(1),w.iushrn(1)}return ee}o.getJSF=C;function S(L,w,ee){var Ce="_"+w;L.prototype[w]=function(){return this[Ce]!==void 0?this[Ce]:this[Ce]=ee.call(this)}}o.cachedProperty=S;function k(L){return typeof L=="string"?o.toArray(L,"hex"):L}o.parseBytes=k;function M(L){return new c(L,"hex","le")}o.intFromLE=M})(gh)),gh}var Wc={exports:{}},bp;function lC(){if(bp)return Wc.exports;bp=1;var f;Wc.exports=function(b){return f||(f=new o(null)),f.generate(b)};function o(l){this.rand=l}if(Wc.exports.Rand=o,o.prototype.generate=function(b){return this._rand(b)},o.prototype._rand=function(b){if(this.rand.getBytes)return this.rand.getBytes(b);for(var y=new Uint8Array(b),C=0;C<y.length;C++)y[C]=this.rand.getByte();return y},typeof self=="object")self.crypto&&self.crypto.getRandomValues?o.prototype._rand=function(b){var y=new Uint8Array(b);return self.crypto.getRandomValues(y),y}:self.msCrypto&&self.msCrypto.getRandomValues?o.prototype._rand=function(b){var y=new Uint8Array(b);return self.msCrypto.getRandomValues(y),y}:typeof window=="object"&&(o.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var c=Pa;if(typeof c.randomBytes!="function")throw new Error("Not supported");o.prototype._rand=function(b){return c.randomBytes(b)}}catch{}return Wc.exports}var yh={},Ch,vp;function cu(){if(vp)return Ch;vp=1;var f=Ja(),o=Ei(),c=o.getNAF,l=o.getJSF,b=o.assert;function y(S,k){this.type=S,this.p=new f(k.p,16),this.red=k.prime?f.red(k.prime):f.mont(this.p),this.zero=new f(0).toRed(this.red),this.one=new f(1).toRed(this.red),this.two=new f(2).toRed(this.red),this.n=k.n&&new f(k.n,16),this.g=k.g&&this.pointFromJSON(k.g,k.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 M=this.n&&this.p.div(this.n);!M||M.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}Ch=y,y.prototype.point=function(){throw new Error("Not implemented")},y.prototype.validate=function(){throw new Error("Not implemented")},y.prototype._fixedNafMul=function(k,M){b(k.precomputed);var L=k._getDoubles(),w=c(M,1,this._bitLength),ee=(1<<L.step+1)-(L.step%2===0?2:1);ee/=3;var Ce=[],ce,V;for(ce=0;ce<w.length;ce+=L.step){V=0;for(var Ee=ce+L.step-1;Ee>=ce;Ee--)V=(V<<1)+w[Ee];Ce.push(V)}for(var ge=this.jpoint(null,null,null),_e=this.jpoint(null,null,null),ne=ee;ne>0;ne--){for(ce=0;ce<Ce.length;ce++)V=Ce[ce],V===ne?_e=_e.mixedAdd(L.points[ce]):V===-ne&&(_e=_e.mixedAdd(L.points[ce].neg()));ge=ge.add(_e)}return ge.toP()},y.prototype._wnafMul=function(k,M){var L=4,w=k._getNAFPoints(L);L=w.wnd;for(var ee=w.points,Ce=c(M,L,this._bitLength),ce=this.jpoint(null,null,null),V=Ce.length-1;V>=0;V--){for(var Ee=0;V>=0&&Ce[V]===0;V--)Ee++;if(V>=0&&Ee++,ce=ce.dblp(Ee),V<0)break;var ge=Ce[V];b(ge!==0),k.type==="affine"?ge>0?ce=ce.mixedAdd(ee[ge-1>>1]):ce=ce.mixedAdd(ee[-ge-1>>1].neg()):ge>0?ce=ce.add(ee[ge-1>>1]):ce=ce.add(ee[-ge-1>>1].neg())}return k.type==="affine"?ce.toP():ce},y.prototype._wnafMulAdd=function(k,M,L,w,ee){var Ce=this._wnafT1,ce=this._wnafT2,V=this._wnafT3,Ee=0,ge,_e,ne;for(ge=0;ge<w;ge++){ne=M[ge];var r0=ne._getNAFPoints(k);Ce[ge]=r0.wnd,ce[ge]=r0.points}for(ge=w-1;ge>=1;ge-=2){var xe=ge-1,Me=ge;if(Ce[xe]!==1||Ce[Me]!==1){V[xe]=c(L[xe],Ce[xe],this._bitLength),V[Me]=c(L[Me],Ce[Me],this._bitLength),Ee=Math.max(V[xe].length,Ee),Ee=Math.max(V[Me].length,Ee);continue}var be=[M[xe],null,null,M[Me]];M[xe].y.cmp(M[Me].y)===0?(be[1]=M[xe].add(M[Me]),be[2]=M[xe].toJ().mixedAdd(M[Me].neg())):M[xe].y.cmp(M[Me].y.redNeg())===0?(be[1]=M[xe].toJ().mixedAdd(M[Me]),be[2]=M[xe].add(M[Me].neg())):(be[1]=M[xe].toJ().mixedAdd(M[Me]),be[2]=M[xe].toJ().mixedAdd(M[Me].neg()));var We=[-3,-1,-5,-7,0,7,5,1,3],ae=l(L[xe],L[Me]);for(Ee=Math.max(ae[0].length,Ee),V[xe]=new Array(Ee),V[Me]=new Array(Ee),_e=0;_e<Ee;_e++){var y0=ae[0][_e]|0,Ne=ae[1][_e]|0;V[xe][_e]=We[(y0+1)*3+(Ne+1)],V[Me][_e]=0,ce[xe]=be}}var J=this.jpoint(null,null,null),G=this._wnafT4;for(ge=Ee;ge>=0;ge--){for(var m=0;ge>=0;){var R=!0;for(_e=0;_e<w;_e++)G[_e]=V[_e][ge]|0,G[_e]!==0&&(R=!1);if(!R)break;m++,ge--}if(ge>=0&&m++,J=J.dblp(m),ge<0)break;for(_e=0;_e<w;_e++){var X=G[_e];X!==0&&(X>0?ne=ce[_e][X-1>>1]:X<0&&(ne=ce[_e][-X-1>>1].neg()),ne.type==="affine"?J=J.mixedAdd(ne):J=J.add(ne))}}for(ge=0;ge<w;ge++)ce[ge]=null;return ee?J:J.toP()};function C(S,k){this.curve=S,this.type=k,this.precomputed=null}return y.BasePoint=C,C.prototype.eq=function(){throw new Error("Not implemented")},C.prototype.validate=function(){return this.curve.validate(this)},y.prototype.decodePoint=function(k,M){k=o.toArray(k,M);var L=this.p.byteLength();if((k[0]===4||k[0]===6||k[0]===7)&&k.length-1===2*L){k[0]===6?b(k[k.length-1]%2===0):k[0]===7&&b(k[k.length-1]%2===1);var w=this.point(k.slice(1,1+L),k.slice(1+L,1+2*L));return w}else if((k[0]===2||k[0]===3)&&k.length-1===L)return this.pointFromX(k.slice(1,1+L),k[0]===3);throw new Error("Unknown point format")},C.prototype.encodeCompressed=function(k){return this.encode(k,!0)},C.prototype._encode=function(k){var M=this.curve.p.byteLength(),L=this.getX().toArray("be",M);return k?[this.getY().isEven()?2:3].concat(L):[4].concat(L,this.getY().toArray("be",M))},C.prototype.encode=function(k,M){return o.encode(this._encode(M),k)},C.prototype.precompute=function(k){if(this.precomputed)return this;var M={doubles:null,naf:null,beta:null};return M.naf=this._getNAFPoints(8),M.doubles=this._getDoubles(4,k),M.beta=this._getBeta(),this.precomputed=M,this},C.prototype._hasDoubles=function(k){if(!this.precomputed)return!1;var M=this.precomputed.doubles;return M?M.points.length>=Math.ceil((k.bitLength()+1)/M.step):!1},C.prototype._getDoubles=function(k,M){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var L=[this],w=this,ee=0;ee<M;ee+=k){for(var Ce=0;Ce<k;Ce++)w=w.dbl();L.push(w)}return{step:k,points:L}},C.prototype._getNAFPoints=function(k){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var M=[this],L=(1<<k)-1,w=L===1?null:this.dbl(),ee=1;ee<L;ee++)M[ee]=M[ee-1].add(w);return{wnd:k,points:M}},C.prototype._getBeta=function(){return null},C.prototype.dblp=function(k){for(var M=this,L=0;L<k;L++)M=M.dbl();return M},Ch}var Ih,Ep;function im(){if(Ep)return Ih;Ep=1;var f=Ei(),o=Ja(),c=au(),l=cu(),b=f.assert;function y(k){l.call(this,"short",k),this.a=new o(k.a,16).toRed(this.red),this.b=new o(k.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(k),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}c(y,l),Ih=y,y.prototype._getEndomorphism=function(M){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var L,w;if(M.beta)L=new o(M.beta,16).toRed(this.red);else{var ee=this._getEndoRoots(this.p);L=ee[0].cmp(ee[1])<0?ee[0]:ee[1],L=L.toRed(this.red)}if(M.lambda)w=new o(M.lambda,16);else{var Ce=this._getEndoRoots(this.n);this.g.mul(Ce[0]).x.cmp(this.g.x.redMul(L))===0?w=Ce[0]:(w=Ce[1],b(this.g.mul(w).x.cmp(this.g.x.redMul(L))===0))}var ce;return M.basis?ce=M.basis.map(function(V){return{a:new o(V.a,16),b:new o(V.b,16)}}):ce=this._getEndoBasis(w),{beta:L,lambda:w,basis:ce}}},y.prototype._getEndoRoots=function(M){var L=M===this.p?this.red:o.mont(M),w=new o(2).toRed(L).redInvm(),ee=w.redNeg(),Ce=new o(3).toRed(L).redNeg().redSqrt().redMul(w),ce=ee.redAdd(Ce).fromRed(),V=ee.redSub(Ce).fromRed();return[ce,V]},y.prototype._getEndoBasis=function(M){for(var L=this.n.ushrn(Math.floor(this.n.bitLength()/2)),w=M,ee=this.n.clone(),Ce=new o(1),ce=new o(0),V=new o(0),Ee=new o(1),ge,_e,ne,r0,xe,Me,be,We=0,ae,y0;w.cmpn(0)!==0;){var Ne=ee.div(w);ae=ee.sub(Ne.mul(w)),y0=V.sub(Ne.mul(Ce));var J=Ee.sub(Ne.mul(ce));if(!ne&&ae.cmp(L)<0)ge=be.neg(),_e=Ce,ne=ae.neg(),r0=y0;else if(ne&&++We===2)break;be=ae,ee=w,w=ae,V=Ce,Ce=y0,Ee=ce,ce=J}xe=ae.neg(),Me=y0;var G=ne.sqr().add(r0.sqr()),m=xe.sqr().add(Me.sqr());return m.cmp(G)>=0&&(xe=ge,Me=_e),ne.negative&&(ne=ne.neg(),r0=r0.neg()),xe.negative&&(xe=xe.neg(),Me=Me.neg()),[{a:ne,b:r0},{a:xe,b:Me}]},y.prototype._endoSplit=function(M){var L=this.endo.basis,w=L[0],ee=L[1],Ce=ee.b.mul(M).divRound(this.n),ce=w.b.neg().mul(M).divRound(this.n),V=Ce.mul(w.a),Ee=ce.mul(ee.a),ge=Ce.mul(w.b),_e=ce.mul(ee.b),ne=M.sub(V).sub(Ee),r0=ge.add(_e).neg();return{k1:ne,k2:r0}},y.prototype.pointFromX=function(M,L){M=new o(M,16),M.red||(M=M.toRed(this.red));var w=M.redSqr().redMul(M).redIAdd(M.redMul(this.a)).redIAdd(this.b),ee=w.redSqrt();if(ee.redSqr().redSub(w).cmp(this.zero)!==0)throw new Error("invalid point");var Ce=ee.fromRed().isOdd();return(L&&!Ce||!L&&Ce)&&(ee=ee.redNeg()),this.point(M,ee)},y.prototype.validate=function(M){if(M.inf)return!0;var L=M.x,w=M.y,ee=this.a.redMul(L),Ce=L.redSqr().redMul(L).redIAdd(ee).redIAdd(this.b);return w.redSqr().redISub(Ce).cmpn(0)===0},y.prototype._endoWnafMulAdd=function(M,L,w){for(var ee=this._endoWnafT1,Ce=this._endoWnafT2,ce=0;ce<M.length;ce++){var V=this._endoSplit(L[ce]),Ee=M[ce],ge=Ee._getBeta();V.k1.negative&&(V.k1.ineg(),Ee=Ee.neg(!0)),V.k2.negative&&(V.k2.ineg(),ge=ge.neg(!0)),ee[ce*2]=Ee,ee[ce*2+1]=ge,Ce[ce*2]=V.k1,Ce[ce*2+1]=V.k2}for(var _e=this._wnafMulAdd(1,ee,Ce,ce*2,w),ne=0;ne<ce*2;ne++)ee[ne]=null,Ce[ne]=null;return _e};function C(k,M,L,w){l.BasePoint.call(this,k,"affine"),M===null&&L===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(M,16),this.y=new o(L,16),w&&(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)}c(C,l.BasePoint),y.prototype.point=function(M,L,w){return new C(this,M,L,w)},y.prototype.pointFromJSON=function(M,L){return C.fromJSON(this,M,L)},C.prototype._getBeta=function(){if(this.curve.endo){var M=this.precomputed;if(M&&M.beta)return M.beta;var L=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(M){var w=this.curve,ee=function(Ce){return w.point(Ce.x.redMul(w.endo.beta),Ce.y)};M.beta=L,L.precomputed={beta:null,naf:M.naf&&{wnd:M.naf.wnd,points:M.naf.points.map(ee)},doubles:M.doubles&&{step:M.doubles.step,points:M.doubles.points.map(ee)}}}return L}},C.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]},C.fromJSON=function(M,L,w){typeof L=="string"&&(L=JSON.parse(L));var ee=M.point(L[0],L[1],w);if(!L[2])return ee;function Ce(V){return M.point(V[0],V[1],w)}var ce=L[2];return ee.precomputed={beta:null,doubles:ce.doubles&&{step:ce.doubles.step,points:[ee].concat(ce.doubles.points.map(Ce))},naf:ce.naf&&{wnd:ce.naf.wnd,points:[ee].concat(ce.naf.points.map(Ce))}},ee},C.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)+">"},C.prototype.isInfinity=function(){return this.inf},C.prototype.add=function(M){if(this.inf)return M;if(M.inf)return this;if(this.eq(M))return this.dbl();if(this.neg().eq(M))return this.curve.point(null,null);if(this.x.cmp(M.x)===0)return this.curve.point(null,null);var L=this.y.redSub(M.y);L.cmpn(0)!==0&&(L=L.redMul(this.x.redSub(M.x).redInvm()));var w=L.redSqr().redISub(this.x).redISub(M.x),ee=L.redMul(this.x.redSub(w)).redISub(this.y);return this.curve.point(w,ee)},C.prototype.dbl=function(){if(this.inf)return this;var M=this.y.redAdd(this.y);if(M.cmpn(0)===0)return this.curve.point(null,null);var L=this.curve.a,w=this.x.redSqr(),ee=M.redInvm(),Ce=w.redAdd(w).redIAdd(w).redIAdd(L).redMul(ee),ce=Ce.redSqr().redISub(this.x.redAdd(this.x)),V=Ce.redMul(this.x.redSub(ce)).redISub(this.y);return this.curve.point(ce,V)},C.prototype.getX=function(){return this.x.fromRed()},C.prototype.getY=function(){return this.y.fromRed()},C.prototype.mul=function(M){return M=new o(M,16),this.isInfinity()?this:this._hasDoubles(M)?this.curve._fixedNafMul(this,M):this.curve.endo?this.curve._endoWnafMulAdd([this],[M]):this.curve._wnafMul(this,M)},C.prototype.mulAdd=function(M,L,w){var ee=[this,L],Ce=[M,w];return this.curve.endo?this.curve._endoWnafMulAdd(ee,Ce):this.curve._wnafMulAdd(1,ee,Ce,2)},C.prototype.jmulAdd=function(M,L,w){var ee=[this,L],Ce=[M,w];return this.curve.endo?this.curve._endoWnafMulAdd(ee,Ce,!0):this.curve._wnafMulAdd(1,ee,Ce,2,!0)},C.prototype.eq=function(M){return this===M||this.inf===M.inf&&(this.inf||this.x.cmp(M.x)===0&&this.y.cmp(M.y)===0)},C.prototype.neg=function(M){if(this.inf)return this;var L=this.curve.point(this.x,this.y.redNeg());if(M&&this.precomputed){var w=this.precomputed,ee=function(Ce){return Ce.neg()};L.precomputed={naf:w.naf&&{wnd:w.naf.wnd,points:w.naf.points.map(ee)},doubles:w.doubles&&{step:w.doubles.step,points:w.doubles.points.map(ee)}}}return L},C.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var M=this.curve.jpoint(this.x,this.y,this.curve.one);return M};function S(k,M,L,w){l.BasePoint.call(this,k,"jacobian"),M===null&&L===null&&w===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(M,16),this.y=new o(L,16),this.z=new o(w,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}return c(S,l.BasePoint),y.prototype.jpoint=function(M,L,w){return new S(this,M,L,w)},S.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var M=this.z.redInvm(),L=M.redSqr(),w=this.x.redMul(L),ee=this.y.redMul(L).redMul(M);return this.curve.point(w,ee)},S.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},S.prototype.add=function(M){if(this.isInfinity())return M;if(M.isInfinity())return this;var L=M.z.redSqr(),w=this.z.redSqr(),ee=this.x.redMul(L),Ce=M.x.redMul(w),ce=this.y.redMul(L.redMul(M.z)),V=M.y.redMul(w.redMul(this.z)),Ee=ee.redSub(Ce),ge=ce.redSub(V);if(Ee.cmpn(0)===0)return ge.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var _e=Ee.redSqr(),ne=_e.redMul(Ee),r0=ee.redMul(_e),xe=ge.redSqr().redIAdd(ne).redISub(r0).redISub(r0),Me=ge.redMul(r0.redISub(xe)).redISub(ce.redMul(ne)),be=this.z.redMul(M.z).redMul(Ee);return this.curve.jpoint(xe,Me,be)},S.prototype.mixedAdd=function(M){if(this.isInfinity())return M.toJ();if(M.isInfinity())return this;var L=this.z.redSqr(),w=this.x,ee=M.x.redMul(L),Ce=this.y,ce=M.y.redMul(L).redMul(this.z),V=w.redSub(ee),Ee=Ce.redSub(ce);if(V.cmpn(0)===0)return Ee.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var ge=V.redSqr(),_e=ge.redMul(V),ne=w.redMul(ge),r0=Ee.redSqr().redIAdd(_e).redISub(ne).redISub(ne),xe=Ee.redMul(ne.redISub(r0)).redISub(Ce.redMul(_e)),Me=this.z.redMul(V);return this.curve.jpoint(r0,xe,Me)},S.prototype.dblp=function(M){if(M===0)return this;if(this.isInfinity())return this;if(!M)return this.dbl();var L;if(this.curve.zeroA||this.curve.threeA){var w=this;for(L=0;L<M;L++)w=w.dbl();return w}var ee=this.curve.a,Ce=this.curve.tinv,ce=this.x,V=this.y,Ee=this.z,ge=Ee.redSqr().redSqr(),_e=V.redAdd(V);for(L=0;L<M;L++){var ne=ce.redSqr(),r0=_e.redSqr(),xe=r0.redSqr(),Me=ne.redAdd(ne).redIAdd(ne).redIAdd(ee.redMul(ge)),be=ce.redMul(r0),We=Me.redSqr().redISub(be.redAdd(be)),ae=be.redISub(We),y0=Me.redMul(ae);y0=y0.redIAdd(y0).redISub(xe);var Ne=_e.redMul(Ee);L+1<M&&(ge=ge.redMul(xe)),ce=We,Ee=Ne,_e=y0}return this.curve.jpoint(ce,_e.redMul(Ce),Ee)},S.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},S.prototype._zeroDbl=function(){var M,L,w;if(this.zOne){var ee=this.x.redSqr(),Ce=this.y.redSqr(),ce=Ce.redSqr(),V=this.x.redAdd(Ce).redSqr().redISub(ee).redISub(ce);V=V.redIAdd(V);var Ee=ee.redAdd(ee).redIAdd(ee),ge=Ee.redSqr().redISub(V).redISub(V),_e=ce.redIAdd(ce);_e=_e.redIAdd(_e),_e=_e.redIAdd(_e),M=ge,L=Ee.redMul(V.redISub(ge)).redISub(_e),w=this.y.redAdd(this.y)}else{var ne=this.x.redSqr(),r0=this.y.redSqr(),xe=r0.redSqr(),Me=this.x.redAdd(r0).redSqr().redISub(ne).redISub(xe);Me=Me.redIAdd(Me);var be=ne.redAdd(ne).redIAdd(ne),We=be.redSqr(),ae=xe.redIAdd(xe);ae=ae.redIAdd(ae),ae=ae.redIAdd(ae),M=We.redISub(Me).redISub(Me),L=be.redMul(Me.redISub(M)).redISub(ae),w=this.y.redMul(this.z),w=w.redIAdd(w)}return this.curve.jpoint(M,L,w)},S.prototype._threeDbl=function(){var M,L,w;if(this.zOne){var ee=this.x.redSqr(),Ce=this.y.redSqr(),ce=Ce.redSqr(),V=this.x.redAdd(Ce).redSqr().redISub(ee).redISub(ce);V=V.redIAdd(V);var Ee=ee.redAdd(ee).redIAdd(ee).redIAdd(this.curve.a),ge=Ee.redSqr().redISub(V).redISub(V);M=ge;var _e=ce.redIAdd(ce);_e=_e.redIAdd(_e),_e=_e.redIAdd(_e),L=Ee.redMul(V.redISub(ge)).redISub(_e),w=this.y.redAdd(this.y)}else{var ne=this.z.redSqr(),r0=this.y.redSqr(),xe=this.x.redMul(r0),Me=this.x.redSub(ne).redMul(this.x.redAdd(ne));Me=Me.redAdd(Me).redIAdd(Me);var be=xe.redIAdd(xe);be=be.redIAdd(be);var We=be.redAdd(be);M=Me.redSqr().redISub(We),w=this.y.redAdd(this.z).redSqr().redISub(r0).redISub(ne);var ae=r0.redSqr();ae=ae.redIAdd(ae),ae=ae.redIAdd(ae),ae=ae.redIAdd(ae),L=Me.redMul(be.redISub(M)).redISub(ae)}return this.curve.jpoint(M,L,w)},S.prototype._dbl=function(){var M=this.curve.a,L=this.x,w=this.y,ee=this.z,Ce=ee.redSqr().redSqr(),ce=L.redSqr(),V=w.redSqr(),Ee=ce.redAdd(ce).redIAdd(ce).redIAdd(M.redMul(Ce)),ge=L.redAdd(L);ge=ge.redIAdd(ge);var _e=ge.redMul(V),ne=Ee.redSqr().redISub(_e.redAdd(_e)),r0=_e.redISub(ne),xe=V.redSqr();xe=xe.redIAdd(xe),xe=xe.redIAdd(xe),xe=xe.redIAdd(xe);var Me=Ee.redMul(r0).redISub(xe),be=w.redAdd(w).redMul(ee);return this.curve.jpoint(ne,Me,be)},S.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var M=this.x.redSqr(),L=this.y.redSqr(),w=this.z.redSqr(),ee=L.redSqr(),Ce=M.redAdd(M).redIAdd(M),ce=Ce.redSqr(),V=this.x.redAdd(L).redSqr().redISub(M).redISub(ee);V=V.redIAdd(V),V=V.redAdd(V).redIAdd(V),V=V.redISub(ce);var Ee=V.redSqr(),ge=ee.redIAdd(ee);ge=ge.redIAdd(ge),ge=ge.redIAdd(ge),ge=ge.redIAdd(ge);var _e=Ce.redIAdd(V).redSqr().redISub(ce).redISub(Ee).redISub(ge),ne=L.redMul(_e);ne=ne.redIAdd(ne),ne=ne.redIAdd(ne);var r0=this.x.redMul(Ee).redISub(ne);r0=r0.redIAdd(r0),r0=r0.redIAdd(r0);var xe=this.y.redMul(_e.redMul(ge.redISub(_e)).redISub(V.redMul(Ee)));xe=xe.redIAdd(xe),xe=xe.redIAdd(xe),xe=xe.redIAdd(xe);var Me=this.z.redAdd(V).redSqr().redISub(w).redISub(Ee);return this.curve.jpoint(r0,xe,Me)},S.prototype.mul=function(M,L){return M=new o(M,L),this.curve._wnafMul(this,M)},S.prototype.eq=function(M){if(M.type==="affine")return this.eq(M.toJ());if(this===M)return!0;var L=this.z.redSqr(),w=M.z.redSqr();if(this.x.redMul(w).redISub(M.x.redMul(L)).cmpn(0)!==0)return!1;var ee=L.redMul(this.z),Ce=w.redMul(M.z);return this.y.redMul(Ce).redISub(M.y.redMul(ee)).cmpn(0)===0},S.prototype.eqXToP=function(M){var L=this.z.redSqr(),w=M.toRed(this.curve.red).redMul(L);if(this.x.cmp(w)===0)return!0;for(var ee=M.clone(),Ce=this.curve.redN.redMul(L);;){if(ee.iadd(this.curve.n),ee.cmp(this.curve.p)>=0)return!1;if(w.redIAdd(Ce),this.x.cmp(w)===0)return!0}},S.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)+">"},S.prototype.isInfinity=function(){return this.z.cmpn(0)===0},Ih}var bh,xp;function am(){if(xp)return bh;xp=1;var f=Ja(),o=au(),c=cu(),l=Ei();function b(C){c.call(this,"mont",C),this.a=new f(C.a,16).toRed(this.red),this.b=new f(C.b,16).toRed(this.red),this.i4=new f(4).toRed(this.red).redInvm(),this.two=new f(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}o(b,c),bh=b,b.prototype.validate=function(S){var k=S.normalize().x,M=k.redSqr(),L=M.redMul(k).redAdd(M.redMul(this.a)).redAdd(k),w=L.redSqrt();return w.redSqr().cmp(L)===0};function y(C,S,k){c.BasePoint.call(this,C,"projective"),S===null&&k===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new f(S,16),this.z=new f(k,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return o(y,c.BasePoint),b.prototype.decodePoint=function(S,k){return this.point(l.toArray(S,k),1)},b.prototype.point=function(S,k){return new y(this,S,k)},b.prototype.pointFromJSON=function(S){return y.fromJSON(this,S)},y.prototype.precompute=function(){},y.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},y.fromJSON=function(S,k){return new y(S,k[0],k[1]||S.one)},y.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)+">"},y.prototype.isInfinity=function(){return this.z.cmpn(0)===0},y.prototype.dbl=function(){var S=this.x.redAdd(this.z),k=S.redSqr(),M=this.x.redSub(this.z),L=M.redSqr(),w=k.redSub(L),ee=k.redMul(L),Ce=w.redMul(L.redAdd(this.curve.a24.redMul(w)));return this.curve.point(ee,Ce)},y.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},y.prototype.diffAdd=function(S,k){var M=this.x.redAdd(this.z),L=this.x.redSub(this.z),w=S.x.redAdd(S.z),ee=S.x.redSub(S.z),Ce=ee.redMul(M),ce=w.redMul(L),V=k.z.redMul(Ce.redAdd(ce).redSqr()),Ee=k.x.redMul(Ce.redISub(ce).redSqr());return this.curve.point(V,Ee)},y.prototype.mul=function(S){for(var k=S.clone(),M=this,L=this.curve.point(null,null),w=this,ee=[];k.cmpn(0)!==0;k.iushrn(1))ee.push(k.andln(1));for(var Ce=ee.length-1;Ce>=0;Ce--)ee[Ce]===0?(M=M.diffAdd(L,w),L=L.dbl()):(L=M.diffAdd(L,w),M=M.dbl());return L},y.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},y.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},y.prototype.eq=function(S){return this.getX().cmp(S.getX())===0},y.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},y.prototype.getX=function(){return this.normalize(),this.x.fromRed()},bh}var vh,_p;function om(){if(_p)return vh;_p=1;var f=Ei(),o=Ja(),c=au(),l=cu(),b=f.assert;function y(S){this.twisted=(S.a|0)!==1,this.mOneA=this.twisted&&(S.a|0)===-1,this.extended=this.mOneA,l.call(this,"edwards",S),this.a=new o(S.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(S.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(S.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),b(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(S.c|0)===1}c(y,l),vh=y,y.prototype._mulA=function(k){return this.mOneA?k.redNeg():this.a.redMul(k)},y.prototype._mulC=function(k){return this.oneC?k:this.c.redMul(k)},y.prototype.jpoint=function(k,M,L,w){return this.point(k,M,L,w)},y.prototype.pointFromX=function(k,M){k=new o(k,16),k.red||(k=k.toRed(this.red));var L=k.redSqr(),w=this.c2.redSub(this.a.redMul(L)),ee=this.one.redSub(this.c2.redMul(this.d).redMul(L)),Ce=w.redMul(ee.redInvm()),ce=Ce.redSqrt();if(ce.redSqr().redSub(Ce).cmp(this.zero)!==0)throw new Error("invalid point");var V=ce.fromRed().isOdd();return(M&&!V||!M&&V)&&(ce=ce.redNeg()),this.point(k,ce)},y.prototype.pointFromY=function(k,M){k=new o(k,16),k.red||(k=k.toRed(this.red));var L=k.redSqr(),w=L.redSub(this.c2),ee=L.redMul(this.d).redMul(this.c2).redSub(this.a),Ce=w.redMul(ee.redInvm());if(Ce.cmp(this.zero)===0){if(M)throw new Error("invalid point");return this.point(this.zero,k)}var ce=Ce.redSqrt();if(ce.redSqr().redSub(Ce).cmp(this.zero)!==0)throw new Error("invalid point");return ce.fromRed().isOdd()!==M&&(ce=ce.redNeg()),this.point(ce,k)},y.prototype.validate=function(k){if(k.isInfinity())return!0;k.normalize();var M=k.x.redSqr(),L=k.y.redSqr(),w=M.redMul(this.a).redAdd(L),ee=this.c2.redMul(this.one.redAdd(this.d.redMul(M).redMul(L)));return w.cmp(ee)===0};function C(S,k,M,L,w){l.BasePoint.call(this,S,"projective"),k===null&&M===null&&L===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 o(k,16),this.y=new o(M,16),this.z=L?new o(L,16):this.curve.one,this.t=w&&new o(w,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()))))}return c(C,l.BasePoint),y.prototype.pointFromJSON=function(k){return C.fromJSON(this,k)},y.prototype.point=function(k,M,L,w){return new C(this,k,M,L,w)},C.fromJSON=function(k,M){return new C(k,M[0],M[1],M[2])},C.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)+">"},C.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},C.prototype._extDbl=function(){var k=this.x.redSqr(),M=this.y.redSqr(),L=this.z.redSqr();L=L.redIAdd(L);var w=this.curve._mulA(k),ee=this.x.redAdd(this.y).redSqr().redISub(k).redISub(M),Ce=w.redAdd(M),ce=Ce.redSub(L),V=w.redSub(M),Ee=ee.redMul(ce),ge=Ce.redMul(V),_e=ee.redMul(V),ne=ce.redMul(Ce);return this.curve.point(Ee,ge,ne,_e)},C.prototype._projDbl=function(){var k=this.x.redAdd(this.y).redSqr(),M=this.x.redSqr(),L=this.y.redSqr(),w,ee,Ce,ce,V,Ee;if(this.curve.twisted){ce=this.curve._mulA(M);var ge=ce.redAdd(L);this.zOne?(w=k.redSub(M).redSub(L).redMul(ge.redSub(this.curve.two)),ee=ge.redMul(ce.redSub(L)),Ce=ge.redSqr().redSub(ge).redSub(ge)):(V=this.z.redSqr(),Ee=ge.redSub(V).redISub(V),w=k.redSub(M).redISub(L).redMul(Ee),ee=ge.redMul(ce.redSub(L)),Ce=ge.redMul(Ee))}else ce=M.redAdd(L),V=this.curve._mulC(this.z).redSqr(),Ee=ce.redSub(V).redSub(V),w=this.curve._mulC(k.redISub(ce)).redMul(Ee),ee=this.curve._mulC(ce).redMul(M.redISub(L)),Ce=ce.redMul(Ee);return this.curve.point(w,ee,Ce)},C.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},C.prototype._extAdd=function(k){var M=this.y.redSub(this.x).redMul(k.y.redSub(k.x)),L=this.y.redAdd(this.x).redMul(k.y.redAdd(k.x)),w=this.t.redMul(this.curve.dd).redMul(k.t),ee=this.z.redMul(k.z.redAdd(k.z)),Ce=L.redSub(M),ce=ee.redSub(w),V=ee.redAdd(w),Ee=L.redAdd(M),ge=Ce.redMul(ce),_e=V.redMul(Ee),ne=Ce.redMul(Ee),r0=ce.redMul(V);return this.curve.point(ge,_e,r0,ne)},C.prototype._projAdd=function(k){var M=this.z.redMul(k.z),L=M.redSqr(),w=this.x.redMul(k.x),ee=this.y.redMul(k.y),Ce=this.curve.d.redMul(w).redMul(ee),ce=L.redSub(Ce),V=L.redAdd(Ce),Ee=this.x.redAdd(this.y).redMul(k.x.redAdd(k.y)).redISub(w).redISub(ee),ge=M.redMul(ce).redMul(Ee),_e,ne;return this.curve.twisted?(_e=M.redMul(V).redMul(ee.redSub(this.curve._mulA(w))),ne=ce.redMul(V)):(_e=M.redMul(V).redMul(ee.redSub(w)),ne=this.curve._mulC(ce).redMul(V)),this.curve.point(ge,_e,ne)},C.prototype.add=function(k){return this.isInfinity()?k:k.isInfinity()?this:this.curve.extended?this._extAdd(k):this._projAdd(k)},C.prototype.mul=function(k){return this._hasDoubles(k)?this.curve._fixedNafMul(this,k):this.curve._wnafMul(this,k)},C.prototype.mulAdd=function(k,M,L){return this.curve._wnafMulAdd(1,[this,M],[k,L],2,!1)},C.prototype.jmulAdd=function(k,M,L){return this.curve._wnafMulAdd(1,[this,M],[k,L],2,!0)},C.prototype.normalize=function(){if(this.zOne)return this;var k=this.z.redInvm();return this.x=this.x.redMul(k),this.y=this.y.redMul(k),this.t&&(this.t=this.t.redMul(k)),this.z=this.curve.one,this.zOne=!0,this},C.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},C.prototype.getX=function(){return this.normalize(),this.x.fromRed()},C.prototype.getY=function(){return this.normalize(),this.y.fromRed()},C.prototype.eq=function(k){return this===k||this.getX().cmp(k.getX())===0&&this.getY().cmp(k.getY())===0},C.prototype.eqXToP=function(k){var M=k.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(M)===0)return!0;for(var L=k.clone(),w=this.curve.redN.redMul(this.z);;){if(L.iadd(this.curve.n),L.cmp(this.curve.p)>=0)return!1;if(M.redIAdd(w),this.x.cmp(M)===0)return!0}},C.prototype.toP=C.prototype.normalize,C.prototype.mixedAdd=C.prototype.add,vh}var wp;function hC(){return wp||(wp=1,(function(f){var o=f;o.base=cu(),o.short=im(),o.mont=am(),o.edwards=om()})(yh)),yh}var Eh={},xh,Bp;function sm(){return Bp||(Bp=1,xh={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"]]}}),xh}var mp;function Eg(){return mp||(mp=1,(function(f){var o=f,c=ou(),l=hC(),b=Ei(),y=b.assert;function C(M){M.type==="short"?this.curve=new l.short(M):M.type==="edwards"?this.curve=new l.edwards(M):this.curve=new l.mont(M),this.g=this.curve.g,this.n=this.curve.n,this.hash=M.hash,y(this.g.validate(),"Invalid curve"),y(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}o.PresetCurve=C;function S(M,L){Object.defineProperty(o,M,{configurable:!0,enumerable:!0,get:function(){var w=new C(L);return Object.defineProperty(o,M,{configurable:!0,enumerable:!0,value:w}),w}})}S("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:c.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),S("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:c.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),S("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:c.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),S("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:c.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"]}),S("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:c.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"]}),S("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:c.sha256,gRed:!1,g:["9"]}),S("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:c.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var k;try{k=sm()}catch{k=void 0}S("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:c.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",k]})})(Eh)),Eh}var _h,Qp;function fm(){if(Qp)return _h;Qp=1;var f=ou(),o=uC(),c=E2();function l(b){if(!(this instanceof l))return new l(b);this.hash=b.hash,this.predResist=!!b.predResist,this.outLen=this.hash.outSize,this.minEntropy=b.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var y=o.toArray(b.entropy,b.entropyEnc||"hex"),C=o.toArray(b.nonce,b.nonceEnc||"hex"),S=o.toArray(b.pers,b.persEnc||"hex");c(y.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(y,C,S)}return _h=l,l.prototype._init=function(y,C,S){var k=y.concat(C).concat(S);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var M=0;M<this.V.length;M++)this.K[M]=0,this.V[M]=1;this._update(k),this._reseed=1,this.reseedInterval=281474976710656},l.prototype._hmac=function(){return new f.hmac(this.hash,this.K)},l.prototype._update=function(y){var C=this._hmac().update(this.V).update([0]);y&&(C=C.update(y)),this.K=C.digest(),this.V=this._hmac().update(this.V).digest(),y&&(this.K=this._hmac().update(this.V).update([1]).update(y).digest(),this.V=this._hmac().update(this.V).digest())},l.prototype.reseed=function(y,C,S,k){typeof C!="string"&&(k=S,S=C,C=null),y=o.toArray(y,C),S=o.toArray(S,k),c(y.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(y.concat(S||[])),this._reseed=1},l.prototype.generate=function(y,C,S,k){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof C!="string"&&(k=S,S=C,C=null),S&&(S=o.toArray(S,k||"hex"),this._update(S));for(var M=[];M.length<y;)this.V=this._hmac().update(this.V).digest(),M=M.concat(this.V);var L=M.slice(0,y);return this._update(S),this._reseed++,o.encode(L,C)},_h}var wh,Sp;function cm(){if(Sp)return wh;Sp=1;var f=Ja(),o=Ei(),c=o.assert;function l(b,y){this.ec=b,this.priv=null,this.pub=null,y.priv&&this._importPrivate(y.priv,y.privEnc),y.pub&&this._importPublic(y.pub,y.pubEnc)}return wh=l,l.fromPublic=function(y,C,S){return C instanceof l?C:new l(y,{pub:C,pubEnc:S})},l.fromPrivate=function(y,C,S){return C instanceof l?C:new l(y,{priv:C,privEnc:S})},l.prototype.validate=function(){var y=this.getPublic();return y.isInfinity()?{result:!1,reason:"Invalid public key"}:y.validate()?y.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"}},l.prototype.getPublic=function(y,C){return typeof y=="string"&&(C=y,y=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),C?this.pub.encode(C,y):this.pub},l.prototype.getPrivate=function(y){return y==="hex"?this.priv.toString(16,2):this.priv},l.prototype._importPrivate=function(y,C){this.priv=new f(y,C||16),this.priv=this.priv.umod(this.ec.curve.n)},l.prototype._importPublic=function(y,C){if(y.x||y.y){this.ec.curve.type==="mont"?c(y.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&c(y.x&&y.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(y.x,y.y);return}this.pub=this.ec.curve.decodePoint(y,C)},l.prototype.derive=function(y){return y.validate()||c(y.validate(),"public point not validated"),y.mul(this.priv).getX()},l.prototype.sign=function(y,C,S){return this.ec.sign(y,this,C,S)},l.prototype.verify=function(y,C,S){return this.ec.verify(y,C,this,void 0,S)},l.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},wh}var Bh,Dp;function um(){if(Dp)return Bh;Dp=1;var f=Ja(),o=Ei(),c=o.assert;function l(k,M){if(k instanceof l)return k;this._importDER(k,M)||(c(k.r&&k.s,"Signature without r or s"),this.r=new f(k.r,16),this.s=new f(k.s,16),k.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=k.recoveryParam)}Bh=l;function b(){this.place=0}function y(k,M){var L=k[M.place++];if(!(L&128))return L;var w=L&15;if(w===0||w>4||k[M.place]===0)return!1;for(var ee=0,Ce=0,ce=M.place;Ce<w;Ce++,ce++)ee<<=8,ee|=k[ce],ee>>>=0;return ee<=127?!1:(M.place=ce,ee)}function C(k){for(var M=0,L=k.length-1;!k[M]&&!(k[M+1]&128)&&M<L;)M++;return M===0?k:k.slice(M)}l.prototype._importDER=function(M,L){M=o.toArray(M,L);var w=new b;if(M[w.place++]!==48)return!1;var ee=y(M,w);if(ee===!1||ee+w.place!==M.length||M[w.place++]!==2)return!1;var Ce=y(M,w);if(Ce===!1||(M[w.place]&128)!==0)return!1;var ce=M.slice(w.place,Ce+w.place);if(w.place+=Ce,M[w.place++]!==2)return!1;var V=y(M,w);if(V===!1||M.length!==V+w.place||(M[w.place]&128)!==0)return!1;var Ee=M.slice(w.place,V+w.place);if(ce[0]===0)if(ce[1]&128)ce=ce.slice(1);else return!1;if(Ee[0]===0)if(Ee[1]&128)Ee=Ee.slice(1);else return!1;return this.r=new f(ce),this.s=new f(Ee),this.recoveryParam=null,!0};function S(k,M){if(M<128){k.push(M);return}var L=1+(Math.log(M)/Math.LN2>>>3);for(k.push(L|128);--L;)k.push(M>>>(L<<3)&255);k.push(M)}return l.prototype.toDER=function(M){var L=this.r.toArray(),w=this.s.toArray();for(L[0]&128&&(L=[0].concat(L)),w[0]&128&&(w=[0].concat(w)),L=C(L),w=C(w);!w[0]&&!(w[1]&128);)w=w.slice(1);var ee=[2];S(ee,L.length),ee=ee.concat(L),ee.push(2),S(ee,w.length);var Ce=ee.concat(w),ce=[48];return S(ce,Ce.length),ce=ce.concat(Ce),o.encode(ce,M)},Bh}var mh,kp;function lm(){if(kp)return mh;kp=1;var f=Ja(),o=fm(),c=Ei(),l=Eg(),b=lC(),y=c.assert,C=cm(),S=um();function k(M){if(!(this instanceof k))return new k(M);typeof M=="string"&&(y(Object.prototype.hasOwnProperty.call(l,M),"Unknown curve "+M),M=l[M]),M instanceof l.PresetCurve&&(M={curve:M}),this.curve=M.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=M.curve.g,this.g.precompute(M.curve.n.bitLength()+1),this.hash=M.hash||M.curve.hash}return mh=k,k.prototype.keyPair=function(L){return new C(this,L)},k.prototype.keyFromPrivate=function(L,w){return C.fromPrivate(this,L,w)},k.prototype.keyFromPublic=function(L,w){return C.fromPublic(this,L,w)},k.prototype.genKeyPair=function(L){L||(L={});for(var w=new o({hash:this.hash,pers:L.pers,persEnc:L.persEnc||"utf8",entropy:L.entropy||b(this.hash.hmacStrength),entropyEnc:L.entropy&&L.entropyEnc||"utf8",nonce:this.n.toArray()}),ee=this.n.byteLength(),Ce=this.n.sub(new f(2));;){var ce=new f(w.generate(ee));if(!(ce.cmp(Ce)>0))return ce.iaddn(1),this.keyFromPrivate(ce)}},k.prototype._truncateToN=function(L,w,ee){var Ce;if(f.isBN(L)||typeof L=="number")L=new f(L,16),Ce=L.byteLength();else if(typeof L=="object")Ce=L.length,L=new f(L,16);else{var ce=L.toString();Ce=ce.length+1>>>1,L=new f(ce,16)}typeof ee!="number"&&(ee=Ce*8);var V=ee-this.n.bitLength();return V>0&&(L=L.ushrn(V)),!w&&L.cmp(this.n)>=0?L.sub(this.n):L},k.prototype.sign=function(L,w,ee,Ce){if(typeof ee=="object"&&(Ce=ee,ee=null),Ce||(Ce={}),typeof L!="string"&&typeof L!="number"&&!f.isBN(L)){y(typeof L=="object"&&L&&typeof L.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),y(L.length>>>0===L.length);for(var ce=0;ce<L.length;ce++)y((L[ce]&255)===L[ce])}w=this.keyFromPrivate(w,ee),L=this._truncateToN(L,!1,Ce.msgBitLength),y(!L.isNeg(),"Can not sign a negative message");var V=this.n.byteLength(),Ee=w.getPrivate().toArray("be",V),ge=L.toArray("be",V);y(new f(ge).eq(L),"Can not sign message");for(var _e=new o({hash:this.hash,entropy:Ee,nonce:ge,pers:Ce.pers,persEnc:Ce.persEnc||"utf8"}),ne=this.n.sub(new f(1)),r0=0;;r0++){var xe=Ce.k?Ce.k(r0):new f(_e.generate(this.n.byteLength()));if(xe=this._truncateToN(xe,!0),!(xe.cmpn(1)<=0||xe.cmp(ne)>=0)){var Me=this.g.mul(xe);if(!Me.isInfinity()){var be=Me.getX(),We=be.umod(this.n);if(We.cmpn(0)!==0){var ae=xe.invm(this.n).mul(We.mul(w.getPrivate()).iadd(L));if(ae=ae.umod(this.n),ae.cmpn(0)!==0){var y0=(Me.getY().isOdd()?1:0)|(be.cmp(We)!==0?2:0);return Ce.canonical&&ae.cmp(this.nh)>0&&(ae=this.n.sub(ae),y0^=1),new S({r:We,s:ae,recoveryParam:y0})}}}}}},k.prototype.verify=function(L,w,ee,Ce,ce){ce||(ce={}),L=this._truncateToN(L,!1,ce.msgBitLength),ee=this.keyFromPublic(ee,Ce),w=new S(w,"hex");var V=w.r,Ee=w.s;if(V.cmpn(1)<0||V.cmp(this.n)>=0||Ee.cmpn(1)<0||Ee.cmp(this.n)>=0)return!1;var ge=Ee.invm(this.n),_e=ge.mul(L).umod(this.n),ne=ge.mul(V).umod(this.n),r0;return this.curve._maxwellTrick?(r0=this.g.jmulAdd(_e,ee.getPublic(),ne),r0.isInfinity()?!1:r0.eqXToP(V)):(r0=this.g.mulAdd(_e,ee.getPublic(),ne),r0.isInfinity()?!1:r0.getX().umod(this.n).cmp(V)===0)},k.prototype.recoverPubKey=function(M,L,w,ee){y((3&w)===w,"The recovery param is more than two bits"),L=new S(L,ee);var Ce=this.n,ce=new f(M),V=L.r,Ee=L.s,ge=w&1,_e=w>>1;if(V.cmp(this.curve.p.umod(this.curve.n))>=0&&_e)throw new Error("Unable to find sencond key candinate");_e?V=this.curve.pointFromX(V.add(this.curve.n),ge):V=this.curve.pointFromX(V,ge);var ne=L.r.invm(Ce),r0=Ce.sub(ce).mul(ne).umod(Ce),xe=Ee.mul(ne).umod(Ce);return this.g.mulAdd(r0,V,xe)},k.prototype.getKeyRecoveryParam=function(M,L,w,ee){if(L=new S(L,ee),L.recoveryParam!==null)return L.recoveryParam;for(var Ce=0;Ce<4;Ce++){var ce;try{ce=this.recoverPubKey(M,L,Ce)}catch{continue}if(ce.eq(w))return Ce}throw new Error("Unable to find valid recovery factor")},mh}var Qh,Mp;function hm(){if(Mp)return Qh;Mp=1;var f=Ei(),o=f.assert,c=f.parseBytes,l=f.cachedProperty;function b(y,C){this.eddsa=y,this._secret=c(C.secret),y.isPoint(C.pub)?this._pub=C.pub:this._pubBytes=c(C.pub)}return b.fromPublic=function(C,S){return S instanceof b?S:new b(C,{pub:S})},b.fromSecret=function(C,S){return S instanceof b?S:new b(C,{secret:S})},b.prototype.secret=function(){return this._secret},l(b,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),l(b,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),l(b,"privBytes",function(){var C=this.eddsa,S=this.hash(),k=C.encodingLength-1,M=S.slice(0,C.encodingLength);return M[0]&=248,M[k]&=127,M[k]|=64,M}),l(b,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),l(b,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),l(b,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),b.prototype.sign=function(C){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(C,this)},b.prototype.verify=function(C,S){return this.eddsa.verify(C,S,this)},b.prototype.getSecret=function(C){return o(this._secret,"KeyPair is public only"),f.encode(this.secret(),C)},b.prototype.getPublic=function(C){return f.encode(this.pubBytes(),C)},Qh=b,Qh}var Sh,Np;function dm(){if(Np)return Sh;Np=1;var f=Ja(),o=Ei(),c=o.assert,l=o.cachedProperty,b=o.parseBytes;function y(C,S){this.eddsa=C,typeof S!="object"&&(S=b(S)),Array.isArray(S)&&(c(S.length===C.encodingLength*2,"Signature has invalid size"),S={R:S.slice(0,C.encodingLength),S:S.slice(C.encodingLength)}),c(S.R&&S.S,"Signature without R or S"),C.isPoint(S.R)&&(this._R=S.R),S.S instanceof f&&(this._S=S.S),this._Rencoded=Array.isArray(S.R)?S.R:S.Rencoded,this._Sencoded=Array.isArray(S.S)?S.S:S.Sencoded}return l(y,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),l(y,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),l(y,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),l(y,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),y.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},y.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},Sh=y,Sh}var Dh,Fp;function gm(){if(Fp)return Dh;Fp=1;var f=ou(),o=Eg(),c=Ei(),l=c.assert,b=c.parseBytes,y=hm(),C=dm();function S(k){if(l(k==="ed25519","only tested with ed25519 so far"),!(this instanceof S))return new S(k);k=o[k].curve,this.curve=k,this.g=k.g,this.g.precompute(k.n.bitLength()+1),this.pointClass=k.point().constructor,this.encodingLength=Math.ceil(k.n.bitLength()/8),this.hash=f.sha512}return Dh=S,S.prototype.sign=function(M,L){M=b(M);var w=this.keyFromSecret(L),ee=this.hashInt(w.messagePrefix(),M),Ce=this.g.mul(ee),ce=this.encodePoint(Ce),V=this.hashInt(ce,w.pubBytes(),M).mul(w.priv()),Ee=ee.add(V).umod(this.curve.n);return this.makeSignature({R:Ce,S:Ee,Rencoded:ce})},S.prototype.verify=function(M,L,w){if(M=b(M),L=this.makeSignature(L),L.S().gte(L.eddsa.curve.n)||L.S().isNeg())return!1;var ee=this.keyFromPublic(w),Ce=this.hashInt(L.Rencoded(),ee.pubBytes(),M),ce=this.g.mul(L.S()),V=L.R().add(ee.pub().mul(Ce));return V.eq(ce)},S.prototype.hashInt=function(){for(var M=this.hash(),L=0;L<arguments.length;L++)M.update(arguments[L]);return c.intFromLE(M.digest()).umod(this.curve.n)},S.prototype.keyFromPublic=function(M){return y.fromPublic(this,M)},S.prototype.keyFromSecret=function(M){return y.fromSecret(this,M)},S.prototype.makeSignature=function(M){return M instanceof C?M:new C(this,M)},S.prototype.encodePoint=function(M){var L=M.getY().toArray("le",this.encodingLength);return L[this.encodingLength-1]|=M.getX().isOdd()?128:0,L},S.prototype.decodePoint=function(M){M=c.parseBytes(M);var L=M.length-1,w=M.slice(0,L).concat(M[L]&-129),ee=(M[L]&128)!==0,Ce=c.intFromLE(w);return this.curve.pointFromY(Ce,ee)},S.prototype.encodeInt=function(M){return M.toArray("le",this.encodingLength)},S.prototype.decodeInt=function(M){return c.intFromLE(M)},S.prototype.isPoint=function(M){return M instanceof this.pointClass},Dh}var Pp;function pm(){return Pp||(Pp=1,(function(f){var o=f;o.version=nm.version,o.utils=Ei(),o.rand=lC(),o.curve=hC(),o.curves=Eg(),o.ec=lm(),o.eddsa=gm()})(dh)),dh}var ym=pm();const Cm=Li(ym);var _2=function(f,o,c,l){var b=arguments.length,y=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(f,o,c,l);else for(var S=f.length-1;S>=0;S--)(C=f[S])&&(y=(b<3?C(y):b>3?C(o,c,y):C(o,c))||y);return b>3&&y&&Object.defineProperty(o,c,y),y},w2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)},pf,ud,c1,Im=Cm.ec;let kh,Mo=pf=class extends Ds{publicKey;constructor(o){if(super(),o.publicKey.length!==33)throw new Error("Expecting key to have length 33");this.publicKey=o.publicKey}static async recover(o){const c=new Uint8Array([0]),l=await o.signMessage(c),b=dC(await ec(c,Ra.ETH_KECCAK_256),l);return new pf({publicKey:b})}equals(o){return o instanceof pf?gA(this.publicKey,o.publicKey):!1}toString(){return"sepc256k1/"+Vf(this.publicKey)}toPeerId(){return Au(nu(this.publicKey))}static fromPeerId(o){if(!o.publicKey)throw new Error("Missing public key");if(o.type==="secp256k1")return new pf({publicKey:o.publicKey.raw});throw new Error("Unsupported key type: "+o.type)}};_2([YA({type:Ud("u8",33)}),w2("design:type",Uint8Array)],Mo.prototype,"publicKey",void 0);Mo=pf=_2([Fo(1),w2("design:paramtypes",[Object])],Mo);let Ns=ud=class extends q3{privateKey;constructor(o){if(super(),o.privateKey.length!==32)throw new Error("Expecting key to have length 32");this.privateKey=o.privateKey}equals(o){return o instanceof ud?gA(this.privateKey,o.privateKey):!1}toString(){return"secp256k1s/"+Vf(this.privateKey)}};_2([YA({type:Uint8Array}),w2("design:type",Uint8Array)],Ns.prototype,"privateKey",void 0);Ns=ud=_2([Fo(1),w2("design:paramtypes",[Object])],Ns);let P1=c1=class extends z3{publicKey;privateKey;_wallet;constructor(o){super(),this.privateKey=o.privateKey,this.publicKey=o.publicKey}static async create(){const o=await nw();return new c1({publicKey:new Mo({publicKey:o.publicKey.raw}),privateKey:new Ns({privateKey:o.raw})})}async sign(o,c=Ra.ETH_KECCAK_256){const l=await ec(o,c),b=id((this._wallet||(this._wallet=new o2(this.privateKey.privateKey)))._signingKey().signDigest(l)),y=new Uint8Array(So.length(b));return So.write(b,y,0),new La({prehash:c,publicKey:this.publicKey,signature:y})}equals(o){return o instanceof c1?this.publicKey.equals(o.publicKey)&&this.privateKey.equals(o.privateKey):!1}toPeerId(){return Au(nu(this.publicKey.publicKey))}};_2([YA({type:Mo}),w2("design:type",Mo)],P1.prototype,"publicKey",void 0);_2([YA({type:Ns}),w2("design:type",Ns)],P1.prototype,"privateKey",void 0);P1=c1=_2([Fo(2),w2("design:paramtypes",[Object])],P1);const bm=new TextDecoder;function vm(){return kh||(kh=new Im("secp256k1")),kh}const dC=(f,o)=>{const c=Rs(o),l={r:Nt(c.r),s:Nt(c.s)};return new Uint8Array(vm().recoverPubKey(Nt(f),l,c.recoveryParam).encodeCompressed())},Em=async(f,o)=>{const c=await ec(o,f.prehash),l=dC(Nt(c),bm.decode(f.signature));return gA(l,f.publicKey.publicKey)};var B2=function(f,o,c,l){var b=arguments.length,y=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(f,o,c,l);else for(var S=f.length-1;S>=0;S--)(C=f[S])&&(y=(b<3?C(y):b>3?C(o,c,y):C(o,c))||y);return b>3&&y&&Object.defineProperty(o,c,y),y},m2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)};let La=class{signature;publicKey;prehash=Ra.NONE;constructor(o){this.signature=o.signature,this.publicKey=o.publicKey,this.prehash=o.prehash}equals(o){return gA(this.signature,o.signature)?P3(Ss(this.publicKey),Ss(o.publicKey))===0&&this.prehash===o.prehash:!1}};B2([YA({type:Uint8Array}),m2("design:type",Uint8Array)],La.prototype,"signature",void 0);B2([YA({type:Ds}),m2("design:type",Ds)],La.prototype,"publicKey",void 0);B2([YA({type:"u8"}),m2("design:type",Number)],La.prototype,"prehash",void 0);La=B2([Fo(0),m2("design:paramtypes",[Object])],La);let K1=class{data;signature;constructor(o){this.data=o.data,this.signature=o.signature,this._value=o.value}_value;getValue(o){return RE(this.data,o)}async verify(){return this.signature?xm(this.signature,this.data):!0}equals(o){return!gA(this.data,o.data)||!this.signature!=!o.signature?!1:this.signature&&o.signature?this.signature.equals(o.signature):!0}async sign(o){const c=await o(this.data);return this.signature=c,this}};B2([YA({type:Uint8Array}),m2("design:type",Uint8Array)],K1.prototype,"data",void 0);B2([YA({type:_E(La)}),m2("design:type",La)],K1.prototype,"signature",void 0);K1=B2([Fo(0),m2("design:paramtypes",[Object])],K1);const xm=async(f,o)=>f.publicKey instanceof No?wm(f,o):f.publicKey instanceof Mo?Em(f,o):!1,_m=async(f,o,c)=>{const l=await ec(f,c);return new La({prehash:c,publicKey:o.publicKey,signature:d2.crypto_sign_detached(l,o.privateKeyPublicKey)})},wm=async(f,o)=>{let c=!1;try{const l=await ec(o,f.prehash);c=d2.crypto_sign_verify_detached(f.signature,l,f.publicKey.publicKey)}catch{return!1}return c};var Q2=function(f,o,c,l){var b=arguments.length,y=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(f,o,c,l);else for(var S=f.length-1;S>=0;S--)(C=f[S])&&(y=(b<3?C(y):b>3?C(o,c,y):C(o,c))||y);return b>3&&y&&Object.defineProperty(o,c,y),y},S2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)},u1,ld,l1;let No=u1=class extends Ds{publicKey;constructor(o){if(super(),this.publicKey=o.publicKey,o.publicKey.length!==32)throw new Error("Expecting key to have length 32")}equals(o){return o instanceof u1?gA(this.publicKey,o.publicKey):!1}toString(){return"ed25119p/"+Vf(this.publicKey)}toPeerId(){return Au(nu(this.publicKey))}static fromPeerId(o){if(!o.publicKey)throw new Error("Missing public key");if(o.type==="Ed25519")return new u1({publicKey:fw(o.publicKey.raw)});throw new Error("Unsupported key type: "+o.type)}};Q2([YA({type:Ud("u8",32)}),S2("design:type",Uint8Array)],No.prototype,"publicKey",void 0);No=u1=Q2([Fo(0),S2("design:paramtypes",[Object])],No);let Fs=ld=class extends q3{privateKey;constructor(o){if(super(),o.privateKey.length!==32)throw new Error("Expecting key to have length 32");this.privateKey=o.privateKey}equals(o){return o instanceof ld?gA(this.privateKey,o.privateKey):!1}toString(){return"ed25119s/"+Vf(this.privateKey)}keyObject};Q2([YA({type:Ud("u8",32)}),S2("design:type",Uint8Array)],Fs.prototype,"privateKey",void 0);Fs=ld=Q2([Fo(0),S2("design:paramtypes",[Object])],Fs);let Pf=l1=class extends z3{publicKey;privateKey;constructor(o){super(),this.privateKey=o.privateKey,this.publicKey=o.publicKey}static async create(){await d2.ready;const o=d2.crypto_sign_keypair();return new l1({publicKey:new No({publicKey:o.publicKey}),privateKey:new Fs({privateKey:o.privateKey.slice(0,32)})})}sign(o,c=Ra.NONE){return _m(o,this,c)}signer(o){return async c=>this.sign(c,o)}equals(o){return o instanceof l1?this.publicKey.equals(o.publicKey)&&this.privateKey.equals(o.privateKey):!1}_privateKeyPublicKey;get privateKeyPublicKey(){return this._privateKeyPublicKey||(this._privateKeyPublicKey=p2([this.privateKey.privateKey,this.publicKey.publicKey]))}toPeerId(){return Au(nu(this.publicKey.publicKey))}};Q2([YA({type:No}),S2("design:type",No)],Pf.prototype,"publicKey",void 0);Q2([YA({type:Fs}),S2("design:type",Fs)],Pf.prototype,"privateKey",void 0);Pf=l1=Q2([Fo(0),S2("design:paramtypes",[Object])],Pf);const Kp=f=>{if(f.type==="Ed25519")return No.fromPeerId(f);if(f.type==="secp256k1")return Mo.fromPeerId(f);throw new Error("Unsupported key type")},Bm=f=>{if(f==="https:")return gC;if(f==="http:")return hd;throw new Error("Unsupported protocol: "+f)},gC=9002,hd=8082,Up="/trust",mm="/peer/id",Qm="/peer/address",Zc="/program",Mh="/programs",Sm="/program/variants",Dm="/install",km="/network/bootstrap",Mm="/restart",Nm="/path",Fm="/log",Pm="/versions",Km="modulepreload",Um=function(f){return"/"+f},Rp={},Hp=function(o,c,l){let b=Promise.resolve();if(c&&c.length>0){let C=function(M){return Promise.all(M.map(L=>Promise.resolve(L).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};document.getElementsByTagName("link");const S=document.querySelector("meta[property=csp-nonce]"),k=S?.nonce||S?.getAttribute("nonce");b=C(c.map(M=>{if(M=Um(M),M in Rp)return;Rp[M]=!0;const L=M.endsWith(".css"),w=L?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${M}"]${w}`))return;const ee=document.createElement("link");if(ee.rel=L?"stylesheet":Km,L||(ee.as="script"),ee.crossOrigin="",ee.href=M,k&&ee.setAttribute("nonce",k),document.head.appendChild(ee),L)return new Promise((Ce,ce)=>{ee.addEventListener("load",Ce),ee.addEventListener("error",()=>ce(new Error(`Unable to preload CSS for ${M}`)))})}))}function y(C){const S=new Event("vite:preloadError",{cancelable:!0});if(S.payload=C,window.dispatchEvent(S),!S.defaultPrevented)throw C}return b.then(C=>{for(const S of C||[])S.status==="rejected"&&y(S.reason);return o().catch(y)})};class gi extends Error{static name="InvalidMultiaddrError";name="InvalidMultiaddrError"}class Kf extends Error{static name="ValidationError";name="ValidationError"}class Rm extends Error{static name="InvalidParametersError";name="InvalidParametersError"}class Hm extends Error{static name="UnknownProtocolError";name="UnknownProtocolError"}class Gm{index=0;input="";new(o){return this.index=0,this.input=o,this}readAtomically(o){const c=this.index,l=o();return l===void 0&&(this.index=c),l}parseWith(o){const c=o();if(this.index===this.input.length)return c}peekChar(){if(!(this.index>=this.input.length))return this.input[this.index]}readChar(){if(!(this.index>=this.input.length))return this.input[this.index++]}readGivenChar(o){return this.readAtomically(()=>{const c=this.readChar();if(c===o)return c})}readSeparator(o,c,l){return this.readAtomically(()=>{if(!(c>0&&this.readGivenChar(o)===void 0))return l()})}readNumber(o,c,l,b){return this.readAtomically(()=>{let y=0,C=0;const S=this.peekChar();if(S===void 0)return;const k=S==="0",M=2**(8*b)-1;for(;;){const L=this.readAtomically(()=>{const w=this.readChar();if(w===void 0)return;const ee=Number.parseInt(w,o);if(!Number.isNaN(ee))return ee});if(L===void 0)break;if(y*=o,y+=L,y>M||(C+=1,c!==void 0&&C>c))return}if(C!==0)return!l&&k&&C>1?void 0:y})}readIPv4Addr(){return this.readAtomically(()=>{const o=new Uint8Array(4);for(let c=0;c<o.length;c++){const l=this.readSeparator(".",c,()=>this.readNumber(10,3,!1,1));if(l===void 0)return;o[c]=l}return o})}readIPv6Addr(){const o=c=>{for(let l=0;l<c.length/2;l++){const b=l*2;if(l<c.length-3){const C=this.readSeparator(":",l,()=>this.readIPv4Addr());if(C!==void 0)return c[b]=C[0],c[b+1]=C[1],c[b+2]=C[2],c[b+3]=C[3],[b+4,!0]}const y=this.readSeparator(":",l,()=>this.readNumber(16,4,!0,2));if(y===void 0)return[b,!1];c[b]=y>>8,c[b+1]=y&255}return[c.length,!1]};return this.readAtomically(()=>{const c=new Uint8Array(16),[l,b]=o(c);if(l===16)return c;if(b||this.readGivenChar(":")===void 0||this.readGivenChar(":")===void 0)return;const y=new Uint8Array(14),C=16-(l+2),[S]=o(y.subarray(0,C));return c.set(y.subarray(0,S),16-S),c})}readIPAddr(){return this.readIPv4Addr()??this.readIPv6Addr()}}const Ym=45,Lm=15,U1=new Gm;function Tm(f){if(!(f.length>Lm))return U1.new(f).parseWith(()=>U1.readIPv4Addr())}function Jm(f){if(f.includes("%")&&(f=f.split("%")[0]),!(f.length>Ym))return U1.new(f).parseWith(()=>U1.readIPv6Addr())}function pC(f){return!!Tm(f)}function Om(f){return!!Jm(f)}const dd=4,gd=6,pd=273,zm=33,h1=41,yC=42,qm=43,CC=53,IC=54,xg=55,bC=56,jm=132,Vm=301,Xm=302,Wm=400,vC=421,Zm=444,$m=445,eQ=446,tQ=447,rQ=448,nQ=449,AQ=454,iQ=460,aQ=461,oQ=465,sQ=466,fQ=480,cQ=481,uQ=443,lQ=477,hQ=478,dQ=479,gQ=277,pQ=275,yQ=276,CQ=280,IQ=281,EC=290,bQ=777;function Gp(f){return o=>wA(o,f)}function Yp(f){return o=>Ga(o,f)}function yf(f){return new DataView(f.buffer).getUint16(f.byteOffset).toString()}function ls(f){const o=new ArrayBuffer(2);return new DataView(o).setUint16(0,typeof f=="string"?parseInt(f):f),new Uint8Array(o)}function vQ(f){const o=f.split(":");if(o.length!==2)throw new Error(`failed to parse onion addr: ["'${o.join('", "')}'"]' does not contain a port number`);if(o[0].length!==16)throw new Error(`failed to parse onion addr: ${o[0]} not a Tor onion address.`);const c=Ga(o[0],"base32"),l=parseInt(o[1],10);if(l<1||l>65536)throw new Error("Port number is not in range(1, 65536)");const b=ls(l);return p2([c,b],c.length+b.length)}function EQ(f){const o=f.split(":");if(o.length!==2)throw new Error(`failed to parse onion addr: ["'${o.join('", "')}'"]' does not contain a port number`);if(o[0].length!==56)throw new Error(`failed to parse onion addr: ${o[0]} not a Tor onion3 address.`);const c=bs.decode(`b${o[0]}`),l=parseInt(o[1],10);if(l<1||l>65536)throw new Error("Port number is not in range(1, 65536)");const b=ls(l);return p2([c,b],c.length+b.length)}function Lp(f){const o=f.subarray(0,f.length-2),c=f.subarray(f.length-2),l=wA(o,"base32"),b=yf(c);return`${l}:${b}`}const xC=function(f){f=f.toString().trim();const o=new Uint8Array(4);return f.split(/\./g).forEach((c,l)=>{const b=parseInt(c,10);if(isNaN(b)||b<0||b>255)throw new gi("Invalid byte value in IP address");o[l]=b}),o},xQ=function(f){let o=0;f=f.toString().trim();const c=f.split(":",8);let l;for(l=0;l<c.length;l++){const y=pC(c[l]);let C;y&&(C=xC(c[l]),c[l]=wA(C.subarray(0,2),"base16")),C!=null&&++l<8&&c.splice(l,0,wA(C.subarray(2,4),"base16"))}if(c[0]==="")for(;c.length<8;)c.unshift("0");else if(c[c.length-1]==="")for(;c.length<8;)c.push("0");else if(c.length<8){for(l=0;l<c.length&&c[l]!=="";l++);const y=[l,1];for(l=9-c.length;l>0;l--)y.push("0");c.splice.apply(c,y)}const b=new Uint8Array(o+16);for(l=0;l<c.length;l++){c[l]===""&&(c[l]="0");const y=parseInt(c[l],16);if(isNaN(y)||y<0||y>65535)throw new gi("Invalid byte value in IP address");b[o++]=y>>8&255,b[o++]=y&255}return b},_Q=function(f){if(f.byteLength!==4)throw new gi("IPv4 address was incorrect length");const o=[];for(let c=0;c<f.byteLength;c++)o.push(f[c]);return o.join(".")},wQ=function(f){if(f.byteLength!==16)throw new gi("IPv6 address was incorrect length");const o=[];for(let l=0;l<f.byteLength;l+=2){const b=f[l],y=f[l+1],C=`${b.toString(16).padStart(2,"0")}${y.toString(16).padStart(2,"0")}`;o.push(C)}const c=o.join(":");try{const l=new URL(`http://[${c}]`);return l.hostname.substring(1,l.hostname.length-1)}catch{throw new gi(`Invalid IPv6 address "${c}"`)}};function BQ(f){try{const o=new URL(`http://[${f}]`);return o.hostname.substring(1,o.hostname.length-1)}catch{throw new gi(`Invalid IPv6 address "${f}"`)}}const Nh=Object.values(qh).map(f=>f.decoder),mQ=(function(){let f=Nh[0].or(Nh[1]);return Nh.slice(2).forEach(o=>f=f.or(o)),f})();function QQ(f){return mQ.decode(f)}function SQ(f){return o=>f.encoder.encode(o)}function DQ(f){if(parseInt(f).toString()!==f)throw new Kf("Value must be an integer")}function kQ(f){if(f<0)throw new Kf("Value must be a positive integer, or zero")}function MQ(f){return o=>{if(o>f)throw new Kf(`Value must be smaller than or equal to ${f}`)}}function NQ(...f){return o=>{for(const c of f)c(o)}}const $c=NQ(DQ,kQ,MQ(65535)),cA=-1;class FQ{protocolsByCode=new Map;protocolsByName=new Map;getProtocol(o){let c;if(typeof o=="string"?c=this.protocolsByName.get(o):c=this.protocolsByCode.get(o),c==null)throw new Hm(`Protocol ${o} was unknown`);return c}addProtocol(o){this.protocolsByCode.set(o.code,o),this.protocolsByName.set(o.name,o),o.aliases?.forEach(c=>{this.protocolsByName.set(c,o)})}removeProtocol(o){const c=this.protocolsByCode.get(o);c!=null&&(this.protocolsByCode.delete(c.code),this.protocolsByName.delete(c.name),c.aliases?.forEach(l=>{this.protocolsByName.delete(l)}))}}const Ha=new FQ,PQ=[{code:dd,name:"ip4",size:32,valueToBytes:xC,bytesToValue:_Q,validate:f=>{if(!pC(f))throw new Kf(`Invalid IPv4 address "${f}"`)}},{code:gd,name:"tcp",size:16,valueToBytes:ls,bytesToValue:yf,validate:$c},{code:pd,name:"udp",size:16,valueToBytes:ls,bytesToValue:yf,validate:$c},{code:zm,name:"dccp",size:16,valueToBytes:ls,bytesToValue:yf,validate:$c},{code:h1,name:"ip6",size:128,valueToBytes:xQ,bytesToValue:wQ,stringToValue:BQ,validate:f=>{if(!Om(f))throw new Kf(`Invalid IPv6 address "${f}"`)}},{code:yC,name:"ip6zone",size:cA},{code:qm,name:"ipcidr",size:8,bytesToValue:Gp("base10"),valueToBytes:Yp("base10")},{code:CC,name:"dns",size:cA,resolvable:!0},{code:IC,name:"dns4",size:cA,resolvable:!0},{code:xg,name:"dns6",size:cA,resolvable:!0},{code:bC,name:"dnsaddr",size:cA,resolvable:!0},{code:jm,name:"sctp",size:16,valueToBytes:ls,bytesToValue:yf,validate:$c},{code:Vm,name:"udt"},{code:Xm,name:"utp"},{code:Wm,name:"unix",size:cA,path:!0,stringToValue:f=>decodeURIComponent(f),valueToString:f=>encodeURIComponent(f)},{code:vC,name:"p2p",aliases:["ipfs"],size:cA,bytesToValue:Gp("base58btc"),valueToBytes:f=>f.startsWith("Q")||f.startsWith("1")?Yp("base58btc")(f):fn.parse(f).multihash.bytes},{code:Zm,name:"onion",size:96,bytesToValue:Lp,valueToBytes:vQ},{code:$m,name:"onion3",size:296,bytesToValue:Lp,valueToBytes:EQ},{code:eQ,name:"garlic64",size:cA},{code:tQ,name:"garlic32",size:cA},{code:rQ,name:"tls"},{code:nQ,name:"sni",size:cA},{code:AQ,name:"noise"},{code:iQ,name:"quic"},{code:aQ,name:"quic-v1"},{code:oQ,name:"webtransport"},{code:sQ,name:"certhash",size:cA,bytesToValue:SQ(R3),valueToBytes:QQ},{code:fQ,name:"http"},{code:cQ,name:"http-path",size:cA,stringToValue:f=>`/${decodeURIComponent(f)}`,valueToString:f=>encodeURIComponent(f.substring(1))},{code:uQ,name:"https"},{code:lQ,name:"ws"},{code:hQ,name:"wss"},{code:dQ,name:"p2p-websocket-star"},{code:gQ,name:"p2p-stardust"},{code:pQ,name:"p2p-webrtc-star"},{code:yQ,name:"p2p-webrtc-direct"},{code:CQ,name:"webrtc-direct"},{code:IQ,name:"webrtc"},{code:EC,name:"p2p-circuit"},{code:bQ,name:"memory",size:cA}];PQ.forEach(f=>{Ha.addProtocol(f)});function KQ(f){const o=[];let c=0;for(;c<f.length;){const l=wy(f,c),b=Ha.getProtocol(l),y=C2(l),C=GQ(b,f,c+y);let S=0;C>0&&b.size===cA&&(S=C2(C));const k=y+S+C,M={code:l,name:b.name,bytes:f.subarray(c,c+k)};if(C>0){const L=c+y+S,w=f.subarray(L,L+C);M.value=b.bytesToValue?.(w)??wA(w)}o.push(M),c+=k}return o}function UQ(f){let o=0;const c=[];for(const l of f){if(l.bytes==null){const b=Ha.getProtocol(l.code),y=C2(l.code);let C,S=0,k=0;l.value!=null&&(C=b.valueToBytes?.(l.value)??Ga(l.value),S=C.byteLength,b.size===cA&&(k=C2(S)));const M=new Uint8Array(y+k+S);let L=0;$h(l.code,M,L),L+=y,C!=null&&(b.size===cA&&($h(S,M,L),L+=k),M.set(C,L)),l.bytes=M}c.push(l.bytes),o+=l.bytes.byteLength}return p2(c,o)}function RQ(f){if(f.charAt(0)!=="/")throw new gi('String multiaddr must start with "/"');const o=[];let c="protocol",l="",b="";for(let y=1;y<f.length;y++){const C=f.charAt(y);C!=="/"&&(c==="protocol"?b+=f.charAt(y):l+=f.charAt(y));const S=y===f.length-1;if(C==="/"||S){const k=Ha.getProtocol(b);if(c==="protocol"){if(k.size==null||k.size===0){o.push({code:k.code,name:k.name}),l="",b="",c="protocol";continue}else if(S)throw new gi(`Component ${b} was missing value`);c="value"}else if(c==="value"){const M={code:k.code,name:k.name};if(k.size!=null&&k.size!==0){if(l==="")throw new gi(`Component ${b} was missing value`);M.value=k.stringToValue?.(l)??l}o.push(M),l="",b="",c="protocol"}}}if(b!==""&&l!=="")throw new gi("Incomplete multiaddr");return o}function HQ(f){return`/${f.flatMap(o=>{if(o.value==null)return o.name;const c=Ha.getProtocol(o.code);if(c==null)throw new gi(`Unknown protocol code ${o.code}`);return[o.name,c.valueToString?.(o.value)??o.value]}).join("/")}`}function GQ(f,o,c){return f.size==null||f.size===0?0:f.size>0?f.size/8:wy(o,c)}const YQ=Symbol.for("nodejs.util.inspect.custom"),_C=Symbol.for("@multiformats/multiaddr"),LQ=[CC,IC,xg,bC];class TQ extends Error{constructor(o="No available resolver"){super(o),this.name="NoAvailableResolverError"}}function JQ(f){if(f==null&&(f="/"),qQ(f))return f.getComponents();if(f instanceof Uint8Array)return KQ(f);if(typeof f=="string")return f=f.replace(/\/(\/)+/,"/").replace(/(\/)+$/,""),f===""&&(f="/"),RQ(f);if(Array.isArray(f))return f;throw new gi("Must be a string, Uint8Array, Component[], or another Multiaddr")}class hs{[_C]=!0;#e;#t;#r;constructor(o="/",c={}){this.#e=JQ(o),c.validate!==!1&&OQ(this)}get bytes(){return this.#r==null&&(this.#r=UQ(this.#e)),this.#r}toString(){return this.#t==null&&(this.#t=HQ(this.#e)),this.#t}toJSON(){return this.toString()}toOptions(){let o,c,l,b,y="";for(const{code:S,name:k,value:M}of this.#e)S===yC&&(y=`%${M??""}`),LQ.includes(S)&&(c="tcp",b=443,l=`${M??""}${y}`,o=S===xg?6:4),(S===gd||S===pd)&&(c=k==="tcp"?"tcp":"udp",b=parseInt(M??"")),(S===dd||S===h1)&&(c="tcp",l=`${M??""}${y}`,o=S===h1?6:4);if(o==null||c==null||l==null||b==null)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6, dnsaddr}/{address}/{tcp, udp}/{port}".');return{family:o,host:l,transport:c,port:b}}getComponents(){return[...this.#e]}protos(){return this.#e.map(({code:o,value:c})=>{const l=Ha.getProtocol(o);return{code:o,size:l.size??0,name:l.name,resolvable:!!l.resolvable,path:!!l.path}})}protoCodes(){return this.#e.map(({code:o})=>o)}protoNames(){return this.#e.map(({name:o})=>o)}tuples(){return this.#e.map(({code:o,value:c})=>{if(c==null)return[o];const l=Ha.getProtocol(o),b=[o];return c!=null&&b.push(l.valueToBytes?.(c)??Ga(c)),b})}stringTuples(){return this.#e.map(({code:o,value:c})=>c==null?[o]:[o,c])}encapsulate(o){const c=new hs(o);return new hs([...this.#e,...c.getComponents()],{validate:!1})}decapsulate(o){const c=o.toString(),l=this.toString(),b=l.lastIndexOf(c);if(b<0)throw new Rm(`Address ${this.toString()} does not contain subaddress: ${o.toString()}`);return new hs(l.slice(0,b),{validate:!1})}decapsulateCode(o){let c;for(let l=this.#e.length-1;l>-1;l--)if(this.#e[l].code===o){c=l;break}return new hs(this.#e.slice(0,c),{validate:!1})}getPeerId(){try{let o=[];this.#e.forEach(({code:l,value:b})=>{l===vC&&o.push([l,b]),l===EC&&(o=[])});const c=o.pop();if(c?.[1]!=null){const l=c[1];return l[0]==="Q"||l[0]==="1"?wA(_A.decode(`z${l}`),"base58btc"):wA(fn.parse(l).multihash.bytes,"base58btc")}return null}catch{return null}}getPath(){for(const o of this.#e)if(Ha.getProtocol(o.code).path)return o.value??null;return null}equals(o){return gA(this.bytes,o.bytes)}async resolve(o){const c=this.protos().find(y=>y.resolvable);if(c==null)return[this];const l=zQ.get(c.name);if(l==null)throw new TQ(`no available resolver for ${c.name}`);return(await l(this,o)).map(y=>wC(y))}nodeAddress(){const o=this.toOptions();if(o.transport!=="tcp"&&o.transport!=="udp")throw new Error(`multiaddr must have a valid format - no protocol with name: "${o.transport}". Must have a valid transport protocol: "{tcp, udp}"`);return{family:o.family,address:o.host,port:o.port}}isThinWaistAddress(){return!(this.#e.length!==2||this.#e[0].code!==dd&&this.#e[0].code!==h1||this.#e[1].code!==gd&&this.#e[1].code!==pd)}[YQ](){return`Multiaddr(${this.toString()})`}}function OQ(f){f.getComponents().forEach(o=>{const c=Ha.getProtocol(o.code);o.value!=null&&c.validate?.(o.value)})}const zQ=new Map;function qQ(f){return!!f?.[_C]}function wC(f){return new hs(f)}const jQ="X-Peerbit-Signature",VQ="X-Peerbit-Signature-Time",XQ=async(f,o,c,l,b)=>{const y=Math.round(new Date().getTime()/1e3).toString(),C=new mr;if(!o)throw new Error("Expecting method");if(!c)throw new Error("Expecting path");C.string(o.toLowerCase()+c.toLowerCase()+y+(l||""));const S=await b.sign(C.finalize());f[VQ]=y,f[jQ]=O3(Ss(S))},WQ=async(f,o={address:"http://localhost:"+hd})=>{let c=o.address;!c.startsWith("http://")&&!c.startsWith("https://")&&(c.endsWith("localhost:")||c.endsWith("localhost")?c="http://"+c:c="https://"+c);const l=c.startsWith("http://localhost");new URL(c).port===""&&!c.endsWith(":80")&&(l?c=c+":"+hd:c=c+":"+gC);const{default:b}=await Hp(async()=>{const{default:w}=await import("./index-BVKiFqNl.js");return{default:w}},[]),y=b.create();y.interceptors.request.use(async w=>{const ee=new URL(w.url);return await XQ(w.headers,w.method,ee.pathname+ee.search,w.data,f),w});const C=w=>w>=200&&w<300||w===404,S=w=>{if(w.status!==200)throw new Error(w.data);return w},k=async()=>S(await y.get(c+mm,{validateStatus:C,timeout:5e3})).data,M=async w=>S(await y.delete(c+Zc+"/"+encodeURIComponent(w.toString()),{validateStatus:C})),L=async w=>S(await y.delete(c+Zc+"/"+encodeURIComponent(w.toString())+"?delete=true",{validateStatus:C}));return{peer:{id:{get:k},addresses:{get:async()=>S(await y.get(c+Qm,{validateStatus:C})).data.map(w=>wC(w))}},access:{allow:async w=>{const ee=await y.put(c+Up+"/"+encodeURIComponent(typeof w=="string"?w:w instanceof Ds?w.hashcode():Kp(w).hashcode()),void 0,{validateStatus:C});if(ee.status!==200&&ee.status!==404)throw new Error(ee.data);return ee.status===200},deny:async w=>{const ee=await y.delete(c+Up+"/"+encodeURIComponent(w instanceof Ds?w.hashcode():Kp(w).hashcode()),{validateStatus:C});if(ee.status!==200&&ee.status!==404)throw new Error(ee.data);return ee.status===200}},program:{has:async w=>{const ee=await y.head(c+Zc+"/"+encodeURIComponent(w.toString()),{validateStatus:C});if(ee.status!==200&&ee.status!==404)throw new Error(ee.data);return ee.status===200},open:async w=>S(await y.put(c+Zc,JSON.stringify(w),{validateStatus:C})).data,close:async w=>{await M(w)},closeAll:async()=>{const w=S(await y.get(c+Mh,{validateStatus:C}));await Promise.all([...Object.keys(w.data)].map(ee=>M(ee)))},drop:async w=>{await L(w)},dropAll:async()=>{const w=S(await y.get(c+Mh,{validateStatus:C}));await Promise.all([...Object.keys(w.data)].map(ee=>L(ee)))},list:async()=>S(await y.get(c+Mh,{validateStatus:C})).data,variants:async()=>S(await y.get(c+Sm,{validateStatus:C})).data},dependency:{install:async w=>{const ee=await y.put(c+Dm,JSON.stringify(w),{validateStatus:C});if(ee.status!==200)throw new Error(typeof ee.data=="string"?ee.data:ee.data.toString());return ee.data},versions:async()=>S(await y.get(c+Pm,{validateStatus:C})).data},network:{bootstrap:async()=>{S(await y.post(c+km,void 0,{validateStatus:C}))}},restart:async()=>{S(await y.post(c+Mm,void 0,{validateStatus:C}))},stop:async()=>{S(await y.post(c+Nm,void 0,{validateStatus:C}))},log:{fetch:async w=>{const ee=c+Fm+(w!==void 0?`?n=${w}`:"");return S(await y.get(ee,{validateStatus:C})).data}},terminate:async()=>{const{terminateNode:w}=await Hp(async()=>{const{terminateNode:ee}=await Promise.resolve().then(()=>eS);return{terminateNode:ee}},void 0);o.origin?.type==="aws"&&await w({instanceId:o.origin.instanceId,region:o.origin.region})}}};let yd=Fd({palette:{mode:"dark"},typography:{fontFamily:["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(",")}});yd=_v(yd);const ZQ=()=>{const[f,o]=Ar.useState(),[c,l]=Ar.useState(),[b,y]=Ar.useState(),[C,S]=Ar.useState(),[k,M]=Ar.useState([]);return Ar.useEffect(()=>{Pf.create().then(L=>WQ(L,{address:window.location.protocol+"//"+window.location.hostname+":"+Bm(window.location.protocol)}).then(w=>{o(w),w.peer.id.get().then(ee=>{l(ee)}).catch(ee=>{window.location.hostname!=="localhost"?alert(ee):console.error(ee)}),w.peer.addresses.get().then(ee=>{const Ce=ee.find(Ee=>Ee.protoNames().includes("tcp")&&!Ee.protoNames().includes("ws")&&!Ee.protoNames().includes("wss"));Ce&&y(Ce.toString());const ce=ee.find(Ee=>Ee.protoNames().includes("ws")||Ee.protoNames().includes("wss"));ce&&S(ce.toString());let V=ee.filter(Ee=>(!Ce||!Ee.equals(Ce))&&(!ce||!Ee.equals(ce)));M(V.map(Ee=>Ee.toString()))}).catch(ee=>{window.location.hostname!=="localhost"?alert(ee):console.error(ee)})}))},[]),nr.jsxs(Gv,{theme:yd,children:[nr.jsx(AE,{}),nr.jsx(eE,{children:nr.jsx(na,{container:!0,sx:{p:4,height:"100vh"},children:nr.jsxs(na,{item:!0,container:!0,direction:"column",spacing:2,maxWidth:"400px",children:[nr.jsxs(na,{item:!0,container:!0,direction:"row",alignItems:"center",mb:2,children:[nr.jsx(na,{mr:2,display:"flex",justifyContent:"center",item:!0,children:nr.jsx("img",{width:"60px",height:"auto",src:"./android-chrome-192x192.png"})}),nr.jsx(na,{item:!0,children:nr.jsx(ra,{variant:"h5",children:"Peerbit"})})]}),nr.jsxs(na,{item:!0,children:[nr.jsx(ra,{variant:"overline",children:"Id"}),nr.jsx(ra,{children:c})]}),nr.jsx(na,{item:!0,children:nr.jsx(ra,{variant:"overline",children:"Address"})}),b&&nr.jsxs(na,{item:!0,children:[nr.jsx(ra,{variant:"caption",children:" TCP (non-browser)"}),nr.jsx(wl,{elevation:10,children:nr.jsx(ra,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:b})})]}),C&&nr.jsxs(na,{item:!0,children:[nr.jsxs(ra,{variant:"caption",children:[" ","Websockets (browser and non-browser)"," "]}),nr.jsx(wl,{elevation:10,children:nr.jsx(ra,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:C})})]}),k.length>0&&nr.jsxs(na,{item:!0,children:[nr.jsx(ra,{variant:"caption",children:" Other addresses"}),k.map(L=>nr.jsx(wl,{elevation:10,children:nr.jsx(ra,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:L})}))]})]})})})]})},$Q=p5.createRoot(document.getElementById("root"));$Q.render(nr.jsx(Tp.StrictMode,{children:nr.jsx(ZQ,{})}));const eS=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));
66
+ `)}static register(o,c){c||(c=o.locale)}}const QB="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let vf=null;function fp(f){if(vf==null&&(vf=QB.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),rc.check(f)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw vf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class SB extends rc{constructor(){super("en")}getWord(o){return fp(this),vf[o]}getWordIndex(o){return fp(this),vf.indexOf(o)}}const tC=new SB;rc.register(tC);const cp={en:tC},DB="hdnode/5.8.0",F1=new zt(DB),kB=Wr.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),MB=Gi("Bitcoin seed"),cf=2147483648;function rC(f){return(1<<f)-1<<8-f}function NB(f){return(1<<f)-1}function Xc(f){return pi(sr(f),32)}function up(f){return qy.encode(Do([f,Df(Nf(Nf(f)),0,4)]))}function Cg(f){if(f==null)return cp.en;if(typeof f=="string"){const o=cp[f];return o==null&&F1.throwArgumentError("unknown locale","wordlist",f),o}return f}const os={},Ff="m/44'/60'/0'/0/0";class hi{constructor(o,c,l,b,y,C,S,k){if(o!==os)throw new Error("HDNode constructor cannot be called directly");if(c){const M=new _s(c);lr(this,"privateKey",M.privateKey),lr(this,"publicKey",M.compressedPublicKey)}else lr(this,"privateKey",null),lr(this,"publicKey",sr(l));lr(this,"parentFingerprint",b),lr(this,"fingerprint",Df(oB(Nf(this.publicKey)),0,4)),lr(this,"address",ws(this.publicKey)),lr(this,"chainCode",y),lr(this,"index",C),lr(this,"depth",S),k==null?(lr(this,"mnemonic",null),lr(this,"path",null)):typeof k=="string"?(lr(this,"mnemonic",null),lr(this,"path",k)):(lr(this,"mnemonic",k),lr(this,"path",k.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return up(Do([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",sr(this.depth),this.parentFingerprint,pi(sr(this.index),4),this.chainCode,this.privateKey!=null?Do(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new hi(os,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(o){if(o>4294967295)throw new Error("invalid index - "+String(o));let c=this.path;c&&(c+="/"+(o&~cf));const l=new Uint8Array(37);if(o&cf){if(!this.privateKey)throw new Error("cannot derive child of neutered node");l.set(Nt(this.privateKey),1),c&&(c+="'")}else l.set(Nt(this.publicKey));for(let w=24;w>=0;w-=8)l[33+(w>>3)]=o>>24-w&255;const b=Nt(k1(Mf.sha512,this.chainCode,l)),y=b.slice(0,32),C=b.slice(32);let S=null,k=null;this.privateKey?S=Xc(Wr.from(y).add(this.privateKey).mod(kB)):k=new _s(sr(y))._addPoint(this.publicKey);let M=c;const L=this.mnemonic;return L&&(M=Object.freeze({phrase:L.phrase,path:c,locale:L.locale||"en"})),new hi(os,S,k,this.fingerprint,Xc(C),o,this.depth+1,M)}derivePath(o){const c=o.split("/");if(c.length===0||c[0]==="m"&&this.depth!==0)throw new Error("invalid path - "+o);c[0]==="m"&&c.shift();let l=this;for(let b=0;b<c.length;b++){const y=c[b];if(y.match(/^[0-9]+'$/)){const C=parseInt(y.substring(0,y.length-1));if(C>=cf)throw new Error("invalid path index - "+y);l=l._derive(cf+C)}else if(y.match(/^[0-9]+$/)){const C=parseInt(y);if(C>=cf)throw new Error("invalid path index - "+y);l=l._derive(C)}else throw new Error("invalid path component - "+y)}return l}static _fromSeed(o,c){const l=Nt(o);if(l.length<16||l.length>64)throw new Error("invalid seed");const b=Nt(k1(Mf.sha512,MB,l));return new hi(os,Xc(b.slice(0,32)),null,"0x00000000",Xc(b.slice(32)),0,0,c)}static fromMnemonic(o,c,l){return l=Cg(l),o=Ig(nC(o,l),l),hi._fromSeed(FB(o,c),{phrase:o,path:"m",locale:l.locale})}static fromSeed(o){return hi._fromSeed(o,null)}static fromExtendedKey(o){const c=qy.decode(o);(c.length!==82||up(c.slice(0,78))!==o)&&F1.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const l=c[4],b=sr(c.slice(5,9)),y=parseInt(sr(c.slice(9,13)).substring(2),16),C=sr(c.slice(13,45)),S=c.slice(45,78);switch(sr(c.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new hi(os,null,sr(S),b,C,y,l,null);case"0x0488ade4":case"0x04358394 ":if(S[0]!==0)break;return new hi(os,sr(S.slice(1)),null,b,C,y,l,null)}return F1.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function FB(f,o){o||(o="");const c=Gi("mnemonic"+o,I2.NFKD);return dg(Gi(f,I2.NFKD),c,2048,64,"sha512")}function nC(f,o){o=Cg(o),F1.checkNormalize();const c=o.split(f);if(c.length%3!==0)throw new Error("invalid mnemonic");const l=Nt(new Uint8Array(Math.ceil(11*c.length/8)));let b=0;for(let M=0;M<c.length;M++){let L=o.getWordIndex(c[M].normalize("NFKD"));if(L===-1)throw new Error("invalid mnemonic");for(let w=0;w<11;w++)L&1<<10-w&&(l[b>>3]|=1<<7-b%8),b++}const y=32*c.length/3,C=c.length/3,S=rC(C);if((Nt(Nf(l.slice(0,y/8)))[0]&S)!==(l[l.length-1]&S))throw new Error("invalid checksum");return sr(l.slice(0,y/8))}function Ig(f,o){if(o=Cg(o),f=Nt(f),f.length%4!==0||f.length<16||f.length>32)throw new Error("invalid entropy");const c=[0];let l=11;for(let C=0;C<f.length;C++)l>8?(c[c.length-1]<<=8,c[c.length-1]|=f[C],l-=8):(c[c.length-1]<<=l,c[c.length-1]|=f[C]>>8-l,c.push(f[C]&NB(8-l)),l+=3);const b=f.length/4,y=Nt(Nf(f))[0]&rC(b);return c[c.length-1]<<=b,c[c.length-1]|=y>>8-b,o.join(c.map(C=>o.getWord(C)))}const PB="random/5.8.0",fd=new zt(PB);function KB(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")}const lp=KB();let s1=lp.crypto||lp.msCrypto;(!s1||!s1.getRandomValues)&&(fd.warn("WARNING: Missing strong random number source"),s1={getRandomValues:function(f){return fd.throwError("no secure random source avaialble",zt.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function gf(f){(f<=0||f>1024||f%1||f!=f)&&fd.throwArgumentError("invalid length","length",f);const o=new Uint8Array(f);return s1.getRandomValues(o),Nt(o)}var lh={exports:{}},hp;function UB(){return hp||(hp=1,(function(f,o){(function(c){function l(Y){return parseInt(Y)===Y}function b(Y){if(!l(Y.length))return!1;for(var O=0;O<Y.length;O++)if(!l(Y[O])||Y[O]<0||Y[O]>255)return!1;return!0}function y(Y,O){if(Y.buffer&&ArrayBuffer.isView(Y)&&Y.name==="Uint8Array")return O&&(Y.slice?Y=Y.slice():Y=Array.prototype.slice.call(Y)),Y;if(Array.isArray(Y)){if(!b(Y))throw new Error("Array contains invalid value: "+Y);return new Uint8Array(Y)}if(l(Y.length)&&b(Y))return new Uint8Array(Y);throw new Error("unsupported array-like object")}function C(Y){return new Uint8Array(Y)}function S(Y,O,me,Je,se){(Je!=null||se!=null)&&(Y.slice?Y=Y.slice(Je,se):Y=Array.prototype.slice.call(Y,Je,se)),O.set(Y,me)}var k=(function(){function Y(me){var Je=[],se=0;for(me=encodeURI(me);se<me.length;){var Ve=me.charCodeAt(se++);Ve===37?(Je.push(parseInt(me.substr(se,2),16)),se+=2):Je.push(Ve)}return y(Je)}function O(me){for(var Je=[],se=0;se<me.length;){var Ve=me[se];Ve<128?(Je.push(String.fromCharCode(Ve)),se++):Ve>191&&Ve<224?(Je.push(String.fromCharCode((Ve&31)<<6|me[se+1]&63)),se+=2):(Je.push(String.fromCharCode((Ve&15)<<12|(me[se+1]&63)<<6|me[se+2]&63)),se+=3)}return Je.join("")}return{toBytes:Y,fromBytes:O}})(),M=(function(){function Y(Je){for(var se=[],Ve=0;Ve<Je.length;Ve+=2)se.push(parseInt(Je.substr(Ve,2),16));return se}var O="0123456789abcdef";function me(Je){for(var se=[],Ve=0;Ve<Je.length;Ve++){var c0=Je[Ve];se.push(O[(c0&240)>>4]+O[c0&15])}return se.join("")}return{toBytes:Y,fromBytes:me}})(),L={16:10,24:12,32:14},w=[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],ee=[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],Ce=[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],ce=[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],V=[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],Ee=[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],ge=[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],_e=[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],ne=[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],r0=[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],xe=[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],Me=[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],be=[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],We=[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],ae=[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 y0(Y){for(var O=[],me=0;me<Y.length;me+=4)O.push(Y[me]<<24|Y[me+1]<<16|Y[me+2]<<8|Y[me+3]);return O}var Ne=function(Y){if(!(this instanceof Ne))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:y(Y,!0)}),this._prepare()};Ne.prototype._prepare=function(){var Y=L[this.key.length];if(Y==null)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var O=0;O<=Y;O++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var me=(Y+1)*4,Je=this.key.length/4,se=y0(this.key),Ve,O=0;O<Je;O++)Ve=O>>2,this._Ke[Ve][O%4]=se[O],this._Kd[Y-Ve][O%4]=se[O];for(var c0=0,l0=Je,h0;l0<me;){if(h0=se[Je-1],se[0]^=ee[h0>>16&255]<<24^ee[h0>>8&255]<<16^ee[h0&255]<<8^ee[h0>>24&255]^w[c0]<<24,c0+=1,Je!=8)for(var O=1;O<Je;O++)se[O]^=se[O-1];else{for(var O=1;O<Je/2;O++)se[O]^=se[O-1];h0=se[Je/2-1],se[Je/2]^=ee[h0&255]^ee[h0>>8&255]<<8^ee[h0>>16&255]<<16^ee[h0>>24&255]<<24;for(var O=Je/2+1;O<Je;O++)se[O]^=se[O-1]}for(var O=0,R0,tt;O<Je&&l0<me;)R0=l0>>2,tt=l0%4,this._Ke[R0][tt]=se[O],this._Kd[Y-R0][tt]=se[O++],l0++}for(var R0=1;R0<Y;R0++)for(var tt=0;tt<4;tt++)h0=this._Kd[R0][tt],this._Kd[R0][tt]=Me[h0>>24&255]^be[h0>>16&255]^We[h0>>8&255]^ae[h0&255]},Ne.prototype.encrypt=function(Y){if(Y.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var O=this._Ke.length-1,me=[0,0,0,0],Je=y0(Y),se=0;se<4;se++)Je[se]^=this._Ke[0][se];for(var Ve=1;Ve<O;Ve++){for(var se=0;se<4;se++)me[se]=ce[Je[se]>>24&255]^V[Je[(se+1)%4]>>16&255]^Ee[Je[(se+2)%4]>>8&255]^ge[Je[(se+3)%4]&255]^this._Ke[Ve][se];Je=me.slice()}for(var c0=C(16),l0,se=0;se<4;se++)l0=this._Ke[O][se],c0[4*se]=(ee[Je[se]>>24&255]^l0>>24)&255,c0[4*se+1]=(ee[Je[(se+1)%4]>>16&255]^l0>>16)&255,c0[4*se+2]=(ee[Je[(se+2)%4]>>8&255]^l0>>8)&255,c0[4*se+3]=(ee[Je[(se+3)%4]&255]^l0)&255;return c0},Ne.prototype.decrypt=function(Y){if(Y.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var O=this._Kd.length-1,me=[0,0,0,0],Je=y0(Y),se=0;se<4;se++)Je[se]^=this._Kd[0][se];for(var Ve=1;Ve<O;Ve++){for(var se=0;se<4;se++)me[se]=_e[Je[se]>>24&255]^ne[Je[(se+3)%4]>>16&255]^r0[Je[(se+2)%4]>>8&255]^xe[Je[(se+1)%4]&255]^this._Kd[Ve][se];Je=me.slice()}for(var c0=C(16),l0,se=0;se<4;se++)l0=this._Kd[O][se],c0[4*se]=(Ce[Je[se]>>24&255]^l0>>24)&255,c0[4*se+1]=(Ce[Je[(se+3)%4]>>16&255]^l0>>16)&255,c0[4*se+2]=(Ce[Je[(se+2)%4]>>8&255]^l0>>8)&255,c0[4*se+3]=(Ce[Je[(se+1)%4]&255]^l0)&255;return c0};var J=function(Y){if(!(this instanceof J))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Ne(Y)};J.prototype.encrypt=function(Y){if(Y=y(Y),Y.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var O=C(Y.length),me=C(16),Je=0;Je<Y.length;Je+=16)S(Y,me,0,Je,Je+16),me=this._aes.encrypt(me),S(me,O,Je);return O},J.prototype.decrypt=function(Y){if(Y=y(Y),Y.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var O=C(Y.length),me=C(16),Je=0;Je<Y.length;Je+=16)S(Y,me,0,Je,Je+16),me=this._aes.decrypt(me),S(me,O,Je);return O};var G=function(Y,O){if(!(this instanceof G))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",!O)O=C(16);else if(O.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastCipherblock=y(O,!0),this._aes=new Ne(Y)};G.prototype.encrypt=function(Y){if(Y=y(Y),Y.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var O=C(Y.length),me=C(16),Je=0;Je<Y.length;Je+=16){S(Y,me,0,Je,Je+16);for(var se=0;se<16;se++)me[se]^=this._lastCipherblock[se];this._lastCipherblock=this._aes.encrypt(me),S(this._lastCipherblock,O,Je)}return O},G.prototype.decrypt=function(Y){if(Y=y(Y),Y.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var O=C(Y.length),me=C(16),Je=0;Je<Y.length;Je+=16){S(Y,me,0,Je,Je+16),me=this._aes.decrypt(me);for(var se=0;se<16;se++)O[Je+se]=me[se]^this._lastCipherblock[se];S(Y,this._lastCipherblock,0,Je,Je+16)}return O};var m=function(Y,O,me){if(!(this instanceof m))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",!O)O=C(16);else if(O.length!=16)throw new Error("invalid initialation vector size (must be 16 size)");me||(me=1),this.segmentSize=me,this._shiftRegister=y(O,!0),this._aes=new Ne(Y)};m.prototype.encrypt=function(Y){if(Y.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var O=y(Y,!0),me,Je=0;Je<O.length;Je+=this.segmentSize){me=this._aes.encrypt(this._shiftRegister);for(var se=0;se<this.segmentSize;se++)O[Je+se]^=me[se];S(this._shiftRegister,this._shiftRegister,0,this.segmentSize),S(O,this._shiftRegister,16-this.segmentSize,Je,Je+this.segmentSize)}return O},m.prototype.decrypt=function(Y){if(Y.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var O=y(Y,!0),me,Je=0;Je<O.length;Je+=this.segmentSize){me=this._aes.encrypt(this._shiftRegister);for(var se=0;se<this.segmentSize;se++)O[Je+se]^=me[se];S(this._shiftRegister,this._shiftRegister,0,this.segmentSize),S(Y,this._shiftRegister,16-this.segmentSize,Je,Je+this.segmentSize)}return O};var R=function(Y,O){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",!O)O=C(16);else if(O.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastPrecipher=y(O,!0),this._lastPrecipherIndex=16,this._aes=new Ne(Y)};R.prototype.encrypt=function(Y){for(var O=y(Y,!0),me=0;me<O.length;me++)this._lastPrecipherIndex===16&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),O[me]^=this._lastPrecipher[this._lastPrecipherIndex++];return O},R.prototype.decrypt=R.prototype.encrypt;var X=function(Y){if(!(this instanceof X))throw Error("Counter must be instanitated with `new`");Y!==0&&!Y&&(Y=1),typeof Y=="number"?(this._counter=C(16),this.setValue(Y)):this.setBytes(Y)};X.prototype.setValue=function(Y){if(typeof Y!="number"||parseInt(Y)!=Y)throw new Error("invalid counter value (must be an integer)");for(var O=15;O>=0;--O)this._counter[O]=Y%256,Y=Y>>8},X.prototype.setBytes=function(Y){if(Y=y(Y,!0),Y.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=Y},X.prototype.increment=function(){for(var Y=15;Y>=0;Y--)if(this._counter[Y]===255)this._counter[Y]=0;else{this._counter[Y]++;break}};var oe=function(Y,O){if(!(this instanceof oe))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",O instanceof X||(O=new X(O)),this._counter=O,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Ne(Y)};oe.prototype.encrypt=function(Y){for(var O=y(Y,!0),me=0;me<O.length;me++)this._remainingCounterIndex===16&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),O[me]^=this._remainingCounter[this._remainingCounterIndex++];return O},oe.prototype.decrypt=oe.prototype.encrypt;function de(Y){Y=y(Y,!0);var O=16-Y.length%16,me=C(Y.length+O);S(Y,me);for(var Je=Y.length;Je<me.length;Je++)me[Je]=O;return me}function le(Y){if(Y=y(Y,!0),Y.length<16)throw new Error("PKCS#7 invalid length");var O=Y[Y.length-1];if(O>16)throw new Error("PKCS#7 padding byte out of range");for(var me=Y.length-O,Je=0;Je<O;Je++)if(Y[me+Je]!==O)throw new Error("PKCS#7 invalid padding byte");var se=C(me);return S(Y,se,0,0,me),se}var q={AES:Ne,Counter:X,ModeOfOperation:{ecb:J,cbc:G,cfb:m,ofb:R,ctr:oe},utils:{hex:M,utf8:k},padding:{pkcs7:{pad:de,strip:le}},_arrayTest:{coerceArray:y,createArray:C,copyArray:S}};f.exports=q})()})(lh)),lh.exports}var RB=UB();const fa=Li(RB),AC="json-wallets/5.8.0";function h2(f){return typeof f=="string"&&f.substring(0,2)!=="0x"&&(f="0x"+f),Nt(f)}function uf(f,o){for(f=String(f);f.length<o;)f="0"+f;return f}function bg(f){return typeof f=="string"?Gi(f,I2.NFKC):Nt(f)}function _n(f,o){let c=f;const l=o.toLowerCase().split("/");for(let b=0;b<l.length;b++){let y=null;for(const C in c)if(C.toLowerCase()===l[b]){y=c[C];break}if(y===null)return null;c=y}return c}function HB(f){const o=Nt(f);o[6]=o[6]&15|64,o[8]=o[8]&63|128;const c=sr(o);return[c.substring(2,10),c.substring(10,14),c.substring(14,18),c.substring(18,22),c.substring(22,34)].join("-")}const GB=new zt(AC);class YB extends Ly{isCrowdsaleAccount(o){return!!(o&&o._isCrowdsaleAccount)}}function iC(f,o){const c=JSON.parse(f);o=bg(o);const l=Yi(_n(c,"ethaddr")),b=h2(_n(c,"encseed"));(!b||b.length%16!==0)&&GB.throwArgumentError("invalid encseed","json",f);const y=Nt(dg(o,o,2e3,32,"sha256")).slice(0,16),C=b.slice(0,16),S=b.slice(16),k=new fa.ModeOfOperation.cbc(y,C),M=fa.padding.pkcs7.strip(Nt(k.decrypt(S)));let L="";for(let Ce=0;Ce<M.length;Ce++)L+=String.fromCharCode(M[Ce]);const w=Gi(L),ee=BA(w);return new YB({_isCrowdsaleAccount:!0,address:l,privateKey:ee})}function aC(f){let o=null;try{o=JSON.parse(f)}catch{return!1}return o.encseed&&o.ethaddr}function oC(f){let o=null;try{o=JSON.parse(f)}catch{return!1}return!(!o.version||parseInt(o.version)!==o.version||parseInt(o.version)!==3)}var hh={exports:{}},dp;function LB(){return dp||(dp=1,(function(f,o){(function(c){function b(V){const Ee=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]);let ge=1779033703,_e=3144134277,ne=1013904242,r0=2773480762,xe=1359893119,Me=2600822924,be=528734635,We=1541459225;const ae=new Uint32Array(64);function y0(oe){let de=0,le=oe.length;for(;le>=64;){let q=ge,Y=_e,O=ne,me=r0,Je=xe,se=Me,Ve=be,c0=We,l0,h0,R0,tt,V0;for(h0=0;h0<16;h0++)R0=de+h0*4,ae[h0]=(oe[R0]&255)<<24|(oe[R0+1]&255)<<16|(oe[R0+2]&255)<<8|oe[R0+3]&255;for(h0=16;h0<64;h0++)l0=ae[h0-2],tt=(l0>>>17|l0<<15)^(l0>>>19|l0<<13)^l0>>>10,l0=ae[h0-15],V0=(l0>>>7|l0<<25)^(l0>>>18|l0<<14)^l0>>>3,ae[h0]=(tt+ae[h0-7]|0)+(V0+ae[h0-16]|0)|0;for(h0=0;h0<64;h0++)tt=(((Je>>>6|Je<<26)^(Je>>>11|Je<<21)^(Je>>>25|Je<<7))+(Je&se^~Je&Ve)|0)+(c0+(Ee[h0]+ae[h0]|0)|0)|0,V0=((q>>>2|q<<30)^(q>>>13|q<<19)^(q>>>22|q<<10))+(q&Y^q&O^Y&O)|0,c0=Ve,Ve=se,se=Je,Je=me+tt|0,me=O,O=Y,Y=q,q=tt+V0|0;ge=ge+q|0,_e=_e+Y|0,ne=ne+O|0,r0=r0+me|0,xe=xe+Je|0,Me=Me+se|0,be=be+Ve|0,We=We+c0|0,de+=64,le-=64}}y0(V);let Ne,J=V.length%64,G=V.length/536870912|0,m=V.length<<3,R=J<56?56:120,X=V.slice(V.length-J,V.length);for(X.push(128),Ne=J+1;Ne<R;Ne++)X.push(0);return X.push(G>>>24&255),X.push(G>>>16&255),X.push(G>>>8&255),X.push(G>>>0&255),X.push(m>>>24&255),X.push(m>>>16&255),X.push(m>>>8&255),X.push(m>>>0&255),y0(X),[ge>>>24&255,ge>>>16&255,ge>>>8&255,ge>>>0&255,_e>>>24&255,_e>>>16&255,_e>>>8&255,_e>>>0&255,ne>>>24&255,ne>>>16&255,ne>>>8&255,ne>>>0&255,r0>>>24&255,r0>>>16&255,r0>>>8&255,r0>>>0&255,xe>>>24&255,xe>>>16&255,xe>>>8&255,xe>>>0&255,Me>>>24&255,Me>>>16&255,Me>>>8&255,Me>>>0&255,be>>>24&255,be>>>16&255,be>>>8&255,be>>>0&255,We>>>24&255,We>>>16&255,We>>>8&255,We>>>0&255]}function y(V,Ee,ge){V=V.length<=64?V:b(V);const _e=64+Ee.length+4,ne=new Array(_e),r0=new Array(64);let xe,Me=[];for(xe=0;xe<64;xe++)ne[xe]=54;for(xe=0;xe<V.length;xe++)ne[xe]^=V[xe];for(xe=0;xe<Ee.length;xe++)ne[64+xe]=Ee[xe];for(xe=_e-4;xe<_e;xe++)ne[xe]=0;for(xe=0;xe<64;xe++)r0[xe]=92;for(xe=0;xe<V.length;xe++)r0[xe]^=V[xe];function be(){for(let We=_e-1;We>=_e-4;We--){if(ne[We]++,ne[We]<=255)return;ne[We]=0}}for(;ge>=32;)be(),Me=Me.concat(b(r0.concat(b(ne)))),ge-=32;return ge>0&&(be(),Me=Me.concat(b(r0.concat(b(ne))).slice(0,ge))),Me}function C(V,Ee,ge,_e,ne){let r0;for(L(V,(2*ge-1)*16,ne,0,16),r0=0;r0<2*ge;r0++)M(V,r0*16,ne,16),k(ne,_e),L(ne,0,V,Ee+r0*16,16);for(r0=0;r0<ge;r0++)L(V,Ee+r0*2*16,V,r0*16,16);for(r0=0;r0<ge;r0++)L(V,Ee+(r0*2+1)*16,V,(r0+ge)*16,16)}function S(V,Ee){return V<<Ee|V>>>32-Ee}function k(V,Ee){L(V,0,Ee,0,16);for(let ge=8;ge>0;ge-=2)Ee[4]^=S(Ee[0]+Ee[12],7),Ee[8]^=S(Ee[4]+Ee[0],9),Ee[12]^=S(Ee[8]+Ee[4],13),Ee[0]^=S(Ee[12]+Ee[8],18),Ee[9]^=S(Ee[5]+Ee[1],7),Ee[13]^=S(Ee[9]+Ee[5],9),Ee[1]^=S(Ee[13]+Ee[9],13),Ee[5]^=S(Ee[1]+Ee[13],18),Ee[14]^=S(Ee[10]+Ee[6],7),Ee[2]^=S(Ee[14]+Ee[10],9),Ee[6]^=S(Ee[2]+Ee[14],13),Ee[10]^=S(Ee[6]+Ee[2],18),Ee[3]^=S(Ee[15]+Ee[11],7),Ee[7]^=S(Ee[3]+Ee[15],9),Ee[11]^=S(Ee[7]+Ee[3],13),Ee[15]^=S(Ee[11]+Ee[7],18),Ee[1]^=S(Ee[0]+Ee[3],7),Ee[2]^=S(Ee[1]+Ee[0],9),Ee[3]^=S(Ee[2]+Ee[1],13),Ee[0]^=S(Ee[3]+Ee[2],18),Ee[6]^=S(Ee[5]+Ee[4],7),Ee[7]^=S(Ee[6]+Ee[5],9),Ee[4]^=S(Ee[7]+Ee[6],13),Ee[5]^=S(Ee[4]+Ee[7],18),Ee[11]^=S(Ee[10]+Ee[9],7),Ee[8]^=S(Ee[11]+Ee[10],9),Ee[9]^=S(Ee[8]+Ee[11],13),Ee[10]^=S(Ee[9]+Ee[8],18),Ee[12]^=S(Ee[15]+Ee[14],7),Ee[13]^=S(Ee[12]+Ee[15],9),Ee[14]^=S(Ee[13]+Ee[12],13),Ee[15]^=S(Ee[14]+Ee[13],18);for(let ge=0;ge<16;++ge)V[ge]+=Ee[ge]}function M(V,Ee,ge,_e){for(let ne=0;ne<_e;ne++)ge[ne]^=V[Ee+ne]}function L(V,Ee,ge,_e,ne){for(;ne--;)ge[_e++]=V[Ee++]}function w(V){if(!V||typeof V.length!="number")return!1;for(let Ee=0;Ee<V.length;Ee++){const ge=V[Ee];if(typeof ge!="number"||ge%1||ge<0||ge>=256)return!1}return!0}function ee(V,Ee){if(typeof V!="number"||V%1)throw new Error("invalid "+Ee);return V}function Ce(V,Ee,ge,_e,ne,r0,xe){if(ge=ee(ge,"N"),_e=ee(_e,"r"),ne=ee(ne,"p"),r0=ee(r0,"dkLen"),ge===0||(ge&ge-1)!==0)throw new Error("N must be power of 2");if(ge>2147483647/128/_e)throw new Error("N too large");if(_e>2147483647/128/ne)throw new Error("r too large");if(!w(V))throw new Error("password must be an array or buffer");if(V=Array.prototype.slice.call(V),!w(Ee))throw new Error("salt must be an array or buffer");Ee=Array.prototype.slice.call(Ee);let Me=y(V,Ee,ne*128*_e);const be=new Uint32Array(ne*32*_e);for(let Je=0;Je<be.length;Je++){const se=Je*4;be[Je]=(Me[se+3]&255)<<24|(Me[se+2]&255)<<16|(Me[se+1]&255)<<8|(Me[se+0]&255)<<0}const We=new Uint32Array(64*_e),ae=new Uint32Array(32*_e*ge),y0=32*_e,Ne=new Uint32Array(16),J=new Uint32Array(16),G=ne*ge*2;let m=0,R=null,X=!1,oe=0,de=0,le,q;const Y=xe?parseInt(1e3/_e):4294967295,O=typeof setImmediate<"u"?setImmediate:setTimeout,me=function(){if(X)return xe(new Error("cancelled"),m/G);let Je;switch(oe){case 0:q=de*32*_e,L(be,q,We,0,y0),oe=1,le=0;case 1:Je=ge-le,Je>Y&&(Je=Y);for(let Ve=0;Ve<Je;Ve++)L(We,0,ae,(le+Ve)*y0,y0),C(We,y0,_e,Ne,J);if(le+=Je,m+=Je,xe){const Ve=parseInt(1e3*m/G);if(Ve!==R){if(X=xe(null,m/G),X)break;R=Ve}}if(le<ge)break;le=0,oe=2;case 2:Je=ge-le,Je>Y&&(Je=Y);for(let Ve=0;Ve<Je;Ve++){const c0=(2*_e-1)*16,l0=We[c0]&ge-1;M(ae,l0*y0,We,y0),C(We,y0,_e,Ne,J)}if(le+=Je,m+=Je,xe){const Ve=parseInt(1e3*m/G);if(Ve!==R){if(X=xe(null,m/G),X)break;R=Ve}}if(le<ge)break;if(L(We,0,be,q,y0),de++,de<ne){oe=0;break}Me=[];for(let Ve=0;Ve<be.length;Ve++)Me.push(be[Ve]>>0&255),Me.push(be[Ve]>>8&255),Me.push(be[Ve]>>16&255),Me.push(be[Ve]>>24&255);const se=y(V,Me,r0);return xe&&xe(null,1,se),se}xe&&O(me)};if(!xe)for(;;){const Je=me();if(Je!=null)return Je}me()}const ce={scrypt:function(V,Ee,ge,_e,ne,r0,xe){return new Promise(function(Me,be){let We=0;xe&&xe(0),Ce(V,Ee,ge,_e,ne,r0,function(ae,y0,Ne){if(ae)be(ae);else if(Ne)xe&&We!==1&&xe(1),Me(new Uint8Array(Ne));else if(xe&&y0!==We)return We=y0,xe(y0)})})},syncScrypt:function(V,Ee,ge,_e,ne,r0){return new Uint8Array(Ce(V,Ee,ge,_e,ne,r0))}};f.exports=ce})()})(hh)),hh.exports}var TB=LB();const vg=Li(TB);var JB=function(f,o,c,l){function b(y){return y instanceof c?y:new c(function(C){C(y)})}return new(c||(c=Promise))(function(y,C){function S(L){try{M(l.next(L))}catch(w){C(w)}}function k(L){try{M(l.throw(L))}catch(w){C(w)}}function M(L){L.done?y(L.value):b(L.value).then(S,k)}M((l=l.apply(f,o||[])).next())})};const cd=new zt(AC);function gp(f){return f!=null&&f.mnemonic&&f.mnemonic.phrase}class OB extends Ly{isKeystoreAccount(o){return!!(o&&o._isKeystoreAccount)}}function zB(f,o,c){if(_n(f,"crypto/cipher")==="aes-128-ctr"){const b=h2(_n(f,"crypto/cipherparams/iv")),y=new fa.Counter(b),C=new fa.ModeOfOperation.ctr(o,y);return Nt(C.decrypt(c))}return null}function sC(f,o){const c=h2(_n(f,"crypto/ciphertext"));if(sr(BA(Do([o.slice(16,32),c]))).substring(2)!==_n(f,"crypto/mac").toLowerCase())throw new Error("invalid password");const b=zB(f,o.slice(0,16),c);b||cd.throwError("unsupported cipher",zt.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const y=o.slice(32,64),C=ws(b);if(f.address){let k=f.address.toLowerCase();if(k.substring(0,2)!=="0x"&&(k="0x"+k),Yi(k)!==C)throw new Error("address mismatch")}const S={_isKeystoreAccount:!0,address:C,privateKey:sr(b)};if(_n(f,"x-ethers/version")==="0.1"){const k=h2(_n(f,"x-ethers/mnemonicCiphertext")),M=h2(_n(f,"x-ethers/mnemonicCounter")),L=new fa.Counter(M),w=new fa.ModeOfOperation.ctr(y,L),ee=_n(f,"x-ethers/path")||Ff,Ce=_n(f,"x-ethers/locale")||"en",ce=Nt(w.decrypt(k));try{const V=Ig(ce,Ce),Ee=hi.fromMnemonic(V,null,Ce).derivePath(ee);if(Ee.privateKey!=S.privateKey)throw new Error("mnemonic mismatch");S.mnemonic=Ee.mnemonic}catch(V){if(V.code!==zt.errors.INVALID_ARGUMENT||V.argument!=="wordlist")throw V}}return new OB(S)}function fC(f,o,c,l,b){return Nt(dg(f,o,c,l,b))}function qB(f,o,c,l,b){return Promise.resolve(fC(f,o,c,l,b))}function cC(f,o,c,l,b){const y=bg(o),C=_n(f,"crypto/kdf");if(C&&typeof C=="string"){const S=function(k,M){return cd.throwArgumentError("invalid key-derivation function parameters",k,M)};if(C.toLowerCase()==="scrypt"){const k=h2(_n(f,"crypto/kdfparams/salt")),M=parseInt(_n(f,"crypto/kdfparams/n")),L=parseInt(_n(f,"crypto/kdfparams/r")),w=parseInt(_n(f,"crypto/kdfparams/p"));(!M||!L||!w)&&S("kdf",C),(M&M-1)!==0&&S("N",M);const ee=parseInt(_n(f,"crypto/kdfparams/dklen"));return ee!==32&&S("dklen",ee),l(y,k,M,L,w,64,b)}else if(C.toLowerCase()==="pbkdf2"){const k=h2(_n(f,"crypto/kdfparams/salt"));let M=null;const L=_n(f,"crypto/kdfparams/prf");L==="hmac-sha256"?M="sha256":L==="hmac-sha512"?M="sha512":S("prf",L);const w=parseInt(_n(f,"crypto/kdfparams/c")),ee=parseInt(_n(f,"crypto/kdfparams/dklen"));return ee!==32&&S("dklen",ee),c(y,k,w,ee,M)}}return cd.throwArgumentError("unsupported key-derivation function","kdf",C)}function jB(f,o){const c=JSON.parse(f),l=cC(c,o,fC,vg.syncScrypt);return sC(c,l)}function VB(f,o,c){return JB(this,void 0,void 0,function*(){const l=JSON.parse(f),b=yield cC(l,o,qB,vg.scrypt,c);return sC(l,b)})}function XB(f,o,c,l){try{if(Yi(f.address)!==ws(f.privateKey))throw new Error("address/privateKey mismatch");if(gp(f)){const Ee=f.mnemonic;if(hi.fromMnemonic(Ee.phrase,null,Ee.locale).derivePath(Ee.path||Ff).privateKey!=f.privateKey)throw new Error("mnemonic mismatch")}}catch(Ee){return Promise.reject(Ee)}typeof c=="function"&&!l&&(l=c,c={}),c||(c={});const b=Nt(f.privateKey),y=bg(o);let C=null,S=null,k=null;if(gp(f)){const Ee=f.mnemonic;C=Nt(nC(Ee.phrase,Ee.locale||"en")),S=Ee.path||Ff,k=Ee.locale||"en"}let M=c.client;M||(M="ethers.js");let L=null;c.salt?L=Nt(c.salt):L=gf(32);let w=null;if(c.iv){if(w=Nt(c.iv),w.length!==16)throw new Error("invalid iv")}else w=gf(16);let ee=null;if(c.uuid){if(ee=Nt(c.uuid),ee.length!==16)throw new Error("invalid uuid")}else ee=gf(16);let Ce=1<<17,ce=8,V=1;return c.scrypt&&(c.scrypt.N&&(Ce=c.scrypt.N),c.scrypt.r&&(ce=c.scrypt.r),c.scrypt.p&&(V=c.scrypt.p)),vg.scrypt(y,L,Ce,ce,V,64,l).then(Ee=>{Ee=Nt(Ee);const ge=Ee.slice(0,16),_e=Ee.slice(16,32),ne=Ee.slice(32,64),r0=new fa.Counter(w),xe=new fa.ModeOfOperation.ctr(ge,r0),Me=Nt(xe.encrypt(b)),be=BA(Do([_e,Me])),We={address:f.address.substring(2).toLowerCase(),id:HB(ee),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:sr(w).substring(2)},ciphertext:sr(Me).substring(2),kdf:"scrypt",kdfparams:{salt:sr(L).substring(2),n:Ce,dklen:32,p:V,r:ce},mac:be.substring(2)}};if(C){const ae=gf(16),y0=new fa.Counter(ae),Ne=new fa.ModeOfOperation.ctr(ne,y0),J=Nt(Ne.encrypt(C)),G=new Date,m=G.getUTCFullYear()+"-"+uf(G.getUTCMonth()+1,2)+"-"+uf(G.getUTCDate(),2)+"T"+uf(G.getUTCHours(),2)+"-"+uf(G.getUTCMinutes(),2)+"-"+uf(G.getUTCSeconds(),2)+".0Z";We["x-ethers"]={client:M,gethFilename:"UTC--"+m+"--"+We.address,mnemonicCounter:sr(ae).substring(2),mnemonicCiphertext:sr(J).substring(2),path:S,locale:k,version:"0.1"}}return JSON.stringify(We)})}function WB(f,o,c){if(aC(f)){c&&c(0);const l=iC(f,o);return c&&c(1),Promise.resolve(l)}return oC(f)?VB(f,o,c):Promise.reject(new Error("invalid JSON wallet"))}function ZB(f,o){if(aC(f))return iC(f,o);if(oC(f))return jB(f,o);throw new Error("invalid JSON wallet")}const $B="wallet/5.8.0";var pp=function(f,o,c,l){function b(y){return y instanceof c?y:new c(function(C){C(y)})}return new(c||(c=Promise))(function(y,C){function S(L){try{M(l.next(L))}catch(w){C(w)}}function k(L){try{M(l.throw(L))}catch(w){C(w)}}function M(L){L.done?y(L.value):b(L.value).then(S,k)}M((l=l.apply(f,o||[])).next())})};const ss=new zt($B);function em(f){return f!=null&&mA(f.privateKey,32)&&f.address!=null}function tm(f){const o=f.mnemonic;return o&&o.phrase}class o2 extends lg{constructor(o,c){if(super(),em(o)){const l=new _s(o.privateKey);if(lr(this,"_signingKey",()=>l),lr(this,"address",ws(this.publicKey)),this.address!==Yi(o.address)&&ss.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),tm(o)){const b=o.mnemonic;lr(this,"_mnemonic",()=>({phrase:b.phrase,path:b.path||Ff,locale:b.locale||"en"}));const y=this.mnemonic,C=hi.fromMnemonic(y.phrase,null,y.locale).derivePath(y.path);ws(C.privateKey)!==this.address&&ss.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else lr(this,"_mnemonic",()=>null)}else{if(_s.isSigningKey(o))o.curve!=="secp256k1"&&ss.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),lr(this,"_signingKey",()=>o);else{typeof o=="string"&&o.match(/^[0-9a-f]*$/i)&&o.length===64&&(o="0x"+o);const l=new _s(o);lr(this,"_signingKey",()=>l)}lr(this,"_mnemonic",()=>null),lr(this,"address",ws(this.publicKey))}c&&!ug.isProvider(c)&&ss.throwArgumentError("invalid provider","provider",c),lr(this,"provider",c||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(o){return new o2(this,o)}signTransaction(o){return us(o).then(c=>{c.from!=null&&(Yi(c.from)!==this.address&&ss.throwArgumentError("transaction from address mismatch","transaction.from",o.from),delete c.from);const l=this._signingKey().signDigest(BA(sp(c)));return sp(c,l)})}signMessage(o){return pp(this,void 0,void 0,function*(){return id(this._signingKey().signDigest(Jw(o)))})}_signTypedData(o,c,l){return pp(this,void 0,void 0,function*(){const b=yield VA.resolveNames(o,c,l,y=>(this.provider==null&&ss.throwError("cannot resolve ENS names without a provider",zt.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:y}),this.provider.resolveName(y)));return id(this._signingKey().signDigest(VA.hash(b.domain,c,b.value)))})}encrypt(o,c,l){if(typeof c=="function"&&!l&&(l=c,c={}),l&&typeof l!="function")throw new Error("invalid callback");return c||(c={}),XB(this,o,c,l)}static createRandom(o){let c=gf(16);o||(o={}),o.extraEntropy&&(c=Nt(Df(BA(Do([c,o.extraEntropy])),0,16)));const l=Ig(c,o.locale);return o2.fromMnemonic(l,o.path,o.locale)}static fromEncryptedJson(o,c,l){return WB(o,c,l).then(b=>new o2(b))}static fromEncryptedJsonSync(o,c){return new o2(ZB(o,c))}static fromMnemonic(o,c,l){return c||(c=Ff),new o2(hi.fromMnemonic(o,null,l).derivePath(c))}}var dh={};const rm="6.6.1",nm={version:rm};var gh={},f1={exports:{}},Am=f1.exports,yp;function Ja(){return yp||(yp=1,(function(f){(function(o,c){function l(Ne,J){if(!Ne)throw new Error(J||"Assertion failed")}function b(Ne,J){Ne.super_=J;var G=function(){};G.prototype=J.prototype,Ne.prototype=new G,Ne.prototype.constructor=Ne}function y(Ne,J,G){if(y.isBN(Ne))return Ne;this.negative=0,this.words=null,this.length=0,this.red=null,Ne!==null&&((J==="le"||J==="be")&&(G=J,J=10),this._init(Ne||0,J||10,G||"be"))}typeof o=="object"?o.exports=y:c.BN=y,y.BN=y,y.wordSize=26;var C;try{typeof window<"u"&&typeof window.Buffer<"u"?C=window.Buffer:C=Pa.Buffer}catch{}y.isBN=function(J){return J instanceof y?!0:J!==null&&typeof J=="object"&&J.constructor.wordSize===y.wordSize&&Array.isArray(J.words)},y.max=function(J,G){return J.cmp(G)>0?J:G},y.min=function(J,G){return J.cmp(G)<0?J:G},y.prototype._init=function(J,G,m){if(typeof J=="number")return this._initNumber(J,G,m);if(typeof J=="object")return this._initArray(J,G,m);G==="hex"&&(G=16),l(G===(G|0)&&G>=2&&G<=36),J=J.toString().replace(/\s+/g,"");var R=0;J[0]==="-"&&(R++,this.negative=1),R<J.length&&(G===16?this._parseHex(J,R,m):(this._parseBase(J,G,R),m==="le"&&this._initArray(this.toArray(),G,m)))},y.prototype._initNumber=function(J,G,m){J<0&&(this.negative=1,J=-J),J<67108864?(this.words=[J&67108863],this.length=1):J<4503599627370496?(this.words=[J&67108863,J/67108864&67108863],this.length=2):(l(J<9007199254740992),this.words=[J&67108863,J/67108864&67108863,1],this.length=3),m==="le"&&this._initArray(this.toArray(),G,m)},y.prototype._initArray=function(J,G,m){if(l(typeof J.length=="number"),J.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(J.length/3),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var X,oe,de=0;if(m==="be")for(R=J.length-1,X=0;R>=0;R-=3)oe=J[R]|J[R-1]<<8|J[R-2]<<16,this.words[X]|=oe<<de&67108863,this.words[X+1]=oe>>>26-de&67108863,de+=24,de>=26&&(de-=26,X++);else if(m==="le")for(R=0,X=0;R<J.length;R+=3)oe=J[R]|J[R+1]<<8|J[R+2]<<16,this.words[X]|=oe<<de&67108863,this.words[X+1]=oe>>>26-de&67108863,de+=24,de>=26&&(de-=26,X++);return this.strip()};function S(Ne,J){var G=Ne.charCodeAt(J);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function k(Ne,J,G){var m=S(Ne,G);return G-1>=J&&(m|=S(Ne,G-1)<<4),m}y.prototype._parseHex=function(J,G,m){this.length=Math.ceil((J.length-G)/6),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var X=0,oe=0,de;if(m==="be")for(R=J.length-1;R>=G;R-=2)de=k(J,G,R)<<X,this.words[oe]|=de&67108863,X>=18?(X-=18,oe+=1,this.words[oe]|=de>>>26):X+=8;else{var le=J.length-G;for(R=le%2===0?G+1:G;R<J.length;R+=2)de=k(J,G,R)<<X,this.words[oe]|=de&67108863,X>=18?(X-=18,oe+=1,this.words[oe]|=de>>>26):X+=8}this.strip()};function M(Ne,J,G,m){for(var R=0,X=Math.min(Ne.length,G),oe=J;oe<X;oe++){var de=Ne.charCodeAt(oe)-48;R*=m,de>=49?R+=de-49+10:de>=17?R+=de-17+10:R+=de}return R}y.prototype._parseBase=function(J,G,m){this.words=[0],this.length=1;for(var R=0,X=1;X<=67108863;X*=G)R++;R--,X=X/G|0;for(var oe=J.length-m,de=oe%R,le=Math.min(oe,oe-de)+m,q=0,Y=m;Y<le;Y+=R)q=M(J,Y,Y+R,G),this.imuln(X),this.words[0]+q<67108864?this.words[0]+=q:this._iaddn(q);if(de!==0){var O=1;for(q=M(J,Y,J.length,G),Y=0;Y<de;Y++)O*=G;this.imuln(O),this.words[0]+q<67108864?this.words[0]+=q:this._iaddn(q)}this.strip()},y.prototype.copy=function(J){J.words=new Array(this.length);for(var G=0;G<this.length;G++)J.words[G]=this.words[G];J.length=this.length,J.negative=this.negative,J.red=this.red},y.prototype.clone=function(){var J=new y(null);return this.copy(J),J},y.prototype._expand=function(J){for(;this.length<J;)this.words[this.length++]=0;return this},y.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},y.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},y.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var L=["","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"],w=[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],ee=[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];y.prototype.toString=function(J,G){J=J||10,G=G|0||1;var m;if(J===16||J==="hex"){m="";for(var R=0,X=0,oe=0;oe<this.length;oe++){var de=this.words[oe],le=((de<<R|X)&16777215).toString(16);X=de>>>24-R&16777215,R+=2,R>=26&&(R-=26,oe--),X!==0||oe!==this.length-1?m=L[6-le.length]+le+m:m=le+m}for(X!==0&&(m=X.toString(16)+m);m.length%G!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}if(J===(J|0)&&J>=2&&J<=36){var q=w[J],Y=ee[J];m="";var O=this.clone();for(O.negative=0;!O.isZero();){var me=O.modn(Y).toString(J);O=O.idivn(Y),O.isZero()?m=me+m:m=L[q-me.length]+me+m}for(this.isZero()&&(m="0"+m);m.length%G!==0;)m="0"+m;return this.negative!==0&&(m="-"+m),m}l(!1,"Base should be between 2 and 36")},y.prototype.toNumber=function(){var J=this.words[0];return this.length===2?J+=this.words[1]*67108864:this.length===3&&this.words[2]===1?J+=4503599627370496+this.words[1]*67108864:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-J:J},y.prototype.toJSON=function(){return this.toString(16)},y.prototype.toBuffer=function(J,G){return l(typeof C<"u"),this.toArrayLike(C,J,G)},y.prototype.toArray=function(J,G){return this.toArrayLike(Array,J,G)},y.prototype.toArrayLike=function(J,G,m){var R=this.byteLength(),X=m||Math.max(1,R);l(R<=X,"byte array longer than desired length"),l(X>0,"Requested array length <= 0"),this.strip();var oe=G==="le",de=new J(X),le,q,Y=this.clone();if(oe){for(q=0;!Y.isZero();q++)le=Y.andln(255),Y.iushrn(8),de[q]=le;for(;q<X;q++)de[q]=0}else{for(q=0;q<X-R;q++)de[q]=0;for(q=0;!Y.isZero();q++)le=Y.andln(255),Y.iushrn(8),de[X-q-1]=le}return de},Math.clz32?y.prototype._countBits=function(J){return 32-Math.clz32(J)}:y.prototype._countBits=function(J){var G=J,m=0;return G>=4096&&(m+=13,G>>>=13),G>=64&&(m+=7,G>>>=7),G>=8&&(m+=4,G>>>=4),G>=2&&(m+=2,G>>>=2),m+G},y.prototype._zeroBits=function(J){if(J===0)return 26;var G=J,m=0;return(G&8191)===0&&(m+=13,G>>>=13),(G&127)===0&&(m+=7,G>>>=7),(G&15)===0&&(m+=4,G>>>=4),(G&3)===0&&(m+=2,G>>>=2),(G&1)===0&&m++,m},y.prototype.bitLength=function(){var J=this.words[this.length-1],G=this._countBits(J);return(this.length-1)*26+G};function Ce(Ne){for(var J=new Array(Ne.bitLength()),G=0;G<J.length;G++){var m=G/26|0,R=G%26;J[G]=(Ne.words[m]&1<<R)>>>R}return J}y.prototype.zeroBits=function(){if(this.isZero())return 0;for(var J=0,G=0;G<this.length;G++){var m=this._zeroBits(this.words[G]);if(J+=m,m!==26)break}return J},y.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},y.prototype.toTwos=function(J){return this.negative!==0?this.abs().inotn(J).iaddn(1):this.clone()},y.prototype.fromTwos=function(J){return this.testn(J-1)?this.notn(J).iaddn(1).ineg():this.clone()},y.prototype.isNeg=function(){return this.negative!==0},y.prototype.neg=function(){return this.clone().ineg()},y.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},y.prototype.iuor=function(J){for(;this.length<J.length;)this.words[this.length++]=0;for(var G=0;G<J.length;G++)this.words[G]=this.words[G]|J.words[G];return this.strip()},y.prototype.ior=function(J){return l((this.negative|J.negative)===0),this.iuor(J)},y.prototype.or=function(J){return this.length>J.length?this.clone().ior(J):J.clone().ior(this)},y.prototype.uor=function(J){return this.length>J.length?this.clone().iuor(J):J.clone().iuor(this)},y.prototype.iuand=function(J){var G;this.length>J.length?G=J:G=this;for(var m=0;m<G.length;m++)this.words[m]=this.words[m]&J.words[m];return this.length=G.length,this.strip()},y.prototype.iand=function(J){return l((this.negative|J.negative)===0),this.iuand(J)},y.prototype.and=function(J){return this.length>J.length?this.clone().iand(J):J.clone().iand(this)},y.prototype.uand=function(J){return this.length>J.length?this.clone().iuand(J):J.clone().iuand(this)},y.prototype.iuxor=function(J){var G,m;this.length>J.length?(G=this,m=J):(G=J,m=this);for(var R=0;R<m.length;R++)this.words[R]=G.words[R]^m.words[R];if(this!==G)for(;R<G.length;R++)this.words[R]=G.words[R];return this.length=G.length,this.strip()},y.prototype.ixor=function(J){return l((this.negative|J.negative)===0),this.iuxor(J)},y.prototype.xor=function(J){return this.length>J.length?this.clone().ixor(J):J.clone().ixor(this)},y.prototype.uxor=function(J){return this.length>J.length?this.clone().iuxor(J):J.clone().iuxor(this)},y.prototype.inotn=function(J){l(typeof J=="number"&&J>=0);var G=Math.ceil(J/26)|0,m=J%26;this._expand(G),m>0&&G--;for(var R=0;R<G;R++)this.words[R]=~this.words[R]&67108863;return m>0&&(this.words[R]=~this.words[R]&67108863>>26-m),this.strip()},y.prototype.notn=function(J){return this.clone().inotn(J)},y.prototype.setn=function(J,G){l(typeof J=="number"&&J>=0);var m=J/26|0,R=J%26;return this._expand(m+1),G?this.words[m]=this.words[m]|1<<R:this.words[m]=this.words[m]&~(1<<R),this.strip()},y.prototype.iadd=function(J){var G;if(this.negative!==0&&J.negative===0)return this.negative=0,G=this.isub(J),this.negative^=1,this._normSign();if(this.negative===0&&J.negative!==0)return J.negative=0,G=this.isub(J),J.negative=1,G._normSign();var m,R;this.length>J.length?(m=this,R=J):(m=J,R=this);for(var X=0,oe=0;oe<R.length;oe++)G=(m.words[oe]|0)+(R.words[oe]|0)+X,this.words[oe]=G&67108863,X=G>>>26;for(;X!==0&&oe<m.length;oe++)G=(m.words[oe]|0)+X,this.words[oe]=G&67108863,X=G>>>26;if(this.length=m.length,X!==0)this.words[this.length]=X,this.length++;else if(m!==this)for(;oe<m.length;oe++)this.words[oe]=m.words[oe];return this},y.prototype.add=function(J){var G;return J.negative!==0&&this.negative===0?(J.negative=0,G=this.sub(J),J.negative^=1,G):J.negative===0&&this.negative!==0?(this.negative=0,G=J.sub(this),this.negative=1,G):this.length>J.length?this.clone().iadd(J):J.clone().iadd(this)},y.prototype.isub=function(J){if(J.negative!==0){J.negative=0;var G=this.iadd(J);return J.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(J),this.negative=1,this._normSign();var m=this.cmp(J);if(m===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,X;m>0?(R=this,X=J):(R=J,X=this);for(var oe=0,de=0;de<X.length;de++)G=(R.words[de]|0)-(X.words[de]|0)+oe,oe=G>>26,this.words[de]=G&67108863;for(;oe!==0&&de<R.length;de++)G=(R.words[de]|0)+oe,oe=G>>26,this.words[de]=G&67108863;if(oe===0&&de<R.length&&R!==this)for(;de<R.length;de++)this.words[de]=R.words[de];return this.length=Math.max(this.length,de),R!==this&&(this.negative=1),this.strip()},y.prototype.sub=function(J){return this.clone().isub(J)};function ce(Ne,J,G){G.negative=J.negative^Ne.negative;var m=Ne.length+J.length|0;G.length=m,m=m-1|0;var R=Ne.words[0]|0,X=J.words[0]|0,oe=R*X,de=oe&67108863,le=oe/67108864|0;G.words[0]=de;for(var q=1;q<m;q++){for(var Y=le>>>26,O=le&67108863,me=Math.min(q,J.length-1),Je=Math.max(0,q-Ne.length+1);Je<=me;Je++){var se=q-Je|0;R=Ne.words[se]|0,X=J.words[Je]|0,oe=R*X+O,Y+=oe/67108864|0,O=oe&67108863}G.words[q]=O|0,le=Y|0}return le!==0?G.words[q]=le|0:G.length--,G.strip()}var V=function(J,G,m){var R=J.words,X=G.words,oe=m.words,de=0,le,q,Y,O=R[0]|0,me=O&8191,Je=O>>>13,se=R[1]|0,Ve=se&8191,c0=se>>>13,l0=R[2]|0,h0=l0&8191,R0=l0>>>13,tt=R[3]|0,V0=tt&8191,t0=tt>>>13,ht=R[4]|0,Ke=ht&8191,Ze=ht>>>13,o0=R[5]|0,Ae=o0&8191,w0=o0>>>13,U0=R[6]|0,N0=U0&8191,ot=U0>>>13,W0=R[7]|0,X0=W0&8191,vt=W0>>>13,er=R[8]|0,Yt=er&8191,yr=er>>>13,Er=R[9]|0,Lt=Er&8191,hr=Er>>>13,kr=X[0]|0,qt=kr&8191,xr=kr>>>13,Mr=X[1]|0,Jt=Mr&8191,Qr=Mr>>>13,Sr=X[2]|0,$t=Sr&8191,Dr=Sr>>>13,Cr=X[3]|0,Ut=Cr&8191,br=Cr>>>13,dr=X[4]|0,jt=dr&8191,Fr=dr>>>13,Pr=X[5]|0,Vt=Pr&8191,_r=Pr>>>13,vr=X[6]|0,Ot=vr&8191,Ir=vr>>>13,Kr=X[7]|0,Xt=Kr&8191,a0=Kr>>>13,wr=X[8]|0,Ye=wr&8191,n0=wr>>>13,u0=X[9]|0,g0=u0&8191,x0=u0>>>13;m.negative=J.negative^G.negative,m.length=19,le=Math.imul(me,qt),q=Math.imul(me,xr),q=q+Math.imul(Je,qt)|0,Y=Math.imul(Je,xr);var P0=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(P0>>>26)|0,P0&=67108863,le=Math.imul(Ve,qt),q=Math.imul(Ve,xr),q=q+Math.imul(c0,qt)|0,Y=Math.imul(c0,xr),le=le+Math.imul(me,Jt)|0,q=q+Math.imul(me,Qr)|0,q=q+Math.imul(Je,Jt)|0,Y=Y+Math.imul(Je,Qr)|0;var Y0=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(Y0>>>26)|0,Y0&=67108863,le=Math.imul(h0,qt),q=Math.imul(h0,xr),q=q+Math.imul(R0,qt)|0,Y=Math.imul(R0,xr),le=le+Math.imul(Ve,Jt)|0,q=q+Math.imul(Ve,Qr)|0,q=q+Math.imul(c0,Jt)|0,Y=Y+Math.imul(c0,Qr)|0,le=le+Math.imul(me,$t)|0,q=q+Math.imul(me,Dr)|0,q=q+Math.imul(Je,$t)|0,Y=Y+Math.imul(Je,Dr)|0;var it=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(it>>>26)|0,it&=67108863,le=Math.imul(V0,qt),q=Math.imul(V0,xr),q=q+Math.imul(t0,qt)|0,Y=Math.imul(t0,xr),le=le+Math.imul(h0,Jt)|0,q=q+Math.imul(h0,Qr)|0,q=q+Math.imul(R0,Jt)|0,Y=Y+Math.imul(R0,Qr)|0,le=le+Math.imul(Ve,$t)|0,q=q+Math.imul(Ve,Dr)|0,q=q+Math.imul(c0,$t)|0,Y=Y+Math.imul(c0,Dr)|0,le=le+Math.imul(me,Ut)|0,q=q+Math.imul(me,br)|0,q=q+Math.imul(Je,Ut)|0,Y=Y+Math.imul(Je,br)|0;var xt=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(xt>>>26)|0,xt&=67108863,le=Math.imul(Ke,qt),q=Math.imul(Ke,xr),q=q+Math.imul(Ze,qt)|0,Y=Math.imul(Ze,xr),le=le+Math.imul(V0,Jt)|0,q=q+Math.imul(V0,Qr)|0,q=q+Math.imul(t0,Jt)|0,Y=Y+Math.imul(t0,Qr)|0,le=le+Math.imul(h0,$t)|0,q=q+Math.imul(h0,Dr)|0,q=q+Math.imul(R0,$t)|0,Y=Y+Math.imul(R0,Dr)|0,le=le+Math.imul(Ve,Ut)|0,q=q+Math.imul(Ve,br)|0,q=q+Math.imul(c0,Ut)|0,Y=Y+Math.imul(c0,br)|0,le=le+Math.imul(me,jt)|0,q=q+Math.imul(me,Fr)|0,q=q+Math.imul(Je,jt)|0,Y=Y+Math.imul(Je,Fr)|0;var wt=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(wt>>>26)|0,wt&=67108863,le=Math.imul(Ae,qt),q=Math.imul(Ae,xr),q=q+Math.imul(w0,qt)|0,Y=Math.imul(w0,xr),le=le+Math.imul(Ke,Jt)|0,q=q+Math.imul(Ke,Qr)|0,q=q+Math.imul(Ze,Jt)|0,Y=Y+Math.imul(Ze,Qr)|0,le=le+Math.imul(V0,$t)|0,q=q+Math.imul(V0,Dr)|0,q=q+Math.imul(t0,$t)|0,Y=Y+Math.imul(t0,Dr)|0,le=le+Math.imul(h0,Ut)|0,q=q+Math.imul(h0,br)|0,q=q+Math.imul(R0,Ut)|0,Y=Y+Math.imul(R0,br)|0,le=le+Math.imul(Ve,jt)|0,q=q+Math.imul(Ve,Fr)|0,q=q+Math.imul(c0,jt)|0,Y=Y+Math.imul(c0,Fr)|0,le=le+Math.imul(me,Vt)|0,q=q+Math.imul(me,_r)|0,q=q+Math.imul(Je,Vt)|0,Y=Y+Math.imul(Je,_r)|0;var I=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(I>>>26)|0,I&=67108863,le=Math.imul(N0,qt),q=Math.imul(N0,xr),q=q+Math.imul(ot,qt)|0,Y=Math.imul(ot,xr),le=le+Math.imul(Ae,Jt)|0,q=q+Math.imul(Ae,Qr)|0,q=q+Math.imul(w0,Jt)|0,Y=Y+Math.imul(w0,Qr)|0,le=le+Math.imul(Ke,$t)|0,q=q+Math.imul(Ke,Dr)|0,q=q+Math.imul(Ze,$t)|0,Y=Y+Math.imul(Ze,Dr)|0,le=le+Math.imul(V0,Ut)|0,q=q+Math.imul(V0,br)|0,q=q+Math.imul(t0,Ut)|0,Y=Y+Math.imul(t0,br)|0,le=le+Math.imul(h0,jt)|0,q=q+Math.imul(h0,Fr)|0,q=q+Math.imul(R0,jt)|0,Y=Y+Math.imul(R0,Fr)|0,le=le+Math.imul(Ve,Vt)|0,q=q+Math.imul(Ve,_r)|0,q=q+Math.imul(c0,Vt)|0,Y=Y+Math.imul(c0,_r)|0,le=le+Math.imul(me,Ot)|0,q=q+Math.imul(me,Ir)|0,q=q+Math.imul(Je,Ot)|0,Y=Y+Math.imul(Je,Ir)|0;var e=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(e>>>26)|0,e&=67108863,le=Math.imul(X0,qt),q=Math.imul(X0,xr),q=q+Math.imul(vt,qt)|0,Y=Math.imul(vt,xr),le=le+Math.imul(N0,Jt)|0,q=q+Math.imul(N0,Qr)|0,q=q+Math.imul(ot,Jt)|0,Y=Y+Math.imul(ot,Qr)|0,le=le+Math.imul(Ae,$t)|0,q=q+Math.imul(Ae,Dr)|0,q=q+Math.imul(w0,$t)|0,Y=Y+Math.imul(w0,Dr)|0,le=le+Math.imul(Ke,Ut)|0,q=q+Math.imul(Ke,br)|0,q=q+Math.imul(Ze,Ut)|0,Y=Y+Math.imul(Ze,br)|0,le=le+Math.imul(V0,jt)|0,q=q+Math.imul(V0,Fr)|0,q=q+Math.imul(t0,jt)|0,Y=Y+Math.imul(t0,Fr)|0,le=le+Math.imul(h0,Vt)|0,q=q+Math.imul(h0,_r)|0,q=q+Math.imul(R0,Vt)|0,Y=Y+Math.imul(R0,_r)|0,le=le+Math.imul(Ve,Ot)|0,q=q+Math.imul(Ve,Ir)|0,q=q+Math.imul(c0,Ot)|0,Y=Y+Math.imul(c0,Ir)|0,le=le+Math.imul(me,Xt)|0,q=q+Math.imul(me,a0)|0,q=q+Math.imul(Je,Xt)|0,Y=Y+Math.imul(Je,a0)|0;var s=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(s>>>26)|0,s&=67108863,le=Math.imul(Yt,qt),q=Math.imul(Yt,xr),q=q+Math.imul(yr,qt)|0,Y=Math.imul(yr,xr),le=le+Math.imul(X0,Jt)|0,q=q+Math.imul(X0,Qr)|0,q=q+Math.imul(vt,Jt)|0,Y=Y+Math.imul(vt,Qr)|0,le=le+Math.imul(N0,$t)|0,q=q+Math.imul(N0,Dr)|0,q=q+Math.imul(ot,$t)|0,Y=Y+Math.imul(ot,Dr)|0,le=le+Math.imul(Ae,Ut)|0,q=q+Math.imul(Ae,br)|0,q=q+Math.imul(w0,Ut)|0,Y=Y+Math.imul(w0,br)|0,le=le+Math.imul(Ke,jt)|0,q=q+Math.imul(Ke,Fr)|0,q=q+Math.imul(Ze,jt)|0,Y=Y+Math.imul(Ze,Fr)|0,le=le+Math.imul(V0,Vt)|0,q=q+Math.imul(V0,_r)|0,q=q+Math.imul(t0,Vt)|0,Y=Y+Math.imul(t0,_r)|0,le=le+Math.imul(h0,Ot)|0,q=q+Math.imul(h0,Ir)|0,q=q+Math.imul(R0,Ot)|0,Y=Y+Math.imul(R0,Ir)|0,le=le+Math.imul(Ve,Xt)|0,q=q+Math.imul(Ve,a0)|0,q=q+Math.imul(c0,Xt)|0,Y=Y+Math.imul(c0,a0)|0,le=le+Math.imul(me,Ye)|0,q=q+Math.imul(me,n0)|0,q=q+Math.imul(Je,Ye)|0,Y=Y+Math.imul(Je,n0)|0;var nn=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(nn>>>26)|0,nn&=67108863,le=Math.imul(Lt,qt),q=Math.imul(Lt,xr),q=q+Math.imul(hr,qt)|0,Y=Math.imul(hr,xr),le=le+Math.imul(Yt,Jt)|0,q=q+Math.imul(Yt,Qr)|0,q=q+Math.imul(yr,Jt)|0,Y=Y+Math.imul(yr,Qr)|0,le=le+Math.imul(X0,$t)|0,q=q+Math.imul(X0,Dr)|0,q=q+Math.imul(vt,$t)|0,Y=Y+Math.imul(vt,Dr)|0,le=le+Math.imul(N0,Ut)|0,q=q+Math.imul(N0,br)|0,q=q+Math.imul(ot,Ut)|0,Y=Y+Math.imul(ot,br)|0,le=le+Math.imul(Ae,jt)|0,q=q+Math.imul(Ae,Fr)|0,q=q+Math.imul(w0,jt)|0,Y=Y+Math.imul(w0,Fr)|0,le=le+Math.imul(Ke,Vt)|0,q=q+Math.imul(Ke,_r)|0,q=q+Math.imul(Ze,Vt)|0,Y=Y+Math.imul(Ze,_r)|0,le=le+Math.imul(V0,Ot)|0,q=q+Math.imul(V0,Ir)|0,q=q+Math.imul(t0,Ot)|0,Y=Y+Math.imul(t0,Ir)|0,le=le+Math.imul(h0,Xt)|0,q=q+Math.imul(h0,a0)|0,q=q+Math.imul(R0,Xt)|0,Y=Y+Math.imul(R0,a0)|0,le=le+Math.imul(Ve,Ye)|0,q=q+Math.imul(Ve,n0)|0,q=q+Math.imul(c0,Ye)|0,Y=Y+Math.imul(c0,n0)|0,le=le+Math.imul(me,g0)|0,q=q+Math.imul(me,x0)|0,q=q+Math.imul(Je,g0)|0,Y=Y+Math.imul(Je,x0)|0;var gt=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(gt>>>26)|0,gt&=67108863,le=Math.imul(Lt,Jt),q=Math.imul(Lt,Qr),q=q+Math.imul(hr,Jt)|0,Y=Math.imul(hr,Qr),le=le+Math.imul(Yt,$t)|0,q=q+Math.imul(Yt,Dr)|0,q=q+Math.imul(yr,$t)|0,Y=Y+Math.imul(yr,Dr)|0,le=le+Math.imul(X0,Ut)|0,q=q+Math.imul(X0,br)|0,q=q+Math.imul(vt,Ut)|0,Y=Y+Math.imul(vt,br)|0,le=le+Math.imul(N0,jt)|0,q=q+Math.imul(N0,Fr)|0,q=q+Math.imul(ot,jt)|0,Y=Y+Math.imul(ot,Fr)|0,le=le+Math.imul(Ae,Vt)|0,q=q+Math.imul(Ae,_r)|0,q=q+Math.imul(w0,Vt)|0,Y=Y+Math.imul(w0,_r)|0,le=le+Math.imul(Ke,Ot)|0,q=q+Math.imul(Ke,Ir)|0,q=q+Math.imul(Ze,Ot)|0,Y=Y+Math.imul(Ze,Ir)|0,le=le+Math.imul(V0,Xt)|0,q=q+Math.imul(V0,a0)|0,q=q+Math.imul(t0,Xt)|0,Y=Y+Math.imul(t0,a0)|0,le=le+Math.imul(h0,Ye)|0,q=q+Math.imul(h0,n0)|0,q=q+Math.imul(R0,Ye)|0,Y=Y+Math.imul(R0,n0)|0,le=le+Math.imul(Ve,g0)|0,q=q+Math.imul(Ve,x0)|0,q=q+Math.imul(c0,g0)|0,Y=Y+Math.imul(c0,x0)|0;var An=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(An>>>26)|0,An&=67108863,le=Math.imul(Lt,$t),q=Math.imul(Lt,Dr),q=q+Math.imul(hr,$t)|0,Y=Math.imul(hr,Dr),le=le+Math.imul(Yt,Ut)|0,q=q+Math.imul(Yt,br)|0,q=q+Math.imul(yr,Ut)|0,Y=Y+Math.imul(yr,br)|0,le=le+Math.imul(X0,jt)|0,q=q+Math.imul(X0,Fr)|0,q=q+Math.imul(vt,jt)|0,Y=Y+Math.imul(vt,Fr)|0,le=le+Math.imul(N0,Vt)|0,q=q+Math.imul(N0,_r)|0,q=q+Math.imul(ot,Vt)|0,Y=Y+Math.imul(ot,_r)|0,le=le+Math.imul(Ae,Ot)|0,q=q+Math.imul(Ae,Ir)|0,q=q+Math.imul(w0,Ot)|0,Y=Y+Math.imul(w0,Ir)|0,le=le+Math.imul(Ke,Xt)|0,q=q+Math.imul(Ke,a0)|0,q=q+Math.imul(Ze,Xt)|0,Y=Y+Math.imul(Ze,a0)|0,le=le+Math.imul(V0,Ye)|0,q=q+Math.imul(V0,n0)|0,q=q+Math.imul(t0,Ye)|0,Y=Y+Math.imul(t0,n0)|0,le=le+Math.imul(h0,g0)|0,q=q+Math.imul(h0,x0)|0,q=q+Math.imul(R0,g0)|0,Y=Y+Math.imul(R0,x0)|0;var bn=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(bn>>>26)|0,bn&=67108863,le=Math.imul(Lt,Ut),q=Math.imul(Lt,br),q=q+Math.imul(hr,Ut)|0,Y=Math.imul(hr,br),le=le+Math.imul(Yt,jt)|0,q=q+Math.imul(Yt,Fr)|0,q=q+Math.imul(yr,jt)|0,Y=Y+Math.imul(yr,Fr)|0,le=le+Math.imul(X0,Vt)|0,q=q+Math.imul(X0,_r)|0,q=q+Math.imul(vt,Vt)|0,Y=Y+Math.imul(vt,_r)|0,le=le+Math.imul(N0,Ot)|0,q=q+Math.imul(N0,Ir)|0,q=q+Math.imul(ot,Ot)|0,Y=Y+Math.imul(ot,Ir)|0,le=le+Math.imul(Ae,Xt)|0,q=q+Math.imul(Ae,a0)|0,q=q+Math.imul(w0,Xt)|0,Y=Y+Math.imul(w0,a0)|0,le=le+Math.imul(Ke,Ye)|0,q=q+Math.imul(Ke,n0)|0,q=q+Math.imul(Ze,Ye)|0,Y=Y+Math.imul(Ze,n0)|0,le=le+Math.imul(V0,g0)|0,q=q+Math.imul(V0,x0)|0,q=q+Math.imul(t0,g0)|0,Y=Y+Math.imul(t0,x0)|0;var Pn=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,le=Math.imul(Lt,jt),q=Math.imul(Lt,Fr),q=q+Math.imul(hr,jt)|0,Y=Math.imul(hr,Fr),le=le+Math.imul(Yt,Vt)|0,q=q+Math.imul(Yt,_r)|0,q=q+Math.imul(yr,Vt)|0,Y=Y+Math.imul(yr,_r)|0,le=le+Math.imul(X0,Ot)|0,q=q+Math.imul(X0,Ir)|0,q=q+Math.imul(vt,Ot)|0,Y=Y+Math.imul(vt,Ir)|0,le=le+Math.imul(N0,Xt)|0,q=q+Math.imul(N0,a0)|0,q=q+Math.imul(ot,Xt)|0,Y=Y+Math.imul(ot,a0)|0,le=le+Math.imul(Ae,Ye)|0,q=q+Math.imul(Ae,n0)|0,q=q+Math.imul(w0,Ye)|0,Y=Y+Math.imul(w0,n0)|0,le=le+Math.imul(Ke,g0)|0,q=q+Math.imul(Ke,x0)|0,q=q+Math.imul(Ze,g0)|0,Y=Y+Math.imul(Ze,x0)|0;var Mn=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,le=Math.imul(Lt,Vt),q=Math.imul(Lt,_r),q=q+Math.imul(hr,Vt)|0,Y=Math.imul(hr,_r),le=le+Math.imul(Yt,Ot)|0,q=q+Math.imul(Yt,Ir)|0,q=q+Math.imul(yr,Ot)|0,Y=Y+Math.imul(yr,Ir)|0,le=le+Math.imul(X0,Xt)|0,q=q+Math.imul(X0,a0)|0,q=q+Math.imul(vt,Xt)|0,Y=Y+Math.imul(vt,a0)|0,le=le+Math.imul(N0,Ye)|0,q=q+Math.imul(N0,n0)|0,q=q+Math.imul(ot,Ye)|0,Y=Y+Math.imul(ot,n0)|0,le=le+Math.imul(Ae,g0)|0,q=q+Math.imul(Ae,x0)|0,q=q+Math.imul(w0,g0)|0,Y=Y+Math.imul(w0,x0)|0;var LA=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(LA>>>26)|0,LA&=67108863,le=Math.imul(Lt,Ot),q=Math.imul(Lt,Ir),q=q+Math.imul(hr,Ot)|0,Y=Math.imul(hr,Ir),le=le+Math.imul(Yt,Xt)|0,q=q+Math.imul(Yt,a0)|0,q=q+Math.imul(yr,Xt)|0,Y=Y+Math.imul(yr,a0)|0,le=le+Math.imul(X0,Ye)|0,q=q+Math.imul(X0,n0)|0,q=q+Math.imul(vt,Ye)|0,Y=Y+Math.imul(vt,n0)|0,le=le+Math.imul(N0,g0)|0,q=q+Math.imul(N0,x0)|0,q=q+Math.imul(ot,g0)|0,Y=Y+Math.imul(ot,x0)|0;var QA=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(QA>>>26)|0,QA&=67108863,le=Math.imul(Lt,Xt),q=Math.imul(Lt,a0),q=q+Math.imul(hr,Xt)|0,Y=Math.imul(hr,a0),le=le+Math.imul(Yt,Ye)|0,q=q+Math.imul(Yt,n0)|0,q=q+Math.imul(yr,Ye)|0,Y=Y+Math.imul(yr,n0)|0,le=le+Math.imul(X0,g0)|0,q=q+Math.imul(X0,x0)|0,q=q+Math.imul(vt,g0)|0,Y=Y+Math.imul(vt,x0)|0;var je=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(je>>>26)|0,je&=67108863,le=Math.imul(Lt,Ye),q=Math.imul(Lt,n0),q=q+Math.imul(hr,Ye)|0,Y=Math.imul(hr,n0),le=le+Math.imul(Yt,g0)|0,q=q+Math.imul(Yt,x0)|0,q=q+Math.imul(yr,g0)|0,Y=Y+Math.imul(yr,x0)|0;var B=(de+le|0)+((q&8191)<<13)|0;de=(Y+(q>>>13)|0)+(B>>>26)|0,B&=67108863,le=Math.imul(Lt,g0),q=Math.imul(Lt,x0),q=q+Math.imul(hr,g0)|0,Y=Math.imul(hr,x0);var eA=(de+le|0)+((q&8191)<<13)|0;return de=(Y+(q>>>13)|0)+(eA>>>26)|0,eA&=67108863,oe[0]=P0,oe[1]=Y0,oe[2]=it,oe[3]=xt,oe[4]=wt,oe[5]=I,oe[6]=e,oe[7]=s,oe[8]=nn,oe[9]=gt,oe[10]=An,oe[11]=bn,oe[12]=Pn,oe[13]=Mn,oe[14]=LA,oe[15]=QA,oe[16]=je,oe[17]=B,oe[18]=eA,de!==0&&(oe[19]=de,m.length++),m};Math.imul||(V=ce);function Ee(Ne,J,G){G.negative=J.negative^Ne.negative,G.length=Ne.length+J.length;for(var m=0,R=0,X=0;X<G.length-1;X++){var oe=R;R=0;for(var de=m&67108863,le=Math.min(X,J.length-1),q=Math.max(0,X-Ne.length+1);q<=le;q++){var Y=X-q,O=Ne.words[Y]|0,me=J.words[q]|0,Je=O*me,se=Je&67108863;oe=oe+(Je/67108864|0)|0,se=se+de|0,de=se&67108863,oe=oe+(se>>>26)|0,R+=oe>>>26,oe&=67108863}G.words[X]=de,m=oe,oe=R}return m!==0?G.words[X]=m:G.length--,G.strip()}function ge(Ne,J,G){var m=new _e;return m.mulp(Ne,J,G)}y.prototype.mulTo=function(J,G){var m,R=this.length+J.length;return this.length===10&&J.length===10?m=V(this,J,G):R<63?m=ce(this,J,G):R<1024?m=Ee(this,J,G):m=ge(this,J,G),m};function _e(Ne,J){this.x=Ne,this.y=J}_e.prototype.makeRBT=function(J){for(var G=new Array(J),m=y.prototype._countBits(J)-1,R=0;R<J;R++)G[R]=this.revBin(R,m,J);return G},_e.prototype.revBin=function(J,G,m){if(J===0||J===m-1)return J;for(var R=0,X=0;X<G;X++)R|=(J&1)<<G-X-1,J>>=1;return R},_e.prototype.permute=function(J,G,m,R,X,oe){for(var de=0;de<oe;de++)R[de]=G[J[de]],X[de]=m[J[de]]},_e.prototype.transform=function(J,G,m,R,X,oe){this.permute(oe,J,G,m,R,X);for(var de=1;de<X;de<<=1)for(var le=de<<1,q=Math.cos(2*Math.PI/le),Y=Math.sin(2*Math.PI/le),O=0;O<X;O+=le)for(var me=q,Je=Y,se=0;se<de;se++){var Ve=m[O+se],c0=R[O+se],l0=m[O+se+de],h0=R[O+se+de],R0=me*l0-Je*h0;h0=me*h0+Je*l0,l0=R0,m[O+se]=Ve+l0,R[O+se]=c0+h0,m[O+se+de]=Ve-l0,R[O+se+de]=c0-h0,se!==le&&(R0=q*me-Y*Je,Je=q*Je+Y*me,me=R0)}},_e.prototype.guessLen13b=function(J,G){var m=Math.max(G,J)|1,R=m&1,X=0;for(m=m/2|0;m;m=m>>>1)X++;return 1<<X+1+R},_e.prototype.conjugate=function(J,G,m){if(!(m<=1))for(var R=0;R<m/2;R++){var X=J[R];J[R]=J[m-R-1],J[m-R-1]=X,X=G[R],G[R]=-G[m-R-1],G[m-R-1]=-X}},_e.prototype.normalize13b=function(J,G){for(var m=0,R=0;R<G/2;R++){var X=Math.round(J[2*R+1]/G)*8192+Math.round(J[2*R]/G)+m;J[R]=X&67108863,X<67108864?m=0:m=X/67108864|0}return J},_e.prototype.convert13b=function(J,G,m,R){for(var X=0,oe=0;oe<G;oe++)X=X+(J[oe]|0),m[2*oe]=X&8191,X=X>>>13,m[2*oe+1]=X&8191,X=X>>>13;for(oe=2*G;oe<R;++oe)m[oe]=0;l(X===0),l((X&-8192)===0)},_e.prototype.stub=function(J){for(var G=new Array(J),m=0;m<J;m++)G[m]=0;return G},_e.prototype.mulp=function(J,G,m){var R=2*this.guessLen13b(J.length,G.length),X=this.makeRBT(R),oe=this.stub(R),de=new Array(R),le=new Array(R),q=new Array(R),Y=new Array(R),O=new Array(R),me=new Array(R),Je=m.words;Je.length=R,this.convert13b(J.words,J.length,de,R),this.convert13b(G.words,G.length,Y,R),this.transform(de,oe,le,q,R,X),this.transform(Y,oe,O,me,R,X);for(var se=0;se<R;se++){var Ve=le[se]*O[se]-q[se]*me[se];q[se]=le[se]*me[se]+q[se]*O[se],le[se]=Ve}return this.conjugate(le,q,R),this.transform(le,q,Je,oe,R,X),this.conjugate(Je,oe,R),this.normalize13b(Je,R),m.negative=J.negative^G.negative,m.length=J.length+G.length,m.strip()},y.prototype.mul=function(J){var G=new y(null);return G.words=new Array(this.length+J.length),this.mulTo(J,G)},y.prototype.mulf=function(J){var G=new y(null);return G.words=new Array(this.length+J.length),ge(this,J,G)},y.prototype.imul=function(J){return this.clone().mulTo(J,this)},y.prototype.imuln=function(J){l(typeof J=="number"),l(J<67108864);for(var G=0,m=0;m<this.length;m++){var R=(this.words[m]|0)*J,X=(R&67108863)+(G&67108863);G>>=26,G+=R/67108864|0,G+=X>>>26,this.words[m]=X&67108863}return G!==0&&(this.words[m]=G,this.length++),this.length=J===0?1:this.length,this},y.prototype.muln=function(J){return this.clone().imuln(J)},y.prototype.sqr=function(){return this.mul(this)},y.prototype.isqr=function(){return this.imul(this.clone())},y.prototype.pow=function(J){var G=Ce(J);if(G.length===0)return new y(1);for(var m=this,R=0;R<G.length&&G[R]===0;R++,m=m.sqr());if(++R<G.length)for(var X=m.sqr();R<G.length;R++,X=X.sqr())G[R]!==0&&(m=m.mul(X));return m},y.prototype.iushln=function(J){l(typeof J=="number"&&J>=0);var G=J%26,m=(J-G)/26,R=67108863>>>26-G<<26-G,X;if(G!==0){var oe=0;for(X=0;X<this.length;X++){var de=this.words[X]&R,le=(this.words[X]|0)-de<<G;this.words[X]=le|oe,oe=de>>>26-G}oe&&(this.words[X]=oe,this.length++)}if(m!==0){for(X=this.length-1;X>=0;X--)this.words[X+m]=this.words[X];for(X=0;X<m;X++)this.words[X]=0;this.length+=m}return this.strip()},y.prototype.ishln=function(J){return l(this.negative===0),this.iushln(J)},y.prototype.iushrn=function(J,G,m){l(typeof J=="number"&&J>=0);var R;G?R=(G-G%26)/26:R=0;var X=J%26,oe=Math.min((J-X)/26,this.length),de=67108863^67108863>>>X<<X,le=m;if(R-=oe,R=Math.max(0,R),le){for(var q=0;q<oe;q++)le.words[q]=this.words[q];le.length=oe}if(oe!==0)if(this.length>oe)for(this.length-=oe,q=0;q<this.length;q++)this.words[q]=this.words[q+oe];else this.words[0]=0,this.length=1;var Y=0;for(q=this.length-1;q>=0&&(Y!==0||q>=R);q--){var O=this.words[q]|0;this.words[q]=Y<<26-X|O>>>X,Y=O&de}return le&&Y!==0&&(le.words[le.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},y.prototype.ishrn=function(J,G,m){return l(this.negative===0),this.iushrn(J,G,m)},y.prototype.shln=function(J){return this.clone().ishln(J)},y.prototype.ushln=function(J){return this.clone().iushln(J)},y.prototype.shrn=function(J){return this.clone().ishrn(J)},y.prototype.ushrn=function(J){return this.clone().iushrn(J)},y.prototype.testn=function(J){l(typeof J=="number"&&J>=0);var G=J%26,m=(J-G)/26,R=1<<G;if(this.length<=m)return!1;var X=this.words[m];return!!(X&R)},y.prototype.imaskn=function(J){l(typeof J=="number"&&J>=0);var G=J%26,m=(J-G)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=m)return this;if(G!==0&&m++,this.length=Math.min(m,this.length),G!==0){var R=67108863^67108863>>>G<<G;this.words[this.length-1]&=R}return this.strip()},y.prototype.maskn=function(J){return this.clone().imaskn(J)},y.prototype.iaddn=function(J){return l(typeof J=="number"),l(J<67108864),J<0?this.isubn(-J):this.negative!==0?this.length===1&&(this.words[0]|0)<J?(this.words[0]=J-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(J),this.negative=1,this):this._iaddn(J)},y.prototype._iaddn=function(J){this.words[0]+=J;for(var G=0;G<this.length&&this.words[G]>=67108864;G++)this.words[G]-=67108864,G===this.length-1?this.words[G+1]=1:this.words[G+1]++;return this.length=Math.max(this.length,G+1),this},y.prototype.isubn=function(J){if(l(typeof J=="number"),l(J<67108864),J<0)return this.iaddn(-J);if(this.negative!==0)return this.negative=0,this.iaddn(J),this.negative=1,this;if(this.words[0]-=J,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var G=0;G<this.length&&this.words[G]<0;G++)this.words[G]+=67108864,this.words[G+1]-=1;return this.strip()},y.prototype.addn=function(J){return this.clone().iaddn(J)},y.prototype.subn=function(J){return this.clone().isubn(J)},y.prototype.iabs=function(){return this.negative=0,this},y.prototype.abs=function(){return this.clone().iabs()},y.prototype._ishlnsubmul=function(J,G,m){var R=J.length+m,X;this._expand(R);var oe,de=0;for(X=0;X<J.length;X++){oe=(this.words[X+m]|0)+de;var le=(J.words[X]|0)*G;oe-=le&67108863,de=(oe>>26)-(le/67108864|0),this.words[X+m]=oe&67108863}for(;X<this.length-m;X++)oe=(this.words[X+m]|0)+de,de=oe>>26,this.words[X+m]=oe&67108863;if(de===0)return this.strip();for(l(de===-1),de=0,X=0;X<this.length;X++)oe=-(this.words[X]|0)+de,de=oe>>26,this.words[X]=oe&67108863;return this.negative=1,this.strip()},y.prototype._wordDiv=function(J,G){var m=this.length-J.length,R=this.clone(),X=J,oe=X.words[X.length-1]|0,de=this._countBits(oe);m=26-de,m!==0&&(X=X.ushln(m),R.iushln(m),oe=X.words[X.length-1]|0);var le=R.length-X.length,q;if(G!=="mod"){q=new y(null),q.length=le+1,q.words=new Array(q.length);for(var Y=0;Y<q.length;Y++)q.words[Y]=0}var O=R.clone()._ishlnsubmul(X,1,le);O.negative===0&&(R=O,q&&(q.words[le]=1));for(var me=le-1;me>=0;me--){var Je=(R.words[X.length+me]|0)*67108864+(R.words[X.length+me-1]|0);for(Je=Math.min(Je/oe|0,67108863),R._ishlnsubmul(X,Je,me);R.negative!==0;)Je--,R.negative=0,R._ishlnsubmul(X,1,me),R.isZero()||(R.negative^=1);q&&(q.words[me]=Je)}return q&&q.strip(),R.strip(),G!=="div"&&m!==0&&R.iushrn(m),{div:q||null,mod:R}},y.prototype.divmod=function(J,G,m){if(l(!J.isZero()),this.isZero())return{div:new y(0),mod:new y(0)};var R,X,oe;return this.negative!==0&&J.negative===0?(oe=this.neg().divmod(J,G),G!=="mod"&&(R=oe.div.neg()),G!=="div"&&(X=oe.mod.neg(),m&&X.negative!==0&&X.iadd(J)),{div:R,mod:X}):this.negative===0&&J.negative!==0?(oe=this.divmod(J.neg(),G),G!=="mod"&&(R=oe.div.neg()),{div:R,mod:oe.mod}):(this.negative&J.negative)!==0?(oe=this.neg().divmod(J.neg(),G),G!=="div"&&(X=oe.mod.neg(),m&&X.negative!==0&&X.isub(J)),{div:oe.div,mod:X}):J.length>this.length||this.cmp(J)<0?{div:new y(0),mod:this}:J.length===1?G==="div"?{div:this.divn(J.words[0]),mod:null}:G==="mod"?{div:null,mod:new y(this.modn(J.words[0]))}:{div:this.divn(J.words[0]),mod:new y(this.modn(J.words[0]))}:this._wordDiv(J,G)},y.prototype.div=function(J){return this.divmod(J,"div",!1).div},y.prototype.mod=function(J){return this.divmod(J,"mod",!1).mod},y.prototype.umod=function(J){return this.divmod(J,"mod",!0).mod},y.prototype.divRound=function(J){var G=this.divmod(J);if(G.mod.isZero())return G.div;var m=G.div.negative!==0?G.mod.isub(J):G.mod,R=J.ushrn(1),X=J.andln(1),oe=m.cmp(R);return oe<0||X===1&&oe===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},y.prototype.modn=function(J){l(J<=67108863);for(var G=(1<<26)%J,m=0,R=this.length-1;R>=0;R--)m=(G*m+(this.words[R]|0))%J;return m},y.prototype.idivn=function(J){l(J<=67108863);for(var G=0,m=this.length-1;m>=0;m--){var R=(this.words[m]|0)+G*67108864;this.words[m]=R/J|0,G=R%J}return this.strip()},y.prototype.divn=function(J){return this.clone().idivn(J)},y.prototype.egcd=function(J){l(J.negative===0),l(!J.isZero());var G=this,m=J.clone();G.negative!==0?G=G.umod(J):G=G.clone();for(var R=new y(1),X=new y(0),oe=new y(0),de=new y(1),le=0;G.isEven()&&m.isEven();)G.iushrn(1),m.iushrn(1),++le;for(var q=m.clone(),Y=G.clone();!G.isZero();){for(var O=0,me=1;(G.words[0]&me)===0&&O<26;++O,me<<=1);if(O>0)for(G.iushrn(O);O-- >0;)(R.isOdd()||X.isOdd())&&(R.iadd(q),X.isub(Y)),R.iushrn(1),X.iushrn(1);for(var Je=0,se=1;(m.words[0]&se)===0&&Je<26;++Je,se<<=1);if(Je>0)for(m.iushrn(Je);Je-- >0;)(oe.isOdd()||de.isOdd())&&(oe.iadd(q),de.isub(Y)),oe.iushrn(1),de.iushrn(1);G.cmp(m)>=0?(G.isub(m),R.isub(oe),X.isub(de)):(m.isub(G),oe.isub(R),de.isub(X))}return{a:oe,b:de,gcd:m.iushln(le)}},y.prototype._invmp=function(J){l(J.negative===0),l(!J.isZero());var G=this,m=J.clone();G.negative!==0?G=G.umod(J):G=G.clone();for(var R=new y(1),X=new y(0),oe=m.clone();G.cmpn(1)>0&&m.cmpn(1)>0;){for(var de=0,le=1;(G.words[0]&le)===0&&de<26;++de,le<<=1);if(de>0)for(G.iushrn(de);de-- >0;)R.isOdd()&&R.iadd(oe),R.iushrn(1);for(var q=0,Y=1;(m.words[0]&Y)===0&&q<26;++q,Y<<=1);if(q>0)for(m.iushrn(q);q-- >0;)X.isOdd()&&X.iadd(oe),X.iushrn(1);G.cmp(m)>=0?(G.isub(m),R.isub(X)):(m.isub(G),X.isub(R))}var O;return G.cmpn(1)===0?O=R:O=X,O.cmpn(0)<0&&O.iadd(J),O},y.prototype.gcd=function(J){if(this.isZero())return J.abs();if(J.isZero())return this.abs();var G=this.clone(),m=J.clone();G.negative=0,m.negative=0;for(var R=0;G.isEven()&&m.isEven();R++)G.iushrn(1),m.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;m.isEven();)m.iushrn(1);var X=G.cmp(m);if(X<0){var oe=G;G=m,m=oe}else if(X===0||m.cmpn(1)===0)break;G.isub(m)}while(!0);return m.iushln(R)},y.prototype.invm=function(J){return this.egcd(J).a.umod(J)},y.prototype.isEven=function(){return(this.words[0]&1)===0},y.prototype.isOdd=function(){return(this.words[0]&1)===1},y.prototype.andln=function(J){return this.words[0]&J},y.prototype.bincn=function(J){l(typeof J=="number");var G=J%26,m=(J-G)/26,R=1<<G;if(this.length<=m)return this._expand(m+1),this.words[m]|=R,this;for(var X=R,oe=m;X!==0&&oe<this.length;oe++){var de=this.words[oe]|0;de+=X,X=de>>>26,de&=67108863,this.words[oe]=de}return X!==0&&(this.words[oe]=X,this.length++),this},y.prototype.isZero=function(){return this.length===1&&this.words[0]===0},y.prototype.cmpn=function(J){var G=J<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var m;if(this.length>1)m=1;else{G&&(J=-J),l(J<=67108863,"Number is too big");var R=this.words[0]|0;m=R===J?0:R<J?-1:1}return this.negative!==0?-m|0:m},y.prototype.cmp=function(J){if(this.negative!==0&&J.negative===0)return-1;if(this.negative===0&&J.negative!==0)return 1;var G=this.ucmp(J);return this.negative!==0?-G|0:G},y.prototype.ucmp=function(J){if(this.length>J.length)return 1;if(this.length<J.length)return-1;for(var G=0,m=this.length-1;m>=0;m--){var R=this.words[m]|0,X=J.words[m]|0;if(R!==X){R<X?G=-1:R>X&&(G=1);break}}return G},y.prototype.gtn=function(J){return this.cmpn(J)===1},y.prototype.gt=function(J){return this.cmp(J)===1},y.prototype.gten=function(J){return this.cmpn(J)>=0},y.prototype.gte=function(J){return this.cmp(J)>=0},y.prototype.ltn=function(J){return this.cmpn(J)===-1},y.prototype.lt=function(J){return this.cmp(J)===-1},y.prototype.lten=function(J){return this.cmpn(J)<=0},y.prototype.lte=function(J){return this.cmp(J)<=0},y.prototype.eqn=function(J){return this.cmpn(J)===0},y.prototype.eq=function(J){return this.cmp(J)===0},y.red=function(J){return new ae(J)},y.prototype.toRed=function(J){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),J.convertTo(this)._forceRed(J)},y.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},y.prototype._forceRed=function(J){return this.red=J,this},y.prototype.forceRed=function(J){return l(!this.red,"Already a number in reduction context"),this._forceRed(J)},y.prototype.redAdd=function(J){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,J)},y.prototype.redIAdd=function(J){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,J)},y.prototype.redSub=function(J){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,J)},y.prototype.redISub=function(J){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,J)},y.prototype.redShl=function(J){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,J)},y.prototype.redMul=function(J){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,J),this.red.mul(this,J)},y.prototype.redIMul=function(J){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,J),this.red.imul(this,J)},y.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},y.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},y.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},y.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},y.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},y.prototype.redPow=function(J){return l(this.red&&!J.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,J)};var ne={k256:null,p224:null,p192:null,p25519:null};function r0(Ne,J){this.name=Ne,this.p=new y(J,16),this.n=this.p.bitLength(),this.k=new y(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}r0.prototype._tmp=function(){var J=new y(null);return J.words=new Array(Math.ceil(this.n/13)),J},r0.prototype.ireduce=function(J){var G=J,m;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),m=G.bitLength();while(m>this.n);var R=m<this.n?-1:G.ucmp(this.p);return R===0?(G.words[0]=0,G.length=1):R>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},r0.prototype.split=function(J,G){J.iushrn(this.n,0,G)},r0.prototype.imulK=function(J){return J.imul(this.k)};function xe(){r0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}b(xe,r0),xe.prototype.split=function(J,G){for(var m=4194303,R=Math.min(J.length,9),X=0;X<R;X++)G.words[X]=J.words[X];if(G.length=R,J.length<=9){J.words[0]=0,J.length=1;return}var oe=J.words[9];for(G.words[G.length++]=oe&m,X=10;X<J.length;X++){var de=J.words[X]|0;J.words[X-10]=(de&m)<<4|oe>>>22,oe=de}oe>>>=22,J.words[X-10]=oe,oe===0&&J.length>10?J.length-=10:J.length-=9},xe.prototype.imulK=function(J){J.words[J.length]=0,J.words[J.length+1]=0,J.length+=2;for(var G=0,m=0;m<J.length;m++){var R=J.words[m]|0;G+=R*977,J.words[m]=G&67108863,G=R*64+(G/67108864|0)}return J.words[J.length-1]===0&&(J.length--,J.words[J.length-1]===0&&J.length--),J};function Me(){r0.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}b(Me,r0);function be(){r0.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}b(be,r0);function We(){r0.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}b(We,r0),We.prototype.imulK=function(J){for(var G=0,m=0;m<J.length;m++){var R=(J.words[m]|0)*19+G,X=R&67108863;R>>>=26,J.words[m]=X,G=R}return G!==0&&(J.words[J.length++]=G),J},y._prime=function(J){if(ne[J])return ne[J];var G;if(J==="k256")G=new xe;else if(J==="p224")G=new Me;else if(J==="p192")G=new be;else if(J==="p25519")G=new We;else throw new Error("Unknown prime "+J);return ne[J]=G,G};function ae(Ne){if(typeof Ne=="string"){var J=y._prime(Ne);this.m=J.p,this.prime=J}else l(Ne.gtn(1),"modulus must be greater than 1"),this.m=Ne,this.prime=null}ae.prototype._verify1=function(J){l(J.negative===0,"red works only with positives"),l(J.red,"red works only with red numbers")},ae.prototype._verify2=function(J,G){l((J.negative|G.negative)===0,"red works only with positives"),l(J.red&&J.red===G.red,"red works only with red numbers")},ae.prototype.imod=function(J){return this.prime?this.prime.ireduce(J)._forceRed(this):J.umod(this.m)._forceRed(this)},ae.prototype.neg=function(J){return J.isZero()?J.clone():this.m.sub(J)._forceRed(this)},ae.prototype.add=function(J,G){this._verify2(J,G);var m=J.add(G);return m.cmp(this.m)>=0&&m.isub(this.m),m._forceRed(this)},ae.prototype.iadd=function(J,G){this._verify2(J,G);var m=J.iadd(G);return m.cmp(this.m)>=0&&m.isub(this.m),m},ae.prototype.sub=function(J,G){this._verify2(J,G);var m=J.sub(G);return m.cmpn(0)<0&&m.iadd(this.m),m._forceRed(this)},ae.prototype.isub=function(J,G){this._verify2(J,G);var m=J.isub(G);return m.cmpn(0)<0&&m.iadd(this.m),m},ae.prototype.shl=function(J,G){return this._verify1(J),this.imod(J.ushln(G))},ae.prototype.imul=function(J,G){return this._verify2(J,G),this.imod(J.imul(G))},ae.prototype.mul=function(J,G){return this._verify2(J,G),this.imod(J.mul(G))},ae.prototype.isqr=function(J){return this.imul(J,J.clone())},ae.prototype.sqr=function(J){return this.mul(J,J)},ae.prototype.sqrt=function(J){if(J.isZero())return J.clone();var G=this.m.andln(3);if(l(G%2===1),G===3){var m=this.m.add(new y(1)).iushrn(2);return this.pow(J,m)}for(var R=this.m.subn(1),X=0;!R.isZero()&&R.andln(1)===0;)X++,R.iushrn(1);l(!R.isZero());var oe=new y(1).toRed(this),de=oe.redNeg(),le=this.m.subn(1).iushrn(1),q=this.m.bitLength();for(q=new y(2*q*q).toRed(this);this.pow(q,le).cmp(de)!==0;)q.redIAdd(de);for(var Y=this.pow(q,R),O=this.pow(J,R.addn(1).iushrn(1)),me=this.pow(J,R),Je=X;me.cmp(oe)!==0;){for(var se=me,Ve=0;se.cmp(oe)!==0;Ve++)se=se.redSqr();l(Ve<Je);var c0=this.pow(Y,new y(1).iushln(Je-Ve-1));O=O.redMul(c0),Y=c0.redSqr(),me=me.redMul(Y),Je=Ve}return O},ae.prototype.invm=function(J){var G=J._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},ae.prototype.pow=function(J,G){if(G.isZero())return new y(1).toRed(this);if(G.cmpn(1)===0)return J.clone();var m=4,R=new Array(1<<m);R[0]=new y(1).toRed(this),R[1]=J;for(var X=2;X<R.length;X++)R[X]=this.mul(R[X-1],J);var oe=R[0],de=0,le=0,q=G.bitLength()%26;for(q===0&&(q=26),X=G.length-1;X>=0;X--){for(var Y=G.words[X],O=q-1;O>=0;O--){var me=Y>>O&1;if(oe!==R[0]&&(oe=this.sqr(oe)),me===0&&de===0){le=0;continue}de<<=1,de|=me,le++,!(le!==m&&(X!==0||O!==0))&&(oe=this.mul(oe,R[de]),le=0,de=0)}q=26}return oe},ae.prototype.convertTo=function(J){var G=J.umod(this.m);return G===J?G.clone():G},ae.prototype.convertFrom=function(J){var G=J.clone();return G.red=null,G},y.mont=function(J){return new y0(J)};function y0(Ne){ae.call(this,Ne),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new y(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)}b(y0,ae),y0.prototype.convertTo=function(J){return this.imod(J.ushln(this.shift))},y0.prototype.convertFrom=function(J){var G=this.imod(J.mul(this.rinv));return G.red=null,G},y0.prototype.imul=function(J,G){if(J.isZero()||G.isZero())return J.words[0]=0,J.length=1,J;var m=J.imul(G),R=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=m.isub(R).iushrn(this.shift),oe=X;return X.cmp(this.m)>=0?oe=X.isub(this.m):X.cmpn(0)<0&&(oe=X.iadd(this.m)),oe._forceRed(this)},y0.prototype.mul=function(J,G){if(J.isZero()||G.isZero())return new y(0)._forceRed(this);var m=J.mul(G),R=m.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),X=m.isub(R).iushrn(this.shift),oe=X;return X.cmp(this.m)>=0?oe=X.isub(this.m):X.cmpn(0)<0&&(oe=X.iadd(this.m)),oe._forceRed(this)},y0.prototype.invm=function(J){var G=this.imod(J._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(f,Am)})(f1)),f1.exports}var ph={},Cp;function uC(){return Cp||(Cp=1,(function(f){var o=f;function c(y,C){if(Array.isArray(y))return y.slice();if(!y)return[];var S=[];if(typeof y!="string"){for(var k=0;k<y.length;k++)S[k]=y[k]|0;return S}if(C==="hex"){y=y.replace(/[^a-z0-9]+/ig,""),y.length%2!==0&&(y="0"+y);for(var k=0;k<y.length;k+=2)S.push(parseInt(y[k]+y[k+1],16))}else for(var k=0;k<y.length;k++){var M=y.charCodeAt(k),L=M>>8,w=M&255;L?S.push(L,w):S.push(w)}return S}o.toArray=c;function l(y){return y.length===1?"0"+y:y}o.zero2=l;function b(y){for(var C="",S=0;S<y.length;S++)C+=l(y[S].toString(16));return C}o.toHex=b,o.encode=function(C,S){return S==="hex"?b(C):C}})(ph)),ph}var Ip;function Ei(){return Ip||(Ip=1,(function(f){var o=f,c=Ja(),l=E2(),b=uC();o.assert=l,o.toArray=b.toArray,o.zero2=b.zero2,o.toHex=b.toHex,o.encode=b.encode;function y(L,w,ee){var Ce=new Array(Math.max(L.bitLength(),ee)+1),ce;for(ce=0;ce<Ce.length;ce+=1)Ce[ce]=0;var V=1<<w+1,Ee=L.clone();for(ce=0;ce<Ce.length;ce++){var ge,_e=Ee.andln(V-1);Ee.isOdd()?(_e>(V>>1)-1?ge=(V>>1)-_e:ge=_e,Ee.isubn(ge)):ge=0,Ce[ce]=ge,Ee.iushrn(1)}return Ce}o.getNAF=y;function C(L,w){var ee=[[],[]];L=L.clone(),w=w.clone();for(var Ce=0,ce=0,V;L.cmpn(-Ce)>0||w.cmpn(-ce)>0;){var Ee=L.andln(3)+Ce&3,ge=w.andln(3)+ce&3;Ee===3&&(Ee=-1),ge===3&&(ge=-1);var _e;(Ee&1)===0?_e=0:(V=L.andln(7)+Ce&7,(V===3||V===5)&&ge===2?_e=-Ee:_e=Ee),ee[0].push(_e);var ne;(ge&1)===0?ne=0:(V=w.andln(7)+ce&7,(V===3||V===5)&&Ee===2?ne=-ge:ne=ge),ee[1].push(ne),2*Ce===_e+1&&(Ce=1-Ce),2*ce===ne+1&&(ce=1-ce),L.iushrn(1),w.iushrn(1)}return ee}o.getJSF=C;function S(L,w,ee){var Ce="_"+w;L.prototype[w]=function(){return this[Ce]!==void 0?this[Ce]:this[Ce]=ee.call(this)}}o.cachedProperty=S;function k(L){return typeof L=="string"?o.toArray(L,"hex"):L}o.parseBytes=k;function M(L){return new c(L,"hex","le")}o.intFromLE=M})(gh)),gh}var Wc={exports:{}},bp;function lC(){if(bp)return Wc.exports;bp=1;var f;Wc.exports=function(b){return f||(f=new o(null)),f.generate(b)};function o(l){this.rand=l}if(Wc.exports.Rand=o,o.prototype.generate=function(b){return this._rand(b)},o.prototype._rand=function(b){if(this.rand.getBytes)return this.rand.getBytes(b);for(var y=new Uint8Array(b),C=0;C<y.length;C++)y[C]=this.rand.getByte();return y},typeof self=="object")self.crypto&&self.crypto.getRandomValues?o.prototype._rand=function(b){var y=new Uint8Array(b);return self.crypto.getRandomValues(y),y}:self.msCrypto&&self.msCrypto.getRandomValues?o.prototype._rand=function(b){var y=new Uint8Array(b);return self.msCrypto.getRandomValues(y),y}:typeof window=="object"&&(o.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var c=Pa;if(typeof c.randomBytes!="function")throw new Error("Not supported");o.prototype._rand=function(b){return c.randomBytes(b)}}catch{}return Wc.exports}var yh={},Ch,vp;function cu(){if(vp)return Ch;vp=1;var f=Ja(),o=Ei(),c=o.getNAF,l=o.getJSF,b=o.assert;function y(S,k){this.type=S,this.p=new f(k.p,16),this.red=k.prime?f.red(k.prime):f.mont(this.p),this.zero=new f(0).toRed(this.red),this.one=new f(1).toRed(this.red),this.two=new f(2).toRed(this.red),this.n=k.n&&new f(k.n,16),this.g=k.g&&this.pointFromJSON(k.g,k.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 M=this.n&&this.p.div(this.n);!M||M.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}Ch=y,y.prototype.point=function(){throw new Error("Not implemented")},y.prototype.validate=function(){throw new Error("Not implemented")},y.prototype._fixedNafMul=function(k,M){b(k.precomputed);var L=k._getDoubles(),w=c(M,1,this._bitLength),ee=(1<<L.step+1)-(L.step%2===0?2:1);ee/=3;var Ce=[],ce,V;for(ce=0;ce<w.length;ce+=L.step){V=0;for(var Ee=ce+L.step-1;Ee>=ce;Ee--)V=(V<<1)+w[Ee];Ce.push(V)}for(var ge=this.jpoint(null,null,null),_e=this.jpoint(null,null,null),ne=ee;ne>0;ne--){for(ce=0;ce<Ce.length;ce++)V=Ce[ce],V===ne?_e=_e.mixedAdd(L.points[ce]):V===-ne&&(_e=_e.mixedAdd(L.points[ce].neg()));ge=ge.add(_e)}return ge.toP()},y.prototype._wnafMul=function(k,M){var L=4,w=k._getNAFPoints(L);L=w.wnd;for(var ee=w.points,Ce=c(M,L,this._bitLength),ce=this.jpoint(null,null,null),V=Ce.length-1;V>=0;V--){for(var Ee=0;V>=0&&Ce[V]===0;V--)Ee++;if(V>=0&&Ee++,ce=ce.dblp(Ee),V<0)break;var ge=Ce[V];b(ge!==0),k.type==="affine"?ge>0?ce=ce.mixedAdd(ee[ge-1>>1]):ce=ce.mixedAdd(ee[-ge-1>>1].neg()):ge>0?ce=ce.add(ee[ge-1>>1]):ce=ce.add(ee[-ge-1>>1].neg())}return k.type==="affine"?ce.toP():ce},y.prototype._wnafMulAdd=function(k,M,L,w,ee){var Ce=this._wnafT1,ce=this._wnafT2,V=this._wnafT3,Ee=0,ge,_e,ne;for(ge=0;ge<w;ge++){ne=M[ge];var r0=ne._getNAFPoints(k);Ce[ge]=r0.wnd,ce[ge]=r0.points}for(ge=w-1;ge>=1;ge-=2){var xe=ge-1,Me=ge;if(Ce[xe]!==1||Ce[Me]!==1){V[xe]=c(L[xe],Ce[xe],this._bitLength),V[Me]=c(L[Me],Ce[Me],this._bitLength),Ee=Math.max(V[xe].length,Ee),Ee=Math.max(V[Me].length,Ee);continue}var be=[M[xe],null,null,M[Me]];M[xe].y.cmp(M[Me].y)===0?(be[1]=M[xe].add(M[Me]),be[2]=M[xe].toJ().mixedAdd(M[Me].neg())):M[xe].y.cmp(M[Me].y.redNeg())===0?(be[1]=M[xe].toJ().mixedAdd(M[Me]),be[2]=M[xe].add(M[Me].neg())):(be[1]=M[xe].toJ().mixedAdd(M[Me]),be[2]=M[xe].toJ().mixedAdd(M[Me].neg()));var We=[-3,-1,-5,-7,0,7,5,1,3],ae=l(L[xe],L[Me]);for(Ee=Math.max(ae[0].length,Ee),V[xe]=new Array(Ee),V[Me]=new Array(Ee),_e=0;_e<Ee;_e++){var y0=ae[0][_e]|0,Ne=ae[1][_e]|0;V[xe][_e]=We[(y0+1)*3+(Ne+1)],V[Me][_e]=0,ce[xe]=be}}var J=this.jpoint(null,null,null),G=this._wnafT4;for(ge=Ee;ge>=0;ge--){for(var m=0;ge>=0;){var R=!0;for(_e=0;_e<w;_e++)G[_e]=V[_e][ge]|0,G[_e]!==0&&(R=!1);if(!R)break;m++,ge--}if(ge>=0&&m++,J=J.dblp(m),ge<0)break;for(_e=0;_e<w;_e++){var X=G[_e];X!==0&&(X>0?ne=ce[_e][X-1>>1]:X<0&&(ne=ce[_e][-X-1>>1].neg()),ne.type==="affine"?J=J.mixedAdd(ne):J=J.add(ne))}}for(ge=0;ge<w;ge++)ce[ge]=null;return ee?J:J.toP()};function C(S,k){this.curve=S,this.type=k,this.precomputed=null}return y.BasePoint=C,C.prototype.eq=function(){throw new Error("Not implemented")},C.prototype.validate=function(){return this.curve.validate(this)},y.prototype.decodePoint=function(k,M){k=o.toArray(k,M);var L=this.p.byteLength();if((k[0]===4||k[0]===6||k[0]===7)&&k.length-1===2*L){k[0]===6?b(k[k.length-1]%2===0):k[0]===7&&b(k[k.length-1]%2===1);var w=this.point(k.slice(1,1+L),k.slice(1+L,1+2*L));return w}else if((k[0]===2||k[0]===3)&&k.length-1===L)return this.pointFromX(k.slice(1,1+L),k[0]===3);throw new Error("Unknown point format")},C.prototype.encodeCompressed=function(k){return this.encode(k,!0)},C.prototype._encode=function(k){var M=this.curve.p.byteLength(),L=this.getX().toArray("be",M);return k?[this.getY().isEven()?2:3].concat(L):[4].concat(L,this.getY().toArray("be",M))},C.prototype.encode=function(k,M){return o.encode(this._encode(M),k)},C.prototype.precompute=function(k){if(this.precomputed)return this;var M={doubles:null,naf:null,beta:null};return M.naf=this._getNAFPoints(8),M.doubles=this._getDoubles(4,k),M.beta=this._getBeta(),this.precomputed=M,this},C.prototype._hasDoubles=function(k){if(!this.precomputed)return!1;var M=this.precomputed.doubles;return M?M.points.length>=Math.ceil((k.bitLength()+1)/M.step):!1},C.prototype._getDoubles=function(k,M){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var L=[this],w=this,ee=0;ee<M;ee+=k){for(var Ce=0;Ce<k;Ce++)w=w.dbl();L.push(w)}return{step:k,points:L}},C.prototype._getNAFPoints=function(k){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var M=[this],L=(1<<k)-1,w=L===1?null:this.dbl(),ee=1;ee<L;ee++)M[ee]=M[ee-1].add(w);return{wnd:k,points:M}},C.prototype._getBeta=function(){return null},C.prototype.dblp=function(k){for(var M=this,L=0;L<k;L++)M=M.dbl();return M},Ch}var Ih,Ep;function im(){if(Ep)return Ih;Ep=1;var f=Ei(),o=Ja(),c=au(),l=cu(),b=f.assert;function y(k){l.call(this,"short",k),this.a=new o(k.a,16).toRed(this.red),this.b=new o(k.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(k),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}c(y,l),Ih=y,y.prototype._getEndomorphism=function(M){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var L,w;if(M.beta)L=new o(M.beta,16).toRed(this.red);else{var ee=this._getEndoRoots(this.p);L=ee[0].cmp(ee[1])<0?ee[0]:ee[1],L=L.toRed(this.red)}if(M.lambda)w=new o(M.lambda,16);else{var Ce=this._getEndoRoots(this.n);this.g.mul(Ce[0]).x.cmp(this.g.x.redMul(L))===0?w=Ce[0]:(w=Ce[1],b(this.g.mul(w).x.cmp(this.g.x.redMul(L))===0))}var ce;return M.basis?ce=M.basis.map(function(V){return{a:new o(V.a,16),b:new o(V.b,16)}}):ce=this._getEndoBasis(w),{beta:L,lambda:w,basis:ce}}},y.prototype._getEndoRoots=function(M){var L=M===this.p?this.red:o.mont(M),w=new o(2).toRed(L).redInvm(),ee=w.redNeg(),Ce=new o(3).toRed(L).redNeg().redSqrt().redMul(w),ce=ee.redAdd(Ce).fromRed(),V=ee.redSub(Ce).fromRed();return[ce,V]},y.prototype._getEndoBasis=function(M){for(var L=this.n.ushrn(Math.floor(this.n.bitLength()/2)),w=M,ee=this.n.clone(),Ce=new o(1),ce=new o(0),V=new o(0),Ee=new o(1),ge,_e,ne,r0,xe,Me,be,We=0,ae,y0;w.cmpn(0)!==0;){var Ne=ee.div(w);ae=ee.sub(Ne.mul(w)),y0=V.sub(Ne.mul(Ce));var J=Ee.sub(Ne.mul(ce));if(!ne&&ae.cmp(L)<0)ge=be.neg(),_e=Ce,ne=ae.neg(),r0=y0;else if(ne&&++We===2)break;be=ae,ee=w,w=ae,V=Ce,Ce=y0,Ee=ce,ce=J}xe=ae.neg(),Me=y0;var G=ne.sqr().add(r0.sqr()),m=xe.sqr().add(Me.sqr());return m.cmp(G)>=0&&(xe=ge,Me=_e),ne.negative&&(ne=ne.neg(),r0=r0.neg()),xe.negative&&(xe=xe.neg(),Me=Me.neg()),[{a:ne,b:r0},{a:xe,b:Me}]},y.prototype._endoSplit=function(M){var L=this.endo.basis,w=L[0],ee=L[1],Ce=ee.b.mul(M).divRound(this.n),ce=w.b.neg().mul(M).divRound(this.n),V=Ce.mul(w.a),Ee=ce.mul(ee.a),ge=Ce.mul(w.b),_e=ce.mul(ee.b),ne=M.sub(V).sub(Ee),r0=ge.add(_e).neg();return{k1:ne,k2:r0}},y.prototype.pointFromX=function(M,L){M=new o(M,16),M.red||(M=M.toRed(this.red));var w=M.redSqr().redMul(M).redIAdd(M.redMul(this.a)).redIAdd(this.b),ee=w.redSqrt();if(ee.redSqr().redSub(w).cmp(this.zero)!==0)throw new Error("invalid point");var Ce=ee.fromRed().isOdd();return(L&&!Ce||!L&&Ce)&&(ee=ee.redNeg()),this.point(M,ee)},y.prototype.validate=function(M){if(M.inf)return!0;var L=M.x,w=M.y,ee=this.a.redMul(L),Ce=L.redSqr().redMul(L).redIAdd(ee).redIAdd(this.b);return w.redSqr().redISub(Ce).cmpn(0)===0},y.prototype._endoWnafMulAdd=function(M,L,w){for(var ee=this._endoWnafT1,Ce=this._endoWnafT2,ce=0;ce<M.length;ce++){var V=this._endoSplit(L[ce]),Ee=M[ce],ge=Ee._getBeta();V.k1.negative&&(V.k1.ineg(),Ee=Ee.neg(!0)),V.k2.negative&&(V.k2.ineg(),ge=ge.neg(!0)),ee[ce*2]=Ee,ee[ce*2+1]=ge,Ce[ce*2]=V.k1,Ce[ce*2+1]=V.k2}for(var _e=this._wnafMulAdd(1,ee,Ce,ce*2,w),ne=0;ne<ce*2;ne++)ee[ne]=null,Ce[ne]=null;return _e};function C(k,M,L,w){l.BasePoint.call(this,k,"affine"),M===null&&L===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(M,16),this.y=new o(L,16),w&&(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)}c(C,l.BasePoint),y.prototype.point=function(M,L,w){return new C(this,M,L,w)},y.prototype.pointFromJSON=function(M,L){return C.fromJSON(this,M,L)},C.prototype._getBeta=function(){if(this.curve.endo){var M=this.precomputed;if(M&&M.beta)return M.beta;var L=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(M){var w=this.curve,ee=function(Ce){return w.point(Ce.x.redMul(w.endo.beta),Ce.y)};M.beta=L,L.precomputed={beta:null,naf:M.naf&&{wnd:M.naf.wnd,points:M.naf.points.map(ee)},doubles:M.doubles&&{step:M.doubles.step,points:M.doubles.points.map(ee)}}}return L}},C.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]},C.fromJSON=function(M,L,w){typeof L=="string"&&(L=JSON.parse(L));var ee=M.point(L[0],L[1],w);if(!L[2])return ee;function Ce(V){return M.point(V[0],V[1],w)}var ce=L[2];return ee.precomputed={beta:null,doubles:ce.doubles&&{step:ce.doubles.step,points:[ee].concat(ce.doubles.points.map(Ce))},naf:ce.naf&&{wnd:ce.naf.wnd,points:[ee].concat(ce.naf.points.map(Ce))}},ee},C.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)+">"},C.prototype.isInfinity=function(){return this.inf},C.prototype.add=function(M){if(this.inf)return M;if(M.inf)return this;if(this.eq(M))return this.dbl();if(this.neg().eq(M))return this.curve.point(null,null);if(this.x.cmp(M.x)===0)return this.curve.point(null,null);var L=this.y.redSub(M.y);L.cmpn(0)!==0&&(L=L.redMul(this.x.redSub(M.x).redInvm()));var w=L.redSqr().redISub(this.x).redISub(M.x),ee=L.redMul(this.x.redSub(w)).redISub(this.y);return this.curve.point(w,ee)},C.prototype.dbl=function(){if(this.inf)return this;var M=this.y.redAdd(this.y);if(M.cmpn(0)===0)return this.curve.point(null,null);var L=this.curve.a,w=this.x.redSqr(),ee=M.redInvm(),Ce=w.redAdd(w).redIAdd(w).redIAdd(L).redMul(ee),ce=Ce.redSqr().redISub(this.x.redAdd(this.x)),V=Ce.redMul(this.x.redSub(ce)).redISub(this.y);return this.curve.point(ce,V)},C.prototype.getX=function(){return this.x.fromRed()},C.prototype.getY=function(){return this.y.fromRed()},C.prototype.mul=function(M){return M=new o(M,16),this.isInfinity()?this:this._hasDoubles(M)?this.curve._fixedNafMul(this,M):this.curve.endo?this.curve._endoWnafMulAdd([this],[M]):this.curve._wnafMul(this,M)},C.prototype.mulAdd=function(M,L,w){var ee=[this,L],Ce=[M,w];return this.curve.endo?this.curve._endoWnafMulAdd(ee,Ce):this.curve._wnafMulAdd(1,ee,Ce,2)},C.prototype.jmulAdd=function(M,L,w){var ee=[this,L],Ce=[M,w];return this.curve.endo?this.curve._endoWnafMulAdd(ee,Ce,!0):this.curve._wnafMulAdd(1,ee,Ce,2,!0)},C.prototype.eq=function(M){return this===M||this.inf===M.inf&&(this.inf||this.x.cmp(M.x)===0&&this.y.cmp(M.y)===0)},C.prototype.neg=function(M){if(this.inf)return this;var L=this.curve.point(this.x,this.y.redNeg());if(M&&this.precomputed){var w=this.precomputed,ee=function(Ce){return Ce.neg()};L.precomputed={naf:w.naf&&{wnd:w.naf.wnd,points:w.naf.points.map(ee)},doubles:w.doubles&&{step:w.doubles.step,points:w.doubles.points.map(ee)}}}return L},C.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var M=this.curve.jpoint(this.x,this.y,this.curve.one);return M};function S(k,M,L,w){l.BasePoint.call(this,k,"jacobian"),M===null&&L===null&&w===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(M,16),this.y=new o(L,16),this.z=new o(w,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}return c(S,l.BasePoint),y.prototype.jpoint=function(M,L,w){return new S(this,M,L,w)},S.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var M=this.z.redInvm(),L=M.redSqr(),w=this.x.redMul(L),ee=this.y.redMul(L).redMul(M);return this.curve.point(w,ee)},S.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},S.prototype.add=function(M){if(this.isInfinity())return M;if(M.isInfinity())return this;var L=M.z.redSqr(),w=this.z.redSqr(),ee=this.x.redMul(L),Ce=M.x.redMul(w),ce=this.y.redMul(L.redMul(M.z)),V=M.y.redMul(w.redMul(this.z)),Ee=ee.redSub(Ce),ge=ce.redSub(V);if(Ee.cmpn(0)===0)return ge.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var _e=Ee.redSqr(),ne=_e.redMul(Ee),r0=ee.redMul(_e),xe=ge.redSqr().redIAdd(ne).redISub(r0).redISub(r0),Me=ge.redMul(r0.redISub(xe)).redISub(ce.redMul(ne)),be=this.z.redMul(M.z).redMul(Ee);return this.curve.jpoint(xe,Me,be)},S.prototype.mixedAdd=function(M){if(this.isInfinity())return M.toJ();if(M.isInfinity())return this;var L=this.z.redSqr(),w=this.x,ee=M.x.redMul(L),Ce=this.y,ce=M.y.redMul(L).redMul(this.z),V=w.redSub(ee),Ee=Ce.redSub(ce);if(V.cmpn(0)===0)return Ee.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var ge=V.redSqr(),_e=ge.redMul(V),ne=w.redMul(ge),r0=Ee.redSqr().redIAdd(_e).redISub(ne).redISub(ne),xe=Ee.redMul(ne.redISub(r0)).redISub(Ce.redMul(_e)),Me=this.z.redMul(V);return this.curve.jpoint(r0,xe,Me)},S.prototype.dblp=function(M){if(M===0)return this;if(this.isInfinity())return this;if(!M)return this.dbl();var L;if(this.curve.zeroA||this.curve.threeA){var w=this;for(L=0;L<M;L++)w=w.dbl();return w}var ee=this.curve.a,Ce=this.curve.tinv,ce=this.x,V=this.y,Ee=this.z,ge=Ee.redSqr().redSqr(),_e=V.redAdd(V);for(L=0;L<M;L++){var ne=ce.redSqr(),r0=_e.redSqr(),xe=r0.redSqr(),Me=ne.redAdd(ne).redIAdd(ne).redIAdd(ee.redMul(ge)),be=ce.redMul(r0),We=Me.redSqr().redISub(be.redAdd(be)),ae=be.redISub(We),y0=Me.redMul(ae);y0=y0.redIAdd(y0).redISub(xe);var Ne=_e.redMul(Ee);L+1<M&&(ge=ge.redMul(xe)),ce=We,Ee=Ne,_e=y0}return this.curve.jpoint(ce,_e.redMul(Ce),Ee)},S.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},S.prototype._zeroDbl=function(){var M,L,w;if(this.zOne){var ee=this.x.redSqr(),Ce=this.y.redSqr(),ce=Ce.redSqr(),V=this.x.redAdd(Ce).redSqr().redISub(ee).redISub(ce);V=V.redIAdd(V);var Ee=ee.redAdd(ee).redIAdd(ee),ge=Ee.redSqr().redISub(V).redISub(V),_e=ce.redIAdd(ce);_e=_e.redIAdd(_e),_e=_e.redIAdd(_e),M=ge,L=Ee.redMul(V.redISub(ge)).redISub(_e),w=this.y.redAdd(this.y)}else{var ne=this.x.redSqr(),r0=this.y.redSqr(),xe=r0.redSqr(),Me=this.x.redAdd(r0).redSqr().redISub(ne).redISub(xe);Me=Me.redIAdd(Me);var be=ne.redAdd(ne).redIAdd(ne),We=be.redSqr(),ae=xe.redIAdd(xe);ae=ae.redIAdd(ae),ae=ae.redIAdd(ae),M=We.redISub(Me).redISub(Me),L=be.redMul(Me.redISub(M)).redISub(ae),w=this.y.redMul(this.z),w=w.redIAdd(w)}return this.curve.jpoint(M,L,w)},S.prototype._threeDbl=function(){var M,L,w;if(this.zOne){var ee=this.x.redSqr(),Ce=this.y.redSqr(),ce=Ce.redSqr(),V=this.x.redAdd(Ce).redSqr().redISub(ee).redISub(ce);V=V.redIAdd(V);var Ee=ee.redAdd(ee).redIAdd(ee).redIAdd(this.curve.a),ge=Ee.redSqr().redISub(V).redISub(V);M=ge;var _e=ce.redIAdd(ce);_e=_e.redIAdd(_e),_e=_e.redIAdd(_e),L=Ee.redMul(V.redISub(ge)).redISub(_e),w=this.y.redAdd(this.y)}else{var ne=this.z.redSqr(),r0=this.y.redSqr(),xe=this.x.redMul(r0),Me=this.x.redSub(ne).redMul(this.x.redAdd(ne));Me=Me.redAdd(Me).redIAdd(Me);var be=xe.redIAdd(xe);be=be.redIAdd(be);var We=be.redAdd(be);M=Me.redSqr().redISub(We),w=this.y.redAdd(this.z).redSqr().redISub(r0).redISub(ne);var ae=r0.redSqr();ae=ae.redIAdd(ae),ae=ae.redIAdd(ae),ae=ae.redIAdd(ae),L=Me.redMul(be.redISub(M)).redISub(ae)}return this.curve.jpoint(M,L,w)},S.prototype._dbl=function(){var M=this.curve.a,L=this.x,w=this.y,ee=this.z,Ce=ee.redSqr().redSqr(),ce=L.redSqr(),V=w.redSqr(),Ee=ce.redAdd(ce).redIAdd(ce).redIAdd(M.redMul(Ce)),ge=L.redAdd(L);ge=ge.redIAdd(ge);var _e=ge.redMul(V),ne=Ee.redSqr().redISub(_e.redAdd(_e)),r0=_e.redISub(ne),xe=V.redSqr();xe=xe.redIAdd(xe),xe=xe.redIAdd(xe),xe=xe.redIAdd(xe);var Me=Ee.redMul(r0).redISub(xe),be=w.redAdd(w).redMul(ee);return this.curve.jpoint(ne,Me,be)},S.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var M=this.x.redSqr(),L=this.y.redSqr(),w=this.z.redSqr(),ee=L.redSqr(),Ce=M.redAdd(M).redIAdd(M),ce=Ce.redSqr(),V=this.x.redAdd(L).redSqr().redISub(M).redISub(ee);V=V.redIAdd(V),V=V.redAdd(V).redIAdd(V),V=V.redISub(ce);var Ee=V.redSqr(),ge=ee.redIAdd(ee);ge=ge.redIAdd(ge),ge=ge.redIAdd(ge),ge=ge.redIAdd(ge);var _e=Ce.redIAdd(V).redSqr().redISub(ce).redISub(Ee).redISub(ge),ne=L.redMul(_e);ne=ne.redIAdd(ne),ne=ne.redIAdd(ne);var r0=this.x.redMul(Ee).redISub(ne);r0=r0.redIAdd(r0),r0=r0.redIAdd(r0);var xe=this.y.redMul(_e.redMul(ge.redISub(_e)).redISub(V.redMul(Ee)));xe=xe.redIAdd(xe),xe=xe.redIAdd(xe),xe=xe.redIAdd(xe);var Me=this.z.redAdd(V).redSqr().redISub(w).redISub(Ee);return this.curve.jpoint(r0,xe,Me)},S.prototype.mul=function(M,L){return M=new o(M,L),this.curve._wnafMul(this,M)},S.prototype.eq=function(M){if(M.type==="affine")return this.eq(M.toJ());if(this===M)return!0;var L=this.z.redSqr(),w=M.z.redSqr();if(this.x.redMul(w).redISub(M.x.redMul(L)).cmpn(0)!==0)return!1;var ee=L.redMul(this.z),Ce=w.redMul(M.z);return this.y.redMul(Ce).redISub(M.y.redMul(ee)).cmpn(0)===0},S.prototype.eqXToP=function(M){var L=this.z.redSqr(),w=M.toRed(this.curve.red).redMul(L);if(this.x.cmp(w)===0)return!0;for(var ee=M.clone(),Ce=this.curve.redN.redMul(L);;){if(ee.iadd(this.curve.n),ee.cmp(this.curve.p)>=0)return!1;if(w.redIAdd(Ce),this.x.cmp(w)===0)return!0}},S.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)+">"},S.prototype.isInfinity=function(){return this.z.cmpn(0)===0},Ih}var bh,xp;function am(){if(xp)return bh;xp=1;var f=Ja(),o=au(),c=cu(),l=Ei();function b(C){c.call(this,"mont",C),this.a=new f(C.a,16).toRed(this.red),this.b=new f(C.b,16).toRed(this.red),this.i4=new f(4).toRed(this.red).redInvm(),this.two=new f(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}o(b,c),bh=b,b.prototype.validate=function(S){var k=S.normalize().x,M=k.redSqr(),L=M.redMul(k).redAdd(M.redMul(this.a)).redAdd(k),w=L.redSqrt();return w.redSqr().cmp(L)===0};function y(C,S,k){c.BasePoint.call(this,C,"projective"),S===null&&k===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new f(S,16),this.z=new f(k,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}return o(y,c.BasePoint),b.prototype.decodePoint=function(S,k){return this.point(l.toArray(S,k),1)},b.prototype.point=function(S,k){return new y(this,S,k)},b.prototype.pointFromJSON=function(S){return y.fromJSON(this,S)},y.prototype.precompute=function(){},y.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},y.fromJSON=function(S,k){return new y(S,k[0],k[1]||S.one)},y.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)+">"},y.prototype.isInfinity=function(){return this.z.cmpn(0)===0},y.prototype.dbl=function(){var S=this.x.redAdd(this.z),k=S.redSqr(),M=this.x.redSub(this.z),L=M.redSqr(),w=k.redSub(L),ee=k.redMul(L),Ce=w.redMul(L.redAdd(this.curve.a24.redMul(w)));return this.curve.point(ee,Ce)},y.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},y.prototype.diffAdd=function(S,k){var M=this.x.redAdd(this.z),L=this.x.redSub(this.z),w=S.x.redAdd(S.z),ee=S.x.redSub(S.z),Ce=ee.redMul(M),ce=w.redMul(L),V=k.z.redMul(Ce.redAdd(ce).redSqr()),Ee=k.x.redMul(Ce.redISub(ce).redSqr());return this.curve.point(V,Ee)},y.prototype.mul=function(S){for(var k=S.clone(),M=this,L=this.curve.point(null,null),w=this,ee=[];k.cmpn(0)!==0;k.iushrn(1))ee.push(k.andln(1));for(var Ce=ee.length-1;Ce>=0;Ce--)ee[Ce]===0?(M=M.diffAdd(L,w),L=L.dbl()):(L=M.diffAdd(L,w),M=M.dbl());return L},y.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},y.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},y.prototype.eq=function(S){return this.getX().cmp(S.getX())===0},y.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},y.prototype.getX=function(){return this.normalize(),this.x.fromRed()},bh}var vh,_p;function om(){if(_p)return vh;_p=1;var f=Ei(),o=Ja(),c=au(),l=cu(),b=f.assert;function y(S){this.twisted=(S.a|0)!==1,this.mOneA=this.twisted&&(S.a|0)===-1,this.extended=this.mOneA,l.call(this,"edwards",S),this.a=new o(S.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(S.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(S.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),b(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(S.c|0)===1}c(y,l),vh=y,y.prototype._mulA=function(k){return this.mOneA?k.redNeg():this.a.redMul(k)},y.prototype._mulC=function(k){return this.oneC?k:this.c.redMul(k)},y.prototype.jpoint=function(k,M,L,w){return this.point(k,M,L,w)},y.prototype.pointFromX=function(k,M){k=new o(k,16),k.red||(k=k.toRed(this.red));var L=k.redSqr(),w=this.c2.redSub(this.a.redMul(L)),ee=this.one.redSub(this.c2.redMul(this.d).redMul(L)),Ce=w.redMul(ee.redInvm()),ce=Ce.redSqrt();if(ce.redSqr().redSub(Ce).cmp(this.zero)!==0)throw new Error("invalid point");var V=ce.fromRed().isOdd();return(M&&!V||!M&&V)&&(ce=ce.redNeg()),this.point(k,ce)},y.prototype.pointFromY=function(k,M){k=new o(k,16),k.red||(k=k.toRed(this.red));var L=k.redSqr(),w=L.redSub(this.c2),ee=L.redMul(this.d).redMul(this.c2).redSub(this.a),Ce=w.redMul(ee.redInvm());if(Ce.cmp(this.zero)===0){if(M)throw new Error("invalid point");return this.point(this.zero,k)}var ce=Ce.redSqrt();if(ce.redSqr().redSub(Ce).cmp(this.zero)!==0)throw new Error("invalid point");return ce.fromRed().isOdd()!==M&&(ce=ce.redNeg()),this.point(ce,k)},y.prototype.validate=function(k){if(k.isInfinity())return!0;k.normalize();var M=k.x.redSqr(),L=k.y.redSqr(),w=M.redMul(this.a).redAdd(L),ee=this.c2.redMul(this.one.redAdd(this.d.redMul(M).redMul(L)));return w.cmp(ee)===0};function C(S,k,M,L,w){l.BasePoint.call(this,S,"projective"),k===null&&M===null&&L===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 o(k,16),this.y=new o(M,16),this.z=L?new o(L,16):this.curve.one,this.t=w&&new o(w,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()))))}return c(C,l.BasePoint),y.prototype.pointFromJSON=function(k){return C.fromJSON(this,k)},y.prototype.point=function(k,M,L,w){return new C(this,k,M,L,w)},C.fromJSON=function(k,M){return new C(k,M[0],M[1],M[2])},C.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)+">"},C.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},C.prototype._extDbl=function(){var k=this.x.redSqr(),M=this.y.redSqr(),L=this.z.redSqr();L=L.redIAdd(L);var w=this.curve._mulA(k),ee=this.x.redAdd(this.y).redSqr().redISub(k).redISub(M),Ce=w.redAdd(M),ce=Ce.redSub(L),V=w.redSub(M),Ee=ee.redMul(ce),ge=Ce.redMul(V),_e=ee.redMul(V),ne=ce.redMul(Ce);return this.curve.point(Ee,ge,ne,_e)},C.prototype._projDbl=function(){var k=this.x.redAdd(this.y).redSqr(),M=this.x.redSqr(),L=this.y.redSqr(),w,ee,Ce,ce,V,Ee;if(this.curve.twisted){ce=this.curve._mulA(M);var ge=ce.redAdd(L);this.zOne?(w=k.redSub(M).redSub(L).redMul(ge.redSub(this.curve.two)),ee=ge.redMul(ce.redSub(L)),Ce=ge.redSqr().redSub(ge).redSub(ge)):(V=this.z.redSqr(),Ee=ge.redSub(V).redISub(V),w=k.redSub(M).redISub(L).redMul(Ee),ee=ge.redMul(ce.redSub(L)),Ce=ge.redMul(Ee))}else ce=M.redAdd(L),V=this.curve._mulC(this.z).redSqr(),Ee=ce.redSub(V).redSub(V),w=this.curve._mulC(k.redISub(ce)).redMul(Ee),ee=this.curve._mulC(ce).redMul(M.redISub(L)),Ce=ce.redMul(Ee);return this.curve.point(w,ee,Ce)},C.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},C.prototype._extAdd=function(k){var M=this.y.redSub(this.x).redMul(k.y.redSub(k.x)),L=this.y.redAdd(this.x).redMul(k.y.redAdd(k.x)),w=this.t.redMul(this.curve.dd).redMul(k.t),ee=this.z.redMul(k.z.redAdd(k.z)),Ce=L.redSub(M),ce=ee.redSub(w),V=ee.redAdd(w),Ee=L.redAdd(M),ge=Ce.redMul(ce),_e=V.redMul(Ee),ne=Ce.redMul(Ee),r0=ce.redMul(V);return this.curve.point(ge,_e,r0,ne)},C.prototype._projAdd=function(k){var M=this.z.redMul(k.z),L=M.redSqr(),w=this.x.redMul(k.x),ee=this.y.redMul(k.y),Ce=this.curve.d.redMul(w).redMul(ee),ce=L.redSub(Ce),V=L.redAdd(Ce),Ee=this.x.redAdd(this.y).redMul(k.x.redAdd(k.y)).redISub(w).redISub(ee),ge=M.redMul(ce).redMul(Ee),_e,ne;return this.curve.twisted?(_e=M.redMul(V).redMul(ee.redSub(this.curve._mulA(w))),ne=ce.redMul(V)):(_e=M.redMul(V).redMul(ee.redSub(w)),ne=this.curve._mulC(ce).redMul(V)),this.curve.point(ge,_e,ne)},C.prototype.add=function(k){return this.isInfinity()?k:k.isInfinity()?this:this.curve.extended?this._extAdd(k):this._projAdd(k)},C.prototype.mul=function(k){return this._hasDoubles(k)?this.curve._fixedNafMul(this,k):this.curve._wnafMul(this,k)},C.prototype.mulAdd=function(k,M,L){return this.curve._wnafMulAdd(1,[this,M],[k,L],2,!1)},C.prototype.jmulAdd=function(k,M,L){return this.curve._wnafMulAdd(1,[this,M],[k,L],2,!0)},C.prototype.normalize=function(){if(this.zOne)return this;var k=this.z.redInvm();return this.x=this.x.redMul(k),this.y=this.y.redMul(k),this.t&&(this.t=this.t.redMul(k)),this.z=this.curve.one,this.zOne=!0,this},C.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},C.prototype.getX=function(){return this.normalize(),this.x.fromRed()},C.prototype.getY=function(){return this.normalize(),this.y.fromRed()},C.prototype.eq=function(k){return this===k||this.getX().cmp(k.getX())===0&&this.getY().cmp(k.getY())===0},C.prototype.eqXToP=function(k){var M=k.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(M)===0)return!0;for(var L=k.clone(),w=this.curve.redN.redMul(this.z);;){if(L.iadd(this.curve.n),L.cmp(this.curve.p)>=0)return!1;if(M.redIAdd(w),this.x.cmp(M)===0)return!0}},C.prototype.toP=C.prototype.normalize,C.prototype.mixedAdd=C.prototype.add,vh}var wp;function hC(){return wp||(wp=1,(function(f){var o=f;o.base=cu(),o.short=im(),o.mont=am(),o.edwards=om()})(yh)),yh}var Eh={},xh,Bp;function sm(){return Bp||(Bp=1,xh={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"]]}}),xh}var mp;function Eg(){return mp||(mp=1,(function(f){var o=f,c=ou(),l=hC(),b=Ei(),y=b.assert;function C(M){M.type==="short"?this.curve=new l.short(M):M.type==="edwards"?this.curve=new l.edwards(M):this.curve=new l.mont(M),this.g=this.curve.g,this.n=this.curve.n,this.hash=M.hash,y(this.g.validate(),"Invalid curve"),y(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}o.PresetCurve=C;function S(M,L){Object.defineProperty(o,M,{configurable:!0,enumerable:!0,get:function(){var w=new C(L);return Object.defineProperty(o,M,{configurable:!0,enumerable:!0,value:w}),w}})}S("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:c.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),S("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:c.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),S("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:c.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),S("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:c.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"]}),S("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:c.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"]}),S("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:c.sha256,gRed:!1,g:["9"]}),S("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:c.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var k;try{k=sm()}catch{k=void 0}S("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:c.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",k]})})(Eh)),Eh}var _h,Qp;function fm(){if(Qp)return _h;Qp=1;var f=ou(),o=uC(),c=E2();function l(b){if(!(this instanceof l))return new l(b);this.hash=b.hash,this.predResist=!!b.predResist,this.outLen=this.hash.outSize,this.minEntropy=b.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var y=o.toArray(b.entropy,b.entropyEnc||"hex"),C=o.toArray(b.nonce,b.nonceEnc||"hex"),S=o.toArray(b.pers,b.persEnc||"hex");c(y.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(y,C,S)}return _h=l,l.prototype._init=function(y,C,S){var k=y.concat(C).concat(S);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var M=0;M<this.V.length;M++)this.K[M]=0,this.V[M]=1;this._update(k),this._reseed=1,this.reseedInterval=281474976710656},l.prototype._hmac=function(){return new f.hmac(this.hash,this.K)},l.prototype._update=function(y){var C=this._hmac().update(this.V).update([0]);y&&(C=C.update(y)),this.K=C.digest(),this.V=this._hmac().update(this.V).digest(),y&&(this.K=this._hmac().update(this.V).update([1]).update(y).digest(),this.V=this._hmac().update(this.V).digest())},l.prototype.reseed=function(y,C,S,k){typeof C!="string"&&(k=S,S=C,C=null),y=o.toArray(y,C),S=o.toArray(S,k),c(y.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(y.concat(S||[])),this._reseed=1},l.prototype.generate=function(y,C,S,k){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof C!="string"&&(k=S,S=C,C=null),S&&(S=o.toArray(S,k||"hex"),this._update(S));for(var M=[];M.length<y;)this.V=this._hmac().update(this.V).digest(),M=M.concat(this.V);var L=M.slice(0,y);return this._update(S),this._reseed++,o.encode(L,C)},_h}var wh,Sp;function cm(){if(Sp)return wh;Sp=1;var f=Ja(),o=Ei(),c=o.assert;function l(b,y){this.ec=b,this.priv=null,this.pub=null,y.priv&&this._importPrivate(y.priv,y.privEnc),y.pub&&this._importPublic(y.pub,y.pubEnc)}return wh=l,l.fromPublic=function(y,C,S){return C instanceof l?C:new l(y,{pub:C,pubEnc:S})},l.fromPrivate=function(y,C,S){return C instanceof l?C:new l(y,{priv:C,privEnc:S})},l.prototype.validate=function(){var y=this.getPublic();return y.isInfinity()?{result:!1,reason:"Invalid public key"}:y.validate()?y.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"}},l.prototype.getPublic=function(y,C){return typeof y=="string"&&(C=y,y=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),C?this.pub.encode(C,y):this.pub},l.prototype.getPrivate=function(y){return y==="hex"?this.priv.toString(16,2):this.priv},l.prototype._importPrivate=function(y,C){this.priv=new f(y,C||16),this.priv=this.priv.umod(this.ec.curve.n)},l.prototype._importPublic=function(y,C){if(y.x||y.y){this.ec.curve.type==="mont"?c(y.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&c(y.x&&y.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(y.x,y.y);return}this.pub=this.ec.curve.decodePoint(y,C)},l.prototype.derive=function(y){return y.validate()||c(y.validate(),"public point not validated"),y.mul(this.priv).getX()},l.prototype.sign=function(y,C,S){return this.ec.sign(y,this,C,S)},l.prototype.verify=function(y,C,S){return this.ec.verify(y,C,this,void 0,S)},l.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},wh}var Bh,Dp;function um(){if(Dp)return Bh;Dp=1;var f=Ja(),o=Ei(),c=o.assert;function l(k,M){if(k instanceof l)return k;this._importDER(k,M)||(c(k.r&&k.s,"Signature without r or s"),this.r=new f(k.r,16),this.s=new f(k.s,16),k.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=k.recoveryParam)}Bh=l;function b(){this.place=0}function y(k,M){var L=k[M.place++];if(!(L&128))return L;var w=L&15;if(w===0||w>4||k[M.place]===0)return!1;for(var ee=0,Ce=0,ce=M.place;Ce<w;Ce++,ce++)ee<<=8,ee|=k[ce],ee>>>=0;return ee<=127?!1:(M.place=ce,ee)}function C(k){for(var M=0,L=k.length-1;!k[M]&&!(k[M+1]&128)&&M<L;)M++;return M===0?k:k.slice(M)}l.prototype._importDER=function(M,L){M=o.toArray(M,L);var w=new b;if(M[w.place++]!==48)return!1;var ee=y(M,w);if(ee===!1||ee+w.place!==M.length||M[w.place++]!==2)return!1;var Ce=y(M,w);if(Ce===!1||(M[w.place]&128)!==0)return!1;var ce=M.slice(w.place,Ce+w.place);if(w.place+=Ce,M[w.place++]!==2)return!1;var V=y(M,w);if(V===!1||M.length!==V+w.place||(M[w.place]&128)!==0)return!1;var Ee=M.slice(w.place,V+w.place);if(ce[0]===0)if(ce[1]&128)ce=ce.slice(1);else return!1;if(Ee[0]===0)if(Ee[1]&128)Ee=Ee.slice(1);else return!1;return this.r=new f(ce),this.s=new f(Ee),this.recoveryParam=null,!0};function S(k,M){if(M<128){k.push(M);return}var L=1+(Math.log(M)/Math.LN2>>>3);for(k.push(L|128);--L;)k.push(M>>>(L<<3)&255);k.push(M)}return l.prototype.toDER=function(M){var L=this.r.toArray(),w=this.s.toArray();for(L[0]&128&&(L=[0].concat(L)),w[0]&128&&(w=[0].concat(w)),L=C(L),w=C(w);!w[0]&&!(w[1]&128);)w=w.slice(1);var ee=[2];S(ee,L.length),ee=ee.concat(L),ee.push(2),S(ee,w.length);var Ce=ee.concat(w),ce=[48];return S(ce,Ce.length),ce=ce.concat(Ce),o.encode(ce,M)},Bh}var mh,kp;function lm(){if(kp)return mh;kp=1;var f=Ja(),o=fm(),c=Ei(),l=Eg(),b=lC(),y=c.assert,C=cm(),S=um();function k(M){if(!(this instanceof k))return new k(M);typeof M=="string"&&(y(Object.prototype.hasOwnProperty.call(l,M),"Unknown curve "+M),M=l[M]),M instanceof l.PresetCurve&&(M={curve:M}),this.curve=M.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=M.curve.g,this.g.precompute(M.curve.n.bitLength()+1),this.hash=M.hash||M.curve.hash}return mh=k,k.prototype.keyPair=function(L){return new C(this,L)},k.prototype.keyFromPrivate=function(L,w){return C.fromPrivate(this,L,w)},k.prototype.keyFromPublic=function(L,w){return C.fromPublic(this,L,w)},k.prototype.genKeyPair=function(L){L||(L={});for(var w=new o({hash:this.hash,pers:L.pers,persEnc:L.persEnc||"utf8",entropy:L.entropy||b(this.hash.hmacStrength),entropyEnc:L.entropy&&L.entropyEnc||"utf8",nonce:this.n.toArray()}),ee=this.n.byteLength(),Ce=this.n.sub(new f(2));;){var ce=new f(w.generate(ee));if(!(ce.cmp(Ce)>0))return ce.iaddn(1),this.keyFromPrivate(ce)}},k.prototype._truncateToN=function(L,w,ee){var Ce;if(f.isBN(L)||typeof L=="number")L=new f(L,16),Ce=L.byteLength();else if(typeof L=="object")Ce=L.length,L=new f(L,16);else{var ce=L.toString();Ce=ce.length+1>>>1,L=new f(ce,16)}typeof ee!="number"&&(ee=Ce*8);var V=ee-this.n.bitLength();return V>0&&(L=L.ushrn(V)),!w&&L.cmp(this.n)>=0?L.sub(this.n):L},k.prototype.sign=function(L,w,ee,Ce){if(typeof ee=="object"&&(Ce=ee,ee=null),Ce||(Ce={}),typeof L!="string"&&typeof L!="number"&&!f.isBN(L)){y(typeof L=="object"&&L&&typeof L.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),y(L.length>>>0===L.length);for(var ce=0;ce<L.length;ce++)y((L[ce]&255)===L[ce])}w=this.keyFromPrivate(w,ee),L=this._truncateToN(L,!1,Ce.msgBitLength),y(!L.isNeg(),"Can not sign a negative message");var V=this.n.byteLength(),Ee=w.getPrivate().toArray("be",V),ge=L.toArray("be",V);y(new f(ge).eq(L),"Can not sign message");for(var _e=new o({hash:this.hash,entropy:Ee,nonce:ge,pers:Ce.pers,persEnc:Ce.persEnc||"utf8"}),ne=this.n.sub(new f(1)),r0=0;;r0++){var xe=Ce.k?Ce.k(r0):new f(_e.generate(this.n.byteLength()));if(xe=this._truncateToN(xe,!0),!(xe.cmpn(1)<=0||xe.cmp(ne)>=0)){var Me=this.g.mul(xe);if(!Me.isInfinity()){var be=Me.getX(),We=be.umod(this.n);if(We.cmpn(0)!==0){var ae=xe.invm(this.n).mul(We.mul(w.getPrivate()).iadd(L));if(ae=ae.umod(this.n),ae.cmpn(0)!==0){var y0=(Me.getY().isOdd()?1:0)|(be.cmp(We)!==0?2:0);return Ce.canonical&&ae.cmp(this.nh)>0&&(ae=this.n.sub(ae),y0^=1),new S({r:We,s:ae,recoveryParam:y0})}}}}}},k.prototype.verify=function(L,w,ee,Ce,ce){ce||(ce={}),L=this._truncateToN(L,!1,ce.msgBitLength),ee=this.keyFromPublic(ee,Ce),w=new S(w,"hex");var V=w.r,Ee=w.s;if(V.cmpn(1)<0||V.cmp(this.n)>=0||Ee.cmpn(1)<0||Ee.cmp(this.n)>=0)return!1;var ge=Ee.invm(this.n),_e=ge.mul(L).umod(this.n),ne=ge.mul(V).umod(this.n),r0;return this.curve._maxwellTrick?(r0=this.g.jmulAdd(_e,ee.getPublic(),ne),r0.isInfinity()?!1:r0.eqXToP(V)):(r0=this.g.mulAdd(_e,ee.getPublic(),ne),r0.isInfinity()?!1:r0.getX().umod(this.n).cmp(V)===0)},k.prototype.recoverPubKey=function(M,L,w,ee){y((3&w)===w,"The recovery param is more than two bits"),L=new S(L,ee);var Ce=this.n,ce=new f(M),V=L.r,Ee=L.s,ge=w&1,_e=w>>1;if(V.cmp(this.curve.p.umod(this.curve.n))>=0&&_e)throw new Error("Unable to find sencond key candinate");_e?V=this.curve.pointFromX(V.add(this.curve.n),ge):V=this.curve.pointFromX(V,ge);var ne=L.r.invm(Ce),r0=Ce.sub(ce).mul(ne).umod(Ce),xe=Ee.mul(ne).umod(Ce);return this.g.mulAdd(r0,V,xe)},k.prototype.getKeyRecoveryParam=function(M,L,w,ee){if(L=new S(L,ee),L.recoveryParam!==null)return L.recoveryParam;for(var Ce=0;Ce<4;Ce++){var ce;try{ce=this.recoverPubKey(M,L,Ce)}catch{continue}if(ce.eq(w))return Ce}throw new Error("Unable to find valid recovery factor")},mh}var Qh,Mp;function hm(){if(Mp)return Qh;Mp=1;var f=Ei(),o=f.assert,c=f.parseBytes,l=f.cachedProperty;function b(y,C){this.eddsa=y,this._secret=c(C.secret),y.isPoint(C.pub)?this._pub=C.pub:this._pubBytes=c(C.pub)}return b.fromPublic=function(C,S){return S instanceof b?S:new b(C,{pub:S})},b.fromSecret=function(C,S){return S instanceof b?S:new b(C,{secret:S})},b.prototype.secret=function(){return this._secret},l(b,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),l(b,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),l(b,"privBytes",function(){var C=this.eddsa,S=this.hash(),k=C.encodingLength-1,M=S.slice(0,C.encodingLength);return M[0]&=248,M[k]&=127,M[k]|=64,M}),l(b,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),l(b,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),l(b,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),b.prototype.sign=function(C){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(C,this)},b.prototype.verify=function(C,S){return this.eddsa.verify(C,S,this)},b.prototype.getSecret=function(C){return o(this._secret,"KeyPair is public only"),f.encode(this.secret(),C)},b.prototype.getPublic=function(C){return f.encode(this.pubBytes(),C)},Qh=b,Qh}var Sh,Np;function dm(){if(Np)return Sh;Np=1;var f=Ja(),o=Ei(),c=o.assert,l=o.cachedProperty,b=o.parseBytes;function y(C,S){this.eddsa=C,typeof S!="object"&&(S=b(S)),Array.isArray(S)&&(c(S.length===C.encodingLength*2,"Signature has invalid size"),S={R:S.slice(0,C.encodingLength),S:S.slice(C.encodingLength)}),c(S.R&&S.S,"Signature without R or S"),C.isPoint(S.R)&&(this._R=S.R),S.S instanceof f&&(this._S=S.S),this._Rencoded=Array.isArray(S.R)?S.R:S.Rencoded,this._Sencoded=Array.isArray(S.S)?S.S:S.Sencoded}return l(y,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),l(y,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),l(y,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),l(y,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),y.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},y.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},Sh=y,Sh}var Dh,Fp;function gm(){if(Fp)return Dh;Fp=1;var f=ou(),o=Eg(),c=Ei(),l=c.assert,b=c.parseBytes,y=hm(),C=dm();function S(k){if(l(k==="ed25519","only tested with ed25519 so far"),!(this instanceof S))return new S(k);k=o[k].curve,this.curve=k,this.g=k.g,this.g.precompute(k.n.bitLength()+1),this.pointClass=k.point().constructor,this.encodingLength=Math.ceil(k.n.bitLength()/8),this.hash=f.sha512}return Dh=S,S.prototype.sign=function(M,L){M=b(M);var w=this.keyFromSecret(L),ee=this.hashInt(w.messagePrefix(),M),Ce=this.g.mul(ee),ce=this.encodePoint(Ce),V=this.hashInt(ce,w.pubBytes(),M).mul(w.priv()),Ee=ee.add(V).umod(this.curve.n);return this.makeSignature({R:Ce,S:Ee,Rencoded:ce})},S.prototype.verify=function(M,L,w){if(M=b(M),L=this.makeSignature(L),L.S().gte(L.eddsa.curve.n)||L.S().isNeg())return!1;var ee=this.keyFromPublic(w),Ce=this.hashInt(L.Rencoded(),ee.pubBytes(),M),ce=this.g.mul(L.S()),V=L.R().add(ee.pub().mul(Ce));return V.eq(ce)},S.prototype.hashInt=function(){for(var M=this.hash(),L=0;L<arguments.length;L++)M.update(arguments[L]);return c.intFromLE(M.digest()).umod(this.curve.n)},S.prototype.keyFromPublic=function(M){return y.fromPublic(this,M)},S.prototype.keyFromSecret=function(M){return y.fromSecret(this,M)},S.prototype.makeSignature=function(M){return M instanceof C?M:new C(this,M)},S.prototype.encodePoint=function(M){var L=M.getY().toArray("le",this.encodingLength);return L[this.encodingLength-1]|=M.getX().isOdd()?128:0,L},S.prototype.decodePoint=function(M){M=c.parseBytes(M);var L=M.length-1,w=M.slice(0,L).concat(M[L]&-129),ee=(M[L]&128)!==0,Ce=c.intFromLE(w);return this.curve.pointFromY(Ce,ee)},S.prototype.encodeInt=function(M){return M.toArray("le",this.encodingLength)},S.prototype.decodeInt=function(M){return c.intFromLE(M)},S.prototype.isPoint=function(M){return M instanceof this.pointClass},Dh}var Pp;function pm(){return Pp||(Pp=1,(function(f){var o=f;o.version=nm.version,o.utils=Ei(),o.rand=lC(),o.curve=hC(),o.curves=Eg(),o.ec=lm(),o.eddsa=gm()})(dh)),dh}var ym=pm();const Cm=Li(ym);var _2=function(f,o,c,l){var b=arguments.length,y=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(f,o,c,l);else for(var S=f.length-1;S>=0;S--)(C=f[S])&&(y=(b<3?C(y):b>3?C(o,c,y):C(o,c))||y);return b>3&&y&&Object.defineProperty(o,c,y),y},w2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)},pf,ud,c1,Im=Cm.ec;let kh,Mo=pf=class extends Ds{publicKey;constructor(o){if(super(),o.publicKey.length!==33)throw new Error("Expecting key to have length 33");this.publicKey=o.publicKey}static async recover(o){const c=new Uint8Array([0]),l=await o.signMessage(c),b=dC(await ec(c,Ra.ETH_KECCAK_256),l);return new pf({publicKey:b})}equals(o){return o instanceof pf?gA(this.publicKey,o.publicKey):!1}toString(){return"sepc256k1/"+Vf(this.publicKey)}toPeerId(){return Au(nu(this.publicKey))}static fromPeerId(o){if(!o.publicKey)throw new Error("Missing public key");if(o.type==="secp256k1")return new pf({publicKey:o.publicKey.raw});throw new Error("Unsupported key type: "+o.type)}};_2([YA({type:Ud("u8",33)}),w2("design:type",Uint8Array)],Mo.prototype,"publicKey",void 0);Mo=pf=_2([Fo(1),w2("design:paramtypes",[Object])],Mo);let Ns=ud=class extends q3{privateKey;constructor(o){if(super(),o.privateKey.length!==32)throw new Error("Expecting key to have length 32");this.privateKey=o.privateKey}equals(o){return o instanceof ud?gA(this.privateKey,o.privateKey):!1}toString(){return"secp256k1s/"+Vf(this.privateKey)}};_2([YA({type:Uint8Array}),w2("design:type",Uint8Array)],Ns.prototype,"privateKey",void 0);Ns=ud=_2([Fo(1),w2("design:paramtypes",[Object])],Ns);let P1=c1=class extends z3{publicKey;privateKey;_wallet;constructor(o){super(),this.privateKey=o.privateKey,this.publicKey=o.publicKey}static async create(){const o=await nw();return new c1({publicKey:new Mo({publicKey:o.publicKey.raw}),privateKey:new Ns({privateKey:o.raw})})}async sign(o,c=Ra.ETH_KECCAK_256){const l=await ec(o,c),b=id((this._wallet||(this._wallet=new o2(this.privateKey.privateKey)))._signingKey().signDigest(l)),y=new Uint8Array(So.length(b));return So.write(b,y,0),new La({prehash:c,publicKey:this.publicKey,signature:y})}equals(o){return o instanceof c1?this.publicKey.equals(o.publicKey)&&this.privateKey.equals(o.privateKey):!1}toPeerId(){return Au(nu(this.publicKey.publicKey))}};_2([YA({type:Mo}),w2("design:type",Mo)],P1.prototype,"publicKey",void 0);_2([YA({type:Ns}),w2("design:type",Ns)],P1.prototype,"privateKey",void 0);P1=c1=_2([Fo(2),w2("design:paramtypes",[Object])],P1);const bm=new TextDecoder;function vm(){return kh||(kh=new Im("secp256k1")),kh}const dC=(f,o)=>{const c=Rs(o),l={r:Nt(c.r),s:Nt(c.s)};return new Uint8Array(vm().recoverPubKey(Nt(f),l,c.recoveryParam).encodeCompressed())},Em=async(f,o)=>{const c=await ec(o,f.prehash),l=dC(Nt(c),bm.decode(f.signature));return gA(l,f.publicKey.publicKey)};var B2=function(f,o,c,l){var b=arguments.length,y=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(f,o,c,l);else for(var S=f.length-1;S>=0;S--)(C=f[S])&&(y=(b<3?C(y):b>3?C(o,c,y):C(o,c))||y);return b>3&&y&&Object.defineProperty(o,c,y),y},m2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)};let La=class{signature;publicKey;prehash=Ra.NONE;constructor(o){this.signature=o.signature,this.publicKey=o.publicKey,this.prehash=o.prehash}equals(o){return gA(this.signature,o.signature)?P3(Ss(this.publicKey),Ss(o.publicKey))===0&&this.prehash===o.prehash:!1}};B2([YA({type:Uint8Array}),m2("design:type",Uint8Array)],La.prototype,"signature",void 0);B2([YA({type:Ds}),m2("design:type",Ds)],La.prototype,"publicKey",void 0);B2([YA({type:"u8"}),m2("design:type",Number)],La.prototype,"prehash",void 0);La=B2([Fo(0),m2("design:paramtypes",[Object])],La);let K1=class{data;signature;constructor(o){this.data=o.data,this.signature=o.signature,this._value=o.value}_value;getValue(o){return RE(this.data,o)}async verify(){return this.signature?xm(this.signature,this.data):!0}equals(o){return!gA(this.data,o.data)||!this.signature!=!o.signature?!1:this.signature&&o.signature?this.signature.equals(o.signature):!0}async sign(o){const c=await o(this.data);return this.signature=c,this}};B2([YA({type:Uint8Array}),m2("design:type",Uint8Array)],K1.prototype,"data",void 0);B2([YA({type:_E(La)}),m2("design:type",La)],K1.prototype,"signature",void 0);K1=B2([Fo(0),m2("design:paramtypes",[Object])],K1);const xm=async(f,o)=>f.publicKey instanceof No?wm(f,o):f.publicKey instanceof Mo?Em(f,o):!1,_m=async(f,o,c)=>{const l=await ec(f,c);return new La({prehash:c,publicKey:o.publicKey,signature:d2.crypto_sign_detached(l,o.privateKeyPublicKey)})},wm=async(f,o)=>{let c=!1;try{const l=await ec(o,f.prehash);c=d2.crypto_sign_verify_detached(f.signature,l,f.publicKey.publicKey)}catch{return!1}return c};var Q2=function(f,o,c,l){var b=arguments.length,y=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(f,o,c,l);else for(var S=f.length-1;S>=0;S--)(C=f[S])&&(y=(b<3?C(y):b>3?C(o,c,y):C(o,c))||y);return b>3&&y&&Object.defineProperty(o,c,y),y},S2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)},u1,ld,l1;let No=u1=class extends Ds{publicKey;constructor(o){if(super(),this.publicKey=o.publicKey,o.publicKey.length!==32)throw new Error("Expecting key to have length 32")}equals(o){return o instanceof u1?gA(this.publicKey,o.publicKey):!1}toString(){return"ed25119p/"+Vf(this.publicKey)}toPeerId(){return Au(nu(this.publicKey))}static fromPeerId(o){if(!o.publicKey)throw new Error("Missing public key");if(o.type==="Ed25519")return new u1({publicKey:fw(o.publicKey.raw)});throw new Error("Unsupported key type: "+o.type)}};Q2([YA({type:Ud("u8",32)}),S2("design:type",Uint8Array)],No.prototype,"publicKey",void 0);No=u1=Q2([Fo(0),S2("design:paramtypes",[Object])],No);let Fs=ld=class extends q3{privateKey;constructor(o){if(super(),o.privateKey.length!==32)throw new Error("Expecting key to have length 32");this.privateKey=o.privateKey}equals(o){return o instanceof ld?gA(this.privateKey,o.privateKey):!1}toString(){return"ed25119s/"+Vf(this.privateKey)}keyObject};Q2([YA({type:Ud("u8",32)}),S2("design:type",Uint8Array)],Fs.prototype,"privateKey",void 0);Fs=ld=Q2([Fo(0),S2("design:paramtypes",[Object])],Fs);let Pf=l1=class extends z3{publicKey;privateKey;constructor(o){super(),this.privateKey=o.privateKey,this.publicKey=o.publicKey}static async create(){await d2.ready;const o=d2.crypto_sign_keypair();return new l1({publicKey:new No({publicKey:o.publicKey}),privateKey:new Fs({privateKey:o.privateKey.slice(0,32)})})}sign(o,c=Ra.NONE){return _m(o,this,c)}signer(o){return async c=>this.sign(c,o)}equals(o){return o instanceof l1?this.publicKey.equals(o.publicKey)&&this.privateKey.equals(o.privateKey):!1}_privateKeyPublicKey;get privateKeyPublicKey(){return this._privateKeyPublicKey||(this._privateKeyPublicKey=p2([this.privateKey.privateKey,this.publicKey.publicKey]))}toPeerId(){return Au(nu(this.publicKey.publicKey))}};Q2([YA({type:No}),S2("design:type",No)],Pf.prototype,"publicKey",void 0);Q2([YA({type:Fs}),S2("design:type",Fs)],Pf.prototype,"privateKey",void 0);Pf=l1=Q2([Fo(0),S2("design:paramtypes",[Object])],Pf);const Kp=f=>{if(f.type==="Ed25519")return No.fromPeerId(f);if(f.type==="secp256k1")return Mo.fromPeerId(f);throw new Error("Unsupported key type")},Bm=f=>{if(f==="https:")return gC;if(f==="http:")return hd;throw new Error("Unsupported protocol: "+f)},gC=9002,hd=8082,Up="/trust",mm="/peer/id",Qm="/peer/address",Zc="/program",Mh="/programs",Sm="/program/variants",Dm="/install",km="/network/bootstrap",Mm="/restart",Nm="/stop",Fm="/log",Pm="/versions",Km="modulepreload",Um=function(f){return"/"+f},Rp={},Hp=function(o,c,l){let b=Promise.resolve();if(c&&c.length>0){let C=function(M){return Promise.all(M.map(L=>Promise.resolve(L).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};document.getElementsByTagName("link");const S=document.querySelector("meta[property=csp-nonce]"),k=S?.nonce||S?.getAttribute("nonce");b=C(c.map(M=>{if(M=Um(M),M in Rp)return;Rp[M]=!0;const L=M.endsWith(".css"),w=L?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${M}"]${w}`))return;const ee=document.createElement("link");if(ee.rel=L?"stylesheet":Km,L||(ee.as="script"),ee.crossOrigin="",ee.href=M,k&&ee.setAttribute("nonce",k),document.head.appendChild(ee),L)return new Promise((Ce,ce)=>{ee.addEventListener("load",Ce),ee.addEventListener("error",()=>ce(new Error(`Unable to preload CSS for ${M}`)))})}))}function y(C){const S=new Event("vite:preloadError",{cancelable:!0});if(S.payload=C,window.dispatchEvent(S),!S.defaultPrevented)throw C}return b.then(C=>{for(const S of C||[])S.status==="rejected"&&y(S.reason);return o().catch(y)})};class gi extends Error{static name="InvalidMultiaddrError";name="InvalidMultiaddrError"}class Kf extends Error{static name="ValidationError";name="ValidationError"}class Rm extends Error{static name="InvalidParametersError";name="InvalidParametersError"}class Hm extends Error{static name="UnknownProtocolError";name="UnknownProtocolError"}class Gm{index=0;input="";new(o){return this.index=0,this.input=o,this}readAtomically(o){const c=this.index,l=o();return l===void 0&&(this.index=c),l}parseWith(o){const c=o();if(this.index===this.input.length)return c}peekChar(){if(!(this.index>=this.input.length))return this.input[this.index]}readChar(){if(!(this.index>=this.input.length))return this.input[this.index++]}readGivenChar(o){return this.readAtomically(()=>{const c=this.readChar();if(c===o)return c})}readSeparator(o,c,l){return this.readAtomically(()=>{if(!(c>0&&this.readGivenChar(o)===void 0))return l()})}readNumber(o,c,l,b){return this.readAtomically(()=>{let y=0,C=0;const S=this.peekChar();if(S===void 0)return;const k=S==="0",M=2**(8*b)-1;for(;;){const L=this.readAtomically(()=>{const w=this.readChar();if(w===void 0)return;const ee=Number.parseInt(w,o);if(!Number.isNaN(ee))return ee});if(L===void 0)break;if(y*=o,y+=L,y>M||(C+=1,c!==void 0&&C>c))return}if(C!==0)return!l&&k&&C>1?void 0:y})}readIPv4Addr(){return this.readAtomically(()=>{const o=new Uint8Array(4);for(let c=0;c<o.length;c++){const l=this.readSeparator(".",c,()=>this.readNumber(10,3,!1,1));if(l===void 0)return;o[c]=l}return o})}readIPv6Addr(){const o=c=>{for(let l=0;l<c.length/2;l++){const b=l*2;if(l<c.length-3){const C=this.readSeparator(":",l,()=>this.readIPv4Addr());if(C!==void 0)return c[b]=C[0],c[b+1]=C[1],c[b+2]=C[2],c[b+3]=C[3],[b+4,!0]}const y=this.readSeparator(":",l,()=>this.readNumber(16,4,!0,2));if(y===void 0)return[b,!1];c[b]=y>>8,c[b+1]=y&255}return[c.length,!1]};return this.readAtomically(()=>{const c=new Uint8Array(16),[l,b]=o(c);if(l===16)return c;if(b||this.readGivenChar(":")===void 0||this.readGivenChar(":")===void 0)return;const y=new Uint8Array(14),C=16-(l+2),[S]=o(y.subarray(0,C));return c.set(y.subarray(0,S),16-S),c})}readIPAddr(){return this.readIPv4Addr()??this.readIPv6Addr()}}const Ym=45,Lm=15,U1=new Gm;function Tm(f){if(!(f.length>Lm))return U1.new(f).parseWith(()=>U1.readIPv4Addr())}function Jm(f){if(f.includes("%")&&(f=f.split("%")[0]),!(f.length>Ym))return U1.new(f).parseWith(()=>U1.readIPv6Addr())}function pC(f){return!!Tm(f)}function Om(f){return!!Jm(f)}const dd=4,gd=6,pd=273,zm=33,h1=41,yC=42,qm=43,CC=53,IC=54,xg=55,bC=56,jm=132,Vm=301,Xm=302,Wm=400,vC=421,Zm=444,$m=445,eQ=446,tQ=447,rQ=448,nQ=449,AQ=454,iQ=460,aQ=461,oQ=465,sQ=466,fQ=480,cQ=481,uQ=443,lQ=477,hQ=478,dQ=479,gQ=277,pQ=275,yQ=276,CQ=280,IQ=281,EC=290,bQ=777;function Gp(f){return o=>wA(o,f)}function Yp(f){return o=>Ga(o,f)}function yf(f){return new DataView(f.buffer).getUint16(f.byteOffset).toString()}function ls(f){const o=new ArrayBuffer(2);return new DataView(o).setUint16(0,typeof f=="string"?parseInt(f):f),new Uint8Array(o)}function vQ(f){const o=f.split(":");if(o.length!==2)throw new Error(`failed to parse onion addr: ["'${o.join('", "')}'"]' does not contain a port number`);if(o[0].length!==16)throw new Error(`failed to parse onion addr: ${o[0]} not a Tor onion address.`);const c=Ga(o[0],"base32"),l=parseInt(o[1],10);if(l<1||l>65536)throw new Error("Port number is not in range(1, 65536)");const b=ls(l);return p2([c,b],c.length+b.length)}function EQ(f){const o=f.split(":");if(o.length!==2)throw new Error(`failed to parse onion addr: ["'${o.join('", "')}'"]' does not contain a port number`);if(o[0].length!==56)throw new Error(`failed to parse onion addr: ${o[0]} not a Tor onion3 address.`);const c=bs.decode(`b${o[0]}`),l=parseInt(o[1],10);if(l<1||l>65536)throw new Error("Port number is not in range(1, 65536)");const b=ls(l);return p2([c,b],c.length+b.length)}function Lp(f){const o=f.subarray(0,f.length-2),c=f.subarray(f.length-2),l=wA(o,"base32"),b=yf(c);return`${l}:${b}`}const xC=function(f){f=f.toString().trim();const o=new Uint8Array(4);return f.split(/\./g).forEach((c,l)=>{const b=parseInt(c,10);if(isNaN(b)||b<0||b>255)throw new gi("Invalid byte value in IP address");o[l]=b}),o},xQ=function(f){let o=0;f=f.toString().trim();const c=f.split(":",8);let l;for(l=0;l<c.length;l++){const y=pC(c[l]);let C;y&&(C=xC(c[l]),c[l]=wA(C.subarray(0,2),"base16")),C!=null&&++l<8&&c.splice(l,0,wA(C.subarray(2,4),"base16"))}if(c[0]==="")for(;c.length<8;)c.unshift("0");else if(c[c.length-1]==="")for(;c.length<8;)c.push("0");else if(c.length<8){for(l=0;l<c.length&&c[l]!=="";l++);const y=[l,1];for(l=9-c.length;l>0;l--)y.push("0");c.splice.apply(c,y)}const b=new Uint8Array(o+16);for(l=0;l<c.length;l++){c[l]===""&&(c[l]="0");const y=parseInt(c[l],16);if(isNaN(y)||y<0||y>65535)throw new gi("Invalid byte value in IP address");b[o++]=y>>8&255,b[o++]=y&255}return b},_Q=function(f){if(f.byteLength!==4)throw new gi("IPv4 address was incorrect length");const o=[];for(let c=0;c<f.byteLength;c++)o.push(f[c]);return o.join(".")},wQ=function(f){if(f.byteLength!==16)throw new gi("IPv6 address was incorrect length");const o=[];for(let l=0;l<f.byteLength;l+=2){const b=f[l],y=f[l+1],C=`${b.toString(16).padStart(2,"0")}${y.toString(16).padStart(2,"0")}`;o.push(C)}const c=o.join(":");try{const l=new URL(`http://[${c}]`);return l.hostname.substring(1,l.hostname.length-1)}catch{throw new gi(`Invalid IPv6 address "${c}"`)}};function BQ(f){try{const o=new URL(`http://[${f}]`);return o.hostname.substring(1,o.hostname.length-1)}catch{throw new gi(`Invalid IPv6 address "${f}"`)}}const Nh=Object.values(qh).map(f=>f.decoder),mQ=(function(){let f=Nh[0].or(Nh[1]);return Nh.slice(2).forEach(o=>f=f.or(o)),f})();function QQ(f){return mQ.decode(f)}function SQ(f){return o=>f.encoder.encode(o)}function DQ(f){if(parseInt(f).toString()!==f)throw new Kf("Value must be an integer")}function kQ(f){if(f<0)throw new Kf("Value must be a positive integer, or zero")}function MQ(f){return o=>{if(o>f)throw new Kf(`Value must be smaller than or equal to ${f}`)}}function NQ(...f){return o=>{for(const c of f)c(o)}}const $c=NQ(DQ,kQ,MQ(65535)),cA=-1;class FQ{protocolsByCode=new Map;protocolsByName=new Map;getProtocol(o){let c;if(typeof o=="string"?c=this.protocolsByName.get(o):c=this.protocolsByCode.get(o),c==null)throw new Hm(`Protocol ${o} was unknown`);return c}addProtocol(o){this.protocolsByCode.set(o.code,o),this.protocolsByName.set(o.name,o),o.aliases?.forEach(c=>{this.protocolsByName.set(c,o)})}removeProtocol(o){const c=this.protocolsByCode.get(o);c!=null&&(this.protocolsByCode.delete(c.code),this.protocolsByName.delete(c.name),c.aliases?.forEach(l=>{this.protocolsByName.delete(l)}))}}const Ha=new FQ,PQ=[{code:dd,name:"ip4",size:32,valueToBytes:xC,bytesToValue:_Q,validate:f=>{if(!pC(f))throw new Kf(`Invalid IPv4 address "${f}"`)}},{code:gd,name:"tcp",size:16,valueToBytes:ls,bytesToValue:yf,validate:$c},{code:pd,name:"udp",size:16,valueToBytes:ls,bytesToValue:yf,validate:$c},{code:zm,name:"dccp",size:16,valueToBytes:ls,bytesToValue:yf,validate:$c},{code:h1,name:"ip6",size:128,valueToBytes:xQ,bytesToValue:wQ,stringToValue:BQ,validate:f=>{if(!Om(f))throw new Kf(`Invalid IPv6 address "${f}"`)}},{code:yC,name:"ip6zone",size:cA},{code:qm,name:"ipcidr",size:8,bytesToValue:Gp("base10"),valueToBytes:Yp("base10")},{code:CC,name:"dns",size:cA,resolvable:!0},{code:IC,name:"dns4",size:cA,resolvable:!0},{code:xg,name:"dns6",size:cA,resolvable:!0},{code:bC,name:"dnsaddr",size:cA,resolvable:!0},{code:jm,name:"sctp",size:16,valueToBytes:ls,bytesToValue:yf,validate:$c},{code:Vm,name:"udt"},{code:Xm,name:"utp"},{code:Wm,name:"unix",size:cA,path:!0,stringToValue:f=>decodeURIComponent(f),valueToString:f=>encodeURIComponent(f)},{code:vC,name:"p2p",aliases:["ipfs"],size:cA,bytesToValue:Gp("base58btc"),valueToBytes:f=>f.startsWith("Q")||f.startsWith("1")?Yp("base58btc")(f):fn.parse(f).multihash.bytes},{code:Zm,name:"onion",size:96,bytesToValue:Lp,valueToBytes:vQ},{code:$m,name:"onion3",size:296,bytesToValue:Lp,valueToBytes:EQ},{code:eQ,name:"garlic64",size:cA},{code:tQ,name:"garlic32",size:cA},{code:rQ,name:"tls"},{code:nQ,name:"sni",size:cA},{code:AQ,name:"noise"},{code:iQ,name:"quic"},{code:aQ,name:"quic-v1"},{code:oQ,name:"webtransport"},{code:sQ,name:"certhash",size:cA,bytesToValue:SQ(R3),valueToBytes:QQ},{code:fQ,name:"http"},{code:cQ,name:"http-path",size:cA,stringToValue:f=>`/${decodeURIComponent(f)}`,valueToString:f=>encodeURIComponent(f.substring(1))},{code:uQ,name:"https"},{code:lQ,name:"ws"},{code:hQ,name:"wss"},{code:dQ,name:"p2p-websocket-star"},{code:gQ,name:"p2p-stardust"},{code:pQ,name:"p2p-webrtc-star"},{code:yQ,name:"p2p-webrtc-direct"},{code:CQ,name:"webrtc-direct"},{code:IQ,name:"webrtc"},{code:EC,name:"p2p-circuit"},{code:bQ,name:"memory",size:cA}];PQ.forEach(f=>{Ha.addProtocol(f)});function KQ(f){const o=[];let c=0;for(;c<f.length;){const l=wy(f,c),b=Ha.getProtocol(l),y=C2(l),C=GQ(b,f,c+y);let S=0;C>0&&b.size===cA&&(S=C2(C));const k=y+S+C,M={code:l,name:b.name,bytes:f.subarray(c,c+k)};if(C>0){const L=c+y+S,w=f.subarray(L,L+C);M.value=b.bytesToValue?.(w)??wA(w)}o.push(M),c+=k}return o}function UQ(f){let o=0;const c=[];for(const l of f){if(l.bytes==null){const b=Ha.getProtocol(l.code),y=C2(l.code);let C,S=0,k=0;l.value!=null&&(C=b.valueToBytes?.(l.value)??Ga(l.value),S=C.byteLength,b.size===cA&&(k=C2(S)));const M=new Uint8Array(y+k+S);let L=0;$h(l.code,M,L),L+=y,C!=null&&(b.size===cA&&($h(S,M,L),L+=k),M.set(C,L)),l.bytes=M}c.push(l.bytes),o+=l.bytes.byteLength}return p2(c,o)}function RQ(f){if(f.charAt(0)!=="/")throw new gi('String multiaddr must start with "/"');const o=[];let c="protocol",l="",b="";for(let y=1;y<f.length;y++){const C=f.charAt(y);C!=="/"&&(c==="protocol"?b+=f.charAt(y):l+=f.charAt(y));const S=y===f.length-1;if(C==="/"||S){const k=Ha.getProtocol(b);if(c==="protocol"){if(k.size==null||k.size===0){o.push({code:k.code,name:k.name}),l="",b="",c="protocol";continue}else if(S)throw new gi(`Component ${b} was missing value`);c="value"}else if(c==="value"){const M={code:k.code,name:k.name};if(k.size!=null&&k.size!==0){if(l==="")throw new gi(`Component ${b} was missing value`);M.value=k.stringToValue?.(l)??l}o.push(M),l="",b="",c="protocol"}}}if(b!==""&&l!=="")throw new gi("Incomplete multiaddr");return o}function HQ(f){return`/${f.flatMap(o=>{if(o.value==null)return o.name;const c=Ha.getProtocol(o.code);if(c==null)throw new gi(`Unknown protocol code ${o.code}`);return[o.name,c.valueToString?.(o.value)??o.value]}).join("/")}`}function GQ(f,o,c){return f.size==null||f.size===0?0:f.size>0?f.size/8:wy(o,c)}const YQ=Symbol.for("nodejs.util.inspect.custom"),_C=Symbol.for("@multiformats/multiaddr"),LQ=[CC,IC,xg,bC];class TQ extends Error{constructor(o="No available resolver"){super(o),this.name="NoAvailableResolverError"}}function JQ(f){if(f==null&&(f="/"),qQ(f))return f.getComponents();if(f instanceof Uint8Array)return KQ(f);if(typeof f=="string")return f=f.replace(/\/(\/)+/,"/").replace(/(\/)+$/,""),f===""&&(f="/"),RQ(f);if(Array.isArray(f))return f;throw new gi("Must be a string, Uint8Array, Component[], or another Multiaddr")}class hs{[_C]=!0;#e;#t;#r;constructor(o="/",c={}){this.#e=JQ(o),c.validate!==!1&&OQ(this)}get bytes(){return this.#r==null&&(this.#r=UQ(this.#e)),this.#r}toString(){return this.#t==null&&(this.#t=HQ(this.#e)),this.#t}toJSON(){return this.toString()}toOptions(){let o,c,l,b,y="";for(const{code:S,name:k,value:M}of this.#e)S===yC&&(y=`%${M??""}`),LQ.includes(S)&&(c="tcp",b=443,l=`${M??""}${y}`,o=S===xg?6:4),(S===gd||S===pd)&&(c=k==="tcp"?"tcp":"udp",b=parseInt(M??"")),(S===dd||S===h1)&&(c="tcp",l=`${M??""}${y}`,o=S===h1?6:4);if(o==null||c==null||l==null||b==null)throw new Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6, dnsaddr}/{address}/{tcp, udp}/{port}".');return{family:o,host:l,transport:c,port:b}}getComponents(){return[...this.#e]}protos(){return this.#e.map(({code:o,value:c})=>{const l=Ha.getProtocol(o);return{code:o,size:l.size??0,name:l.name,resolvable:!!l.resolvable,path:!!l.path}})}protoCodes(){return this.#e.map(({code:o})=>o)}protoNames(){return this.#e.map(({name:o})=>o)}tuples(){return this.#e.map(({code:o,value:c})=>{if(c==null)return[o];const l=Ha.getProtocol(o),b=[o];return c!=null&&b.push(l.valueToBytes?.(c)??Ga(c)),b})}stringTuples(){return this.#e.map(({code:o,value:c})=>c==null?[o]:[o,c])}encapsulate(o){const c=new hs(o);return new hs([...this.#e,...c.getComponents()],{validate:!1})}decapsulate(o){const c=o.toString(),l=this.toString(),b=l.lastIndexOf(c);if(b<0)throw new Rm(`Address ${this.toString()} does not contain subaddress: ${o.toString()}`);return new hs(l.slice(0,b),{validate:!1})}decapsulateCode(o){let c;for(let l=this.#e.length-1;l>-1;l--)if(this.#e[l].code===o){c=l;break}return new hs(this.#e.slice(0,c),{validate:!1})}getPeerId(){try{let o=[];this.#e.forEach(({code:l,value:b})=>{l===vC&&o.push([l,b]),l===EC&&(o=[])});const c=o.pop();if(c?.[1]!=null){const l=c[1];return l[0]==="Q"||l[0]==="1"?wA(_A.decode(`z${l}`),"base58btc"):wA(fn.parse(l).multihash.bytes,"base58btc")}return null}catch{return null}}getPath(){for(const o of this.#e)if(Ha.getProtocol(o.code).path)return o.value??null;return null}equals(o){return gA(this.bytes,o.bytes)}async resolve(o){const c=this.protos().find(y=>y.resolvable);if(c==null)return[this];const l=zQ.get(c.name);if(l==null)throw new TQ(`no available resolver for ${c.name}`);return(await l(this,o)).map(y=>wC(y))}nodeAddress(){const o=this.toOptions();if(o.transport!=="tcp"&&o.transport!=="udp")throw new Error(`multiaddr must have a valid format - no protocol with name: "${o.transport}". Must have a valid transport protocol: "{tcp, udp}"`);return{family:o.family,address:o.host,port:o.port}}isThinWaistAddress(){return!(this.#e.length!==2||this.#e[0].code!==dd&&this.#e[0].code!==h1||this.#e[1].code!==gd&&this.#e[1].code!==pd)}[YQ](){return`Multiaddr(${this.toString()})`}}function OQ(f){f.getComponents().forEach(o=>{const c=Ha.getProtocol(o.code);o.value!=null&&c.validate?.(o.value)})}const zQ=new Map;function qQ(f){return!!f?.[_C]}function wC(f){return new hs(f)}const jQ="X-Peerbit-Signature",VQ="X-Peerbit-Signature-Time",XQ=async(f,o,c,l,b)=>{const y=Math.round(new Date().getTime()/1e3).toString(),C=new mr;if(!o)throw new Error("Expecting method");if(!c)throw new Error("Expecting path");C.string(o.toLowerCase()+c.toLowerCase()+y+(l||""));const S=await b.sign(C.finalize());f[VQ]=y,f[jQ]=O3(Ss(S))},WQ=async(f,o={address:"http://localhost:"+hd})=>{let c=o.address;!c.startsWith("http://")&&!c.startsWith("https://")&&(c.endsWith("localhost:")||c.endsWith("localhost")?c="http://"+c:c="https://"+c);const l=c.startsWith("http://localhost");new URL(c).port===""&&!c.endsWith(":80")&&(l?c=c+":"+hd:c=c+":"+gC);const{default:b}=await Hp(async()=>{const{default:w}=await import("./index-BVKiFqNl.js");return{default:w}},[]),y=b.create();y.interceptors.request.use(async w=>{const ee=new URL(w.url);return await XQ(w.headers,w.method,ee.pathname+ee.search,w.data,f),w});const C=w=>w>=200&&w<300||w===404,S=w=>{if(w.status!==200)throw new Error(w.data);return w},k=async()=>S(await y.get(c+mm,{validateStatus:C,timeout:5e3})).data,M=async w=>S(await y.delete(c+Zc+"/"+encodeURIComponent(w.toString()),{validateStatus:C})),L=async w=>S(await y.delete(c+Zc+"/"+encodeURIComponent(w.toString())+"?delete=true",{validateStatus:C}));return{peer:{id:{get:k},addresses:{get:async()=>S(await y.get(c+Qm,{validateStatus:C})).data.map(w=>wC(w))}},access:{allow:async w=>{const ee=await y.put(c+Up+"/"+encodeURIComponent(typeof w=="string"?w:w instanceof Ds?w.hashcode():Kp(w).hashcode()),void 0,{validateStatus:C});if(ee.status!==200&&ee.status!==404)throw new Error(ee.data);return ee.status===200},deny:async w=>{const ee=await y.delete(c+Up+"/"+encodeURIComponent(w instanceof Ds?w.hashcode():Kp(w).hashcode()),{validateStatus:C});if(ee.status!==200&&ee.status!==404)throw new Error(ee.data);return ee.status===200}},program:{has:async w=>{const ee=await y.head(c+Zc+"/"+encodeURIComponent(w.toString()),{validateStatus:C});if(ee.status!==200&&ee.status!==404)throw new Error(ee.data);return ee.status===200},open:async w=>S(await y.put(c+Zc,JSON.stringify(w),{validateStatus:C})).data,close:async w=>{await M(w)},closeAll:async()=>{const w=S(await y.get(c+Mh,{validateStatus:C}));await Promise.all([...Object.keys(w.data)].map(ee=>M(ee)))},drop:async w=>{await L(w)},dropAll:async()=>{const w=S(await y.get(c+Mh,{validateStatus:C}));await Promise.all([...Object.keys(w.data)].map(ee=>L(ee)))},list:async()=>S(await y.get(c+Mh,{validateStatus:C})).data,variants:async()=>S(await y.get(c+Sm,{validateStatus:C})).data},dependency:{install:async w=>{const ee=await y.put(c+Dm,JSON.stringify(w),{validateStatus:C});if(ee.status!==200)throw new Error(typeof ee.data=="string"?ee.data:ee.data.toString());return ee.data},versions:async()=>S(await y.get(c+Pm,{validateStatus:C})).data},network:{bootstrap:async()=>{S(await y.post(c+km,void 0,{validateStatus:C}))}},restart:async()=>{S(await y.post(c+Mm,void 0,{validateStatus:C}))},stop:async()=>{S(await y.post(c+Nm,void 0,{validateStatus:C}))},log:{fetch:async w=>{const ee=c+Fm+(w!==void 0?`?n=${w}`:"");return S(await y.get(ee,{validateStatus:C})).data}},terminate:async()=>{const{terminateNode:w}=await Hp(async()=>{const{terminateNode:ee}=await Promise.resolve().then(()=>eS);return{terminateNode:ee}},void 0);o.origin?.type==="aws"&&await w({instanceId:o.origin.instanceId,region:o.origin.region})}}};let yd=Fd({palette:{mode:"dark"},typography:{fontFamily:["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(",")}});yd=_v(yd);const ZQ=()=>{const[f,o]=Ar.useState(),[c,l]=Ar.useState(),[b,y]=Ar.useState(),[C,S]=Ar.useState(),[k,M]=Ar.useState([]);return Ar.useEffect(()=>{Pf.create().then(L=>WQ(L,{address:window.location.protocol+"//"+window.location.hostname+":"+Bm(window.location.protocol)}).then(w=>{o(w),w.peer.id.get().then(ee=>{l(ee)}).catch(ee=>{window.location.hostname!=="localhost"?alert(ee):console.error(ee)}),w.peer.addresses.get().then(ee=>{const Ce=ee.find(Ee=>Ee.protoNames().includes("tcp")&&!Ee.protoNames().includes("ws")&&!Ee.protoNames().includes("wss"));Ce&&y(Ce.toString());const ce=ee.find(Ee=>Ee.protoNames().includes("ws")||Ee.protoNames().includes("wss"));ce&&S(ce.toString());let V=ee.filter(Ee=>(!Ce||!Ee.equals(Ce))&&(!ce||!Ee.equals(ce)));M(V.map(Ee=>Ee.toString()))}).catch(ee=>{window.location.hostname!=="localhost"?alert(ee):console.error(ee)})}))},[]),nr.jsxs(Gv,{theme:yd,children:[nr.jsx(AE,{}),nr.jsx(eE,{children:nr.jsx(na,{container:!0,sx:{p:4,height:"100vh"},children:nr.jsxs(na,{item:!0,container:!0,direction:"column",spacing:2,maxWidth:"400px",children:[nr.jsxs(na,{item:!0,container:!0,direction:"row",alignItems:"center",mb:2,children:[nr.jsx(na,{mr:2,display:"flex",justifyContent:"center",item:!0,children:nr.jsx("img",{width:"60px",height:"auto",src:"./android-chrome-192x192.png"})}),nr.jsx(na,{item:!0,children:nr.jsx(ra,{variant:"h5",children:"Peerbit"})})]}),nr.jsxs(na,{item:!0,children:[nr.jsx(ra,{variant:"overline",children:"Id"}),nr.jsx(ra,{children:c})]}),nr.jsx(na,{item:!0,children:nr.jsx(ra,{variant:"overline",children:"Address"})}),b&&nr.jsxs(na,{item:!0,children:[nr.jsx(ra,{variant:"caption",children:" TCP (non-browser)"}),nr.jsx(wl,{elevation:10,children:nr.jsx(ra,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:b})})]}),C&&nr.jsxs(na,{item:!0,children:[nr.jsxs(ra,{variant:"caption",children:[" ","Websockets (browser and non-browser)"," "]}),nr.jsx(wl,{elevation:10,children:nr.jsx(ra,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:C})})]}),k.length>0&&nr.jsxs(na,{item:!0,children:[nr.jsx(ra,{variant:"caption",children:" Other addresses"}),k.map(L=>nr.jsx(wl,{elevation:10,children:nr.jsx(ra,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:L})}))]})]})})})]})},$Q=p5.createRoot(document.getElementById("root"));$Q.render(nr.jsx(Tp.StrictMode,{children:nr.jsx(ZQ,{})}));const eS=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));