@peerbit/server 5.4.8-7ce8142 → 5.4.8
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: `+ge.message+`
|
|
|
63
63
|
`,rw=f=>new Uint8Array(Cy.keccak256.update(h2([Ri(tw),Ri(String(f.length)),f])).arrayBuffer());var Ua;(function(f){f[f.NONE=0]="NONE",f[f.SHA_256=1]="SHA_256",f[f.ETH_KECCAK_256=3]="ETH_KECCAK_256"})(Ua||(Ua={}));const Wf=(f,o)=>{if(o===Ua.NONE)return f;if(o===Ua.SHA_256)return ZE(f);if(o===Ua.ETH_KECCAK_256)return rw(f);throw new Error("Unsupported")};function BA(f){return"0x"+Cy.keccak_256(Nt(f))}const nw="rlp/5.8.0",Aw=new zt(nw);function m8(f){const o=[];for(;f;)o.unshift(f&255),f>>=8;return o}function Iy(f){if(Array.isArray(f)){let l=[];if(f.forEach(function(C){l=l.concat(Iy(C))}),l.length<=55)return l.unshift(192+l.length),l;const b=m8(l.length);return b.unshift(247+b.length),b.concat(l)}tg(f)||Aw.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=m8(o.length);return c.unshift(183+c.length),c.concat(o)}function _1(f){return or(Iy(f))}const iw="address/5.8.0",cf=new zt(iw);function Q8(f){mA(f,20)||cf.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 aw=9007199254740991;function ow(f){return Math.log10?Math.log10(f):Math.log(f)/Math.LN10}const rg={};for(let f=0;f<10;f++)rg[String(f)]=String(f);for(let f=0;f<26;f++)rg[String.fromCharCode(65+f)]=String(10+f);const S8=Math.floor(ow(aw));function sw(f){f=f.toUpperCase(),f=f.substring(4)+f.substring(0,2)+"00";let o=f.split("").map(l=>rg[l]).join("");for(;o.length>=S8;){let l=o.substring(0,S8);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 Gi(f){let o=null;if(typeof f!="string"&&cf.throwArgumentError("invalid address","address",f),f.match(/^(0x)?[0-9a-fA-F]{40}$/))f.substring(0,2)!=="0x"&&(f="0x"+f),o=Q8(f),f.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&o!==f&&cf.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)!==sw(f)&&cf.throwArgumentError("bad icap checksum","address",f),o=X9(f.substring(4));o.length<40;)o="0"+o;o=Q8("0x"+o)}else cf.throwArgumentError("invalid address","address",f);return o}const fw="properties/5.8.0";var cw=function(f,o,c,l){function b(C){return C instanceof c?C:new c(function(y){y(C)})}return new(c||(c=Promise))(function(C,y){function m(U){try{M(l.next(U))}catch(w){y(w)}}function N(U){try{M(l.throw(U))}catch(w){y(w)}}function M(U){U.done?C(U.value):b(U.value).then(m,N)}M((l=l.apply(f,o||[])).next())})};const w1=new zt(fw);function lr(f,o,c){Object.defineProperty(f,o,{enumerable:!0,value:c,writable:!1})}function as(f){return cw(this,void 0,void 0,function*(){const o=Object.keys(f).map(l=>{const b=f[l];return Promise.resolve(b).then(C=>({key:l,value:C}))});return(yield Promise.all(o)).reduce((l,b)=>(l[b.key]=b.value,l),{})})}function uw(f,o){(!f||typeof f!="object")&&w1.throwArgumentError("invalid object","object",f),Object.keys(f).forEach(c=>{o[c]||w1.throwArgumentError("invalid object key - "+c,"transaction:"+c,f)})}function td(f){const o={};for(const c in f)o[c]=f[c];return o}const lw={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function by(f){if(f==null||lw[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(!by(l))return!1}return!0}return w1.throwArgumentError(`Cannot deepCopy ${typeof f}`,"object",f)}function hw(f){if(by(f))return f;if(Array.isArray(f))return Object.freeze(f.map(o=>B1(o)));if(typeof f=="object"){const o={};for(const c in f){const l=f[c];l!==void 0&&lr(o,c,B1(l))}return o}return w1.throwArgumentError(`Cannot deepCopy ${typeof f}`,"object",f)}function B1(f){return hw(f)}class vy{constructor(o){for(const c in o)this[c]=B1(o[c])}}const dw="abstract-provider/5.8.0";var gw=function(f,o,c,l){function b(C){return C instanceof c?C:new c(function(y){y(C)})}return new(c||(c=Promise))(function(C,y){function m(U){try{M(l.next(U))}catch(w){y(w)}}function N(U){try{M(l.throw(U))}catch(w){y(w)}}function M(U){U.done?C(U.value):b(U.value).then(m,N)}M((l=l.apply(f,o||[])).next())})};const pw=new zt(dw);class ng{constructor(){pw.checkAbstract(new.target,ng),lr(this,"_isProvider",!0)}getFeeData(){return gw(this,void 0,void 0,function*(){const{block:o,gasPrice:c}=yield as({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(y=>null)});let l=null,b=null,C=null;return o&&o.baseFeePerGas&&(l=o.baseFeePerGas,C=Wr.from("1500000000"),b=o.baseFeePerGas.mul(2).add(C)),{lastBaseFeePerGas:l,maxFeePerGas:b,maxPriorityFeePerGas:C,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 yw="abstract-signer/5.8.0";var Fi=function(f,o,c,l){function b(C){return C instanceof c?C:new c(function(y){y(C)})}return new(c||(c=Promise))(function(C,y){function m(U){try{M(l.next(U))}catch(w){y(w)}}function N(U){try{M(l.throw(U))}catch(w){y(w)}}function M(U){U.done?C(U.value):b(U.value).then(m,N)}M((l=l.apply(f,o||[])).next())})};const Pi=new zt(yw),Cw=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],Iw=[zt.errors.INSUFFICIENT_FUNDS,zt.errors.NONCE_EXPIRED,zt.errors.REPLACEMENT_UNDERPRICED];class Ag{constructor(){Pi.checkAbstract(new.target,Ag),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 as(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 as(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)Cw.indexOf(l)===-1&&Pi.throwArgumentError("invalid transaction key: "+l,"transaction",o);const c=td(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 as(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 C=yield this.resolveName(b);return C==null&&Pi.throwArgumentError("provided ENS name resolves to null","tx.to",b),C})),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 C=c.gasPrice;delete c.gasPrice,c.maxFeePerGas=C,c.maxPriorityFeePerGas=C}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(Iw.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 as(c)})}_checkProvider(o){this.provider||Pi.throwError("missing provider",zt.errors.UNSUPPORTED_OPERATION,{operation:o||"_checkProvider"})}static isSigner(o){return!!(o&&o._isSigner)}}function ig(f){return BA(Ri(f))}const bw="hash/5.8.0",vw=`Ethereum Signed Message:
|
|
64
64
|
`;function xw(f){return typeof f=="string"&&(f=Ri(f)),BA(So([Ri(vw),Ri(String(f.length)),f]))}var Ew=function(f,o,c,l){function b(C){return C instanceof c?C:new c(function(y){y(C)})}return new(c||(c=Promise))(function(C,y){function m(U){try{M(l.next(U))}catch(w){y(w)}}function N(U){try{M(l.throw(U))}catch(w){y(w)}}function M(U){U.done?C(U.value):b(U.value).then(m,N)}M((l=l.apply(f,o||[])).next())})};const cn=new zt(bw),xy=new Uint8Array(32);xy.fill(0);const _w=Wr.from(-1),Ey=Wr.from(0),_y=Wr.from(1),ww=Wr.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Bw(f){const o=Nt(f),c=o.length%32;return c?ys([o,xy.slice(c)]):or(o)}const mw=pi(_y.toHexString(),32),Qw=pi(Ey.toHexString(),32),D8={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},zl=["name","version","chainId","verifyingContract","salt"];function k8(f){return function(o){return typeof o!="string"&&cn.throwArgumentError(`invalid domain value for ${JSON.stringify(f)}`,`domain.${f}`,o),o}}const Sw={name:k8("name"),version:k8("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 Gi(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 or(o)}catch{}return cn.throwArgumentError('invalid domain value "salt"',"domain.salt",f)}};function ql(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=ww.mask(c?l-1:l),C=c?b.add(_y).mul(_w):Ey;return function(y){const m=Wr.from(y);return(m.lt(C)||m.gt(b))&&cn.throwArgumentError(`value out-of-bounds for ${f}`,"value",y),pi(m.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),Bw(l)}}}switch(f){case"address":return function(o){return pi(Gi(o),32)};case"bool":return function(o){return o?mw:Qw};case"bytes":return function(o){return BA(o)};case"string":return function(o){return ig(o)}}return null}function M8(f,o){return`${f}(${o.map(({name:c,type:l})=>l+" "+c).join(",")})`}class VA{constructor(o){lr(this,"types",Object.freeze(B1(o))),lr(this,"_encoderCache",{}),lr(this,"_types",{});const c={},l={},b={};Object.keys(o).forEach(m=>{c[m]={},l[m]=[],b[m]={}});for(const m in o){const N={};o[m].forEach(M=>{N[M.name]&&cn.throwArgumentError(`duplicate variable name ${JSON.stringify(M.name)} in ${JSON.stringify(m)}`,"types",o),N[M.name]=!0;const U=M.type.match(/^([^\x5b]*)(\x5b|$)/)[1];U===m&&cn.throwArgumentError(`circular type reference to ${JSON.stringify(U)}`,"types",o),!ql(U)&&(l[U]||cn.throwArgumentError(`unknown type ${JSON.stringify(U)}`,"types",o),l[U].push(m),c[m][U]=!0)})}const C=Object.keys(l).filter(m=>l[m].length===0);C.length===0?cn.throwArgumentError("missing primary type","types",o):C.length>1&&cn.throwArgumentError(`ambiguous primary types or unused types: ${C.map(m=>JSON.stringify(m)).join(", ")}`,"types",o),lr(this,"primaryType",C[0]);function y(m,N){N[m]&&cn.throwArgumentError(`circular type reference to ${JSON.stringify(m)}`,"types",o),N[m]=!0,Object.keys(c[m]).forEach(M=>{l[M]&&(y(M,N),Object.keys(N).forEach(U=>{b[U][M]=!0}))}),delete N[m]}y(this.primaryType,{});for(const m in b){const N=Object.keys(b[m]);N.sort(),this._types[m]=M8(m,o[m])+N.map(M=>M8(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=ql(o);if(b)return b}const c=o.match(/^(.*)(\x5b(\d*)\x5d)$/);if(c){const b=c[1],C=this.getEncoder(b),y=parseInt(c[3]);return m=>{y>=0&&m.length!==y&&cn.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",m);let N=m.map(C);return this._types[b]&&(N=N.map(BA)),BA(ys(N))}}const l=this.types[o];if(l){const b=ig(this._types[o]);return C=>{const y=l.map(({name:m,type:N})=>{const M=this.getEncoder(N)(C[m]);return this._types[N]?BA(M):M});return y.unshift(b),ys(y)}}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(ql(o))return l(o,c);const b=o.match(/^(.*)(\x5b(\d*)\x5d)$/);if(b){const y=b[1],m=parseInt(b[3]);return m>=0&&c.length!==m&&cn.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",c),c.map(N=>this._visit(y,N,l))}const C=this.types[o];return C?C.reduce((y,{name:m,type:N})=>(y[m]=this._visit(N,c[m],l),y),{}):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=D8[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)=>zl.indexOf(l.name)-zl.indexOf(b.name)),VA.hashStruct("EIP712Domain",{EIP712Domain:c},o)}static encode(o,c,l){return ys(["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 Ew(this,void 0,void 0,function*(){o=td(o);const C={};o.verifyingContract&&!mA(o.verifyingContract,20)&&(C[o.verifyingContract]="0x");const y=VA.from(c);y.visit(l,(m,N)=>(m==="address"&&!mA(N,20)&&(C[N]="0x"),N));for(const m in C)C[m]=yield b(m);return o.verifyingContract&&C[o.verifyingContract]&&(o.verifyingContract=C[o.verifyingContract]),l=y.visit(l,(m,N)=>m==="address"&&C[N]?C[N]:N),{domain:o,value:l}})}static getPayload(o,c,l){VA.hashDomain(o);const b={},C=[];zl.forEach(N=>{const M=o[N];M!=null&&(b[N]=Sw[N](M),C.push({name:N,type:D8[N]}))});const y=VA.from(c),m=td(c);return m.EIP712Domain?cn.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",c):m.EIP712Domain=C,y.encode(l),{types:m,domain:b,primaryType:y.primaryType,message:y.visit(l,(N,M)=>{if(N.match(/^bytes(\d*)/))return or(Nt(M));if(N.match(/^u?int/))return Wr.from(M).toString();switch(N){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",N)})}}}class wy{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 C=0;C<c.length;++C){let y=c[C];for(let m=0;m<l.length;++m)y+=l[m]<<8,l[m]=y%this.base,y=y/this.base|0;for(;y>0;)l.push(y%this.base),y=y/this.base|0}let b="";for(let C=0;c[C]===0&&C<c.length-1;++C)b+=this._leader;for(let C=l.length-1;C>=0;--C)b+=this.alphabet[l[C]];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 C=b;for(let y=0;y<c.length;++y)C+=c[y]*this.base,c[y]=C&255,C>>=8;for(;C>0;)c.push(C&255),C>>=8}for(let l=0;o[l]===this._leader&&l<o.length-1;++l)c.push(0);return Nt(new Uint8Array(c.reverse()))}}new wy("abcdefghijklmnopqrstuvwxyz234567");const By=new wy("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var jl={},jr={},Vl,N8;function y2(){if(N8)return Vl;N8=1,Vl=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)},Vl}var zc={exports:{}},F8;function iu(){return F8||(F8=1,typeof Object.create=="function"?zc.exports=function(o,c){c&&(o.super_=c,o.prototype=Object.create(c.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}))}:zc.exports=function(o,c){if(c){o.super_=c;var l=function(){};l.prototype=c.prototype,o.prototype=new l,o.prototype.constructor=o}}),zc.exports}var P8;function ha(){if(P8)return jr;P8=1;var f=y2(),o=iu();jr.inherits=o;function c(L,G){return(L.charCodeAt(G)&64512)!==55296||G<0||G+1>=L.length?!1:(L.charCodeAt(G+1)&64512)===56320}function l(L,G){if(Array.isArray(L))return L.slice();if(!L)return[];var S=[];if(typeof L=="string")if(G){if(G==="hex")for(L=L.replace(/[^a-z0-9]+/ig,""),L.length%2!==0&&(L="0"+L),W=0;W<L.length;W+=2)S.push(parseInt(L[W]+L[W+1],16))}else for(var J=0,W=0;W<L.length;W++){var fe=L.charCodeAt(W);fe<128?S[J++]=fe:fe<2048?(S[J++]=fe>>6|192,S[J++]=fe&63|128):c(L,W)?(fe=65536+((fe&1023)<<10)+(L.charCodeAt(++W)&1023),S[J++]=fe>>18|240,S[J++]=fe>>12&63|128,S[J++]=fe>>6&63|128,S[J++]=fe&63|128):(S[J++]=fe>>12|224,S[J++]=fe>>6&63|128,S[J++]=fe&63|128)}else for(W=0;W<L.length;W++)S[W]=L[W]|0;return S}jr.toArray=l;function b(L){for(var G="",S=0;S<L.length;S++)G+=m(L[S].toString(16));return G}jr.toHex=b;function C(L){var G=L>>>24|L>>>8&65280|L<<8&16711680|(L&255)<<24;return G>>>0}jr.htonl=C;function y(L,G){for(var S="",J=0;J<L.length;J++){var W=L[J];G==="little"&&(W=C(W)),S+=N(W.toString(16))}return S}jr.toHex32=y;function m(L){return L.length===1?"0"+L:L}jr.zero2=m;function N(L){return L.length===7?"0"+L:L.length===6?"00"+L:L.length===5?"000"+L:L.length===4?"0000"+L:L.length===3?"00000"+L:L.length===2?"000000"+L:L.length===1?"0000000"+L:L}jr.zero8=N;function M(L,G,S,J){var W=S-G;f(W%4===0);for(var fe=new Array(W/4),he=0,Ce=G;he<fe.length;he++,Ce+=4){var j;J==="big"?j=L[Ce]<<24|L[Ce+1]<<16|L[Ce+2]<<8|L[Ce+3]:j=L[Ce+3]<<24|L[Ce+2]<<16|L[Ce+1]<<8|L[Ce],fe[he]=j>>>0}return fe}jr.join32=M;function U(L,G){for(var S=new Array(L.length*4),J=0,W=0;J<L.length;J++,W+=4){var fe=L[J];G==="big"?(S[W]=fe>>>24,S[W+1]=fe>>>16&255,S[W+2]=fe>>>8&255,S[W+3]=fe&255):(S[W+3]=fe>>>24,S[W+2]=fe>>>16&255,S[W+1]=fe>>>8&255,S[W]=fe&255)}return S}jr.split32=U;function w(L,G){return L>>>G|L<<32-G}jr.rotr32=w;function ae(L,G){return L<<G|L>>>32-G}jr.rotl32=ae;function Ee(L,G){return L+G>>>0}jr.sum32=Ee;function pe(L,G,S){return L+G+S>>>0}jr.sum32_3=pe;function V(L,G,S,J){return L+G+S+J>>>0}jr.sum32_4=V;function xe(L,G,S,J,W){return L+G+S+J+W>>>0}jr.sum32_5=xe;function Ie(L,G,S,J){var W=L[G],fe=L[G+1],he=J+fe>>>0,Ce=(he<J?1:0)+S+W;L[G]=Ce>>>0,L[G+1]=he}jr.sum64=Ie;function _e(L,G,S,J){var W=G+J>>>0,fe=(W<G?1:0)+L+S;return fe>>>0}jr.sum64_hi=_e;function ie(L,G,S,J){var W=G+J;return W>>>0}jr.sum64_lo=ie;function n0(L,G,S,J,W,fe,he,Ce){var j=0,Y=G;Y=Y+J>>>0,j+=Y<G?1:0,Y=Y+fe>>>0,j+=Y<fe?1:0,Y=Y+Ce>>>0,j+=Y<Ce?1:0;var z=L+S+W+he+j;return z>>>0}jr.sum64_4_hi=n0;function le(L,G,S,J,W,fe,he,Ce){var j=G+J+fe+Ce;return j>>>0}jr.sum64_4_lo=le;function Ne(L,G,S,J,W,fe,he,Ce,j,Y){var z=0,me=G;me=me+J>>>0,z+=me<G?1:0,me=me+fe>>>0,z+=me<fe?1:0,me=me+Ce>>>0,z+=me<Ce?1:0,me=me+Y>>>0,z+=me<Y?1:0;var ze=L+S+W+he+j+z;return ze>>>0}jr.sum64_5_hi=Ne;function ye(L,G,S,J,W,fe,he,Ce,j,Y){var z=G+J+fe+Ce+Y;return z>>>0}jr.sum64_5_lo=ye;function Xe(L,G,S){var J=G<<32-S|L>>>S;return J>>>0}jr.rotr64_hi=Xe;function re(L,G,S){var J=L<<32-S|G>>>S;return J>>>0}jr.rotr64_lo=re;function a0(L,G,S){return L>>>S}jr.shr64_hi=a0;function Qe(L,G,S){var J=L<<32-S|G>>>S;return J>>>0}return jr.shr64_lo=Qe,jr}var Xl={},K8;function Zf(){if(K8)return Xl;K8=1;var f=ha(),o=y2();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 Xl.BlockHash=c,c.prototype.update=function(b,C){if(b=f.toArray(b,C),this.pending?this.pending=this.pending.concat(b):this.pending=b,this.pendingTotal+=b.length,this.pending.length>=this._delta8){b=this.pending;var y=b.length%this._delta8;this.pending=b.slice(b.length-y,b.length),this.pending.length===0&&(this.pending=null),b=f.join32(b,0,b.length-y,this.endian);for(var m=0;m<b.length;m+=this._delta32)this._update(b,m,m+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,C=this._delta8,y=C-(b+this.padLength)%C,m=new Array(y+this.padLength);m[0]=128;for(var N=1;N<y;N++)m[N]=0;if(b<<=3,this.endian==="big"){for(var M=8;M<this.padLength;M++)m[N++]=0;m[N++]=0,m[N++]=0,m[N++]=0,m[N++]=0,m[N++]=b>>>24&255,m[N++]=b>>>16&255,m[N++]=b>>>8&255,m[N++]=b&255}else for(m[N++]=b&255,m[N++]=b>>>8&255,m[N++]=b>>>16&255,m[N++]=b>>>24&255,m[N++]=0,m[N++]=0,m[N++]=0,m[N++]=0,M=8;M<this.padLength;M++)m[N++]=0;return m},Xl}var n2={},Aa={},H8;function my(){if(H8)return Aa;H8=1;var f=ha(),o=f.rotr32;function c(U,w,ae,Ee){if(U===0)return l(w,ae,Ee);if(U===1||U===3)return C(w,ae,Ee);if(U===2)return b(w,ae,Ee)}Aa.ft_1=c;function l(U,w,ae){return U&w^~U&ae}Aa.ch32=l;function b(U,w,ae){return U&w^U&ae^w&ae}Aa.maj32=b;function C(U,w,ae){return U^w^ae}Aa.p32=C;function y(U){return o(U,2)^o(U,13)^o(U,22)}Aa.s0_256=y;function m(U){return o(U,6)^o(U,11)^o(U,25)}Aa.s1_256=m;function N(U){return o(U,7)^o(U,18)^U>>>3}Aa.g0_256=N;function M(U){return o(U,17)^o(U,19)^U>>>10}return Aa.g1_256=M,Aa}var Wl,U8;function Dw(){if(U8)return Wl;U8=1;var f=ha(),o=Zf(),c=my(),l=f.rotl32,b=f.sum32,C=f.sum32_5,y=c.ft_1,m=o.BlockHash,N=[1518500249,1859775393,2400959708,3395469782];function M(){if(!(this instanceof M))return new M;m.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}return f.inherits(M,m),Wl=M,M.blockSize=512,M.outSize=160,M.hmacStrength=80,M.padLength=64,M.prototype._update=function(w,ae){for(var Ee=this.W,pe=0;pe<16;pe++)Ee[pe]=w[ae+pe];for(;pe<Ee.length;pe++)Ee[pe]=l(Ee[pe-3]^Ee[pe-8]^Ee[pe-14]^Ee[pe-16],1);var V=this.h[0],xe=this.h[1],Ie=this.h[2],_e=this.h[3],ie=this.h[4];for(pe=0;pe<Ee.length;pe++){var n0=~~(pe/20),le=C(l(V,5),y(n0,xe,Ie,_e),ie,Ee[pe],N[n0]);ie=_e,_e=Ie,Ie=l(xe,30),xe=V,V=le}this.h[0]=b(this.h[0],V),this.h[1]=b(this.h[1],xe),this.h[2]=b(this.h[2],Ie),this.h[3]=b(this.h[3],_e),this.h[4]=b(this.h[4],ie)},M.prototype._digest=function(w){return w==="hex"?f.toHex32(this.h,"big"):f.split32(this.h,"big")},Wl}var Zl,R8;function Qy(){if(R8)return Zl;R8=1;var f=ha(),o=Zf(),c=my(),l=y2(),b=f.sum32,C=f.sum32_4,y=f.sum32_5,m=c.ch32,N=c.maj32,M=c.s0_256,U=c.s1_256,w=c.g0_256,ae=c.g1_256,Ee=o.BlockHash,pe=[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;Ee.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=pe,this.W=new Array(64)}return f.inherits(V,Ee),Zl=V,V.blockSize=512,V.outSize=256,V.hmacStrength=192,V.padLength=64,V.prototype._update=function(Ie,_e){for(var ie=this.W,n0=0;n0<16;n0++)ie[n0]=Ie[_e+n0];for(;n0<ie.length;n0++)ie[n0]=C(ae(ie[n0-2]),ie[n0-7],w(ie[n0-15]),ie[n0-16]);var le=this.h[0],Ne=this.h[1],ye=this.h[2],Xe=this.h[3],re=this.h[4],a0=this.h[5],Qe=this.h[6],L=this.h[7];for(l(this.k.length===ie.length),n0=0;n0<ie.length;n0++){var G=y(L,U(re),m(re,a0,Qe),this.k[n0],ie[n0]),S=b(M(le),N(le,Ne,ye));L=Qe,Qe=a0,a0=re,re=b(Xe,G),Xe=ye,ye=Ne,Ne=le,le=b(G,S)}this.h[0]=b(this.h[0],le),this.h[1]=b(this.h[1],Ne),this.h[2]=b(this.h[2],ye),this.h[3]=b(this.h[3],Xe),this.h[4]=b(this.h[4],re),this.h[5]=b(this.h[5],a0),this.h[6]=b(this.h[6],Qe),this.h[7]=b(this.h[7],L)},V.prototype._digest=function(Ie){return Ie==="hex"?f.toHex32(this.h,"big"):f.split32(this.h,"big")},Zl}var $l,G8;function kw(){if(G8)return $l;G8=1;var f=ha(),o=Qy();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),$l=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")},$l}var eh,Y8;function Sy(){if(Y8)return eh;Y8=1;var f=ha(),o=Zf(),c=y2(),l=f.rotr64_hi,b=f.rotr64_lo,C=f.shr64_hi,y=f.shr64_lo,m=f.sum64,N=f.sum64_hi,M=f.sum64_lo,U=f.sum64_4_hi,w=f.sum64_4_lo,ae=f.sum64_5_hi,Ee=f.sum64_5_lo,pe=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 xe(){if(!(this instanceof xe))return new xe;pe.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(xe,pe),eh=xe,xe.blockSize=1024,xe.outSize=512,xe.hmacStrength=192,xe.padLength=128,xe.prototype._prepareBlock=function(S,J){for(var W=this.W,fe=0;fe<32;fe++)W[fe]=S[J+fe];for(;fe<W.length;fe+=2){var he=Qe(W[fe-4],W[fe-3]),Ce=L(W[fe-4],W[fe-3]),j=W[fe-14],Y=W[fe-13],z=re(W[fe-30],W[fe-29]),me=a0(W[fe-30],W[fe-29]),ze=W[fe-32],se=W[fe-31];W[fe]=U(he,Ce,j,Y,z,me,ze,se),W[fe+1]=w(he,Ce,j,Y,z,me,ze,se)}},xe.prototype._update=function(S,J){this._prepareBlock(S,J);var W=this.W,fe=this.h[0],he=this.h[1],Ce=this.h[2],j=this.h[3],Y=this.h[4],z=this.h[5],me=this.h[6],ze=this.h[7],se=this.h[8],Ve=this.h[9],h0=this.h[10],y0=this.h[11],C0=this.h[12],q0=this.h[13],rt=this.h[14],V0=this.h[15];c(this.k.length===W.length);for(var $e=0;$e<W.length;$e+=2){var gt=rt,Ue=V0,t0=ye(se,Ve),s0=Xe(se,Ve),ne=Ie(se,Ve,h0,y0,C0),w0=_e(se,Ve,h0,y0,C0,q0),H0=this.k[$e],N0=this.k[$e+1],ot=W[$e],W0=W[$e+1],X0=ae(gt,Ue,t0,s0,ne,w0,H0,N0,ot,W0),vt=Ee(gt,Ue,t0,s0,ne,w0,H0,N0,ot,W0);gt=le(fe,he),Ue=Ne(fe,he),t0=ie(fe,he,Ce,j,Y),s0=n0(fe,he,Ce,j,Y,z);var er=N(gt,Ue,t0,s0),Yt=M(gt,Ue,t0,s0);rt=C0,V0=q0,C0=h0,q0=y0,h0=se,y0=Ve,se=N(me,ze,X0,vt),Ve=M(ze,ze,X0,vt),me=Y,ze=z,Y=Ce,z=j,Ce=fe,j=he,fe=N(X0,vt,er,Yt),he=M(X0,vt,er,Yt)}m(this.h,0,fe,he),m(this.h,2,Ce,j),m(this.h,4,Y,z),m(this.h,6,me,ze),m(this.h,8,se,Ve),m(this.h,10,h0,y0),m(this.h,12,C0,q0),m(this.h,14,rt,V0)},xe.prototype._digest=function(S){return S==="hex"?f.toHex32(this.h,"big"):f.split32(this.h,"big")};function Ie(G,S,J,W,fe){var he=G&J^~G&fe;return he<0&&(he+=4294967296),he}function _e(G,S,J,W,fe,he){var Ce=S&W^~S&he;return Ce<0&&(Ce+=4294967296),Ce}function ie(G,S,J,W,fe){var he=G&J^G&fe^J&fe;return he<0&&(he+=4294967296),he}function n0(G,S,J,W,fe,he){var Ce=S&W^S&he^W&he;return Ce<0&&(Ce+=4294967296),Ce}function le(G,S){var J=l(G,S,28),W=l(S,G,2),fe=l(S,G,7),he=J^W^fe;return he<0&&(he+=4294967296),he}function Ne(G,S){var J=b(G,S,28),W=b(S,G,2),fe=b(S,G,7),he=J^W^fe;return he<0&&(he+=4294967296),he}function ye(G,S){var J=l(G,S,14),W=l(G,S,18),fe=l(S,G,9),he=J^W^fe;return he<0&&(he+=4294967296),he}function Xe(G,S){var J=b(G,S,14),W=b(G,S,18),fe=b(S,G,9),he=J^W^fe;return he<0&&(he+=4294967296),he}function re(G,S){var J=l(G,S,1),W=l(G,S,8),fe=C(G,S,7),he=J^W^fe;return he<0&&(he+=4294967296),he}function a0(G,S){var J=b(G,S,1),W=b(G,S,8),fe=y(G,S,7),he=J^W^fe;return he<0&&(he+=4294967296),he}function Qe(G,S){var J=l(G,S,19),W=l(S,G,29),fe=C(G,S,6),he=J^W^fe;return he<0&&(he+=4294967296),he}function L(G,S){var J=b(G,S,19),W=b(S,G,29),fe=y(G,S,6),he=J^W^fe;return he<0&&(he+=4294967296),he}return eh}var th,L8;function Mw(){if(L8)return th;L8=1;var f=ha(),o=Sy();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),th=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")},th}var T8;function Nw(){return T8||(T8=1,n2.sha1=Dw(),n2.sha224=kw(),n2.sha256=Qy(),n2.sha384=Mw(),n2.sha512=Sy()),n2}var rh={},J8;function Fw(){if(J8)return rh;J8=1;var f=ha(),o=Zf(),c=f.rotl32,l=f.sum32,b=f.sum32_3,C=f.sum32_4,y=o.BlockHash;function m(){if(!(this instanceof m))return new m;y.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}f.inherits(m,y),rh.ripemd160=m,m.blockSize=512,m.outSize=160,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(xe,Ie){for(var _e=this.h[0],ie=this.h[1],n0=this.h[2],le=this.h[3],Ne=this.h[4],ye=_e,Xe=ie,re=n0,a0=le,Qe=Ne,L=0;L<80;L++){var G=l(c(C(_e,N(L,ie,n0,le),xe[w[L]+Ie],M(L)),Ee[L]),Ne);_e=Ne,Ne=le,le=c(n0,10),n0=ie,ie=G,G=l(c(C(ye,N(79-L,Xe,re,a0),xe[ae[L]+Ie],U(L)),pe[L]),Qe),ye=Qe,Qe=a0,a0=c(re,10),re=Xe,Xe=G}G=b(this.h[1],n0,a0),this.h[1]=b(this.h[2],le,Qe),this.h[2]=b(this.h[3],Ne,ye),this.h[3]=b(this.h[4],_e,Xe),this.h[4]=b(this.h[0],ie,re),this.h[0]=G},m.prototype._digest=function(xe){return xe==="hex"?f.toHex32(this.h,"little"):f.split32(this.h,"little")};function N(V,xe,Ie,_e){return V<=15?xe^Ie^_e:V<=31?xe&Ie|~xe&_e:V<=47?(xe|~Ie)^_e:V<=63?xe&_e|Ie&~_e:xe^(Ie|~_e)}function M(V){return V<=15?0:V<=31?1518500249:V<=47?1859775393:V<=63?2400959708:2840853838}function U(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],ae=[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],Ee=[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],pe=[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 rh}var nh,O8;function Pw(){if(O8)return nh;O8=1;var f=ha(),o=y2();function c(l,b,C){if(!(this instanceof c))return new c(l,b,C);this.Hash=l,this.blockSize=l.blockSize/8,this.outSize=l.outSize/8,this.inner=null,this.outer=null,this._init(f.toArray(b,C))}return nh=c,c.prototype._init=function(b){b.length>this.blockSize&&(b=new this.Hash().update(b).digest()),o(b.length<=this.blockSize);for(var C=b.length;C<this.blockSize;C++)b.push(0);for(C=0;C<b.length;C++)b[C]^=54;for(this.inner=new this.Hash().update(b),C=0;C<b.length;C++)b[C]^=106;this.outer=new this.Hash().update(b)},c.prototype.update=function(b,C){return this.inner.update(b,C),this},c.prototype.digest=function(b){return this.outer.update(this.inner.digest()),this.outer.digest(b)},nh}var z8;function au(){return z8||(z8=1,function(f){var o=f;o.utils=ha(),o.common=Zf(),o.sha=Nw(),o.ripemd=Fw(),o.hmac=Pw(),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}(jl)),jl}var Kw=au();const XA=Yi(Kw);var Mf;(function(f){f.sha256="sha256",f.sha512="sha512"})(Mf||(Mf={}));const Hw="sha2/5.8.0",Uw=new zt(Hw);function Rw(f){return"0x"+XA.ripemd160().update(Nt(f)).digest("hex")}function Nf(f){return"0x"+XA.sha256().update(Nt(f)).digest("hex")}function m1(f,o,c){return Mf[f]||Uw.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 ag(f,o,c,l,b){f=Nt(f),o=Nt(o);let C,y=1;const m=new Uint8Array(l),N=new Uint8Array(o.length+4);N.set(o);let M,U;for(let w=1;w<=y;w++){N[o.length]=w>>24&255,N[o.length+1]=w>>16&255,N[o.length+2]=w>>8&255,N[o.length+3]=w&255;let ae=Nt(m1(b,f,N));C||(C=ae.length,U=new Uint8Array(C),y=Math.ceil(l/C),M=l-(y-1)*C),U.set(ae);for(let V=1;V<c;V++){ae=Nt(m1(b,f,ae));for(let xe=0;xe<C;xe++)U[xe]^=ae[xe]}const Ee=(w-1)*C,pe=w===y?M:C;m.set(Nt(U).slice(0,pe),Ee)}return or(m)}function Ps(f,o,c){return c={path:o,exports:{},require:function(l,b){return Gw(l,b??c.path)}},f(c,c.exports),c.exports}function Gw(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var og=Dy;function Dy(f,o){if(!f)throw new Error(o||"Assertion failed")}Dy.equal=function(o,c,l){if(o!=c)throw new Error(l||"Assertion failed: "+o+" != "+c)};var Ui=Ps(function(f,o){var c=o;function l(y,m){if(Array.isArray(y))return y.slice();if(!y)return[];var N=[];if(typeof y!="string"){for(var M=0;M<y.length;M++)N[M]=y[M]|0;return N}if(m==="hex"){y=y.replace(/[^a-z0-9]+/ig,""),y.length%2!==0&&(y="0"+y);for(var M=0;M<y.length;M+=2)N.push(parseInt(y[M]+y[M+1],16))}else for(var M=0;M<y.length;M++){var U=y.charCodeAt(M),w=U>>8,ae=U&255;w?N.push(w,ae):N.push(ae)}return N}c.toArray=l;function b(y){return y.length===1?"0"+y:y}c.zero2=b;function C(y){for(var m="",N=0;N<y.length;N++)m+=b(y[N].toString(16));return m}c.toHex=C,c.encode=function(m,N){return N==="hex"?C(m):m}}),ri=Ps(function(f,o){var c=o;c.assert=og,c.toArray=Ui.toArray,c.zero2=Ui.zero2,c.toHex=Ui.toHex,c.encode=Ui.encode;function l(N,M,U){var w=new Array(Math.max(N.bitLength(),U)+1),ae;for(ae=0;ae<w.length;ae+=1)w[ae]=0;var Ee=1<<M+1,pe=N.clone();for(ae=0;ae<w.length;ae++){var V,xe=pe.andln(Ee-1);pe.isOdd()?(xe>(Ee>>1)-1?V=(Ee>>1)-xe:V=xe,pe.isubn(V)):V=0,w[ae]=V,pe.iushrn(1)}return w}c.getNAF=l;function b(N,M){var U=[[],[]];N=N.clone(),M=M.clone();for(var w=0,ae=0,Ee;N.cmpn(-w)>0||M.cmpn(-ae)>0;){var pe=N.andln(3)+w&3,V=M.andln(3)+ae&3;pe===3&&(pe=-1),V===3&&(V=-1);var xe;(pe&1)===0?xe=0:(Ee=N.andln(7)+w&7,(Ee===3||Ee===5)&&V===2?xe=-pe:xe=pe),U[0].push(xe);var Ie;(V&1)===0?Ie=0:(Ee=M.andln(7)+ae&7,(Ee===3||Ee===5)&&pe===2?Ie=-V:Ie=V),U[1].push(Ie),2*w===xe+1&&(w=1-w),2*ae===Ie+1&&(ae=1-ae),N.iushrn(1),M.iushrn(1)}return U}c.getJSF=b;function C(N,M,U){var w="_"+M;N.prototype[M]=function(){return this[w]!==void 0?this[w]:this[w]=U.call(this)}}c.cachedProperty=C;function y(N){return typeof N=="string"?c.toArray(N,"hex"):N}c.parseBytes=y;function m(N){return new ir(N,"hex","le")}c.intFromLE=m}),Q1=ri.getNAF,Yw=ri.getJSF,S1=ri.assert;function Fo(f,o){this.type=f,this.p=new ir(o.p,16),this.red=o.prime?ir.red(o.prime):ir.mont(this.p),this.zero=new ir(0).toRed(this.red),this.one=new ir(1).toRed(this.red),this.two=new ir(2).toRed(this.red),this.n=o.n&&new ir(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 C2=Fo;Fo.prototype.point=function(){throw new Error("Not implemented")};Fo.prototype.validate=function(){throw new Error("Not implemented")};Fo.prototype._fixedNafMul=function(o,c){S1(o.precomputed);var l=o._getDoubles(),b=Q1(c,1,this._bitLength),C=(1<<l.step+1)-(l.step%2===0?2:1);C/=3;var y=[],m,N;for(m=0;m<b.length;m+=l.step){N=0;for(var M=m+l.step-1;M>=m;M--)N=(N<<1)+b[M];y.push(N)}for(var U=this.jpoint(null,null,null),w=this.jpoint(null,null,null),ae=C;ae>0;ae--){for(m=0;m<y.length;m++)N=y[m],N===ae?w=w.mixedAdd(l.points[m]):N===-ae&&(w=w.mixedAdd(l.points[m].neg()));U=U.add(w)}return U.toP()};Fo.prototype._wnafMul=function(o,c){var l=4,b=o._getNAFPoints(l);l=b.wnd;for(var C=b.points,y=Q1(c,l,this._bitLength),m=this.jpoint(null,null,null),N=y.length-1;N>=0;N--){for(var M=0;N>=0&&y[N]===0;N--)M++;if(N>=0&&M++,m=m.dblp(M),N<0)break;var U=y[N];S1(U!==0),o.type==="affine"?U>0?m=m.mixedAdd(C[U-1>>1]):m=m.mixedAdd(C[-U-1>>1].neg()):U>0?m=m.add(C[U-1>>1]):m=m.add(C[-U-1>>1].neg())}return o.type==="affine"?m.toP():m};Fo.prototype._wnafMulAdd=function(o,c,l,b,C){var y=this._wnafT1,m=this._wnafT2,N=this._wnafT3,M=0,U,w,ae;for(U=0;U<b;U++){ae=c[U];var Ee=ae._getNAFPoints(o);y[U]=Ee.wnd,m[U]=Ee.points}for(U=b-1;U>=1;U-=2){var pe=U-1,V=U;if(y[pe]!==1||y[V]!==1){N[pe]=Q1(l[pe],y[pe],this._bitLength),N[V]=Q1(l[V],y[V],this._bitLength),M=Math.max(N[pe].length,M),M=Math.max(N[V].length,M);continue}var xe=[c[pe],null,null,c[V]];c[pe].y.cmp(c[V].y)===0?(xe[1]=c[pe].add(c[V]),xe[2]=c[pe].toJ().mixedAdd(c[V].neg())):c[pe].y.cmp(c[V].y.redNeg())===0?(xe[1]=c[pe].toJ().mixedAdd(c[V]),xe[2]=c[pe].add(c[V].neg())):(xe[1]=c[pe].toJ().mixedAdd(c[V]),xe[2]=c[pe].toJ().mixedAdd(c[V].neg()));var Ie=[-3,-1,-5,-7,0,7,5,1,3],_e=Yw(l[pe],l[V]);for(M=Math.max(_e[0].length,M),N[pe]=new Array(M),N[V]=new Array(M),w=0;w<M;w++){var ie=_e[0][w]|0,n0=_e[1][w]|0;N[pe][w]=Ie[(ie+1)*3+(n0+1)],N[V][w]=0,m[pe]=xe}}var le=this.jpoint(null,null,null),Ne=this._wnafT4;for(U=M;U>=0;U--){for(var ye=0;U>=0;){var Xe=!0;for(w=0;w<b;w++)Ne[w]=N[w][U]|0,Ne[w]!==0&&(Xe=!1);if(!Xe)break;ye++,U--}if(U>=0&&ye++,le=le.dblp(ye),U<0)break;for(w=0;w<b;w++){var re=Ne[w];re!==0&&(re>0?ae=m[w][re-1>>1]:re<0&&(ae=m[w][-re-1>>1].neg()),ae.type==="affine"?le=le.mixedAdd(ae):le=le.add(ae))}}for(U=0;U<b;U++)m[U]=null;return C?le:le.toP()};function bi(f,o){this.curve=f,this.type=o,this.precomputed=null}Fo.BasePoint=bi;bi.prototype.eq=function(){throw new Error("Not implemented")};bi.prototype.validate=function(){return this.curve.validate(this)};Fo.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?S1(o[o.length-1]%2===0):o[0]===7&&S1(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,C=0;C<c;C+=o){for(var y=0;y<o;y++)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(),C=1;C<l;C++)c[C]=c[C-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 sg=Ps(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}}}),Lw=ri.assert;function vi(f){C2.call(this,"short",f),this.a=new ir(f.a,16).toRed(this.red),this.b=new ir(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)}sg(vi,C2);var Tw=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 ir(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 ir(o.lambda,16);else{var C=this._getEndoRoots(this.n);this.g.mul(C[0]).x.cmp(this.g.x.redMul(c))===0?l=C[0]:(l=C[1],Lw(this.g.mul(l).x.cmp(this.g.x.redMul(c))===0))}var y;return o.basis?y=o.basis.map(function(m){return{a:new ir(m.a,16),b:new ir(m.b,16)}}):y=this._getEndoBasis(l),{beta:c,lambda:l,basis:y}}};vi.prototype._getEndoRoots=function(o){var c=o===this.p?this.red:ir.mont(o),l=new ir(2).toRed(c).redInvm(),b=l.redNeg(),C=new ir(3).toRed(c).redNeg().redSqrt().redMul(l),y=b.redAdd(C).fromRed(),m=b.redSub(C).fromRed();return[y,m]};vi.prototype._getEndoBasis=function(o){for(var c=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=o,b=this.n.clone(),C=new ir(1),y=new ir(0),m=new ir(0),N=new ir(1),M,U,w,ae,Ee,pe,V,xe=0,Ie,_e;l.cmpn(0)!==0;){var ie=b.div(l);Ie=b.sub(ie.mul(l)),_e=m.sub(ie.mul(C));var n0=N.sub(ie.mul(y));if(!w&&Ie.cmp(c)<0)M=V.neg(),U=C,w=Ie.neg(),ae=_e;else if(w&&++xe===2)break;V=Ie,b=l,l=Ie,m=C,C=_e,N=y,y=n0}Ee=Ie.neg(),pe=_e;var le=w.sqr().add(ae.sqr()),Ne=Ee.sqr().add(pe.sqr());return Ne.cmp(le)>=0&&(Ee=M,pe=U),w.negative&&(w=w.neg(),ae=ae.neg()),Ee.negative&&(Ee=Ee.neg(),pe=pe.neg()),[{a:w,b:ae},{a:Ee,b:pe}]};vi.prototype._endoSplit=function(o){var c=this.endo.basis,l=c[0],b=c[1],C=b.b.mul(o).divRound(this.n),y=l.b.neg().mul(o).divRound(this.n),m=C.mul(l.a),N=y.mul(b.a),M=C.mul(l.b),U=y.mul(b.b),w=o.sub(m).sub(N),ae=M.add(U).neg();return{k1:w,k2:ae}};vi.prototype.pointFromX=function(o,c){o=new ir(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 C=b.fromRed().isOdd();return(c&&!C||!c&&C)&&(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),C=c.redSqr().redMul(c).redIAdd(b).redIAdd(this.b);return l.redSqr().redISub(C).cmpn(0)===0};vi.prototype._endoWnafMulAdd=function(o,c,l){for(var b=this._endoWnafT1,C=this._endoWnafT2,y=0;y<o.length;y++){var m=this._endoSplit(c[y]),N=o[y],M=N._getBeta();m.k1.negative&&(m.k1.ineg(),N=N.neg(!0)),m.k2.negative&&(m.k2.ineg(),M=M.neg(!0)),b[y*2]=N,b[y*2+1]=M,C[y*2]=m.k1,C[y*2+1]=m.k2}for(var U=this._wnafMulAdd(1,b,C,y*2,l),w=0;w<y*2;w++)b[w]=null,C[w]=null;return U};function Tn(f,o,c,l){C2.BasePoint.call(this,f,"affine"),o===null&&c===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new ir(o,16),this.y=new ir(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)}sg(Tn,C2.BasePoint);vi.prototype.point=function(o,c,l){return new Tn(this,o,c,l)};vi.prototype.pointFromJSON=function(o,c){return Tn.fromJSON(this,o,c)};Tn.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(C){return l.point(C.x.redMul(l.endo.beta),C.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}};Tn.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]};Tn.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 C(m){return o.point(m[0],m[1],l)}var y=c[2];return b.precomputed={beta:null,doubles:y.doubles&&{step:y.doubles.step,points:[b].concat(y.doubles.points.map(C))},naf:y.naf&&{wnd:y.naf.wnd,points:[b].concat(y.naf.points.map(C))}},b};Tn.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)+">"};Tn.prototype.isInfinity=function(){return this.inf};Tn.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)};Tn.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(),C=l.redAdd(l).redIAdd(l).redIAdd(c).redMul(b),y=C.redSqr().redISub(this.x.redAdd(this.x)),m=C.redMul(this.x.redSub(y)).redISub(this.y);return this.curve.point(y,m)};Tn.prototype.getX=function(){return this.x.fromRed()};Tn.prototype.getY=function(){return this.y.fromRed()};Tn.prototype.mul=function(o){return o=new ir(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)};Tn.prototype.mulAdd=function(o,c,l){var b=[this,c],C=[o,l];return this.curve.endo?this.curve._endoWnafMulAdd(b,C):this.curve._wnafMulAdd(1,b,C,2)};Tn.prototype.jmulAdd=function(o,c,l){var b=[this,c],C=[o,l];return this.curve.endo?this.curve._endoWnafMulAdd(b,C,!0):this.curve._wnafMulAdd(1,b,C,2,!0)};Tn.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)};Tn.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(C){return C.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};Tn.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 Zn(f,o,c,l){C2.BasePoint.call(this,f,"jacobian"),o===null&&c===null&&l===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new ir(0)):(this.x=new ir(o,16),this.y=new ir(c,16),this.z=new ir(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}sg(Zn,C2.BasePoint);vi.prototype.jpoint=function(o,c,l){return new Zn(this,o,c,l)};Zn.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)};Zn.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};Zn.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),C=o.x.redMul(l),y=this.y.redMul(c.redMul(o.z)),m=o.y.redMul(l.redMul(this.z)),N=b.redSub(C),M=y.redSub(m);if(N.cmpn(0)===0)return M.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var U=N.redSqr(),w=U.redMul(N),ae=b.redMul(U),Ee=M.redSqr().redIAdd(w).redISub(ae).redISub(ae),pe=M.redMul(ae.redISub(Ee)).redISub(y.redMul(w)),V=this.z.redMul(o.z).redMul(N);return this.curve.jpoint(Ee,pe,V)};Zn.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),C=this.y,y=o.y.redMul(c).redMul(this.z),m=l.redSub(b),N=C.redSub(y);if(m.cmpn(0)===0)return N.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var M=m.redSqr(),U=M.redMul(m),w=l.redMul(M),ae=N.redSqr().redIAdd(U).redISub(w).redISub(w),Ee=N.redMul(w.redISub(ae)).redISub(C.redMul(U)),pe=this.z.redMul(m);return this.curve.jpoint(ae,Ee,pe)};Zn.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,C=this.curve.tinv,y=this.x,m=this.y,N=this.z,M=N.redSqr().redSqr(),U=m.redAdd(m);for(c=0;c<o;c++){var w=y.redSqr(),ae=U.redSqr(),Ee=ae.redSqr(),pe=w.redAdd(w).redIAdd(w).redIAdd(b.redMul(M)),V=y.redMul(ae),xe=pe.redSqr().redISub(V.redAdd(V)),Ie=V.redISub(xe),_e=pe.redMul(Ie);_e=_e.redIAdd(_e).redISub(Ee);var ie=U.redMul(N);c+1<o&&(M=M.redMul(Ee)),y=xe,N=ie,U=_e}return this.curve.jpoint(y,U.redMul(C),N)};Zn.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};Zn.prototype._zeroDbl=function(){var o,c,l;if(this.zOne){var b=this.x.redSqr(),C=this.y.redSqr(),y=C.redSqr(),m=this.x.redAdd(C).redSqr().redISub(b).redISub(y);m=m.redIAdd(m);var N=b.redAdd(b).redIAdd(b),M=N.redSqr().redISub(m).redISub(m),U=y.redIAdd(y);U=U.redIAdd(U),U=U.redIAdd(U),o=M,c=N.redMul(m.redISub(M)).redISub(U),l=this.y.redAdd(this.y)}else{var w=this.x.redSqr(),ae=this.y.redSqr(),Ee=ae.redSqr(),pe=this.x.redAdd(ae).redSqr().redISub(w).redISub(Ee);pe=pe.redIAdd(pe);var V=w.redAdd(w).redIAdd(w),xe=V.redSqr(),Ie=Ee.redIAdd(Ee);Ie=Ie.redIAdd(Ie),Ie=Ie.redIAdd(Ie),o=xe.redISub(pe).redISub(pe),c=V.redMul(pe.redISub(o)).redISub(Ie),l=this.y.redMul(this.z),l=l.redIAdd(l)}return this.curve.jpoint(o,c,l)};Zn.prototype._threeDbl=function(){var o,c,l;if(this.zOne){var b=this.x.redSqr(),C=this.y.redSqr(),y=C.redSqr(),m=this.x.redAdd(C).redSqr().redISub(b).redISub(y);m=m.redIAdd(m);var N=b.redAdd(b).redIAdd(b).redIAdd(this.curve.a),M=N.redSqr().redISub(m).redISub(m);o=M;var U=y.redIAdd(y);U=U.redIAdd(U),U=U.redIAdd(U),c=N.redMul(m.redISub(M)).redISub(U),l=this.y.redAdd(this.y)}else{var w=this.z.redSqr(),ae=this.y.redSqr(),Ee=this.x.redMul(ae),pe=this.x.redSub(w).redMul(this.x.redAdd(w));pe=pe.redAdd(pe).redIAdd(pe);var V=Ee.redIAdd(Ee);V=V.redIAdd(V);var xe=V.redAdd(V);o=pe.redSqr().redISub(xe),l=this.y.redAdd(this.z).redSqr().redISub(ae).redISub(w);var Ie=ae.redSqr();Ie=Ie.redIAdd(Ie),Ie=Ie.redIAdd(Ie),Ie=Ie.redIAdd(Ie),c=pe.redMul(V.redISub(o)).redISub(Ie)}return this.curve.jpoint(o,c,l)};Zn.prototype._dbl=function(){var o=this.curve.a,c=this.x,l=this.y,b=this.z,C=b.redSqr().redSqr(),y=c.redSqr(),m=l.redSqr(),N=y.redAdd(y).redIAdd(y).redIAdd(o.redMul(C)),M=c.redAdd(c);M=M.redIAdd(M);var U=M.redMul(m),w=N.redSqr().redISub(U.redAdd(U)),ae=U.redISub(w),Ee=m.redSqr();Ee=Ee.redIAdd(Ee),Ee=Ee.redIAdd(Ee),Ee=Ee.redIAdd(Ee);var pe=N.redMul(ae).redISub(Ee),V=l.redAdd(l).redMul(b);return this.curve.jpoint(w,pe,V)};Zn.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(),C=o.redAdd(o).redIAdd(o),y=C.redSqr(),m=this.x.redAdd(c).redSqr().redISub(o).redISub(b);m=m.redIAdd(m),m=m.redAdd(m).redIAdd(m),m=m.redISub(y);var N=m.redSqr(),M=b.redIAdd(b);M=M.redIAdd(M),M=M.redIAdd(M),M=M.redIAdd(M);var U=C.redIAdd(m).redSqr().redISub(y).redISub(N).redISub(M),w=c.redMul(U);w=w.redIAdd(w),w=w.redIAdd(w);var ae=this.x.redMul(N).redISub(w);ae=ae.redIAdd(ae),ae=ae.redIAdd(ae);var Ee=this.y.redMul(U.redMul(M.redISub(U)).redISub(m.redMul(N)));Ee=Ee.redIAdd(Ee),Ee=Ee.redIAdd(Ee),Ee=Ee.redIAdd(Ee);var pe=this.z.redAdd(m).redSqr().redISub(l).redISub(N);return this.curve.jpoint(ae,Ee,pe)};Zn.prototype.mul=function(o,c){return o=new ir(o,c),this.curve._wnafMul(this,o)};Zn.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),C=l.redMul(o.z);return this.y.redMul(C).redISub(o.y.redMul(b)).cmpn(0)===0};Zn.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(),C=this.curve.redN.redMul(c);;){if(b.iadd(this.curve.n),b.cmp(this.curve.p)>=0)return!1;if(l.redIAdd(C),this.x.cmp(l)===0)return!0}};Zn.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)+">"};Zn.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var n1=Ps(function(f,o){var c=o;c.base=C2,c.short=Tw,c.mont=null,c.edwards=null}),A1=Ps(function(f,o){var c=o,l=ri.assert;function b(m){m.type==="short"?this.curve=new n1.short(m):m.type==="edwards"?this.curve=new n1.edwards(m):this.curve=new n1.mont(m),this.g=this.curve.g,this.n=this.curve.n,this.hash=m.hash,l(this.g.validate(),"Invalid curve"),l(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}c.PresetCurve=b;function C(m,N){Object.defineProperty(c,m,{configurable:!0,enumerable:!0,get:function(){var M=new b(N);return Object.defineProperty(c,m,{configurable:!0,enumerable:!0,value:M}),M}})}C("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"]}),C("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"]}),C("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"]}),C("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"]}),C("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"]}),C("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"]}),C("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 y;try{y=null.crash()}catch{y=void 0}C("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",y]})});function Do(f){if(!(this instanceof Do))return new Do(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=Ui.toArray(f.entropy,f.entropyEnc||"hex"),c=Ui.toArray(f.nonce,f.nonceEnc||"hex"),l=Ui.toArray(f.pers,f.persEnc||"hex");og(o.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(o,c,l)}var ky=Do;Do.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 C=0;C<this.V.length;C++)this.K[C]=0,this.V[C]=1;this._update(b),this._reseed=1,this.reseedInterval=281474976710656};Do.prototype._hmac=function(){return new XA.hmac(this.hash,this.K)};Do.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())};Do.prototype.reseed=function(o,c,l,b){typeof c!="string"&&(b=l,l=c,c=null),o=Ui.toArray(o,c),l=Ui.toArray(l,b),og(o.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(o.concat(l||[])),this._reseed=1};Do.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=Ui.toArray(l,b||"hex"),this._update(l));for(var C=[];C.length<o;)this.V=this._hmac().update(this.V).digest(),C=C.concat(this.V);var y=C.slice(0,o);return this._update(l),this._reseed++,Ui.encode(y,c)};var rd=ri.assert;function hA(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 fg=hA;hA.fromPublic=function(o,c,l){return c instanceof hA?c:new hA(o,{pub:c,pubEnc:l})};hA.fromPrivate=function(o,c,l){return c instanceof hA?c:new hA(o,{priv:c,privEnc:l})};hA.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"}};hA.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};hA.prototype.getPrivate=function(o){return o==="hex"?this.priv.toString(16,2):this.priv};hA.prototype._importPrivate=function(o,c){this.priv=new ir(o,c||16),this.priv=this.priv.umod(this.ec.curve.n)};hA.prototype._importPublic=function(o,c){if(o.x||o.y){this.ec.curve.type==="mont"?rd(o.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&rd(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)};hA.prototype.derive=function(o){return o.validate()||rd(o.validate(),"public point not validated"),o.mul(this.priv).getX()};hA.prototype.sign=function(o,c,l){return this.ec.sign(o,this,c,l)};hA.prototype.verify=function(o,c,l){return this.ec.verify(o,c,this,void 0,l)};hA.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Jw=ri.assert;function ou(f,o){if(f instanceof ou)return f;this._importDER(f,o)||(Jw(f.r&&f.s,"Signature without r or s"),this.r=new ir(f.r,16),this.s=new ir(f.s,16),f.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=f.recoveryParam)}var su=ou;function Ow(){this.place=0}function Ah(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,C=0,y=o.place;C<l;C++,y++)b<<=8,b|=f[y],b>>>=0;return b<=127?!1:(o.place=y,b)}function q8(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)}ou.prototype._importDER=function(o,c){o=ri.toArray(o,c);var l=new Ow;if(o[l.place++]!==48)return!1;var b=Ah(o,l);if(b===!1||b+l.place!==o.length||o[l.place++]!==2)return!1;var C=Ah(o,l);if(C===!1||(o[l.place]&128)!==0)return!1;var y=o.slice(l.place,C+l.place);if(l.place+=C,o[l.place++]!==2)return!1;var m=Ah(o,l);if(m===!1||o.length!==m+l.place||(o[l.place]&128)!==0)return!1;var N=o.slice(l.place,m+l.place);if(y[0]===0)if(y[1]&128)y=y.slice(1);else return!1;if(N[0]===0)if(N[1]&128)N=N.slice(1);else return!1;return this.r=new ir(y),this.s=new ir(N),this.recoveryParam=null,!0};function ih(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)}ou.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=q8(c),l=q8(l);!l[0]&&!(l[1]&128);)l=l.slice(1);var b=[2];ih(b,c.length),b=b.concat(c),b.push(2),ih(b,l.length);var C=b.concat(l),y=[48];return ih(y,C.length),y=y.concat(C),ri.encode(y,o)};var zw=function(){throw new Error("unsupported")},i2=ri.assert;function Ci(f){if(!(this instanceof Ci))return new Ci(f);typeof f=="string"&&(i2(Object.prototype.hasOwnProperty.call(A1,f),"Unknown curve "+f),f=A1[f]),f instanceof A1.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 qw=Ci;Ci.prototype.keyPair=function(o){return new fg(this,o)};Ci.prototype.keyFromPrivate=function(o,c){return fg.fromPrivate(this,o,c)};Ci.prototype.keyFromPublic=function(o,c){return fg.fromPublic(this,o,c)};Ci.prototype.genKeyPair=function(o){o||(o={});for(var c=new ky({hash:this.hash,pers:o.pers,persEnc:o.persEnc||"utf8",entropy:o.entropy||zw(this.hash.hmacStrength),entropyEnc:o.entropy&&o.entropyEnc||"utf8",nonce:this.n.toArray()}),l=this.n.byteLength(),b=this.n.sub(new ir(2));;){var C=new ir(c.generate(l));if(!(C.cmp(b)>0))return C.iaddn(1),this.keyFromPrivate(C)}};Ci.prototype._truncateToN=function(o,c,l){var b;if(ir.isBN(o)||typeof o=="number")o=new ir(o,16),b=o.byteLength();else if(typeof o=="object")b=o.length,o=new ir(o,16);else{var C=o.toString();b=C.length+1>>>1,o=new ir(C,16)}typeof l!="number"&&(l=b*8);var y=l-this.n.bitLength();return y>0&&(o=o.ushrn(y)),!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"&&!ir.isBN(o)){i2(typeof o=="object"&&o&&typeof o.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),i2(o.length>>>0===o.length);for(var C=0;C<o.length;C++)i2((o[C]&255)===o[C])}c=this.keyFromPrivate(c,l),o=this._truncateToN(o,!1,b.msgBitLength),i2(!o.isNeg(),"Can not sign a negative message");var y=this.n.byteLength(),m=c.getPrivate().toArray("be",y),N=o.toArray("be",y);i2(new ir(N).eq(o),"Can not sign message");for(var M=new ky({hash:this.hash,entropy:m,nonce:N,pers:b.pers,persEnc:b.persEnc||"utf8"}),U=this.n.sub(new ir(1)),w=0;;w++){var ae=b.k?b.k(w):new ir(M.generate(this.n.byteLength()));if(ae=this._truncateToN(ae,!0),!(ae.cmpn(1)<=0||ae.cmp(U)>=0)){var Ee=this.g.mul(ae);if(!Ee.isInfinity()){var pe=Ee.getX(),V=pe.umod(this.n);if(V.cmpn(0)!==0){var xe=ae.invm(this.n).mul(V.mul(c.getPrivate()).iadd(o));if(xe=xe.umod(this.n),xe.cmpn(0)!==0){var Ie=(Ee.getY().isOdd()?1:0)|(pe.cmp(V)!==0?2:0);return b.canonical&&xe.cmp(this.nh)>0&&(xe=this.n.sub(xe),Ie^=1),new su({r:V,s:xe,recoveryParam:Ie})}}}}}};Ci.prototype.verify=function(o,c,l,b,C){C||(C={}),o=this._truncateToN(o,!1,C.msgBitLength),l=this.keyFromPublic(l,b),c=new su(c,"hex");var y=c.r,m=c.s;if(y.cmpn(1)<0||y.cmp(this.n)>=0||m.cmpn(1)<0||m.cmp(this.n)>=0)return!1;var N=m.invm(this.n),M=N.mul(o).umod(this.n),U=N.mul(y).umod(this.n),w;return this.curve._maxwellTrick?(w=this.g.jmulAdd(M,l.getPublic(),U),w.isInfinity()?!1:w.eqXToP(y)):(w=this.g.mulAdd(M,l.getPublic(),U),w.isInfinity()?!1:w.getX().umod(this.n).cmp(y)===0)};Ci.prototype.recoverPubKey=function(f,o,c,l){i2((3&c)===c,"The recovery param is more than two bits"),o=new su(o,l);var b=this.n,C=new ir(f),y=o.r,m=o.s,N=c&1,M=c>>1;if(y.cmp(this.curve.p.umod(this.curve.n))>=0&&M)throw new Error("Unable to find sencond key candinate");M?y=this.curve.pointFromX(y.add(this.curve.n),N):y=this.curve.pointFromX(y,N);var U=o.r.invm(b),w=b.sub(C).mul(U).umod(b),ae=m.mul(U).umod(b);return this.g.mulAdd(w,y,ae)};Ci.prototype.getKeyRecoveryParam=function(f,o,c,l){if(o=new su(o,l),o.recoveryParam!==null)return o.recoveryParam;for(var b=0;b<4;b++){var C;try{C=this.recoverPubKey(f,o,b)}catch{continue}if(C.eq(c))return b}throw new Error("Unable to find valid recovery factor")};var jw=Ps(function(f,o){var c=o;c.version="6.6.1",c.utils=ri,c.rand=function(){throw new Error("unsupported")},c.curve=n1,c.curves=A1,c.ec=qw,c.eddsa=null}),Vw=jw.ec;const Xw="signing-key/5.8.0",nd=new zt(Xw);let ah=null;function A2(){return ah||(ah=new Vw("secp256k1")),ah}class Cs{constructor(o){lr(this,"curve","secp256k1"),lr(this,"privateKey",or(o)),yy(this.privateKey)!==32&&nd.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const c=A2().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=A2().keyFromPublic(Nt(this.publicKey)),l=A2().keyFromPublic(Nt(o));return"0x"+c.pub.add(l.pub).encodeCompressed("hex")}signDigest(o){const c=A2().keyFromPrivate(Nt(this.privateKey)),l=Nt(o);l.length!==32&&nd.throwArgumentError("bad digest length","digest",o);const b=c.sign(l,{canonical:!0});return Fs({recoveryParam:b.recoveryParam,r:pi("0x"+b.r.toString(16),32),s:pi("0x"+b.s.toString(16),32)})}computeSharedSecret(o){const c=A2().keyFromPrivate(Nt(this.privateKey)),l=A2().keyFromPublic(Nt(My(o)));return pi("0x"+c.derive(l.getPublic()).toString(16),32)}static isSigningKey(o){return!!(o&&o._isSigningKey)}}function My(f,o){const c=Nt(f);return c.length===32?new Cs(c).publicKey:c.length===33?"0x"+A2().keyFromPublic(c).getPublic(!1,"hex"):c.length===65?or(c):nd.throwArgumentError("invalid public or private key","key","[REDACTED]")}const Ww="transactions/5.8.0",Hi=new zt(Ww);var j8;(function(f){f[f.legacy=0]="legacy",f[f.eip2930=1]="eip2930",f[f.eip1559=2]="eip1559"})(j8||(j8={}));const Zw=[{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"}],$w={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function Is(f){const o=My(f);return Gi(Df(BA(Df(o,1)),12))}function WA(f,o){const c=mo(Wr.from(f).toHexString());return c.length>32&&Hi.throwArgumentError("invalid length for "+o,"transaction:"+o,f),c}function oh(f,o){return{address:Gi(f),storageKeys:(o||[]).map((c,l)=>(yy(c)!==32&&Hi.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&&Hi.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${l}]`,c),oh(c[0],c[1])):oh(c.address,c.storageKeys));const o=Object.keys(f).map(c=>{const l=f[c].reduce((b,C)=>(b[C]=!0,b),{});return oh(c,Object.keys(l).sort())});return o.sort((c,l)=>c.address.localeCompare(l.address)),o}function Ny(f){return eB(f).map(o=>[o.address,o.storageKeys])}function tB(f,o){if(f.gasPrice!=null){const l=Wr.from(f.gasPrice),b=Wr.from(f.maxFeePerGas||0);l.eq(b)||Hi.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?Gi(f.to):"0x",WA(f.value||0,"value"),f.data||"0x",Ny(f.accessList||[])];if(o){const l=Fs(o);c.push(WA(l.recoveryParam,"recoveryParam")),c.push(mo(l.r)),c.push(mo(l.s))}return ys(["0x02",_1(c)])}function rB(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?Gi(f.to):"0x",WA(f.value||0,"value"),f.data||"0x",Ny(f.accessList||[])];if(o){const l=Fs(o);c.push(WA(l.recoveryParam,"recoveryParam")),c.push(mo(l.r)),c.push(mo(l.s))}return ys(["0x01",_1(c)])}function nB(f,o){uw(f,$w);const c=[];Zw.forEach(function(y){let m=f[y.name]||[];const N={};y.numeric&&(N.hexPad="left"),m=Nt(or(m,N)),y.length&&m.length!==y.length&&m.length>0&&Hi.throwArgumentError("invalid length for "+y.name,"transaction:"+y.name,m),y.maxLength&&(m=mo(m),m.length>y.maxLength&&Hi.throwArgumentError("invalid length for "+y.name,"transaction:"+y.name,m)),c.push(or(m))});let l=0;if(f.chainId!=null?(l=f.chainId,typeof l!="number"&&Hi.throwArgumentError("invalid transaction.chainId","transaction",f)):o&&!tg(o)&&o.v>28&&(l=Math.floor((o.v-35)/2)),l!==0&&(c.push(or(l)),c.push("0x"),c.push("0x")),!o)return _1(c);const b=Fs(o);let C=27+b.recoveryParam;return l!==0?(c.pop(),c.pop(),c.pop(),C+=l*2+8,b.v>28&&b.v!==C&&Hi.throwArgumentError("transaction.chainId/signature.v mismatch","signature",o)):b.v!==C&&Hi.throwArgumentError("transaction.chainId/signature.v mismatch","signature",o),c.push(or(C)),c.push(mo(Nt(b.r))),c.push(mo(Nt(b.s))),_1(c)}function V8(f,o){if(f.type==null||f.type===0)return f.accessList!=null&&Hi.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",f),nB(f,o);switch(f.type){case 1:return rB(f,o);case 2:return tB(f,o)}return Hi.throwError(`unsupported transaction type: ${f.type}`,zt.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:f.type})}const AB="wordlists/5.8.0",iB=new zt(AB);class $f{constructor(o){iB.checkAbstract(new.target,$f),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 ig(c.join(`
|
|
65
65
|
`)+`
|
|
66
|
-
`)}static register(o,c){c||(c=o.locale)}}const aB="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let bf=null;function X8(f){if(bf==null&&(bf=aB.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),$f.check(f)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw bf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class oB extends $f{constructor(){super("en")}getWord(o){return X8(this),bf[o]}getWordIndex(o){return X8(this),bf.indexOf(o)}}const Fy=new oB;$f.register(Fy);const W8={en:Fy},sB="hdnode/5.8.0",D1=new zt(sB),fB=Wr.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),cB=Ri("Bitcoin seed"),af=2147483648;function Py(f){return(1<<f)-1<<8-f}function uB(f){return(1<<f)-1}function qc(f){return pi(or(f),32)}function Z8(f){return By.encode(So([f,Df(Nf(Nf(f)),0,4)]))}function cg(f){if(f==null)return W8.en;if(typeof f=="string"){const o=W8[f];return o==null&&D1.throwArgumentError("unknown locale","wordlist",f),o}return f}const rs={},Ff="m/44'/60'/0'/0/0";class hi{constructor(o,c,l,b,C,y,m,N){if(o!==rs)throw new Error("HDNode constructor cannot be called directly");if(c){const M=new Cs(c);lr(this,"privateKey",M.privateKey),lr(this,"publicKey",M.compressedPublicKey)}else lr(this,"privateKey",null),lr(this,"publicKey",or(l));lr(this,"parentFingerprint",b),lr(this,"fingerprint",Df(Rw(Nf(this.publicKey)),0,4)),lr(this,"address",Is(this.publicKey)),lr(this,"chainCode",C),lr(this,"index",y),lr(this,"depth",m),N==null?(lr(this,"mnemonic",null),lr(this,"path",null)):typeof N=="string"?(lr(this,"mnemonic",null),lr(this,"path",N)):(lr(this,"mnemonic",N),lr(this,"path",N.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return Z8(So([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",or(this.depth),this.parentFingerprint,pi(or(this.index),4),this.chainCode,this.privateKey!=null?So(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new hi(rs,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&~af));const l=new Uint8Array(37);if(o&af){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(m1(Mf.sha512,this.chainCode,l)),C=b.slice(0,32),y=b.slice(32);let m=null,N=null;this.privateKey?m=qc(Wr.from(C).add(this.privateKey).mod(fB)):N=new Cs(or(C))._addPoint(this.publicKey);let M=c;const U=this.mnemonic;return U&&(M=Object.freeze({phrase:U.phrase,path:c,locale:U.locale||"en"})),new hi(rs,m,N,this.fingerprint,qc(y),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 C=c[b];if(C.match(/^[0-9]+'$/)){const y=parseInt(C.substring(0,C.length-1));if(y>=af)throw new Error("invalid path index - "+C);l=l._derive(af+y)}else if(C.match(/^[0-9]+$/)){const y=parseInt(C);if(y>=af)throw new Error("invalid path index - "+C);l=l._derive(y)}else throw new Error("invalid path component - "+C)}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(m1(Mf.sha512,cB,l));return new hi(rs,qc(b.slice(0,32)),null,"0x00000000",qc(b.slice(32)),0,0,c)}static fromMnemonic(o,c,l){return l=cg(l),o=ug(Ky(o,l),l),hi._fromSeed(lB(o,c),{phrase:o,path:"m",locale:l.locale})}static fromSeed(o){return hi._fromSeed(o,null)}static fromExtendedKey(o){const c=By.decode(o);(c.length!==82||Z8(c.slice(0,78))!==o)&&D1.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const l=c[4],b=or(c.slice(5,9)),C=parseInt(or(c.slice(9,13)).substring(2),16),y=or(c.slice(13,45)),m=c.slice(45,78);switch(or(c.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new hi(rs,null,or(m),b,y,C,l,null);case"0x0488ade4":case"0x04358394 ":if(m[0]!==0)break;return new hi(rs,or(m.slice(1)),null,b,y,C,l,null)}return D1.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function lB(f,o){o||(o="");const c=Ri("mnemonic"+o,p2.NFKD);return ag(Ri(f,p2.NFKD),c,2048,64,"sha512")}function Ky(f,o){o=cg(o),D1.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 U=o.getWordIndex(c[M].normalize("NFKD"));if(U===-1)throw new Error("invalid mnemonic");for(let w=0;w<11;w++)U&1<<10-w&&(l[b>>3]|=1<<7-b%8),b++}const C=32*c.length/3,y=c.length/3,m=Py(y);if((Nt(Nf(l.slice(0,C/8)))[0]&m)!==(l[l.length-1]&m))throw new Error("invalid checksum");return or(l.slice(0,C/8))}function ug(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 y=0;y<f.length;y++)l>8?(c[c.length-1]<<=8,c[c.length-1]|=f[y],l-=8):(c[c.length-1]<<=l,c[c.length-1]|=f[y]>>8-l,c.push(f[y]&uB(8-l)),l+=3);const b=f.length/4,C=Nt(Nf(f))[0]&Py(b);return c[c.length-1]<<=b,c[c.length-1]|=C>>8-b,o.join(c.map(y=>o.getWord(y)))}const hB="random/5.8.0",Ad=new zt(hB);function dB(){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 $8=dB();let i1=$8.crypto||$8.msCrypto;(!i1||!i1.getRandomValues)&&(Ad.warn("WARNING: Missing strong random number source"),i1={getRandomValues:function(f){return Ad.throwError("no secure random source avaialble",zt.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function uf(f){(f<=0||f>1024||f%1||f!=f)&&Ad.throwArgumentError("invalid length","length",f);const o=new Uint8Array(f);return i1.getRandomValues(o),Nt(o)}var sh={exports:{}},ep;function gB(){return ep||(ep=1,function(f,o){(function(c){function l(Y){return parseInt(Y)===Y}function b(Y){if(!l(Y.length))return!1;for(var z=0;z<Y.length;z++)if(!l(Y[z])||Y[z]<0||Y[z]>255)return!1;return!0}function C(Y,z){if(Y.buffer&&ArrayBuffer.isView(Y)&&Y.name==="Uint8Array")return z&&(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 y(Y){return new Uint8Array(Y)}function m(Y,z,me,ze,se){(ze!=null||se!=null)&&(Y.slice?Y=Y.slice(ze,se):Y=Array.prototype.slice.call(Y,ze,se)),z.set(Y,me)}var N=function(){function Y(me){var ze=[],se=0;for(me=encodeURI(me);se<me.length;){var Ve=me.charCodeAt(se++);Ve===37?(ze.push(parseInt(me.substr(se,2),16)),se+=2):ze.push(Ve)}return C(ze)}function z(me){for(var ze=[],se=0;se<me.length;){var Ve=me[se];Ve<128?(ze.push(String.fromCharCode(Ve)),se++):Ve>191&&Ve<224?(ze.push(String.fromCharCode((Ve&31)<<6|me[se+1]&63)),se+=2):(ze.push(String.fromCharCode((Ve&15)<<12|(me[se+1]&63)<<6|me[se+2]&63)),se+=3)}return ze.join("")}return{toBytes:Y,fromBytes:z}}(),M=function(){function Y(ze){for(var se=[],Ve=0;Ve<ze.length;Ve+=2)se.push(parseInt(ze.substr(Ve,2),16));return se}var z="0123456789abcdef";function me(ze){for(var se=[],Ve=0;Ve<ze.length;Ve++){var h0=ze[Ve];se.push(z[(h0&240)>>4]+z[h0&15])}return se.join("")}return{toBytes:Y,fromBytes:me}}(),U={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],ae=[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],Ee=[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],pe=[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],xe=[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],Ie=[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],ie=[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],n0=[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],le=[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],Ne=[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],ye=[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],Xe=[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],re=[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 a0(Y){for(var z=[],me=0;me<Y.length;me+=4)z.push(Y[me]<<24|Y[me+1]<<16|Y[me+2]<<8|Y[me+3]);return z}var Qe=function(Y){if(!(this instanceof Qe))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:C(Y,!0)}),this._prepare()};Qe.prototype._prepare=function(){var Y=U[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 z=0;z<=Y;z++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var me=(Y+1)*4,ze=this.key.length/4,se=a0(this.key),Ve,z=0;z<ze;z++)Ve=z>>2,this._Ke[Ve][z%4]=se[z],this._Kd[Y-Ve][z%4]=se[z];for(var h0=0,y0=ze,C0;y0<me;){if(C0=se[ze-1],se[0]^=ae[C0>>16&255]<<24^ae[C0>>8&255]<<16^ae[C0&255]<<8^ae[C0>>24&255]^w[h0]<<24,h0+=1,ze!=8)for(var z=1;z<ze;z++)se[z]^=se[z-1];else{for(var z=1;z<ze/2;z++)se[z]^=se[z-1];C0=se[ze/2-1],se[ze/2]^=ae[C0&255]^ae[C0>>8&255]<<8^ae[C0>>16&255]<<16^ae[C0>>24&255]<<24;for(var z=ze/2+1;z<ze;z++)se[z]^=se[z-1]}for(var z=0,q0,rt;z<ze&&y0<me;)q0=y0>>2,rt=y0%4,this._Ke[q0][rt]=se[z],this._Kd[Y-q0][rt]=se[z++],y0++}for(var q0=1;q0<Y;q0++)for(var rt=0;rt<4;rt++)C0=this._Kd[q0][rt],this._Kd[q0][rt]=Ne[C0>>24&255]^ye[C0>>16&255]^Xe[C0>>8&255]^re[C0&255]},Qe.prototype.encrypt=function(Y){if(Y.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var z=this._Ke.length-1,me=[0,0,0,0],ze=a0(Y),se=0;se<4;se++)ze[se]^=this._Ke[0][se];for(var Ve=1;Ve<z;Ve++){for(var se=0;se<4;se++)me[se]=pe[ze[se]>>24&255]^V[ze[(se+1)%4]>>16&255]^xe[ze[(se+2)%4]>>8&255]^Ie[ze[(se+3)%4]&255]^this._Ke[Ve][se];ze=me.slice()}for(var h0=y(16),y0,se=0;se<4;se++)y0=this._Ke[z][se],h0[4*se]=(ae[ze[se]>>24&255]^y0>>24)&255,h0[4*se+1]=(ae[ze[(se+1)%4]>>16&255]^y0>>16)&255,h0[4*se+2]=(ae[ze[(se+2)%4]>>8&255]^y0>>8)&255,h0[4*se+3]=(ae[ze[(se+3)%4]&255]^y0)&255;return h0},Qe.prototype.decrypt=function(Y){if(Y.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var z=this._Kd.length-1,me=[0,0,0,0],ze=a0(Y),se=0;se<4;se++)ze[se]^=this._Kd[0][se];for(var Ve=1;Ve<z;Ve++){for(var se=0;se<4;se++)me[se]=_e[ze[se]>>24&255]^ie[ze[(se+3)%4]>>16&255]^n0[ze[(se+2)%4]>>8&255]^le[ze[(se+1)%4]&255]^this._Kd[Ve][se];ze=me.slice()}for(var h0=y(16),y0,se=0;se<4;se++)y0=this._Kd[z][se],h0[4*se]=(Ee[ze[se]>>24&255]^y0>>24)&255,h0[4*se+1]=(Ee[ze[(se+3)%4]>>16&255]^y0>>16)&255,h0[4*se+2]=(Ee[ze[(se+2)%4]>>8&255]^y0>>8)&255,h0[4*se+3]=(Ee[ze[(se+1)%4]&255]^y0)&255;return h0};var L=function(Y){if(!(this instanceof L))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Qe(Y)};L.prototype.encrypt=function(Y){if(Y=C(Y),Y.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var z=y(Y.length),me=y(16),ze=0;ze<Y.length;ze+=16)m(Y,me,0,ze,ze+16),me=this._aes.encrypt(me),m(me,z,ze);return z},L.prototype.decrypt=function(Y){if(Y=C(Y),Y.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var z=y(Y.length),me=y(16),ze=0;ze<Y.length;ze+=16)m(Y,me,0,ze,ze+16),me=this._aes.decrypt(me),m(me,z,ze);return z};var G=function(Y,z){if(!(this instanceof G))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",!z)z=y(16);else if(z.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastCipherblock=C(z,!0),this._aes=new Qe(Y)};G.prototype.encrypt=function(Y){if(Y=C(Y),Y.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var z=y(Y.length),me=y(16),ze=0;ze<Y.length;ze+=16){m(Y,me,0,ze,ze+16);for(var se=0;se<16;se++)me[se]^=this._lastCipherblock[se];this._lastCipherblock=this._aes.encrypt(me),m(this._lastCipherblock,z,ze)}return z},G.prototype.decrypt=function(Y){if(Y=C(Y),Y.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var z=y(Y.length),me=y(16),ze=0;ze<Y.length;ze+=16){m(Y,me,0,ze,ze+16),me=this._aes.decrypt(me);for(var se=0;se<16;se++)z[ze+se]=me[se]^this._lastCipherblock[se];m(Y,this._lastCipherblock,0,ze,ze+16)}return z};var S=function(Y,z,me){if(!(this instanceof S))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",!z)z=y(16);else if(z.length!=16)throw new Error("invalid initialation vector size (must be 16 size)");me||(me=1),this.segmentSize=me,this._shiftRegister=C(z,!0),this._aes=new Qe(Y)};S.prototype.encrypt=function(Y){if(Y.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var z=C(Y,!0),me,ze=0;ze<z.length;ze+=this.segmentSize){me=this._aes.encrypt(this._shiftRegister);for(var se=0;se<this.segmentSize;se++)z[ze+se]^=me[se];m(this._shiftRegister,this._shiftRegister,0,this.segmentSize),m(z,this._shiftRegister,16-this.segmentSize,ze,ze+this.segmentSize)}return z},S.prototype.decrypt=function(Y){if(Y.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var z=C(Y,!0),me,ze=0;ze<z.length;ze+=this.segmentSize){me=this._aes.encrypt(this._shiftRegister);for(var se=0;se<this.segmentSize;se++)z[ze+se]^=me[se];m(this._shiftRegister,this._shiftRegister,0,this.segmentSize),m(Y,this._shiftRegister,16-this.segmentSize,ze,ze+this.segmentSize)}return z};var J=function(Y,z){if(!(this instanceof J))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",!z)z=y(16);else if(z.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastPrecipher=C(z,!0),this._lastPrecipherIndex=16,this._aes=new Qe(Y)};J.prototype.encrypt=function(Y){for(var z=C(Y,!0),me=0;me<z.length;me++)this._lastPrecipherIndex===16&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),z[me]^=this._lastPrecipher[this._lastPrecipherIndex++];return z},J.prototype.decrypt=J.prototype.encrypt;var W=function(Y){if(!(this instanceof W))throw Error("Counter must be instanitated with `new`");Y!==0&&!Y&&(Y=1),typeof Y=="number"?(this._counter=y(16),this.setValue(Y)):this.setBytes(Y)};W.prototype.setValue=function(Y){if(typeof Y!="number"||parseInt(Y)!=Y)throw new Error("invalid counter value (must be an integer)");for(var z=15;z>=0;--z)this._counter[z]=Y%256,Y=Y>>8},W.prototype.setBytes=function(Y){if(Y=C(Y,!0),Y.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=Y},W.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 fe=function(Y,z){if(!(this instanceof fe))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",z instanceof W||(z=new W(z)),this._counter=z,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Qe(Y)};fe.prototype.encrypt=function(Y){for(var z=C(Y,!0),me=0;me<z.length;me++)this._remainingCounterIndex===16&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),z[me]^=this._remainingCounter[this._remainingCounterIndex++];return z},fe.prototype.decrypt=fe.prototype.encrypt;function he(Y){Y=C(Y,!0);var z=16-Y.length%16,me=y(Y.length+z);m(Y,me);for(var ze=Y.length;ze<me.length;ze++)me[ze]=z;return me}function Ce(Y){if(Y=C(Y,!0),Y.length<16)throw new Error("PKCS#7 invalid length");var z=Y[Y.length-1];if(z>16)throw new Error("PKCS#7 padding byte out of range");for(var me=Y.length-z,ze=0;ze<z;ze++)if(Y[me+ze]!==z)throw new Error("PKCS#7 invalid padding byte");var se=y(me);return m(Y,se,0,0,me),se}var j={AES:Qe,Counter:W,ModeOfOperation:{ecb:L,cbc:G,cfb:S,ofb:J,ctr:fe},utils:{hex:M,utf8:N},padding:{pkcs7:{pad:he,strip:Ce}},_arrayTest:{coerceArray:C,createArray:y,copyArray:m}};f.exports=j})()}(sh)),sh.exports}var pB=gB();const sa=Yi(pB),Hy="json-wallets/5.8.0";function c2(f){return typeof f=="string"&&f.substring(0,2)!=="0x"&&(f="0x"+f),Nt(f)}function of(f,o){for(f=String(f);f.length<o;)f="0"+f;return f}function lg(f){return typeof f=="string"?Ri(f,p2.NFKC):Nt(f)}function En(f,o){let c=f;const l=o.toLowerCase().split("/");for(let b=0;b<l.length;b++){let C=null;for(const y in c)if(y.toLowerCase()===l[b]){C=c[y];break}if(C===null)return null;c=C}return c}function yB(f){const o=Nt(f);o[6]=o[6]&15|64,o[8]=o[8]&63|128;const c=or(o);return[c.substring(2,10),c.substring(10,14),c.substring(14,18),c.substring(18,22),c.substring(22,34)].join("-")}const CB=new zt(Hy);class IB extends vy{isCrowdsaleAccount(o){return!!(o&&o._isCrowdsaleAccount)}}function Uy(f,o){const c=JSON.parse(f);o=lg(o);const l=Gi(En(c,"ethaddr")),b=c2(En(c,"encseed"));(!b||b.length%16!==0)&&CB.throwArgumentError("invalid encseed","json",f);const C=Nt(ag(o,o,2e3,32,"sha256")).slice(0,16),y=b.slice(0,16),m=b.slice(16),N=new sa.ModeOfOperation.cbc(C,y),M=sa.padding.pkcs7.strip(Nt(N.decrypt(m)));let U="";for(let Ee=0;Ee<M.length;Ee++)U+=String.fromCharCode(M[Ee]);const w=Ri(U),ae=BA(w);return new IB({_isCrowdsaleAccount:!0,address:l,privateKey:ae})}function Ry(f){let o=null;try{o=JSON.parse(f)}catch{return!1}return o.encseed&&o.ethaddr}function Gy(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 fh={exports:{}},tp;function bB(){return tp||(tp=1,function(f,o){(function(c){function b(V){const xe=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 Ie=1779033703,_e=3144134277,ie=1013904242,n0=2773480762,le=1359893119,Ne=2600822924,ye=528734635,Xe=1541459225;const re=new Uint32Array(64);function a0(fe){let he=0,Ce=fe.length;for(;Ce>=64;){let j=Ie,Y=_e,z=ie,me=n0,ze=le,se=Ne,Ve=ye,h0=Xe,y0,C0,q0,rt,V0;for(C0=0;C0<16;C0++)q0=he+C0*4,re[C0]=(fe[q0]&255)<<24|(fe[q0+1]&255)<<16|(fe[q0+2]&255)<<8|fe[q0+3]&255;for(C0=16;C0<64;C0++)y0=re[C0-2],rt=(y0>>>17|y0<<15)^(y0>>>19|y0<<13)^y0>>>10,y0=re[C0-15],V0=(y0>>>7|y0<<25)^(y0>>>18|y0<<14)^y0>>>3,re[C0]=(rt+re[C0-7]|0)+(V0+re[C0-16]|0)|0;for(C0=0;C0<64;C0++)rt=(((ze>>>6|ze<<26)^(ze>>>11|ze<<21)^(ze>>>25|ze<<7))+(ze&se^~ze&Ve)|0)+(h0+(xe[C0]+re[C0]|0)|0)|0,V0=((j>>>2|j<<30)^(j>>>13|j<<19)^(j>>>22|j<<10))+(j&Y^j&z^Y&z)|0,h0=Ve,Ve=se,se=ze,ze=me+rt|0,me=z,z=Y,Y=j,j=rt+V0|0;Ie=Ie+j|0,_e=_e+Y|0,ie=ie+z|0,n0=n0+me|0,le=le+ze|0,Ne=Ne+se|0,ye=ye+Ve|0,Xe=Xe+h0|0,he+=64,Ce-=64}}a0(V);let Qe,L=V.length%64,G=V.length/536870912|0,S=V.length<<3,J=L<56?56:120,W=V.slice(V.length-L,V.length);for(W.push(128),Qe=L+1;Qe<J;Qe++)W.push(0);return W.push(G>>>24&255),W.push(G>>>16&255),W.push(G>>>8&255),W.push(G>>>0&255),W.push(S>>>24&255),W.push(S>>>16&255),W.push(S>>>8&255),W.push(S>>>0&255),a0(W),[Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie>>>0&255,_e>>>24&255,_e>>>16&255,_e>>>8&255,_e>>>0&255,ie>>>24&255,ie>>>16&255,ie>>>8&255,ie>>>0&255,n0>>>24&255,n0>>>16&255,n0>>>8&255,n0>>>0&255,le>>>24&255,le>>>16&255,le>>>8&255,le>>>0&255,Ne>>>24&255,Ne>>>16&255,Ne>>>8&255,Ne>>>0&255,ye>>>24&255,ye>>>16&255,ye>>>8&255,ye>>>0&255,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe>>>0&255]}function C(V,xe,Ie){V=V.length<=64?V:b(V);const _e=64+xe.length+4,ie=new Array(_e),n0=new Array(64);let le,Ne=[];for(le=0;le<64;le++)ie[le]=54;for(le=0;le<V.length;le++)ie[le]^=V[le];for(le=0;le<xe.length;le++)ie[64+le]=xe[le];for(le=_e-4;le<_e;le++)ie[le]=0;for(le=0;le<64;le++)n0[le]=92;for(le=0;le<V.length;le++)n0[le]^=V[le];function ye(){for(let Xe=_e-1;Xe>=_e-4;Xe--){if(ie[Xe]++,ie[Xe]<=255)return;ie[Xe]=0}}for(;Ie>=32;)ye(),Ne=Ne.concat(b(n0.concat(b(ie)))),Ie-=32;return Ie>0&&(ye(),Ne=Ne.concat(b(n0.concat(b(ie))).slice(0,Ie))),Ne}function y(V,xe,Ie,_e,ie){let n0;for(U(V,(2*Ie-1)*16,ie,0,16),n0=0;n0<2*Ie;n0++)M(V,n0*16,ie,16),N(ie,_e),U(ie,0,V,xe+n0*16,16);for(n0=0;n0<Ie;n0++)U(V,xe+n0*2*16,V,n0*16,16);for(n0=0;n0<Ie;n0++)U(V,xe+(n0*2+1)*16,V,(n0+Ie)*16,16)}function m(V,xe){return V<<xe|V>>>32-xe}function N(V,xe){U(V,0,xe,0,16);for(let Ie=8;Ie>0;Ie-=2)xe[4]^=m(xe[0]+xe[12],7),xe[8]^=m(xe[4]+xe[0],9),xe[12]^=m(xe[8]+xe[4],13),xe[0]^=m(xe[12]+xe[8],18),xe[9]^=m(xe[5]+xe[1],7),xe[13]^=m(xe[9]+xe[5],9),xe[1]^=m(xe[13]+xe[9],13),xe[5]^=m(xe[1]+xe[13],18),xe[14]^=m(xe[10]+xe[6],7),xe[2]^=m(xe[14]+xe[10],9),xe[6]^=m(xe[2]+xe[14],13),xe[10]^=m(xe[6]+xe[2],18),xe[3]^=m(xe[15]+xe[11],7),xe[7]^=m(xe[3]+xe[15],9),xe[11]^=m(xe[7]+xe[3],13),xe[15]^=m(xe[11]+xe[7],18),xe[1]^=m(xe[0]+xe[3],7),xe[2]^=m(xe[1]+xe[0],9),xe[3]^=m(xe[2]+xe[1],13),xe[0]^=m(xe[3]+xe[2],18),xe[6]^=m(xe[5]+xe[4],7),xe[7]^=m(xe[6]+xe[5],9),xe[4]^=m(xe[7]+xe[6],13),xe[5]^=m(xe[4]+xe[7],18),xe[11]^=m(xe[10]+xe[9],7),xe[8]^=m(xe[11]+xe[10],9),xe[9]^=m(xe[8]+xe[11],13),xe[10]^=m(xe[9]+xe[8],18),xe[12]^=m(xe[15]+xe[14],7),xe[13]^=m(xe[12]+xe[15],9),xe[14]^=m(xe[13]+xe[12],13),xe[15]^=m(xe[14]+xe[13],18);for(let Ie=0;Ie<16;++Ie)V[Ie]+=xe[Ie]}function M(V,xe,Ie,_e){for(let ie=0;ie<_e;ie++)Ie[ie]^=V[xe+ie]}function U(V,xe,Ie,_e,ie){for(;ie--;)Ie[_e++]=V[xe++]}function w(V){if(!V||typeof V.length!="number")return!1;for(let xe=0;xe<V.length;xe++){const Ie=V[xe];if(typeof Ie!="number"||Ie%1||Ie<0||Ie>=256)return!1}return!0}function ae(V,xe){if(typeof V!="number"||V%1)throw new Error("invalid "+xe);return V}function Ee(V,xe,Ie,_e,ie,n0,le){if(Ie=ae(Ie,"N"),_e=ae(_e,"r"),ie=ae(ie,"p"),n0=ae(n0,"dkLen"),Ie===0||(Ie&Ie-1)!==0)throw new Error("N must be power of 2");if(Ie>2147483647/128/_e)throw new Error("N too large");if(_e>2147483647/128/ie)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(xe))throw new Error("salt must be an array or buffer");xe=Array.prototype.slice.call(xe);let Ne=C(V,xe,ie*128*_e);const ye=new Uint32Array(ie*32*_e);for(let ze=0;ze<ye.length;ze++){const se=ze*4;ye[ze]=(Ne[se+3]&255)<<24|(Ne[se+2]&255)<<16|(Ne[se+1]&255)<<8|(Ne[se+0]&255)<<0}const Xe=new Uint32Array(64*_e),re=new Uint32Array(32*_e*Ie),a0=32*_e,Qe=new Uint32Array(16),L=new Uint32Array(16),G=ie*Ie*2;let S=0,J=null,W=!1,fe=0,he=0,Ce,j;const Y=le?parseInt(1e3/_e):4294967295,z=typeof setImmediate<"u"?setImmediate:setTimeout,me=function(){if(W)return le(new Error("cancelled"),S/G);let ze;switch(fe){case 0:j=he*32*_e,U(ye,j,Xe,0,a0),fe=1,Ce=0;case 1:ze=Ie-Ce,ze>Y&&(ze=Y);for(let Ve=0;Ve<ze;Ve++)U(Xe,0,re,(Ce+Ve)*a0,a0),y(Xe,a0,_e,Qe,L);if(Ce+=ze,S+=ze,le){const Ve=parseInt(1e3*S/G);if(Ve!==J){if(W=le(null,S/G),W)break;J=Ve}}if(Ce<Ie)break;Ce=0,fe=2;case 2:ze=Ie-Ce,ze>Y&&(ze=Y);for(let Ve=0;Ve<ze;Ve++){const h0=(2*_e-1)*16,y0=Xe[h0]&Ie-1;M(re,y0*a0,Xe,a0),y(Xe,a0,_e,Qe,L)}if(Ce+=ze,S+=ze,le){const Ve=parseInt(1e3*S/G);if(Ve!==J){if(W=le(null,S/G),W)break;J=Ve}}if(Ce<Ie)break;if(U(Xe,0,ye,j,a0),he++,he<ie){fe=0;break}Ne=[];for(let Ve=0;Ve<ye.length;Ve++)Ne.push(ye[Ve]>>0&255),Ne.push(ye[Ve]>>8&255),Ne.push(ye[Ve]>>16&255),Ne.push(ye[Ve]>>24&255);const se=C(V,Ne,n0);return le&&le(null,1,se),se}le&&z(me)};if(!le)for(;;){const ze=me();if(ze!=null)return ze}me()}const pe={scrypt:function(V,xe,Ie,_e,ie,n0,le){return new Promise(function(Ne,ye){let Xe=0;le&&le(0),Ee(V,xe,Ie,_e,ie,n0,function(re,a0,Qe){if(re)ye(re);else if(Qe)le&&Xe!==1&&le(1),Ne(new Uint8Array(Qe));else if(le&&a0!==Xe)return Xe=a0,le(a0)})})},syncScrypt:function(V,xe,Ie,_e,ie,n0){return new Uint8Array(Ee(V,xe,Ie,_e,ie,n0))}};f.exports=pe})()}(fh)),fh.exports}var vB=bB();const hg=Yi(vB);var xB=function(f,o,c,l){function b(C){return C instanceof c?C:new c(function(y){y(C)})}return new(c||(c=Promise))(function(C,y){function m(U){try{M(l.next(U))}catch(w){y(w)}}function N(U){try{M(l.throw(U))}catch(w){y(w)}}function M(U){U.done?C(U.value):b(U.value).then(m,N)}M((l=l.apply(f,o||[])).next())})};const id=new zt(Hy);function rp(f){return f!=null&&f.mnemonic&&f.mnemonic.phrase}class EB extends vy{isKeystoreAccount(o){return!!(o&&o._isKeystoreAccount)}}function _B(f,o,c){if(En(f,"crypto/cipher")==="aes-128-ctr"){const b=c2(En(f,"crypto/cipherparams/iv")),C=new sa.Counter(b),y=new sa.ModeOfOperation.ctr(o,C);return Nt(y.decrypt(c))}return null}function Yy(f,o){const c=c2(En(f,"crypto/ciphertext"));if(or(BA(So([o.slice(16,32),c]))).substring(2)!==En(f,"crypto/mac").toLowerCase())throw new Error("invalid password");const b=_B(f,o.slice(0,16),c);b||id.throwError("unsupported cipher",zt.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const C=o.slice(32,64),y=Is(b);if(f.address){let N=f.address.toLowerCase();if(N.substring(0,2)!=="0x"&&(N="0x"+N),Gi(N)!==y)throw new Error("address mismatch")}const m={_isKeystoreAccount:!0,address:y,privateKey:or(b)};if(En(f,"x-ethers/version")==="0.1"){const N=c2(En(f,"x-ethers/mnemonicCiphertext")),M=c2(En(f,"x-ethers/mnemonicCounter")),U=new sa.Counter(M),w=new sa.ModeOfOperation.ctr(C,U),ae=En(f,"x-ethers/path")||Ff,Ee=En(f,"x-ethers/locale")||"en",pe=Nt(w.decrypt(N));try{const V=ug(pe,Ee),xe=hi.fromMnemonic(V,null,Ee).derivePath(ae);if(xe.privateKey!=m.privateKey)throw new Error("mnemonic mismatch");m.mnemonic=xe.mnemonic}catch(V){if(V.code!==zt.errors.INVALID_ARGUMENT||V.argument!=="wordlist")throw V}}return new EB(m)}function Ly(f,o,c,l,b){return Nt(ag(f,o,c,l,b))}function wB(f,o,c,l,b){return Promise.resolve(Ly(f,o,c,l,b))}function Ty(f,o,c,l,b){const C=lg(o),y=En(f,"crypto/kdf");if(y&&typeof y=="string"){const m=function(N,M){return id.throwArgumentError("invalid key-derivation function parameters",N,M)};if(y.toLowerCase()==="scrypt"){const N=c2(En(f,"crypto/kdfparams/salt")),M=parseInt(En(f,"crypto/kdfparams/n")),U=parseInt(En(f,"crypto/kdfparams/r")),w=parseInt(En(f,"crypto/kdfparams/p"));(!M||!U||!w)&&m("kdf",y),(M&M-1)!==0&&m("N",M);const ae=parseInt(En(f,"crypto/kdfparams/dklen"));return ae!==32&&m("dklen",ae),l(C,N,M,U,w,64,b)}else if(y.toLowerCase()==="pbkdf2"){const N=c2(En(f,"crypto/kdfparams/salt"));let M=null;const U=En(f,"crypto/kdfparams/prf");U==="hmac-sha256"?M="sha256":U==="hmac-sha512"?M="sha512":m("prf",U);const w=parseInt(En(f,"crypto/kdfparams/c")),ae=parseInt(En(f,"crypto/kdfparams/dklen"));return ae!==32&&m("dklen",ae),c(C,N,w,ae,M)}}return id.throwArgumentError("unsupported key-derivation function","kdf",y)}function BB(f,o){const c=JSON.parse(f),l=Ty(c,o,Ly,hg.syncScrypt);return Yy(c,l)}function mB(f,o,c){return xB(this,void 0,void 0,function*(){const l=JSON.parse(f),b=yield Ty(l,o,wB,hg.scrypt,c);return Yy(l,b)})}function QB(f,o,c,l){try{if(Gi(f.address)!==Is(f.privateKey))throw new Error("address/privateKey mismatch");if(rp(f)){const xe=f.mnemonic;if(hi.fromMnemonic(xe.phrase,null,xe.locale).derivePath(xe.path||Ff).privateKey!=f.privateKey)throw new Error("mnemonic mismatch")}}catch(xe){return Promise.reject(xe)}typeof c=="function"&&!l&&(l=c,c={}),c||(c={});const b=Nt(f.privateKey),C=lg(o);let y=null,m=null,N=null;if(rp(f)){const xe=f.mnemonic;y=Nt(Ky(xe.phrase,xe.locale||"en")),m=xe.path||Ff,N=xe.locale||"en"}let M=c.client;M||(M="ethers.js");let U=null;c.salt?U=Nt(c.salt):U=uf(32);let w=null;if(c.iv){if(w=Nt(c.iv),w.length!==16)throw new Error("invalid iv")}else w=uf(16);let ae=null;if(c.uuid){if(ae=Nt(c.uuid),ae.length!==16)throw new Error("invalid uuid")}else ae=uf(16);let Ee=1<<17,pe=8,V=1;return c.scrypt&&(c.scrypt.N&&(Ee=c.scrypt.N),c.scrypt.r&&(pe=c.scrypt.r),c.scrypt.p&&(V=c.scrypt.p)),hg.scrypt(C,U,Ee,pe,V,64,l).then(xe=>{xe=Nt(xe);const Ie=xe.slice(0,16),_e=xe.slice(16,32),ie=xe.slice(32,64),n0=new sa.Counter(w),le=new sa.ModeOfOperation.ctr(Ie,n0),Ne=Nt(le.encrypt(b)),ye=BA(So([_e,Ne])),Xe={address:f.address.substring(2).toLowerCase(),id:yB(ae),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:or(w).substring(2)},ciphertext:or(Ne).substring(2),kdf:"scrypt",kdfparams:{salt:or(U).substring(2),n:Ee,dklen:32,p:V,r:pe},mac:ye.substring(2)}};if(y){const re=uf(16),a0=new sa.Counter(re),Qe=new sa.ModeOfOperation.ctr(ie,a0),L=Nt(Qe.encrypt(y)),G=new Date,S=G.getUTCFullYear()+"-"+of(G.getUTCMonth()+1,2)+"-"+of(G.getUTCDate(),2)+"T"+of(G.getUTCHours(),2)+"-"+of(G.getUTCMinutes(),2)+"-"+of(G.getUTCSeconds(),2)+".0Z";Xe["x-ethers"]={client:M,gethFilename:"UTC--"+S+"--"+Xe.address,mnemonicCounter:or(re).substring(2),mnemonicCiphertext:or(L).substring(2),path:m,locale:N,version:"0.1"}}return JSON.stringify(Xe)})}function SB(f,o,c){if(Ry(f)){c&&c(0);const l=Uy(f,o);return c&&c(1),Promise.resolve(l)}return Gy(f)?mB(f,o,c):Promise.reject(new Error("invalid JSON wallet"))}function DB(f,o){if(Ry(f))return Uy(f,o);if(Gy(f))return BB(f,o);throw new Error("invalid JSON wallet")}const kB="wallet/5.8.0";var np=function(f,o,c,l){function b(C){return C instanceof c?C:new c(function(y){y(C)})}return new(c||(c=Promise))(function(C,y){function m(U){try{M(l.next(U))}catch(w){y(w)}}function N(U){try{M(l.throw(U))}catch(w){y(w)}}function M(U){U.done?C(U.value):b(U.value).then(m,N)}M((l=l.apply(f,o||[])).next())})};const ns=new zt(kB);function MB(f){return f!=null&&mA(f.privateKey,32)&&f.address!=null}function NB(f){const o=f.mnemonic;return o&&o.phrase}class a2 extends Ag{constructor(o,c){if(super(),MB(o)){const l=new Cs(o.privateKey);if(lr(this,"_signingKey",()=>l),lr(this,"address",Is(this.publicKey)),this.address!==Gi(o.address)&&ns.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),NB(o)){const b=o.mnemonic;lr(this,"_mnemonic",()=>({phrase:b.phrase,path:b.path||Ff,locale:b.locale||"en"}));const C=this.mnemonic,y=hi.fromMnemonic(C.phrase,null,C.locale).derivePath(C.path);Is(y.privateKey)!==this.address&&ns.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else lr(this,"_mnemonic",()=>null)}else{if(Cs.isSigningKey(o))o.curve!=="secp256k1"&&ns.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 Cs(o);lr(this,"_signingKey",()=>l)}lr(this,"_mnemonic",()=>null),lr(this,"address",Is(this.publicKey))}c&&!ng.isProvider(c)&&ns.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 a2(this,o)}signTransaction(o){return as(o).then(c=>{c.from!=null&&(Gi(c.from)!==this.address&&ns.throwArgumentError("transaction from address mismatch","transaction.from",o.from),delete c.from);const l=this._signingKey().signDigest(BA(V8(c)));return V8(c,l)})}signMessage(o){return np(this,void 0,void 0,function*(){return ed(this._signingKey().signDigest(xw(o)))})}_signTypedData(o,c,l){return np(this,void 0,void 0,function*(){const b=yield VA.resolveNames(o,c,l,C=>(this.provider==null&&ns.throwError("cannot resolve ENS names without a provider",zt.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:C}),this.provider.resolveName(C)));return ed(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={}),QB(this,o,c,l)}static createRandom(o){let c=uf(16);o||(o={}),o.extraEntropy&&(c=Nt(Df(BA(So([c,o.extraEntropy])),0,16)));const l=ug(c,o.locale);return a2.fromMnemonic(l,o.path,o.locale)}static fromEncryptedJson(o,c,l){return SB(o,c,l).then(b=>new a2(b))}static fromEncryptedJsonSync(o,c){return new a2(DB(o,c))}static fromMnemonic(o,c,l){return c||(c=Ff),new a2(hi.fromMnemonic(o,null,l).derivePath(c))}}var ch={};const FB="6.6.1",PB={version:FB};var uh={},a1={exports:{}},KB=a1.exports,Ap;function Ja(){return Ap||(Ap=1,function(f){(function(o,c){function l(Qe,L){if(!Qe)throw new Error(L||"Assertion failed")}function b(Qe,L){Qe.super_=L;var G=function(){};G.prototype=L.prototype,Qe.prototype=new G,Qe.prototype.constructor=Qe}function C(Qe,L,G){if(C.isBN(Qe))return Qe;this.negative=0,this.words=null,this.length=0,this.red=null,Qe!==null&&((L==="le"||L==="be")&&(G=L,L=10),this._init(Qe||0,L||10,G||"be"))}typeof o=="object"?o.exports=C:c.BN=C,C.BN=C,C.wordSize=26;var y;try{typeof window<"u"&&typeof window.Buffer<"u"?y=window.Buffer:y=Pa.Buffer}catch{}C.isBN=function(L){return L instanceof C?!0:L!==null&&typeof L=="object"&&L.constructor.wordSize===C.wordSize&&Array.isArray(L.words)},C.max=function(L,G){return L.cmp(G)>0?L:G},C.min=function(L,G){return L.cmp(G)<0?L:G},C.prototype._init=function(L,G,S){if(typeof L=="number")return this._initNumber(L,G,S);if(typeof L=="object")return this._initArray(L,G,S);G==="hex"&&(G=16),l(G===(G|0)&&G>=2&&G<=36),L=L.toString().replace(/\s+/g,"");var J=0;L[0]==="-"&&(J++,this.negative=1),J<L.length&&(G===16?this._parseHex(L,J,S):(this._parseBase(L,G,J),S==="le"&&this._initArray(this.toArray(),G,S)))},C.prototype._initNumber=function(L,G,S){L<0&&(this.negative=1,L=-L),L<67108864?(this.words=[L&67108863],this.length=1):L<4503599627370496?(this.words=[L&67108863,L/67108864&67108863],this.length=2):(l(L<9007199254740992),this.words=[L&67108863,L/67108864&67108863,1],this.length=3),S==="le"&&this._initArray(this.toArray(),G,S)},C.prototype._initArray=function(L,G,S){if(l(typeof L.length=="number"),L.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(L.length/3),this.words=new Array(this.length);for(var J=0;J<this.length;J++)this.words[J]=0;var W,fe,he=0;if(S==="be")for(J=L.length-1,W=0;J>=0;J-=3)fe=L[J]|L[J-1]<<8|L[J-2]<<16,this.words[W]|=fe<<he&67108863,this.words[W+1]=fe>>>26-he&67108863,he+=24,he>=26&&(he-=26,W++);else if(S==="le")for(J=0,W=0;J<L.length;J+=3)fe=L[J]|L[J+1]<<8|L[J+2]<<16,this.words[W]|=fe<<he&67108863,this.words[W+1]=fe>>>26-he&67108863,he+=24,he>=26&&(he-=26,W++);return this.strip()};function m(Qe,L){var G=Qe.charCodeAt(L);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function N(Qe,L,G){var S=m(Qe,G);return G-1>=L&&(S|=m(Qe,G-1)<<4),S}C.prototype._parseHex=function(L,G,S){this.length=Math.ceil((L.length-G)/6),this.words=new Array(this.length);for(var J=0;J<this.length;J++)this.words[J]=0;var W=0,fe=0,he;if(S==="be")for(J=L.length-1;J>=G;J-=2)he=N(L,G,J)<<W,this.words[fe]|=he&67108863,W>=18?(W-=18,fe+=1,this.words[fe]|=he>>>26):W+=8;else{var Ce=L.length-G;for(J=Ce%2===0?G+1:G;J<L.length;J+=2)he=N(L,G,J)<<W,this.words[fe]|=he&67108863,W>=18?(W-=18,fe+=1,this.words[fe]|=he>>>26):W+=8}this.strip()};function M(Qe,L,G,S){for(var J=0,W=Math.min(Qe.length,G),fe=L;fe<W;fe++){var he=Qe.charCodeAt(fe)-48;J*=S,he>=49?J+=he-49+10:he>=17?J+=he-17+10:J+=he}return J}C.prototype._parseBase=function(L,G,S){this.words=[0],this.length=1;for(var J=0,W=1;W<=67108863;W*=G)J++;J--,W=W/G|0;for(var fe=L.length-S,he=fe%J,Ce=Math.min(fe,fe-he)+S,j=0,Y=S;Y<Ce;Y+=J)j=M(L,Y,Y+J,G),this.imuln(W),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j);if(he!==0){var z=1;for(j=M(L,Y,L.length,G),Y=0;Y<he;Y++)z*=G;this.imuln(z),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j)}this.strip()},C.prototype.copy=function(L){L.words=new Array(this.length);for(var G=0;G<this.length;G++)L.words[G]=this.words[G];L.length=this.length,L.negative=this.negative,L.red=this.red},C.prototype.clone=function(){var L=new C(null);return this.copy(L),L},C.prototype._expand=function(L){for(;this.length<L;)this.words[this.length++]=0;return this},C.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var U=["","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],ae=[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];C.prototype.toString=function(L,G){L=L||10,G=G|0||1;var S;if(L===16||L==="hex"){S="";for(var J=0,W=0,fe=0;fe<this.length;fe++){var he=this.words[fe],Ce=((he<<J|W)&16777215).toString(16);W=he>>>24-J&16777215,J+=2,J>=26&&(J-=26,fe--),W!==0||fe!==this.length-1?S=U[6-Ce.length]+Ce+S:S=Ce+S}for(W!==0&&(S=W.toString(16)+S);S.length%G!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(L===(L|0)&&L>=2&&L<=36){var j=w[L],Y=ae[L];S="";var z=this.clone();for(z.negative=0;!z.isZero();){var me=z.modn(Y).toString(L);z=z.idivn(Y),z.isZero()?S=me+S:S=U[j-me.length]+me+S}for(this.isZero()&&(S="0"+S);S.length%G!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}l(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=this.words[1]*67108864:this.length===3&&this.words[2]===1?L+=4503599627370496+this.words[1]*67108864:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(L,G){return l(typeof y<"u"),this.toArrayLike(y,L,G)},C.prototype.toArray=function(L,G){return this.toArrayLike(Array,L,G)},C.prototype.toArrayLike=function(L,G,S){var J=this.byteLength(),W=S||Math.max(1,J);l(J<=W,"byte array longer than desired length"),l(W>0,"Requested array length <= 0"),this.strip();var fe=G==="le",he=new L(W),Ce,j,Y=this.clone();if(fe){for(j=0;!Y.isZero();j++)Ce=Y.andln(255),Y.iushrn(8),he[j]=Ce;for(;j<W;j++)he[j]=0}else{for(j=0;j<W-J;j++)he[j]=0;for(j=0;!Y.isZero();j++)Ce=Y.andln(255),Y.iushrn(8),he[W-j-1]=Ce}return he},Math.clz32?C.prototype._countBits=function(L){return 32-Math.clz32(L)}:C.prototype._countBits=function(L){var G=L,S=0;return G>=4096&&(S+=13,G>>>=13),G>=64&&(S+=7,G>>>=7),G>=8&&(S+=4,G>>>=4),G>=2&&(S+=2,G>>>=2),S+G},C.prototype._zeroBits=function(L){if(L===0)return 26;var G=L,S=0;return(G&8191)===0&&(S+=13,G>>>=13),(G&127)===0&&(S+=7,G>>>=7),(G&15)===0&&(S+=4,G>>>=4),(G&3)===0&&(S+=2,G>>>=2),(G&1)===0&&S++,S},C.prototype.bitLength=function(){var L=this.words[this.length-1],G=this._countBits(L);return(this.length-1)*26+G};function Ee(Qe){for(var L=new Array(Qe.bitLength()),G=0;G<L.length;G++){var S=G/26|0,J=G%26;L[G]=(Qe.words[S]&1<<J)>>>J}return L}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,G=0;G<this.length;G++){var S=this._zeroBits(this.words[G]);if(L+=S,S!==26)break}return L},C.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},C.prototype.toTwos=function(L){return this.negative!==0?this.abs().inotn(L).iaddn(1):this.clone()},C.prototype.fromTwos=function(L){return this.testn(L-1)?this.notn(L).iaddn(1).ineg():this.clone()},C.prototype.isNeg=function(){return this.negative!==0},C.prototype.neg=function(){return this.clone().ineg()},C.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},C.prototype.iuor=function(L){for(;this.length<L.length;)this.words[this.length++]=0;for(var G=0;G<L.length;G++)this.words[G]=this.words[G]|L.words[G];return this.strip()},C.prototype.ior=function(L){return l((this.negative|L.negative)===0),this.iuor(L)},C.prototype.or=function(L){return this.length>L.length?this.clone().ior(L):L.clone().ior(this)},C.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},C.prototype.iuand=function(L){var G;this.length>L.length?G=L:G=this;for(var S=0;S<G.length;S++)this.words[S]=this.words[S]&L.words[S];return this.length=G.length,this.strip()},C.prototype.iand=function(L){return l((this.negative|L.negative)===0),this.iuand(L)},C.prototype.and=function(L){return this.length>L.length?this.clone().iand(L):L.clone().iand(this)},C.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},C.prototype.iuxor=function(L){var G,S;this.length>L.length?(G=this,S=L):(G=L,S=this);for(var J=0;J<S.length;J++)this.words[J]=G.words[J]^S.words[J];if(this!==G)for(;J<G.length;J++)this.words[J]=G.words[J];return this.length=G.length,this.strip()},C.prototype.ixor=function(L){return l((this.negative|L.negative)===0),this.iuxor(L)},C.prototype.xor=function(L){return this.length>L.length?this.clone().ixor(L):L.clone().ixor(this)},C.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},C.prototype.inotn=function(L){l(typeof L=="number"&&L>=0);var G=Math.ceil(L/26)|0,S=L%26;this._expand(G),S>0&&G--;for(var J=0;J<G;J++)this.words[J]=~this.words[J]&67108863;return S>0&&(this.words[J]=~this.words[J]&67108863>>26-S),this.strip()},C.prototype.notn=function(L){return this.clone().inotn(L)},C.prototype.setn=function(L,G){l(typeof L=="number"&&L>=0);var S=L/26|0,J=L%26;return this._expand(S+1),G?this.words[S]=this.words[S]|1<<J:this.words[S]=this.words[S]&~(1<<J),this.strip()},C.prototype.iadd=function(L){var G;if(this.negative!==0&&L.negative===0)return this.negative=0,G=this.isub(L),this.negative^=1,this._normSign();if(this.negative===0&&L.negative!==0)return L.negative=0,G=this.isub(L),L.negative=1,G._normSign();var S,J;this.length>L.length?(S=this,J=L):(S=L,J=this);for(var W=0,fe=0;fe<J.length;fe++)G=(S.words[fe]|0)+(J.words[fe]|0)+W,this.words[fe]=G&67108863,W=G>>>26;for(;W!==0&&fe<S.length;fe++)G=(S.words[fe]|0)+W,this.words[fe]=G&67108863,W=G>>>26;if(this.length=S.length,W!==0)this.words[this.length]=W,this.length++;else if(S!==this)for(;fe<S.length;fe++)this.words[fe]=S.words[fe];return this},C.prototype.add=function(L){var G;return L.negative!==0&&this.negative===0?(L.negative=0,G=this.sub(L),L.negative^=1,G):L.negative===0&&this.negative!==0?(this.negative=0,G=L.sub(this),this.negative=1,G):this.length>L.length?this.clone().iadd(L):L.clone().iadd(this)},C.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var G=this.iadd(L);return L.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var S=this.cmp(L);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,W;S>0?(J=this,W=L):(J=L,W=this);for(var fe=0,he=0;he<W.length;he++)G=(J.words[he]|0)-(W.words[he]|0)+fe,fe=G>>26,this.words[he]=G&67108863;for(;fe!==0&&he<J.length;he++)G=(J.words[he]|0)+fe,fe=G>>26,this.words[he]=G&67108863;if(fe===0&&he<J.length&&J!==this)for(;he<J.length;he++)this.words[he]=J.words[he];return this.length=Math.max(this.length,he),J!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(L){return this.clone().isub(L)};function pe(Qe,L,G){G.negative=L.negative^Qe.negative;var S=Qe.length+L.length|0;G.length=S,S=S-1|0;var J=Qe.words[0]|0,W=L.words[0]|0,fe=J*W,he=fe&67108863,Ce=fe/67108864|0;G.words[0]=he;for(var j=1;j<S;j++){for(var Y=Ce>>>26,z=Ce&67108863,me=Math.min(j,L.length-1),ze=Math.max(0,j-Qe.length+1);ze<=me;ze++){var se=j-ze|0;J=Qe.words[se]|0,W=L.words[ze]|0,fe=J*W+z,Y+=fe/67108864|0,z=fe&67108863}G.words[j]=z|0,Ce=Y|0}return Ce!==0?G.words[j]=Ce|0:G.length--,G.strip()}var V=function(L,G,S){var J=L.words,W=G.words,fe=S.words,he=0,Ce,j,Y,z=J[0]|0,me=z&8191,ze=z>>>13,se=J[1]|0,Ve=se&8191,h0=se>>>13,y0=J[2]|0,C0=y0&8191,q0=y0>>>13,rt=J[3]|0,V0=rt&8191,$e=rt>>>13,gt=J[4]|0,Ue=gt&8191,t0=gt>>>13,s0=J[5]|0,ne=s0&8191,w0=s0>>>13,H0=J[6]|0,N0=H0&8191,ot=H0>>>13,W0=J[7]|0,X0=W0&8191,vt=W0>>>13,er=J[8]|0,Yt=er&8191,yr=er>>>13,xr=J[9]|0,Lt=xr&8191,hr=xr>>>13,kr=W[0]|0,qt=kr&8191,Er=kr>>>13,Mr=W[1]|0,Jt=Mr&8191,Qr=Mr>>>13,Sr=W[2]|0,$t=Sr&8191,Dr=Sr>>>13,Cr=W[3]|0,Ht=Cr&8191,br=Cr>>>13,dr=W[4]|0,jt=dr&8191,Fr=dr>>>13,Pr=W[5]|0,Vt=Pr&8191,_r=Pr>>>13,vr=W[6]|0,Ot=vr&8191,Ir=vr>>>13,Kr=W[7]|0,Xt=Kr&8191,o0=Kr>>>13,wr=W[8]|0,Ye=wr&8191,r0=wr>>>13,u0=W[9]|0,d0=u0&8191,E0=u0>>>13;S.negative=L.negative^G.negative,S.length=19,Ce=Math.imul(me,qt),j=Math.imul(me,Er),j=j+Math.imul(ze,qt)|0,Y=Math.imul(ze,Er);var P0=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(P0>>>26)|0,P0&=67108863,Ce=Math.imul(Ve,qt),j=Math.imul(Ve,Er),j=j+Math.imul(h0,qt)|0,Y=Math.imul(h0,Er),Ce=Ce+Math.imul(me,Jt)|0,j=j+Math.imul(me,Qr)|0,j=j+Math.imul(ze,Jt)|0,Y=Y+Math.imul(ze,Qr)|0;var G0=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(G0>>>26)|0,G0&=67108863,Ce=Math.imul(C0,qt),j=Math.imul(C0,Er),j=j+Math.imul(q0,qt)|0,Y=Math.imul(q0,Er),Ce=Ce+Math.imul(Ve,Jt)|0,j=j+Math.imul(Ve,Qr)|0,j=j+Math.imul(h0,Jt)|0,Y=Y+Math.imul(h0,Qr)|0,Ce=Ce+Math.imul(me,$t)|0,j=j+Math.imul(me,Dr)|0,j=j+Math.imul(ze,$t)|0,Y=Y+Math.imul(ze,Dr)|0;var it=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(it>>>26)|0,it&=67108863,Ce=Math.imul(V0,qt),j=Math.imul(V0,Er),j=j+Math.imul($e,qt)|0,Y=Math.imul($e,Er),Ce=Ce+Math.imul(C0,Jt)|0,j=j+Math.imul(C0,Qr)|0,j=j+Math.imul(q0,Jt)|0,Y=Y+Math.imul(q0,Qr)|0,Ce=Ce+Math.imul(Ve,$t)|0,j=j+Math.imul(Ve,Dr)|0,j=j+Math.imul(h0,$t)|0,Y=Y+Math.imul(h0,Dr)|0,Ce=Ce+Math.imul(me,Ht)|0,j=j+Math.imul(me,br)|0,j=j+Math.imul(ze,Ht)|0,Y=Y+Math.imul(ze,br)|0;var Et=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(Et>>>26)|0,Et&=67108863,Ce=Math.imul(Ue,qt),j=Math.imul(Ue,Er),j=j+Math.imul(t0,qt)|0,Y=Math.imul(t0,Er),Ce=Ce+Math.imul(V0,Jt)|0,j=j+Math.imul(V0,Qr)|0,j=j+Math.imul($e,Jt)|0,Y=Y+Math.imul($e,Qr)|0,Ce=Ce+Math.imul(C0,$t)|0,j=j+Math.imul(C0,Dr)|0,j=j+Math.imul(q0,$t)|0,Y=Y+Math.imul(q0,Dr)|0,Ce=Ce+Math.imul(Ve,Ht)|0,j=j+Math.imul(Ve,br)|0,j=j+Math.imul(h0,Ht)|0,Y=Y+Math.imul(h0,br)|0,Ce=Ce+Math.imul(me,jt)|0,j=j+Math.imul(me,Fr)|0,j=j+Math.imul(ze,jt)|0,Y=Y+Math.imul(ze,Fr)|0;var wt=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(wt>>>26)|0,wt&=67108863,Ce=Math.imul(ne,qt),j=Math.imul(ne,Er),j=j+Math.imul(w0,qt)|0,Y=Math.imul(w0,Er),Ce=Ce+Math.imul(Ue,Jt)|0,j=j+Math.imul(Ue,Qr)|0,j=j+Math.imul(t0,Jt)|0,Y=Y+Math.imul(t0,Qr)|0,Ce=Ce+Math.imul(V0,$t)|0,j=j+Math.imul(V0,Dr)|0,j=j+Math.imul($e,$t)|0,Y=Y+Math.imul($e,Dr)|0,Ce=Ce+Math.imul(C0,Ht)|0,j=j+Math.imul(C0,br)|0,j=j+Math.imul(q0,Ht)|0,Y=Y+Math.imul(q0,br)|0,Ce=Ce+Math.imul(Ve,jt)|0,j=j+Math.imul(Ve,Fr)|0,j=j+Math.imul(h0,jt)|0,Y=Y+Math.imul(h0,Fr)|0,Ce=Ce+Math.imul(me,Vt)|0,j=j+Math.imul(me,_r)|0,j=j+Math.imul(ze,Vt)|0,Y=Y+Math.imul(ze,_r)|0;var I=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(I>>>26)|0,I&=67108863,Ce=Math.imul(N0,qt),j=Math.imul(N0,Er),j=j+Math.imul(ot,qt)|0,Y=Math.imul(ot,Er),Ce=Ce+Math.imul(ne,Jt)|0,j=j+Math.imul(ne,Qr)|0,j=j+Math.imul(w0,Jt)|0,Y=Y+Math.imul(w0,Qr)|0,Ce=Ce+Math.imul(Ue,$t)|0,j=j+Math.imul(Ue,Dr)|0,j=j+Math.imul(t0,$t)|0,Y=Y+Math.imul(t0,Dr)|0,Ce=Ce+Math.imul(V0,Ht)|0,j=j+Math.imul(V0,br)|0,j=j+Math.imul($e,Ht)|0,Y=Y+Math.imul($e,br)|0,Ce=Ce+Math.imul(C0,jt)|0,j=j+Math.imul(C0,Fr)|0,j=j+Math.imul(q0,jt)|0,Y=Y+Math.imul(q0,Fr)|0,Ce=Ce+Math.imul(Ve,Vt)|0,j=j+Math.imul(Ve,_r)|0,j=j+Math.imul(h0,Vt)|0,Y=Y+Math.imul(h0,_r)|0,Ce=Ce+Math.imul(me,Ot)|0,j=j+Math.imul(me,Ir)|0,j=j+Math.imul(ze,Ot)|0,Y=Y+Math.imul(ze,Ir)|0;var e=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(e>>>26)|0,e&=67108863,Ce=Math.imul(X0,qt),j=Math.imul(X0,Er),j=j+Math.imul(vt,qt)|0,Y=Math.imul(vt,Er),Ce=Ce+Math.imul(N0,Jt)|0,j=j+Math.imul(N0,Qr)|0,j=j+Math.imul(ot,Jt)|0,Y=Y+Math.imul(ot,Qr)|0,Ce=Ce+Math.imul(ne,$t)|0,j=j+Math.imul(ne,Dr)|0,j=j+Math.imul(w0,$t)|0,Y=Y+Math.imul(w0,Dr)|0,Ce=Ce+Math.imul(Ue,Ht)|0,j=j+Math.imul(Ue,br)|0,j=j+Math.imul(t0,Ht)|0,Y=Y+Math.imul(t0,br)|0,Ce=Ce+Math.imul(V0,jt)|0,j=j+Math.imul(V0,Fr)|0,j=j+Math.imul($e,jt)|0,Y=Y+Math.imul($e,Fr)|0,Ce=Ce+Math.imul(C0,Vt)|0,j=j+Math.imul(C0,_r)|0,j=j+Math.imul(q0,Vt)|0,Y=Y+Math.imul(q0,_r)|0,Ce=Ce+Math.imul(Ve,Ot)|0,j=j+Math.imul(Ve,Ir)|0,j=j+Math.imul(h0,Ot)|0,Y=Y+Math.imul(h0,Ir)|0,Ce=Ce+Math.imul(me,Xt)|0,j=j+Math.imul(me,o0)|0,j=j+Math.imul(ze,Xt)|0,Y=Y+Math.imul(ze,o0)|0;var s=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(s>>>26)|0,s&=67108863,Ce=Math.imul(Yt,qt),j=Math.imul(Yt,Er),j=j+Math.imul(yr,qt)|0,Y=Math.imul(yr,Er),Ce=Ce+Math.imul(X0,Jt)|0,j=j+Math.imul(X0,Qr)|0,j=j+Math.imul(vt,Jt)|0,Y=Y+Math.imul(vt,Qr)|0,Ce=Ce+Math.imul(N0,$t)|0,j=j+Math.imul(N0,Dr)|0,j=j+Math.imul(ot,$t)|0,Y=Y+Math.imul(ot,Dr)|0,Ce=Ce+Math.imul(ne,Ht)|0,j=j+Math.imul(ne,br)|0,j=j+Math.imul(w0,Ht)|0,Y=Y+Math.imul(w0,br)|0,Ce=Ce+Math.imul(Ue,jt)|0,j=j+Math.imul(Ue,Fr)|0,j=j+Math.imul(t0,jt)|0,Y=Y+Math.imul(t0,Fr)|0,Ce=Ce+Math.imul(V0,Vt)|0,j=j+Math.imul(V0,_r)|0,j=j+Math.imul($e,Vt)|0,Y=Y+Math.imul($e,_r)|0,Ce=Ce+Math.imul(C0,Ot)|0,j=j+Math.imul(C0,Ir)|0,j=j+Math.imul(q0,Ot)|0,Y=Y+Math.imul(q0,Ir)|0,Ce=Ce+Math.imul(Ve,Xt)|0,j=j+Math.imul(Ve,o0)|0,j=j+Math.imul(h0,Xt)|0,Y=Y+Math.imul(h0,o0)|0,Ce=Ce+Math.imul(me,Ye)|0,j=j+Math.imul(me,r0)|0,j=j+Math.imul(ze,Ye)|0,Y=Y+Math.imul(ze,r0)|0;var nn=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(nn>>>26)|0,nn&=67108863,Ce=Math.imul(Lt,qt),j=Math.imul(Lt,Er),j=j+Math.imul(hr,qt)|0,Y=Math.imul(hr,Er),Ce=Ce+Math.imul(Yt,Jt)|0,j=j+Math.imul(Yt,Qr)|0,j=j+Math.imul(yr,Jt)|0,Y=Y+Math.imul(yr,Qr)|0,Ce=Ce+Math.imul(X0,$t)|0,j=j+Math.imul(X0,Dr)|0,j=j+Math.imul(vt,$t)|0,Y=Y+Math.imul(vt,Dr)|0,Ce=Ce+Math.imul(N0,Ht)|0,j=j+Math.imul(N0,br)|0,j=j+Math.imul(ot,Ht)|0,Y=Y+Math.imul(ot,br)|0,Ce=Ce+Math.imul(ne,jt)|0,j=j+Math.imul(ne,Fr)|0,j=j+Math.imul(w0,jt)|0,Y=Y+Math.imul(w0,Fr)|0,Ce=Ce+Math.imul(Ue,Vt)|0,j=j+Math.imul(Ue,_r)|0,j=j+Math.imul(t0,Vt)|0,Y=Y+Math.imul(t0,_r)|0,Ce=Ce+Math.imul(V0,Ot)|0,j=j+Math.imul(V0,Ir)|0,j=j+Math.imul($e,Ot)|0,Y=Y+Math.imul($e,Ir)|0,Ce=Ce+Math.imul(C0,Xt)|0,j=j+Math.imul(C0,o0)|0,j=j+Math.imul(q0,Xt)|0,Y=Y+Math.imul(q0,o0)|0,Ce=Ce+Math.imul(Ve,Ye)|0,j=j+Math.imul(Ve,r0)|0,j=j+Math.imul(h0,Ye)|0,Y=Y+Math.imul(h0,r0)|0,Ce=Ce+Math.imul(me,d0)|0,j=j+Math.imul(me,E0)|0,j=j+Math.imul(ze,d0)|0,Y=Y+Math.imul(ze,E0)|0;var dt=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(dt>>>26)|0,dt&=67108863,Ce=Math.imul(Lt,Jt),j=Math.imul(Lt,Qr),j=j+Math.imul(hr,Jt)|0,Y=Math.imul(hr,Qr),Ce=Ce+Math.imul(Yt,$t)|0,j=j+Math.imul(Yt,Dr)|0,j=j+Math.imul(yr,$t)|0,Y=Y+Math.imul(yr,Dr)|0,Ce=Ce+Math.imul(X0,Ht)|0,j=j+Math.imul(X0,br)|0,j=j+Math.imul(vt,Ht)|0,Y=Y+Math.imul(vt,br)|0,Ce=Ce+Math.imul(N0,jt)|0,j=j+Math.imul(N0,Fr)|0,j=j+Math.imul(ot,jt)|0,Y=Y+Math.imul(ot,Fr)|0,Ce=Ce+Math.imul(ne,Vt)|0,j=j+Math.imul(ne,_r)|0,j=j+Math.imul(w0,Vt)|0,Y=Y+Math.imul(w0,_r)|0,Ce=Ce+Math.imul(Ue,Ot)|0,j=j+Math.imul(Ue,Ir)|0,j=j+Math.imul(t0,Ot)|0,Y=Y+Math.imul(t0,Ir)|0,Ce=Ce+Math.imul(V0,Xt)|0,j=j+Math.imul(V0,o0)|0,j=j+Math.imul($e,Xt)|0,Y=Y+Math.imul($e,o0)|0,Ce=Ce+Math.imul(C0,Ye)|0,j=j+Math.imul(C0,r0)|0,j=j+Math.imul(q0,Ye)|0,Y=Y+Math.imul(q0,r0)|0,Ce=Ce+Math.imul(Ve,d0)|0,j=j+Math.imul(Ve,E0)|0,j=j+Math.imul(h0,d0)|0,Y=Y+Math.imul(h0,E0)|0;var An=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(An>>>26)|0,An&=67108863,Ce=Math.imul(Lt,$t),j=Math.imul(Lt,Dr),j=j+Math.imul(hr,$t)|0,Y=Math.imul(hr,Dr),Ce=Ce+Math.imul(Yt,Ht)|0,j=j+Math.imul(Yt,br)|0,j=j+Math.imul(yr,Ht)|0,Y=Y+Math.imul(yr,br)|0,Ce=Ce+Math.imul(X0,jt)|0,j=j+Math.imul(X0,Fr)|0,j=j+Math.imul(vt,jt)|0,Y=Y+Math.imul(vt,Fr)|0,Ce=Ce+Math.imul(N0,Vt)|0,j=j+Math.imul(N0,_r)|0,j=j+Math.imul(ot,Vt)|0,Y=Y+Math.imul(ot,_r)|0,Ce=Ce+Math.imul(ne,Ot)|0,j=j+Math.imul(ne,Ir)|0,j=j+Math.imul(w0,Ot)|0,Y=Y+Math.imul(w0,Ir)|0,Ce=Ce+Math.imul(Ue,Xt)|0,j=j+Math.imul(Ue,o0)|0,j=j+Math.imul(t0,Xt)|0,Y=Y+Math.imul(t0,o0)|0,Ce=Ce+Math.imul(V0,Ye)|0,j=j+Math.imul(V0,r0)|0,j=j+Math.imul($e,Ye)|0,Y=Y+Math.imul($e,r0)|0,Ce=Ce+Math.imul(C0,d0)|0,j=j+Math.imul(C0,E0)|0,j=j+Math.imul(q0,d0)|0,Y=Y+Math.imul(q0,E0)|0;var In=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(In>>>26)|0,In&=67108863,Ce=Math.imul(Lt,Ht),j=Math.imul(Lt,br),j=j+Math.imul(hr,Ht)|0,Y=Math.imul(hr,br),Ce=Ce+Math.imul(Yt,jt)|0,j=j+Math.imul(Yt,Fr)|0,j=j+Math.imul(yr,jt)|0,Y=Y+Math.imul(yr,Fr)|0,Ce=Ce+Math.imul(X0,Vt)|0,j=j+Math.imul(X0,_r)|0,j=j+Math.imul(vt,Vt)|0,Y=Y+Math.imul(vt,_r)|0,Ce=Ce+Math.imul(N0,Ot)|0,j=j+Math.imul(N0,Ir)|0,j=j+Math.imul(ot,Ot)|0,Y=Y+Math.imul(ot,Ir)|0,Ce=Ce+Math.imul(ne,Xt)|0,j=j+Math.imul(ne,o0)|0,j=j+Math.imul(w0,Xt)|0,Y=Y+Math.imul(w0,o0)|0,Ce=Ce+Math.imul(Ue,Ye)|0,j=j+Math.imul(Ue,r0)|0,j=j+Math.imul(t0,Ye)|0,Y=Y+Math.imul(t0,r0)|0,Ce=Ce+Math.imul(V0,d0)|0,j=j+Math.imul(V0,E0)|0,j=j+Math.imul($e,d0)|0,Y=Y+Math.imul($e,E0)|0;var Pn=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,Ce=Math.imul(Lt,jt),j=Math.imul(Lt,Fr),j=j+Math.imul(hr,jt)|0,Y=Math.imul(hr,Fr),Ce=Ce+Math.imul(Yt,Vt)|0,j=j+Math.imul(Yt,_r)|0,j=j+Math.imul(yr,Vt)|0,Y=Y+Math.imul(yr,_r)|0,Ce=Ce+Math.imul(X0,Ot)|0,j=j+Math.imul(X0,Ir)|0,j=j+Math.imul(vt,Ot)|0,Y=Y+Math.imul(vt,Ir)|0,Ce=Ce+Math.imul(N0,Xt)|0,j=j+Math.imul(N0,o0)|0,j=j+Math.imul(ot,Xt)|0,Y=Y+Math.imul(ot,o0)|0,Ce=Ce+Math.imul(ne,Ye)|0,j=j+Math.imul(ne,r0)|0,j=j+Math.imul(w0,Ye)|0,Y=Y+Math.imul(w0,r0)|0,Ce=Ce+Math.imul(Ue,d0)|0,j=j+Math.imul(Ue,E0)|0,j=j+Math.imul(t0,d0)|0,Y=Y+Math.imul(t0,E0)|0;var Mn=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,Ce=Math.imul(Lt,Vt),j=Math.imul(Lt,_r),j=j+Math.imul(hr,Vt)|0,Y=Math.imul(hr,_r),Ce=Ce+Math.imul(Yt,Ot)|0,j=j+Math.imul(Yt,Ir)|0,j=j+Math.imul(yr,Ot)|0,Y=Y+Math.imul(yr,Ir)|0,Ce=Ce+Math.imul(X0,Xt)|0,j=j+Math.imul(X0,o0)|0,j=j+Math.imul(vt,Xt)|0,Y=Y+Math.imul(vt,o0)|0,Ce=Ce+Math.imul(N0,Ye)|0,j=j+Math.imul(N0,r0)|0,j=j+Math.imul(ot,Ye)|0,Y=Y+Math.imul(ot,r0)|0,Ce=Ce+Math.imul(ne,d0)|0,j=j+Math.imul(ne,E0)|0,j=j+Math.imul(w0,d0)|0,Y=Y+Math.imul(w0,E0)|0;var LA=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(LA>>>26)|0,LA&=67108863,Ce=Math.imul(Lt,Ot),j=Math.imul(Lt,Ir),j=j+Math.imul(hr,Ot)|0,Y=Math.imul(hr,Ir),Ce=Ce+Math.imul(Yt,Xt)|0,j=j+Math.imul(Yt,o0)|0,j=j+Math.imul(yr,Xt)|0,Y=Y+Math.imul(yr,o0)|0,Ce=Ce+Math.imul(X0,Ye)|0,j=j+Math.imul(X0,r0)|0,j=j+Math.imul(vt,Ye)|0,Y=Y+Math.imul(vt,r0)|0,Ce=Ce+Math.imul(N0,d0)|0,j=j+Math.imul(N0,E0)|0,j=j+Math.imul(ot,d0)|0,Y=Y+Math.imul(ot,E0)|0;var QA=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(QA>>>26)|0,QA&=67108863,Ce=Math.imul(Lt,Xt),j=Math.imul(Lt,o0),j=j+Math.imul(hr,Xt)|0,Y=Math.imul(hr,o0),Ce=Ce+Math.imul(Yt,Ye)|0,j=j+Math.imul(Yt,r0)|0,j=j+Math.imul(yr,Ye)|0,Y=Y+Math.imul(yr,r0)|0,Ce=Ce+Math.imul(X0,d0)|0,j=j+Math.imul(X0,E0)|0,j=j+Math.imul(vt,d0)|0,Y=Y+Math.imul(vt,E0)|0;var je=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(je>>>26)|0,je&=67108863,Ce=Math.imul(Lt,Ye),j=Math.imul(Lt,r0),j=j+Math.imul(hr,Ye)|0,Y=Math.imul(hr,r0),Ce=Ce+Math.imul(Yt,d0)|0,j=j+Math.imul(Yt,E0)|0,j=j+Math.imul(yr,d0)|0,Y=Y+Math.imul(yr,E0)|0;var B=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(B>>>26)|0,B&=67108863,Ce=Math.imul(Lt,d0),j=Math.imul(Lt,E0),j=j+Math.imul(hr,d0)|0,Y=Math.imul(hr,E0);var $n=(he+Ce|0)+((j&8191)<<13)|0;return he=(Y+(j>>>13)|0)+($n>>>26)|0,$n&=67108863,fe[0]=P0,fe[1]=G0,fe[2]=it,fe[3]=Et,fe[4]=wt,fe[5]=I,fe[6]=e,fe[7]=s,fe[8]=nn,fe[9]=dt,fe[10]=An,fe[11]=In,fe[12]=Pn,fe[13]=Mn,fe[14]=LA,fe[15]=QA,fe[16]=je,fe[17]=B,fe[18]=$n,he!==0&&(fe[19]=he,S.length++),S};Math.imul||(V=pe);function xe(Qe,L,G){G.negative=L.negative^Qe.negative,G.length=Qe.length+L.length;for(var S=0,J=0,W=0;W<G.length-1;W++){var fe=J;J=0;for(var he=S&67108863,Ce=Math.min(W,L.length-1),j=Math.max(0,W-Qe.length+1);j<=Ce;j++){var Y=W-j,z=Qe.words[Y]|0,me=L.words[j]|0,ze=z*me,se=ze&67108863;fe=fe+(ze/67108864|0)|0,se=se+he|0,he=se&67108863,fe=fe+(se>>>26)|0,J+=fe>>>26,fe&=67108863}G.words[W]=he,S=fe,fe=J}return S!==0?G.words[W]=S:G.length--,G.strip()}function Ie(Qe,L,G){var S=new _e;return S.mulp(Qe,L,G)}C.prototype.mulTo=function(L,G){var S,J=this.length+L.length;return this.length===10&&L.length===10?S=V(this,L,G):J<63?S=pe(this,L,G):J<1024?S=xe(this,L,G):S=Ie(this,L,G),S};function _e(Qe,L){this.x=Qe,this.y=L}_e.prototype.makeRBT=function(L){for(var G=new Array(L),S=C.prototype._countBits(L)-1,J=0;J<L;J++)G[J]=this.revBin(J,S,L);return G},_e.prototype.revBin=function(L,G,S){if(L===0||L===S-1)return L;for(var J=0,W=0;W<G;W++)J|=(L&1)<<G-W-1,L>>=1;return J},_e.prototype.permute=function(L,G,S,J,W,fe){for(var he=0;he<fe;he++)J[he]=G[L[he]],W[he]=S[L[he]]},_e.prototype.transform=function(L,G,S,J,W,fe){this.permute(fe,L,G,S,J,W);for(var he=1;he<W;he<<=1)for(var Ce=he<<1,j=Math.cos(2*Math.PI/Ce),Y=Math.sin(2*Math.PI/Ce),z=0;z<W;z+=Ce)for(var me=j,ze=Y,se=0;se<he;se++){var Ve=S[z+se],h0=J[z+se],y0=S[z+se+he],C0=J[z+se+he],q0=me*y0-ze*C0;C0=me*C0+ze*y0,y0=q0,S[z+se]=Ve+y0,J[z+se]=h0+C0,S[z+se+he]=Ve-y0,J[z+se+he]=h0-C0,se!==Ce&&(q0=j*me-Y*ze,ze=j*ze+Y*me,me=q0)}},_e.prototype.guessLen13b=function(L,G){var S=Math.max(G,L)|1,J=S&1,W=0;for(S=S/2|0;S;S=S>>>1)W++;return 1<<W+1+J},_e.prototype.conjugate=function(L,G,S){if(!(S<=1))for(var J=0;J<S/2;J++){var W=L[J];L[J]=L[S-J-1],L[S-J-1]=W,W=G[J],G[J]=-G[S-J-1],G[S-J-1]=-W}},_e.prototype.normalize13b=function(L,G){for(var S=0,J=0;J<G/2;J++){var W=Math.round(L[2*J+1]/G)*8192+Math.round(L[2*J]/G)+S;L[J]=W&67108863,W<67108864?S=0:S=W/67108864|0}return L},_e.prototype.convert13b=function(L,G,S,J){for(var W=0,fe=0;fe<G;fe++)W=W+(L[fe]|0),S[2*fe]=W&8191,W=W>>>13,S[2*fe+1]=W&8191,W=W>>>13;for(fe=2*G;fe<J;++fe)S[fe]=0;l(W===0),l((W&-8192)===0)},_e.prototype.stub=function(L){for(var G=new Array(L),S=0;S<L;S++)G[S]=0;return G},_e.prototype.mulp=function(L,G,S){var J=2*this.guessLen13b(L.length,G.length),W=this.makeRBT(J),fe=this.stub(J),he=new Array(J),Ce=new Array(J),j=new Array(J),Y=new Array(J),z=new Array(J),me=new Array(J),ze=S.words;ze.length=J,this.convert13b(L.words,L.length,he,J),this.convert13b(G.words,G.length,Y,J),this.transform(he,fe,Ce,j,J,W),this.transform(Y,fe,z,me,J,W);for(var se=0;se<J;se++){var Ve=Ce[se]*z[se]-j[se]*me[se];j[se]=Ce[se]*me[se]+j[se]*z[se],Ce[se]=Ve}return this.conjugate(Ce,j,J),this.transform(Ce,j,ze,fe,J,W),this.conjugate(ze,fe,J),this.normalize13b(ze,J),S.negative=L.negative^G.negative,S.length=L.length+G.length,S.strip()},C.prototype.mul=function(L){var G=new C(null);return G.words=new Array(this.length+L.length),this.mulTo(L,G)},C.prototype.mulf=function(L){var G=new C(null);return G.words=new Array(this.length+L.length),Ie(this,L,G)},C.prototype.imul=function(L){return this.clone().mulTo(L,this)},C.prototype.imuln=function(L){l(typeof L=="number"),l(L<67108864);for(var G=0,S=0;S<this.length;S++){var J=(this.words[S]|0)*L,W=(J&67108863)+(G&67108863);G>>=26,G+=J/67108864|0,G+=W>>>26,this.words[S]=W&67108863}return G!==0&&(this.words[S]=G,this.length++),this.length=L===0?1:this.length,this},C.prototype.muln=function(L){return this.clone().imuln(L)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(L){var G=Ee(L);if(G.length===0)return new C(1);for(var S=this,J=0;J<G.length&&G[J]===0;J++,S=S.sqr());if(++J<G.length)for(var W=S.sqr();J<G.length;J++,W=W.sqr())G[J]!==0&&(S=S.mul(W));return S},C.prototype.iushln=function(L){l(typeof L=="number"&&L>=0);var G=L%26,S=(L-G)/26,J=67108863>>>26-G<<26-G,W;if(G!==0){var fe=0;for(W=0;W<this.length;W++){var he=this.words[W]&J,Ce=(this.words[W]|0)-he<<G;this.words[W]=Ce|fe,fe=he>>>26-G}fe&&(this.words[W]=fe,this.length++)}if(S!==0){for(W=this.length-1;W>=0;W--)this.words[W+S]=this.words[W];for(W=0;W<S;W++)this.words[W]=0;this.length+=S}return this.strip()},C.prototype.ishln=function(L){return l(this.negative===0),this.iushln(L)},C.prototype.iushrn=function(L,G,S){l(typeof L=="number"&&L>=0);var J;G?J=(G-G%26)/26:J=0;var W=L%26,fe=Math.min((L-W)/26,this.length),he=67108863^67108863>>>W<<W,Ce=S;if(J-=fe,J=Math.max(0,J),Ce){for(var j=0;j<fe;j++)Ce.words[j]=this.words[j];Ce.length=fe}if(fe!==0)if(this.length>fe)for(this.length-=fe,j=0;j<this.length;j++)this.words[j]=this.words[j+fe];else this.words[0]=0,this.length=1;var Y=0;for(j=this.length-1;j>=0&&(Y!==0||j>=J);j--){var z=this.words[j]|0;this.words[j]=Y<<26-W|z>>>W,Y=z&he}return Ce&&Y!==0&&(Ce.words[Ce.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(L,G,S){return l(this.negative===0),this.iushrn(L,G,S)},C.prototype.shln=function(L){return this.clone().ishln(L)},C.prototype.ushln=function(L){return this.clone().iushln(L)},C.prototype.shrn=function(L){return this.clone().ishrn(L)},C.prototype.ushrn=function(L){return this.clone().iushrn(L)},C.prototype.testn=function(L){l(typeof L=="number"&&L>=0);var G=L%26,S=(L-G)/26,J=1<<G;if(this.length<=S)return!1;var W=this.words[S];return!!(W&J)},C.prototype.imaskn=function(L){l(typeof L=="number"&&L>=0);var G=L%26,S=(L-G)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(G!==0&&S++,this.length=Math.min(S,this.length),G!==0){var J=67108863^67108863>>>G<<G;this.words[this.length-1]&=J}return this.strip()},C.prototype.maskn=function(L){return this.clone().imaskn(L)},C.prototype.iaddn=function(L){return l(typeof L=="number"),l(L<67108864),L<0?this.isubn(-L):this.negative!==0?this.length===1&&(this.words[0]|0)<L?(this.words[0]=L-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(L),this.negative=1,this):this._iaddn(L)},C.prototype._iaddn=function(L){this.words[0]+=L;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},C.prototype.isubn=function(L){if(l(typeof L=="number"),l(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,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()},C.prototype.addn=function(L){return this.clone().iaddn(L)},C.prototype.subn=function(L){return this.clone().isubn(L)},C.prototype.iabs=function(){return this.negative=0,this},C.prototype.abs=function(){return this.clone().iabs()},C.prototype._ishlnsubmul=function(L,G,S){var J=L.length+S,W;this._expand(J);var fe,he=0;for(W=0;W<L.length;W++){fe=(this.words[W+S]|0)+he;var Ce=(L.words[W]|0)*G;fe-=Ce&67108863,he=(fe>>26)-(Ce/67108864|0),this.words[W+S]=fe&67108863}for(;W<this.length-S;W++)fe=(this.words[W+S]|0)+he,he=fe>>26,this.words[W+S]=fe&67108863;if(he===0)return this.strip();for(l(he===-1),he=0,W=0;W<this.length;W++)fe=-(this.words[W]|0)+he,he=fe>>26,this.words[W]=fe&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(L,G){var S=this.length-L.length,J=this.clone(),W=L,fe=W.words[W.length-1]|0,he=this._countBits(fe);S=26-he,S!==0&&(W=W.ushln(S),J.iushln(S),fe=W.words[W.length-1]|0);var Ce=J.length-W.length,j;if(G!=="mod"){j=new C(null),j.length=Ce+1,j.words=new Array(j.length);for(var Y=0;Y<j.length;Y++)j.words[Y]=0}var z=J.clone()._ishlnsubmul(W,1,Ce);z.negative===0&&(J=z,j&&(j.words[Ce]=1));for(var me=Ce-1;me>=0;me--){var ze=(J.words[W.length+me]|0)*67108864+(J.words[W.length+me-1]|0);for(ze=Math.min(ze/fe|0,67108863),J._ishlnsubmul(W,ze,me);J.negative!==0;)ze--,J.negative=0,J._ishlnsubmul(W,1,me),J.isZero()||(J.negative^=1);j&&(j.words[me]=ze)}return j&&j.strip(),J.strip(),G!=="div"&&S!==0&&J.iushrn(S),{div:j||null,mod:J}},C.prototype.divmod=function(L,G,S){if(l(!L.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var J,W,fe;return this.negative!==0&&L.negative===0?(fe=this.neg().divmod(L,G),G!=="mod"&&(J=fe.div.neg()),G!=="div"&&(W=fe.mod.neg(),S&&W.negative!==0&&W.iadd(L)),{div:J,mod:W}):this.negative===0&&L.negative!==0?(fe=this.divmod(L.neg(),G),G!=="mod"&&(J=fe.div.neg()),{div:J,mod:fe.mod}):(this.negative&L.negative)!==0?(fe=this.neg().divmod(L.neg(),G),G!=="div"&&(W=fe.mod.neg(),S&&W.negative!==0&&W.isub(L)),{div:fe.div,mod:W}):L.length>this.length||this.cmp(L)<0?{div:new C(0),mod:this}:L.length===1?G==="div"?{div:this.divn(L.words[0]),mod:null}:G==="mod"?{div:null,mod:new C(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new C(this.modn(L.words[0]))}:this._wordDiv(L,G)},C.prototype.div=function(L){return this.divmod(L,"div",!1).div},C.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},C.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},C.prototype.divRound=function(L){var G=this.divmod(L);if(G.mod.isZero())return G.div;var S=G.div.negative!==0?G.mod.isub(L):G.mod,J=L.ushrn(1),W=L.andln(1),fe=S.cmp(J);return fe<0||W===1&&fe===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},C.prototype.modn=function(L){l(L<=67108863);for(var G=(1<<26)%L,S=0,J=this.length-1;J>=0;J--)S=(G*S+(this.words[J]|0))%L;return S},C.prototype.idivn=function(L){l(L<=67108863);for(var G=0,S=this.length-1;S>=0;S--){var J=(this.words[S]|0)+G*67108864;this.words[S]=J/L|0,G=J%L}return this.strip()},C.prototype.divn=function(L){return this.clone().idivn(L)},C.prototype.egcd=function(L){l(L.negative===0),l(!L.isZero());var G=this,S=L.clone();G.negative!==0?G=G.umod(L):G=G.clone();for(var J=new C(1),W=new C(0),fe=new C(0),he=new C(1),Ce=0;G.isEven()&&S.isEven();)G.iushrn(1),S.iushrn(1),++Ce;for(var j=S.clone(),Y=G.clone();!G.isZero();){for(var z=0,me=1;(G.words[0]&me)===0&&z<26;++z,me<<=1);if(z>0)for(G.iushrn(z);z-- >0;)(J.isOdd()||W.isOdd())&&(J.iadd(j),W.isub(Y)),J.iushrn(1),W.iushrn(1);for(var ze=0,se=1;(S.words[0]&se)===0&&ze<26;++ze,se<<=1);if(ze>0)for(S.iushrn(ze);ze-- >0;)(fe.isOdd()||he.isOdd())&&(fe.iadd(j),he.isub(Y)),fe.iushrn(1),he.iushrn(1);G.cmp(S)>=0?(G.isub(S),J.isub(fe),W.isub(he)):(S.isub(G),fe.isub(J),he.isub(W))}return{a:fe,b:he,gcd:S.iushln(Ce)}},C.prototype._invmp=function(L){l(L.negative===0),l(!L.isZero());var G=this,S=L.clone();G.negative!==0?G=G.umod(L):G=G.clone();for(var J=new C(1),W=new C(0),fe=S.clone();G.cmpn(1)>0&&S.cmpn(1)>0;){for(var he=0,Ce=1;(G.words[0]&Ce)===0&&he<26;++he,Ce<<=1);if(he>0)for(G.iushrn(he);he-- >0;)J.isOdd()&&J.iadd(fe),J.iushrn(1);for(var j=0,Y=1;(S.words[0]&Y)===0&&j<26;++j,Y<<=1);if(j>0)for(S.iushrn(j);j-- >0;)W.isOdd()&&W.iadd(fe),W.iushrn(1);G.cmp(S)>=0?(G.isub(S),J.isub(W)):(S.isub(G),W.isub(J))}var z;return G.cmpn(1)===0?z=J:z=W,z.cmpn(0)<0&&z.iadd(L),z},C.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var G=this.clone(),S=L.clone();G.negative=0,S.negative=0;for(var J=0;G.isEven()&&S.isEven();J++)G.iushrn(1),S.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;S.isEven();)S.iushrn(1);var W=G.cmp(S);if(W<0){var fe=G;G=S,S=fe}else if(W===0||S.cmpn(1)===0)break;G.isub(S)}while(!0);return S.iushln(J)},C.prototype.invm=function(L){return this.egcd(L).a.umod(L)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(L){return this.words[0]&L},C.prototype.bincn=function(L){l(typeof L=="number");var G=L%26,S=(L-G)/26,J=1<<G;if(this.length<=S)return this._expand(S+1),this.words[S]|=J,this;for(var W=J,fe=S;W!==0&&fe<this.length;fe++){var he=this.words[fe]|0;he+=W,W=he>>>26,he&=67108863,this.words[fe]=he}return W!==0&&(this.words[fe]=W,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(L){var G=L<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var S;if(this.length>1)S=1;else{G&&(L=-L),l(L<=67108863,"Number is too big");var J=this.words[0]|0;S=J===L?0:J<L?-1:1}return this.negative!==0?-S|0:S},C.prototype.cmp=function(L){if(this.negative!==0&&L.negative===0)return-1;if(this.negative===0&&L.negative!==0)return 1;var G=this.ucmp(L);return this.negative!==0?-G|0:G},C.prototype.ucmp=function(L){if(this.length>L.length)return 1;if(this.length<L.length)return-1;for(var G=0,S=this.length-1;S>=0;S--){var J=this.words[S]|0,W=L.words[S]|0;if(J!==W){J<W?G=-1:J>W&&(G=1);break}}return G},C.prototype.gtn=function(L){return this.cmpn(L)===1},C.prototype.gt=function(L){return this.cmp(L)===1},C.prototype.gten=function(L){return this.cmpn(L)>=0},C.prototype.gte=function(L){return this.cmp(L)>=0},C.prototype.ltn=function(L){return this.cmpn(L)===-1},C.prototype.lt=function(L){return this.cmp(L)===-1},C.prototype.lten=function(L){return this.cmpn(L)<=0},C.prototype.lte=function(L){return this.cmp(L)<=0},C.prototype.eqn=function(L){return this.cmpn(L)===0},C.prototype.eq=function(L){return this.cmp(L)===0},C.red=function(L){return new re(L)},C.prototype.toRed=function(L){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},C.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(L){return this.red=L,this},C.prototype.forceRed=function(L){return l(!this.red,"Already a number in reduction context"),this._forceRed(L)},C.prototype.redAdd=function(L){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},C.prototype.redIAdd=function(L){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},C.prototype.redSub=function(L){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},C.prototype.redISub=function(L){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},C.prototype.redShl=function(L){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},C.prototype.redMul=function(L){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},C.prototype.redIMul=function(L){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},C.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(L){return l(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var ie={k256:null,p224:null,p192:null,p25519:null};function n0(Qe,L){this.name=Qe,this.p=new C(L,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}n0.prototype._tmp=function(){var L=new C(null);return L.words=new Array(Math.ceil(this.n/13)),L},n0.prototype.ireduce=function(L){var G=L,S;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),S=G.bitLength();while(S>this.n);var J=S<this.n?-1:G.ucmp(this.p);return J===0?(G.words[0]=0,G.length=1):J>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},n0.prototype.split=function(L,G){L.iushrn(this.n,0,G)},n0.prototype.imulK=function(L){return L.imul(this.k)};function le(){n0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}b(le,n0),le.prototype.split=function(L,G){for(var S=4194303,J=Math.min(L.length,9),W=0;W<J;W++)G.words[W]=L.words[W];if(G.length=J,L.length<=9){L.words[0]=0,L.length=1;return}var fe=L.words[9];for(G.words[G.length++]=fe&S,W=10;W<L.length;W++){var he=L.words[W]|0;L.words[W-10]=(he&S)<<4|fe>>>22,fe=he}fe>>>=22,L.words[W-10]=fe,fe===0&&L.length>10?L.length-=10:L.length-=9},le.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var G=0,S=0;S<L.length;S++){var J=L.words[S]|0;G+=J*977,L.words[S]=G&67108863,G=J*64+(G/67108864|0)}return L.words[L.length-1]===0&&(L.length--,L.words[L.length-1]===0&&L.length--),L};function Ne(){n0.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}b(Ne,n0);function ye(){n0.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}b(ye,n0);function Xe(){n0.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}b(Xe,n0),Xe.prototype.imulK=function(L){for(var G=0,S=0;S<L.length;S++){var J=(L.words[S]|0)*19+G,W=J&67108863;J>>>=26,L.words[S]=W,G=J}return G!==0&&(L.words[L.length++]=G),L},C._prime=function(L){if(ie[L])return ie[L];var G;if(L==="k256")G=new le;else if(L==="p224")G=new Ne;else if(L==="p192")G=new ye;else if(L==="p25519")G=new Xe;else throw new Error("Unknown prime "+L);return ie[L]=G,G};function re(Qe){if(typeof Qe=="string"){var L=C._prime(Qe);this.m=L.p,this.prime=L}else l(Qe.gtn(1),"modulus must be greater than 1"),this.m=Qe,this.prime=null}re.prototype._verify1=function(L){l(L.negative===0,"red works only with positives"),l(L.red,"red works only with red numbers")},re.prototype._verify2=function(L,G){l((L.negative|G.negative)===0,"red works only with positives"),l(L.red&&L.red===G.red,"red works only with red numbers")},re.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},re.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},re.prototype.add=function(L,G){this._verify2(L,G);var S=L.add(G);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},re.prototype.iadd=function(L,G){this._verify2(L,G);var S=L.iadd(G);return S.cmp(this.m)>=0&&S.isub(this.m),S},re.prototype.sub=function(L,G){this._verify2(L,G);var S=L.sub(G);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},re.prototype.isub=function(L,G){this._verify2(L,G);var S=L.isub(G);return S.cmpn(0)<0&&S.iadd(this.m),S},re.prototype.shl=function(L,G){return this._verify1(L),this.imod(L.ushln(G))},re.prototype.imul=function(L,G){return this._verify2(L,G),this.imod(L.imul(G))},re.prototype.mul=function(L,G){return this._verify2(L,G),this.imod(L.mul(G))},re.prototype.isqr=function(L){return this.imul(L,L.clone())},re.prototype.sqr=function(L){return this.mul(L,L)},re.prototype.sqrt=function(L){if(L.isZero())return L.clone();var G=this.m.andln(3);if(l(G%2===1),G===3){var S=this.m.add(new C(1)).iushrn(2);return this.pow(L,S)}for(var J=this.m.subn(1),W=0;!J.isZero()&&J.andln(1)===0;)W++,J.iushrn(1);l(!J.isZero());var fe=new C(1).toRed(this),he=fe.redNeg(),Ce=this.m.subn(1).iushrn(1),j=this.m.bitLength();for(j=new C(2*j*j).toRed(this);this.pow(j,Ce).cmp(he)!==0;)j.redIAdd(he);for(var Y=this.pow(j,J),z=this.pow(L,J.addn(1).iushrn(1)),me=this.pow(L,J),ze=W;me.cmp(fe)!==0;){for(var se=me,Ve=0;se.cmp(fe)!==0;Ve++)se=se.redSqr();l(Ve<ze);var h0=this.pow(Y,new C(1).iushln(ze-Ve-1));z=z.redMul(h0),Y=h0.redSqr(),me=me.redMul(Y),ze=Ve}return z},re.prototype.invm=function(L){var G=L._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},re.prototype.pow=function(L,G){if(G.isZero())return new C(1).toRed(this);if(G.cmpn(1)===0)return L.clone();var S=4,J=new Array(1<<S);J[0]=new C(1).toRed(this),J[1]=L;for(var W=2;W<J.length;W++)J[W]=this.mul(J[W-1],L);var fe=J[0],he=0,Ce=0,j=G.bitLength()%26;for(j===0&&(j=26),W=G.length-1;W>=0;W--){for(var Y=G.words[W],z=j-1;z>=0;z--){var me=Y>>z&1;if(fe!==J[0]&&(fe=this.sqr(fe)),me===0&&he===0){Ce=0;continue}he<<=1,he|=me,Ce++,!(Ce!==S&&(W!==0||z!==0))&&(fe=this.mul(fe,J[he]),Ce=0,he=0)}j=26}return fe},re.prototype.convertTo=function(L){var G=L.umod(this.m);return G===L?G.clone():G},re.prototype.convertFrom=function(L){var G=L.clone();return G.red=null,G},C.mont=function(L){return new a0(L)};function a0(Qe){re.call(this,Qe),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(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(a0,re),a0.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},a0.prototype.convertFrom=function(L){var G=this.imod(L.mul(this.rinv));return G.red=null,G},a0.prototype.imul=function(L,G){if(L.isZero()||G.isZero())return L.words[0]=0,L.length=1,L;var S=L.imul(G),J=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=S.isub(J).iushrn(this.shift),fe=W;return W.cmp(this.m)>=0?fe=W.isub(this.m):W.cmpn(0)<0&&(fe=W.iadd(this.m)),fe._forceRed(this)},a0.prototype.mul=function(L,G){if(L.isZero()||G.isZero())return new C(0)._forceRed(this);var S=L.mul(G),J=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=S.isub(J).iushrn(this.shift),fe=W;return W.cmp(this.m)>=0?fe=W.isub(this.m):W.cmpn(0)<0&&(fe=W.iadd(this.m)),fe._forceRed(this)},a0.prototype.invm=function(L){var G=this.imod(L._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(f,KB)}(a1)),a1.exports}var lh={},ip;function Jy(){return ip||(ip=1,function(f){var o=f;function c(C,y){if(Array.isArray(C))return C.slice();if(!C)return[];var m=[];if(typeof C!="string"){for(var N=0;N<C.length;N++)m[N]=C[N]|0;return m}if(y==="hex"){C=C.replace(/[^a-z0-9]+/ig,""),C.length%2!==0&&(C="0"+C);for(var N=0;N<C.length;N+=2)m.push(parseInt(C[N]+C[N+1],16))}else for(var N=0;N<C.length;N++){var M=C.charCodeAt(N),U=M>>8,w=M&255;U?m.push(U,w):m.push(w)}return m}o.toArray=c;function l(C){return C.length===1?"0"+C:C}o.zero2=l;function b(C){for(var y="",m=0;m<C.length;m++)y+=l(C[m].toString(16));return y}o.toHex=b,o.encode=function(y,m){return m==="hex"?b(y):y}}(lh)),lh}var ap;function xi(){return ap||(ap=1,function(f){var o=f,c=Ja(),l=y2(),b=Jy();o.assert=l,o.toArray=b.toArray,o.zero2=b.zero2,o.toHex=b.toHex,o.encode=b.encode;function C(U,w,ae){var Ee=new Array(Math.max(U.bitLength(),ae)+1),pe;for(pe=0;pe<Ee.length;pe+=1)Ee[pe]=0;var V=1<<w+1,xe=U.clone();for(pe=0;pe<Ee.length;pe++){var Ie,_e=xe.andln(V-1);xe.isOdd()?(_e>(V>>1)-1?Ie=(V>>1)-_e:Ie=_e,xe.isubn(Ie)):Ie=0,Ee[pe]=Ie,xe.iushrn(1)}return Ee}o.getNAF=C;function y(U,w){var ae=[[],[]];U=U.clone(),w=w.clone();for(var Ee=0,pe=0,V;U.cmpn(-Ee)>0||w.cmpn(-pe)>0;){var xe=U.andln(3)+Ee&3,Ie=w.andln(3)+pe&3;xe===3&&(xe=-1),Ie===3&&(Ie=-1);var _e;(xe&1)===0?_e=0:(V=U.andln(7)+Ee&7,(V===3||V===5)&&Ie===2?_e=-xe:_e=xe),ae[0].push(_e);var ie;(Ie&1)===0?ie=0:(V=w.andln(7)+pe&7,(V===3||V===5)&&xe===2?ie=-Ie:ie=Ie),ae[1].push(ie),2*Ee===_e+1&&(Ee=1-Ee),2*pe===ie+1&&(pe=1-pe),U.iushrn(1),w.iushrn(1)}return ae}o.getJSF=y;function m(U,w,ae){var Ee="_"+w;U.prototype[w]=function(){return this[Ee]!==void 0?this[Ee]:this[Ee]=ae.call(this)}}o.cachedProperty=m;function N(U){return typeof U=="string"?o.toArray(U,"hex"):U}o.parseBytes=N;function M(U){return new c(U,"hex","le")}o.intFromLE=M}(uh)),uh}var jc={exports:{}},op;function Oy(){if(op)return jc.exports;op=1;var f;jc.exports=function(b){return f||(f=new o(null)),f.generate(b)};function o(l){this.rand=l}if(jc.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 C=new Uint8Array(b),y=0;y<C.length;y++)C[y]=this.rand.getByte();return C},typeof self=="object")self.crypto&&self.crypto.getRandomValues?o.prototype._rand=function(b){var C=new Uint8Array(b);return self.crypto.getRandomValues(C),C}:self.msCrypto&&self.msCrypto.getRandomValues?o.prototype._rand=function(b){var C=new Uint8Array(b);return self.msCrypto.getRandomValues(C),C}: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 jc.exports}var hh={},dh,sp;function fu(){if(sp)return dh;sp=1;var f=Ja(),o=xi(),c=o.getNAF,l=o.getJSF,b=o.assert;function C(m,N){this.type=m,this.p=new f(N.p,16),this.red=N.prime?f.red(N.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=N.n&&new f(N.n,16),this.g=N.g&&this.pointFromJSON(N.g,N.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))}dh=C,C.prototype.point=function(){throw new Error("Not implemented")},C.prototype.validate=function(){throw new Error("Not implemented")},C.prototype._fixedNafMul=function(N,M){b(N.precomputed);var U=N._getDoubles(),w=c(M,1,this._bitLength),ae=(1<<U.step+1)-(U.step%2===0?2:1);ae/=3;var Ee=[],pe,V;for(pe=0;pe<w.length;pe+=U.step){V=0;for(var xe=pe+U.step-1;xe>=pe;xe--)V=(V<<1)+w[xe];Ee.push(V)}for(var Ie=this.jpoint(null,null,null),_e=this.jpoint(null,null,null),ie=ae;ie>0;ie--){for(pe=0;pe<Ee.length;pe++)V=Ee[pe],V===ie?_e=_e.mixedAdd(U.points[pe]):V===-ie&&(_e=_e.mixedAdd(U.points[pe].neg()));Ie=Ie.add(_e)}return Ie.toP()},C.prototype._wnafMul=function(N,M){var U=4,w=N._getNAFPoints(U);U=w.wnd;for(var ae=w.points,Ee=c(M,U,this._bitLength),pe=this.jpoint(null,null,null),V=Ee.length-1;V>=0;V--){for(var xe=0;V>=0&&Ee[V]===0;V--)xe++;if(V>=0&&xe++,pe=pe.dblp(xe),V<0)break;var Ie=Ee[V];b(Ie!==0),N.type==="affine"?Ie>0?pe=pe.mixedAdd(ae[Ie-1>>1]):pe=pe.mixedAdd(ae[-Ie-1>>1].neg()):Ie>0?pe=pe.add(ae[Ie-1>>1]):pe=pe.add(ae[-Ie-1>>1].neg())}return N.type==="affine"?pe.toP():pe},C.prototype._wnafMulAdd=function(N,M,U,w,ae){var Ee=this._wnafT1,pe=this._wnafT2,V=this._wnafT3,xe=0,Ie,_e,ie;for(Ie=0;Ie<w;Ie++){ie=M[Ie];var n0=ie._getNAFPoints(N);Ee[Ie]=n0.wnd,pe[Ie]=n0.points}for(Ie=w-1;Ie>=1;Ie-=2){var le=Ie-1,Ne=Ie;if(Ee[le]!==1||Ee[Ne]!==1){V[le]=c(U[le],Ee[le],this._bitLength),V[Ne]=c(U[Ne],Ee[Ne],this._bitLength),xe=Math.max(V[le].length,xe),xe=Math.max(V[Ne].length,xe);continue}var ye=[M[le],null,null,M[Ne]];M[le].y.cmp(M[Ne].y)===0?(ye[1]=M[le].add(M[Ne]),ye[2]=M[le].toJ().mixedAdd(M[Ne].neg())):M[le].y.cmp(M[Ne].y.redNeg())===0?(ye[1]=M[le].toJ().mixedAdd(M[Ne]),ye[2]=M[le].add(M[Ne].neg())):(ye[1]=M[le].toJ().mixedAdd(M[Ne]),ye[2]=M[le].toJ().mixedAdd(M[Ne].neg()));var Xe=[-3,-1,-5,-7,0,7,5,1,3],re=l(U[le],U[Ne]);for(xe=Math.max(re[0].length,xe),V[le]=new Array(xe),V[Ne]=new Array(xe),_e=0;_e<xe;_e++){var a0=re[0][_e]|0,Qe=re[1][_e]|0;V[le][_e]=Xe[(a0+1)*3+(Qe+1)],V[Ne][_e]=0,pe[le]=ye}}var L=this.jpoint(null,null,null),G=this._wnafT4;for(Ie=xe;Ie>=0;Ie--){for(var S=0;Ie>=0;){var J=!0;for(_e=0;_e<w;_e++)G[_e]=V[_e][Ie]|0,G[_e]!==0&&(J=!1);if(!J)break;S++,Ie--}if(Ie>=0&&S++,L=L.dblp(S),Ie<0)break;for(_e=0;_e<w;_e++){var W=G[_e];W!==0&&(W>0?ie=pe[_e][W-1>>1]:W<0&&(ie=pe[_e][-W-1>>1].neg()),ie.type==="affine"?L=L.mixedAdd(ie):L=L.add(ie))}}for(Ie=0;Ie<w;Ie++)pe[Ie]=null;return ae?L:L.toP()};function y(m,N){this.curve=m,this.type=N,this.precomputed=null}return C.BasePoint=y,y.prototype.eq=function(){throw new Error("Not implemented")},y.prototype.validate=function(){return this.curve.validate(this)},C.prototype.decodePoint=function(N,M){N=o.toArray(N,M);var U=this.p.byteLength();if((N[0]===4||N[0]===6||N[0]===7)&&N.length-1===2*U){N[0]===6?b(N[N.length-1]%2===0):N[0]===7&&b(N[N.length-1]%2===1);var w=this.point(N.slice(1,1+U),N.slice(1+U,1+2*U));return w}else if((N[0]===2||N[0]===3)&&N.length-1===U)return this.pointFromX(N.slice(1,1+U),N[0]===3);throw new Error("Unknown point format")},y.prototype.encodeCompressed=function(N){return this.encode(N,!0)},y.prototype._encode=function(N){var M=this.curve.p.byteLength(),U=this.getX().toArray("be",M);return N?[this.getY().isEven()?2:3].concat(U):[4].concat(U,this.getY().toArray("be",M))},y.prototype.encode=function(N,M){return o.encode(this._encode(M),N)},y.prototype.precompute=function(N){if(this.precomputed)return this;var M={doubles:null,naf:null,beta:null};return M.naf=this._getNAFPoints(8),M.doubles=this._getDoubles(4,N),M.beta=this._getBeta(),this.precomputed=M,this},y.prototype._hasDoubles=function(N){if(!this.precomputed)return!1;var M=this.precomputed.doubles;return M?M.points.length>=Math.ceil((N.bitLength()+1)/M.step):!1},y.prototype._getDoubles=function(N,M){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var U=[this],w=this,ae=0;ae<M;ae+=N){for(var Ee=0;Ee<N;Ee++)w=w.dbl();U.push(w)}return{step:N,points:U}},y.prototype._getNAFPoints=function(N){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var M=[this],U=(1<<N)-1,w=U===1?null:this.dbl(),ae=1;ae<U;ae++)M[ae]=M[ae-1].add(w);return{wnd:N,points:M}},y.prototype._getBeta=function(){return null},y.prototype.dblp=function(N){for(var M=this,U=0;U<N;U++)M=M.dbl();return M},dh}var gh,fp;function HB(){if(fp)return gh;fp=1;var f=xi(),o=Ja(),c=iu(),l=fu(),b=f.assert;function C(N){l.call(this,"short",N),this.a=new o(N.a,16).toRed(this.red),this.b=new o(N.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(N),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}c(C,l),gh=C,C.prototype._getEndomorphism=function(M){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var U,w;if(M.beta)U=new o(M.beta,16).toRed(this.red);else{var ae=this._getEndoRoots(this.p);U=ae[0].cmp(ae[1])<0?ae[0]:ae[1],U=U.toRed(this.red)}if(M.lambda)w=new o(M.lambda,16);else{var Ee=this._getEndoRoots(this.n);this.g.mul(Ee[0]).x.cmp(this.g.x.redMul(U))===0?w=Ee[0]:(w=Ee[1],b(this.g.mul(w).x.cmp(this.g.x.redMul(U))===0))}var pe;return M.basis?pe=M.basis.map(function(V){return{a:new o(V.a,16),b:new o(V.b,16)}}):pe=this._getEndoBasis(w),{beta:U,lambda:w,basis:pe}}},C.prototype._getEndoRoots=function(M){var U=M===this.p?this.red:o.mont(M),w=new o(2).toRed(U).redInvm(),ae=w.redNeg(),Ee=new o(3).toRed(U).redNeg().redSqrt().redMul(w),pe=ae.redAdd(Ee).fromRed(),V=ae.redSub(Ee).fromRed();return[pe,V]},C.prototype._getEndoBasis=function(M){for(var U=this.n.ushrn(Math.floor(this.n.bitLength()/2)),w=M,ae=this.n.clone(),Ee=new o(1),pe=new o(0),V=new o(0),xe=new o(1),Ie,_e,ie,n0,le,Ne,ye,Xe=0,re,a0;w.cmpn(0)!==0;){var Qe=ae.div(w);re=ae.sub(Qe.mul(w)),a0=V.sub(Qe.mul(Ee));var L=xe.sub(Qe.mul(pe));if(!ie&&re.cmp(U)<0)Ie=ye.neg(),_e=Ee,ie=re.neg(),n0=a0;else if(ie&&++Xe===2)break;ye=re,ae=w,w=re,V=Ee,Ee=a0,xe=pe,pe=L}le=re.neg(),Ne=a0;var G=ie.sqr().add(n0.sqr()),S=le.sqr().add(Ne.sqr());return S.cmp(G)>=0&&(le=Ie,Ne=_e),ie.negative&&(ie=ie.neg(),n0=n0.neg()),le.negative&&(le=le.neg(),Ne=Ne.neg()),[{a:ie,b:n0},{a:le,b:Ne}]},C.prototype._endoSplit=function(M){var U=this.endo.basis,w=U[0],ae=U[1],Ee=ae.b.mul(M).divRound(this.n),pe=w.b.neg().mul(M).divRound(this.n),V=Ee.mul(w.a),xe=pe.mul(ae.a),Ie=Ee.mul(w.b),_e=pe.mul(ae.b),ie=M.sub(V).sub(xe),n0=Ie.add(_e).neg();return{k1:ie,k2:n0}},C.prototype.pointFromX=function(M,U){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),ae=w.redSqrt();if(ae.redSqr().redSub(w).cmp(this.zero)!==0)throw new Error("invalid point");var Ee=ae.fromRed().isOdd();return(U&&!Ee||!U&&Ee)&&(ae=ae.redNeg()),this.point(M,ae)},C.prototype.validate=function(M){if(M.inf)return!0;var U=M.x,w=M.y,ae=this.a.redMul(U),Ee=U.redSqr().redMul(U).redIAdd(ae).redIAdd(this.b);return w.redSqr().redISub(Ee).cmpn(0)===0},C.prototype._endoWnafMulAdd=function(M,U,w){for(var ae=this._endoWnafT1,Ee=this._endoWnafT2,pe=0;pe<M.length;pe++){var V=this._endoSplit(U[pe]),xe=M[pe],Ie=xe._getBeta();V.k1.negative&&(V.k1.ineg(),xe=xe.neg(!0)),V.k2.negative&&(V.k2.ineg(),Ie=Ie.neg(!0)),ae[pe*2]=xe,ae[pe*2+1]=Ie,Ee[pe*2]=V.k1,Ee[pe*2+1]=V.k2}for(var _e=this._wnafMulAdd(1,ae,Ee,pe*2,w),ie=0;ie<pe*2;ie++)ae[ie]=null,Ee[ie]=null;return _e};function y(N,M,U,w){l.BasePoint.call(this,N,"affine"),M===null&&U===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(M,16),this.y=new o(U,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(y,l.BasePoint),C.prototype.point=function(M,U,w){return new y(this,M,U,w)},C.prototype.pointFromJSON=function(M,U){return y.fromJSON(this,M,U)},y.prototype._getBeta=function(){if(this.curve.endo){var M=this.precomputed;if(M&&M.beta)return M.beta;var U=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(M){var w=this.curve,ae=function(Ee){return w.point(Ee.x.redMul(w.endo.beta),Ee.y)};M.beta=U,U.precomputed={beta:null,naf:M.naf&&{wnd:M.naf.wnd,points:M.naf.points.map(ae)},doubles:M.doubles&&{step:M.doubles.step,points:M.doubles.points.map(ae)}}}return U}},y.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]},y.fromJSON=function(M,U,w){typeof U=="string"&&(U=JSON.parse(U));var ae=M.point(U[0],U[1],w);if(!U[2])return ae;function Ee(V){return M.point(V[0],V[1],w)}var pe=U[2];return ae.precomputed={beta:null,doubles:pe.doubles&&{step:pe.doubles.step,points:[ae].concat(pe.doubles.points.map(Ee))},naf:pe.naf&&{wnd:pe.naf.wnd,points:[ae].concat(pe.naf.points.map(Ee))}},ae},y.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)+">"},y.prototype.isInfinity=function(){return this.inf},y.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 U=this.y.redSub(M.y);U.cmpn(0)!==0&&(U=U.redMul(this.x.redSub(M.x).redInvm()));var w=U.redSqr().redISub(this.x).redISub(M.x),ae=U.redMul(this.x.redSub(w)).redISub(this.y);return this.curve.point(w,ae)},y.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 U=this.curve.a,w=this.x.redSqr(),ae=M.redInvm(),Ee=w.redAdd(w).redIAdd(w).redIAdd(U).redMul(ae),pe=Ee.redSqr().redISub(this.x.redAdd(this.x)),V=Ee.redMul(this.x.redSub(pe)).redISub(this.y);return this.curve.point(pe,V)},y.prototype.getX=function(){return this.x.fromRed()},y.prototype.getY=function(){return this.y.fromRed()},y.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)},y.prototype.mulAdd=function(M,U,w){var ae=[this,U],Ee=[M,w];return this.curve.endo?this.curve._endoWnafMulAdd(ae,Ee):this.curve._wnafMulAdd(1,ae,Ee,2)},y.prototype.jmulAdd=function(M,U,w){var ae=[this,U],Ee=[M,w];return this.curve.endo?this.curve._endoWnafMulAdd(ae,Ee,!0):this.curve._wnafMulAdd(1,ae,Ee,2,!0)},y.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)},y.prototype.neg=function(M){if(this.inf)return this;var U=this.curve.point(this.x,this.y.redNeg());if(M&&this.precomputed){var w=this.precomputed,ae=function(Ee){return Ee.neg()};U.precomputed={naf:w.naf&&{wnd:w.naf.wnd,points:w.naf.points.map(ae)},doubles:w.doubles&&{step:w.doubles.step,points:w.doubles.points.map(ae)}}}return U},y.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 m(N,M,U,w){l.BasePoint.call(this,N,"jacobian"),M===null&&U===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(U,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(m,l.BasePoint),C.prototype.jpoint=function(M,U,w){return new m(this,M,U,w)},m.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var M=this.z.redInvm(),U=M.redSqr(),w=this.x.redMul(U),ae=this.y.redMul(U).redMul(M);return this.curve.point(w,ae)},m.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},m.prototype.add=function(M){if(this.isInfinity())return M;if(M.isInfinity())return this;var U=M.z.redSqr(),w=this.z.redSqr(),ae=this.x.redMul(U),Ee=M.x.redMul(w),pe=this.y.redMul(U.redMul(M.z)),V=M.y.redMul(w.redMul(this.z)),xe=ae.redSub(Ee),Ie=pe.redSub(V);if(xe.cmpn(0)===0)return Ie.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var _e=xe.redSqr(),ie=_e.redMul(xe),n0=ae.redMul(_e),le=Ie.redSqr().redIAdd(ie).redISub(n0).redISub(n0),Ne=Ie.redMul(n0.redISub(le)).redISub(pe.redMul(ie)),ye=this.z.redMul(M.z).redMul(xe);return this.curve.jpoint(le,Ne,ye)},m.prototype.mixedAdd=function(M){if(this.isInfinity())return M.toJ();if(M.isInfinity())return this;var U=this.z.redSqr(),w=this.x,ae=M.x.redMul(U),Ee=this.y,pe=M.y.redMul(U).redMul(this.z),V=w.redSub(ae),xe=Ee.redSub(pe);if(V.cmpn(0)===0)return xe.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var Ie=V.redSqr(),_e=Ie.redMul(V),ie=w.redMul(Ie),n0=xe.redSqr().redIAdd(_e).redISub(ie).redISub(ie),le=xe.redMul(ie.redISub(n0)).redISub(Ee.redMul(_e)),Ne=this.z.redMul(V);return this.curve.jpoint(n0,le,Ne)},m.prototype.dblp=function(M){if(M===0)return this;if(this.isInfinity())return this;if(!M)return this.dbl();var U;if(this.curve.zeroA||this.curve.threeA){var w=this;for(U=0;U<M;U++)w=w.dbl();return w}var ae=this.curve.a,Ee=this.curve.tinv,pe=this.x,V=this.y,xe=this.z,Ie=xe.redSqr().redSqr(),_e=V.redAdd(V);for(U=0;U<M;U++){var ie=pe.redSqr(),n0=_e.redSqr(),le=n0.redSqr(),Ne=ie.redAdd(ie).redIAdd(ie).redIAdd(ae.redMul(Ie)),ye=pe.redMul(n0),Xe=Ne.redSqr().redISub(ye.redAdd(ye)),re=ye.redISub(Xe),a0=Ne.redMul(re);a0=a0.redIAdd(a0).redISub(le);var Qe=_e.redMul(xe);U+1<M&&(Ie=Ie.redMul(le)),pe=Xe,xe=Qe,_e=a0}return this.curve.jpoint(pe,_e.redMul(Ee),xe)},m.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},m.prototype._zeroDbl=function(){var M,U,w;if(this.zOne){var ae=this.x.redSqr(),Ee=this.y.redSqr(),pe=Ee.redSqr(),V=this.x.redAdd(Ee).redSqr().redISub(ae).redISub(pe);V=V.redIAdd(V);var xe=ae.redAdd(ae).redIAdd(ae),Ie=xe.redSqr().redISub(V).redISub(V),_e=pe.redIAdd(pe);_e=_e.redIAdd(_e),_e=_e.redIAdd(_e),M=Ie,U=xe.redMul(V.redISub(Ie)).redISub(_e),w=this.y.redAdd(this.y)}else{var ie=this.x.redSqr(),n0=this.y.redSqr(),le=n0.redSqr(),Ne=this.x.redAdd(n0).redSqr().redISub(ie).redISub(le);Ne=Ne.redIAdd(Ne);var ye=ie.redAdd(ie).redIAdd(ie),Xe=ye.redSqr(),re=le.redIAdd(le);re=re.redIAdd(re),re=re.redIAdd(re),M=Xe.redISub(Ne).redISub(Ne),U=ye.redMul(Ne.redISub(M)).redISub(re),w=this.y.redMul(this.z),w=w.redIAdd(w)}return this.curve.jpoint(M,U,w)},m.prototype._threeDbl=function(){var M,U,w;if(this.zOne){var ae=this.x.redSqr(),Ee=this.y.redSqr(),pe=Ee.redSqr(),V=this.x.redAdd(Ee).redSqr().redISub(ae).redISub(pe);V=V.redIAdd(V);var xe=ae.redAdd(ae).redIAdd(ae).redIAdd(this.curve.a),Ie=xe.redSqr().redISub(V).redISub(V);M=Ie;var _e=pe.redIAdd(pe);_e=_e.redIAdd(_e),_e=_e.redIAdd(_e),U=xe.redMul(V.redISub(Ie)).redISub(_e),w=this.y.redAdd(this.y)}else{var ie=this.z.redSqr(),n0=this.y.redSqr(),le=this.x.redMul(n0),Ne=this.x.redSub(ie).redMul(this.x.redAdd(ie));Ne=Ne.redAdd(Ne).redIAdd(Ne);var ye=le.redIAdd(le);ye=ye.redIAdd(ye);var Xe=ye.redAdd(ye);M=Ne.redSqr().redISub(Xe),w=this.y.redAdd(this.z).redSqr().redISub(n0).redISub(ie);var re=n0.redSqr();re=re.redIAdd(re),re=re.redIAdd(re),re=re.redIAdd(re),U=Ne.redMul(ye.redISub(M)).redISub(re)}return this.curve.jpoint(M,U,w)},m.prototype._dbl=function(){var M=this.curve.a,U=this.x,w=this.y,ae=this.z,Ee=ae.redSqr().redSqr(),pe=U.redSqr(),V=w.redSqr(),xe=pe.redAdd(pe).redIAdd(pe).redIAdd(M.redMul(Ee)),Ie=U.redAdd(U);Ie=Ie.redIAdd(Ie);var _e=Ie.redMul(V),ie=xe.redSqr().redISub(_e.redAdd(_e)),n0=_e.redISub(ie),le=V.redSqr();le=le.redIAdd(le),le=le.redIAdd(le),le=le.redIAdd(le);var Ne=xe.redMul(n0).redISub(le),ye=w.redAdd(w).redMul(ae);return this.curve.jpoint(ie,Ne,ye)},m.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var M=this.x.redSqr(),U=this.y.redSqr(),w=this.z.redSqr(),ae=U.redSqr(),Ee=M.redAdd(M).redIAdd(M),pe=Ee.redSqr(),V=this.x.redAdd(U).redSqr().redISub(M).redISub(ae);V=V.redIAdd(V),V=V.redAdd(V).redIAdd(V),V=V.redISub(pe);var xe=V.redSqr(),Ie=ae.redIAdd(ae);Ie=Ie.redIAdd(Ie),Ie=Ie.redIAdd(Ie),Ie=Ie.redIAdd(Ie);var _e=Ee.redIAdd(V).redSqr().redISub(pe).redISub(xe).redISub(Ie),ie=U.redMul(_e);ie=ie.redIAdd(ie),ie=ie.redIAdd(ie);var n0=this.x.redMul(xe).redISub(ie);n0=n0.redIAdd(n0),n0=n0.redIAdd(n0);var le=this.y.redMul(_e.redMul(Ie.redISub(_e)).redISub(V.redMul(xe)));le=le.redIAdd(le),le=le.redIAdd(le),le=le.redIAdd(le);var Ne=this.z.redAdd(V).redSqr().redISub(w).redISub(xe);return this.curve.jpoint(n0,le,Ne)},m.prototype.mul=function(M,U){return M=new o(M,U),this.curve._wnafMul(this,M)},m.prototype.eq=function(M){if(M.type==="affine")return this.eq(M.toJ());if(this===M)return!0;var U=this.z.redSqr(),w=M.z.redSqr();if(this.x.redMul(w).redISub(M.x.redMul(U)).cmpn(0)!==0)return!1;var ae=U.redMul(this.z),Ee=w.redMul(M.z);return this.y.redMul(Ee).redISub(M.y.redMul(ae)).cmpn(0)===0},m.prototype.eqXToP=function(M){var U=this.z.redSqr(),w=M.toRed(this.curve.red).redMul(U);if(this.x.cmp(w)===0)return!0;for(var ae=M.clone(),Ee=this.curve.redN.redMul(U);;){if(ae.iadd(this.curve.n),ae.cmp(this.curve.p)>=0)return!1;if(w.redIAdd(Ee),this.x.cmp(w)===0)return!0}},m.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)+">"},m.prototype.isInfinity=function(){return this.z.cmpn(0)===0},gh}var ph,cp;function UB(){if(cp)return ph;cp=1;var f=Ja(),o=iu(),c=fu(),l=xi();function b(y){c.call(this,"mont",y),this.a=new f(y.a,16).toRed(this.red),this.b=new f(y.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),ph=b,b.prototype.validate=function(m){var N=m.normalize().x,M=N.redSqr(),U=M.redMul(N).redAdd(M.redMul(this.a)).redAdd(N),w=U.redSqrt();return w.redSqr().cmp(U)===0};function C(y,m,N){c.BasePoint.call(this,y,"projective"),m===null&&N===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new f(m,16),this.z=new f(N,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(C,c.BasePoint),b.prototype.decodePoint=function(m,N){return this.point(l.toArray(m,N),1)},b.prototype.point=function(m,N){return new C(this,m,N)},b.prototype.pointFromJSON=function(m){return C.fromJSON(this,m)},C.prototype.precompute=function(){},C.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},C.fromJSON=function(m,N){return new C(m,N[0],N[1]||m.one)},C.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)+">"},C.prototype.isInfinity=function(){return this.z.cmpn(0)===0},C.prototype.dbl=function(){var m=this.x.redAdd(this.z),N=m.redSqr(),M=this.x.redSub(this.z),U=M.redSqr(),w=N.redSub(U),ae=N.redMul(U),Ee=w.redMul(U.redAdd(this.curve.a24.redMul(w)));return this.curve.point(ae,Ee)},C.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.diffAdd=function(m,N){var M=this.x.redAdd(this.z),U=this.x.redSub(this.z),w=m.x.redAdd(m.z),ae=m.x.redSub(m.z),Ee=ae.redMul(M),pe=w.redMul(U),V=N.z.redMul(Ee.redAdd(pe).redSqr()),xe=N.x.redMul(Ee.redISub(pe).redSqr());return this.curve.point(V,xe)},C.prototype.mul=function(m){for(var N=m.clone(),M=this,U=this.curve.point(null,null),w=this,ae=[];N.cmpn(0)!==0;N.iushrn(1))ae.push(N.andln(1));for(var Ee=ae.length-1;Ee>=0;Ee--)ae[Ee]===0?(M=M.diffAdd(U,w),U=U.dbl()):(U=M.diffAdd(U,w),M=M.dbl());return U},C.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.eq=function(m){return this.getX().cmp(m.getX())===0},C.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},C.prototype.getX=function(){return this.normalize(),this.x.fromRed()},ph}var yh,up;function RB(){if(up)return yh;up=1;var f=xi(),o=Ja(),c=iu(),l=fu(),b=f.assert;function C(m){this.twisted=(m.a|0)!==1,this.mOneA=this.twisted&&(m.a|0)===-1,this.extended=this.mOneA,l.call(this,"edwards",m),this.a=new o(m.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(m.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(m.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),b(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(m.c|0)===1}c(C,l),yh=C,C.prototype._mulA=function(N){return this.mOneA?N.redNeg():this.a.redMul(N)},C.prototype._mulC=function(N){return this.oneC?N:this.c.redMul(N)},C.prototype.jpoint=function(N,M,U,w){return this.point(N,M,U,w)},C.prototype.pointFromX=function(N,M){N=new o(N,16),N.red||(N=N.toRed(this.red));var U=N.redSqr(),w=this.c2.redSub(this.a.redMul(U)),ae=this.one.redSub(this.c2.redMul(this.d).redMul(U)),Ee=w.redMul(ae.redInvm()),pe=Ee.redSqrt();if(pe.redSqr().redSub(Ee).cmp(this.zero)!==0)throw new Error("invalid point");var V=pe.fromRed().isOdd();return(M&&!V||!M&&V)&&(pe=pe.redNeg()),this.point(N,pe)},C.prototype.pointFromY=function(N,M){N=new o(N,16),N.red||(N=N.toRed(this.red));var U=N.redSqr(),w=U.redSub(this.c2),ae=U.redMul(this.d).redMul(this.c2).redSub(this.a),Ee=w.redMul(ae.redInvm());if(Ee.cmp(this.zero)===0){if(M)throw new Error("invalid point");return this.point(this.zero,N)}var pe=Ee.redSqrt();if(pe.redSqr().redSub(Ee).cmp(this.zero)!==0)throw new Error("invalid point");return pe.fromRed().isOdd()!==M&&(pe=pe.redNeg()),this.point(pe,N)},C.prototype.validate=function(N){if(N.isInfinity())return!0;N.normalize();var M=N.x.redSqr(),U=N.y.redSqr(),w=M.redMul(this.a).redAdd(U),ae=this.c2.redMul(this.one.redAdd(this.d.redMul(M).redMul(U)));return w.cmp(ae)===0};function y(m,N,M,U,w){l.BasePoint.call(this,m,"projective"),N===null&&M===null&&U===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(N,16),this.y=new o(M,16),this.z=U?new o(U,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(y,l.BasePoint),C.prototype.pointFromJSON=function(N){return y.fromJSON(this,N)},C.prototype.point=function(N,M,U,w){return new y(this,N,M,U,w)},y.fromJSON=function(N,M){return new y(N,M[0],M[1],M[2])},y.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)+">"},y.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},y.prototype._extDbl=function(){var N=this.x.redSqr(),M=this.y.redSqr(),U=this.z.redSqr();U=U.redIAdd(U);var w=this.curve._mulA(N),ae=this.x.redAdd(this.y).redSqr().redISub(N).redISub(M),Ee=w.redAdd(M),pe=Ee.redSub(U),V=w.redSub(M),xe=ae.redMul(pe),Ie=Ee.redMul(V),_e=ae.redMul(V),ie=pe.redMul(Ee);return this.curve.point(xe,Ie,ie,_e)},y.prototype._projDbl=function(){var N=this.x.redAdd(this.y).redSqr(),M=this.x.redSqr(),U=this.y.redSqr(),w,ae,Ee,pe,V,xe;if(this.curve.twisted){pe=this.curve._mulA(M);var Ie=pe.redAdd(U);this.zOne?(w=N.redSub(M).redSub(U).redMul(Ie.redSub(this.curve.two)),ae=Ie.redMul(pe.redSub(U)),Ee=Ie.redSqr().redSub(Ie).redSub(Ie)):(V=this.z.redSqr(),xe=Ie.redSub(V).redISub(V),w=N.redSub(M).redISub(U).redMul(xe),ae=Ie.redMul(pe.redSub(U)),Ee=Ie.redMul(xe))}else pe=M.redAdd(U),V=this.curve._mulC(this.z).redSqr(),xe=pe.redSub(V).redSub(V),w=this.curve._mulC(N.redISub(pe)).redMul(xe),ae=this.curve._mulC(pe).redMul(M.redISub(U)),Ee=pe.redMul(xe);return this.curve.point(w,ae,Ee)},y.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},y.prototype._extAdd=function(N){var M=this.y.redSub(this.x).redMul(N.y.redSub(N.x)),U=this.y.redAdd(this.x).redMul(N.y.redAdd(N.x)),w=this.t.redMul(this.curve.dd).redMul(N.t),ae=this.z.redMul(N.z.redAdd(N.z)),Ee=U.redSub(M),pe=ae.redSub(w),V=ae.redAdd(w),xe=U.redAdd(M),Ie=Ee.redMul(pe),_e=V.redMul(xe),ie=Ee.redMul(xe),n0=pe.redMul(V);return this.curve.point(Ie,_e,n0,ie)},y.prototype._projAdd=function(N){var M=this.z.redMul(N.z),U=M.redSqr(),w=this.x.redMul(N.x),ae=this.y.redMul(N.y),Ee=this.curve.d.redMul(w).redMul(ae),pe=U.redSub(Ee),V=U.redAdd(Ee),xe=this.x.redAdd(this.y).redMul(N.x.redAdd(N.y)).redISub(w).redISub(ae),Ie=M.redMul(pe).redMul(xe),_e,ie;return this.curve.twisted?(_e=M.redMul(V).redMul(ae.redSub(this.curve._mulA(w))),ie=pe.redMul(V)):(_e=M.redMul(V).redMul(ae.redSub(w)),ie=this.curve._mulC(pe).redMul(V)),this.curve.point(Ie,_e,ie)},y.prototype.add=function(N){return this.isInfinity()?N:N.isInfinity()?this:this.curve.extended?this._extAdd(N):this._projAdd(N)},y.prototype.mul=function(N){return this._hasDoubles(N)?this.curve._fixedNafMul(this,N):this.curve._wnafMul(this,N)},y.prototype.mulAdd=function(N,M,U){return this.curve._wnafMulAdd(1,[this,M],[N,U],2,!1)},y.prototype.jmulAdd=function(N,M,U){return this.curve._wnafMulAdd(1,[this,M],[N,U],2,!0)},y.prototype.normalize=function(){if(this.zOne)return this;var N=this.z.redInvm();return this.x=this.x.redMul(N),this.y=this.y.redMul(N),this.t&&(this.t=this.t.redMul(N)),this.z=this.curve.one,this.zOne=!0,this},y.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},y.prototype.getX=function(){return this.normalize(),this.x.fromRed()},y.prototype.getY=function(){return this.normalize(),this.y.fromRed()},y.prototype.eq=function(N){return this===N||this.getX().cmp(N.getX())===0&&this.getY().cmp(N.getY())===0},y.prototype.eqXToP=function(N){var M=N.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(M)===0)return!0;for(var U=N.clone(),w=this.curve.redN.redMul(this.z);;){if(U.iadd(this.curve.n),U.cmp(this.curve.p)>=0)return!1;if(M.redIAdd(w),this.x.cmp(M)===0)return!0}},y.prototype.toP=y.prototype.normalize,y.prototype.mixedAdd=y.prototype.add,yh}var lp;function zy(){return lp||(lp=1,function(f){var o=f;o.base=fu(),o.short=HB(),o.mont=UB(),o.edwards=RB()}(hh)),hh}var Ch={},Ih,hp;function GB(){return hp||(hp=1,Ih={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"]]}}),Ih}var dp;function dg(){return dp||(dp=1,function(f){var o=f,c=au(),l=zy(),b=xi(),C=b.assert;function y(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,C(this.g.validate(),"Invalid curve"),C(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}o.PresetCurve=y;function m(M,U){Object.defineProperty(o,M,{configurable:!0,enumerable:!0,get:function(){var w=new y(U);return Object.defineProperty(o,M,{configurable:!0,enumerable:!0,value:w}),w}})}m("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"]}),m("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"]}),m("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"]}),m("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"]}),m("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"]}),m("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"]}),m("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 N;try{N=GB()}catch{N=void 0}m("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",N]})}(Ch)),Ch}var bh,gp;function YB(){if(gp)return bh;gp=1;var f=au(),o=Jy(),c=y2();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 C=o.toArray(b.entropy,b.entropyEnc||"hex"),y=o.toArray(b.nonce,b.nonceEnc||"hex"),m=o.toArray(b.pers,b.persEnc||"hex");c(C.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(C,y,m)}return bh=l,l.prototype._init=function(C,y,m){var N=C.concat(y).concat(m);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(N),this._reseed=1,this.reseedInterval=281474976710656},l.prototype._hmac=function(){return new f.hmac(this.hash,this.K)},l.prototype._update=function(C){var y=this._hmac().update(this.V).update([0]);C&&(y=y.update(C)),this.K=y.digest(),this.V=this._hmac().update(this.V).digest(),C&&(this.K=this._hmac().update(this.V).update([1]).update(C).digest(),this.V=this._hmac().update(this.V).digest())},l.prototype.reseed=function(C,y,m,N){typeof y!="string"&&(N=m,m=y,y=null),C=o.toArray(C,y),m=o.toArray(m,N),c(C.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(C.concat(m||[])),this._reseed=1},l.prototype.generate=function(C,y,m,N){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof y!="string"&&(N=m,m=y,y=null),m&&(m=o.toArray(m,N||"hex"),this._update(m));for(var M=[];M.length<C;)this.V=this._hmac().update(this.V).digest(),M=M.concat(this.V);var U=M.slice(0,C);return this._update(m),this._reseed++,o.encode(U,y)},bh}var vh,pp;function LB(){if(pp)return vh;pp=1;var f=Ja(),o=xi(),c=o.assert;function l(b,C){this.ec=b,this.priv=null,this.pub=null,C.priv&&this._importPrivate(C.priv,C.privEnc),C.pub&&this._importPublic(C.pub,C.pubEnc)}return vh=l,l.fromPublic=function(C,y,m){return y instanceof l?y:new l(C,{pub:y,pubEnc:m})},l.fromPrivate=function(C,y,m){return y instanceof l?y:new l(C,{priv:y,privEnc:m})},l.prototype.validate=function(){var C=this.getPublic();return C.isInfinity()?{result:!1,reason:"Invalid public key"}:C.validate()?C.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(C,y){return typeof C=="string"&&(y=C,C=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),y?this.pub.encode(y,C):this.pub},l.prototype.getPrivate=function(C){return C==="hex"?this.priv.toString(16,2):this.priv},l.prototype._importPrivate=function(C,y){this.priv=new f(C,y||16),this.priv=this.priv.umod(this.ec.curve.n)},l.prototype._importPublic=function(C,y){if(C.x||C.y){this.ec.curve.type==="mont"?c(C.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&c(C.x&&C.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(C.x,C.y);return}this.pub=this.ec.curve.decodePoint(C,y)},l.prototype.derive=function(C){return C.validate()||c(C.validate(),"public point not validated"),C.mul(this.priv).getX()},l.prototype.sign=function(C,y,m){return this.ec.sign(C,this,y,m)},l.prototype.verify=function(C,y,m){return this.ec.verify(C,y,this,void 0,m)},l.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},vh}var xh,yp;function TB(){if(yp)return xh;yp=1;var f=Ja(),o=xi(),c=o.assert;function l(N,M){if(N instanceof l)return N;this._importDER(N,M)||(c(N.r&&N.s,"Signature without r or s"),this.r=new f(N.r,16),this.s=new f(N.s,16),N.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=N.recoveryParam)}xh=l;function b(){this.place=0}function C(N,M){var U=N[M.place++];if(!(U&128))return U;var w=U&15;if(w===0||w>4||N[M.place]===0)return!1;for(var ae=0,Ee=0,pe=M.place;Ee<w;Ee++,pe++)ae<<=8,ae|=N[pe],ae>>>=0;return ae<=127?!1:(M.place=pe,ae)}function y(N){for(var M=0,U=N.length-1;!N[M]&&!(N[M+1]&128)&&M<U;)M++;return M===0?N:N.slice(M)}l.prototype._importDER=function(M,U){M=o.toArray(M,U);var w=new b;if(M[w.place++]!==48)return!1;var ae=C(M,w);if(ae===!1||ae+w.place!==M.length||M[w.place++]!==2)return!1;var Ee=C(M,w);if(Ee===!1||(M[w.place]&128)!==0)return!1;var pe=M.slice(w.place,Ee+w.place);if(w.place+=Ee,M[w.place++]!==2)return!1;var V=C(M,w);if(V===!1||M.length!==V+w.place||(M[w.place]&128)!==0)return!1;var xe=M.slice(w.place,V+w.place);if(pe[0]===0)if(pe[1]&128)pe=pe.slice(1);else return!1;if(xe[0]===0)if(xe[1]&128)xe=xe.slice(1);else return!1;return this.r=new f(pe),this.s=new f(xe),this.recoveryParam=null,!0};function m(N,M){if(M<128){N.push(M);return}var U=1+(Math.log(M)/Math.LN2>>>3);for(N.push(U|128);--U;)N.push(M>>>(U<<3)&255);N.push(M)}return l.prototype.toDER=function(M){var U=this.r.toArray(),w=this.s.toArray();for(U[0]&128&&(U=[0].concat(U)),w[0]&128&&(w=[0].concat(w)),U=y(U),w=y(w);!w[0]&&!(w[1]&128);)w=w.slice(1);var ae=[2];m(ae,U.length),ae=ae.concat(U),ae.push(2),m(ae,w.length);var Ee=ae.concat(w),pe=[48];return m(pe,Ee.length),pe=pe.concat(Ee),o.encode(pe,M)},xh}var Eh,Cp;function JB(){if(Cp)return Eh;Cp=1;var f=Ja(),o=YB(),c=xi(),l=dg(),b=Oy(),C=c.assert,y=LB(),m=TB();function N(M){if(!(this instanceof N))return new N(M);typeof M=="string"&&(C(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 Eh=N,N.prototype.keyPair=function(U){return new y(this,U)},N.prototype.keyFromPrivate=function(U,w){return y.fromPrivate(this,U,w)},N.prototype.keyFromPublic=function(U,w){return y.fromPublic(this,U,w)},N.prototype.genKeyPair=function(U){U||(U={});for(var w=new o({hash:this.hash,pers:U.pers,persEnc:U.persEnc||"utf8",entropy:U.entropy||b(this.hash.hmacStrength),entropyEnc:U.entropy&&U.entropyEnc||"utf8",nonce:this.n.toArray()}),ae=this.n.byteLength(),Ee=this.n.sub(new f(2));;){var pe=new f(w.generate(ae));if(!(pe.cmp(Ee)>0))return pe.iaddn(1),this.keyFromPrivate(pe)}},N.prototype._truncateToN=function(U,w,ae){var Ee;if(f.isBN(U)||typeof U=="number")U=new f(U,16),Ee=U.byteLength();else if(typeof U=="object")Ee=U.length,U=new f(U,16);else{var pe=U.toString();Ee=pe.length+1>>>1,U=new f(pe,16)}typeof ae!="number"&&(ae=Ee*8);var V=ae-this.n.bitLength();return V>0&&(U=U.ushrn(V)),!w&&U.cmp(this.n)>=0?U.sub(this.n):U},N.prototype.sign=function(U,w,ae,Ee){if(typeof ae=="object"&&(Ee=ae,ae=null),Ee||(Ee={}),typeof U!="string"&&typeof U!="number"&&!f.isBN(U)){C(typeof U=="object"&&U&&typeof U.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),C(U.length>>>0===U.length);for(var pe=0;pe<U.length;pe++)C((U[pe]&255)===U[pe])}w=this.keyFromPrivate(w,ae),U=this._truncateToN(U,!1,Ee.msgBitLength),C(!U.isNeg(),"Can not sign a negative message");var V=this.n.byteLength(),xe=w.getPrivate().toArray("be",V),Ie=U.toArray("be",V);C(new f(Ie).eq(U),"Can not sign message");for(var _e=new o({hash:this.hash,entropy:xe,nonce:Ie,pers:Ee.pers,persEnc:Ee.persEnc||"utf8"}),ie=this.n.sub(new f(1)),n0=0;;n0++){var le=Ee.k?Ee.k(n0):new f(_e.generate(this.n.byteLength()));if(le=this._truncateToN(le,!0),!(le.cmpn(1)<=0||le.cmp(ie)>=0)){var Ne=this.g.mul(le);if(!Ne.isInfinity()){var ye=Ne.getX(),Xe=ye.umod(this.n);if(Xe.cmpn(0)!==0){var re=le.invm(this.n).mul(Xe.mul(w.getPrivate()).iadd(U));if(re=re.umod(this.n),re.cmpn(0)!==0){var a0=(Ne.getY().isOdd()?1:0)|(ye.cmp(Xe)!==0?2:0);return Ee.canonical&&re.cmp(this.nh)>0&&(re=this.n.sub(re),a0^=1),new m({r:Xe,s:re,recoveryParam:a0})}}}}}},N.prototype.verify=function(U,w,ae,Ee,pe){pe||(pe={}),U=this._truncateToN(U,!1,pe.msgBitLength),ae=this.keyFromPublic(ae,Ee),w=new m(w,"hex");var V=w.r,xe=w.s;if(V.cmpn(1)<0||V.cmp(this.n)>=0||xe.cmpn(1)<0||xe.cmp(this.n)>=0)return!1;var Ie=xe.invm(this.n),_e=Ie.mul(U).umod(this.n),ie=Ie.mul(V).umod(this.n),n0;return this.curve._maxwellTrick?(n0=this.g.jmulAdd(_e,ae.getPublic(),ie),n0.isInfinity()?!1:n0.eqXToP(V)):(n0=this.g.mulAdd(_e,ae.getPublic(),ie),n0.isInfinity()?!1:n0.getX().umod(this.n).cmp(V)===0)},N.prototype.recoverPubKey=function(M,U,w,ae){C((3&w)===w,"The recovery param is more than two bits"),U=new m(U,ae);var Ee=this.n,pe=new f(M),V=U.r,xe=U.s,Ie=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),Ie):V=this.curve.pointFromX(V,Ie);var ie=U.r.invm(Ee),n0=Ee.sub(pe).mul(ie).umod(Ee),le=xe.mul(ie).umod(Ee);return this.g.mulAdd(n0,V,le)},N.prototype.getKeyRecoveryParam=function(M,U,w,ae){if(U=new m(U,ae),U.recoveryParam!==null)return U.recoveryParam;for(var Ee=0;Ee<4;Ee++){var pe;try{pe=this.recoverPubKey(M,U,Ee)}catch{continue}if(pe.eq(w))return Ee}throw new Error("Unable to find valid recovery factor")},Eh}var _h,Ip;function OB(){if(Ip)return _h;Ip=1;var f=xi(),o=f.assert,c=f.parseBytes,l=f.cachedProperty;function b(C,y){this.eddsa=C,this._secret=c(y.secret),C.isPoint(y.pub)?this._pub=y.pub:this._pubBytes=c(y.pub)}return b.fromPublic=function(y,m){return m instanceof b?m:new b(y,{pub:m})},b.fromSecret=function(y,m){return m instanceof b?m:new b(y,{secret:m})},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 y=this.eddsa,m=this.hash(),N=y.encodingLength-1,M=m.slice(0,y.encodingLength);return M[0]&=248,M[N]&=127,M[N]|=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(y){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(y,this)},b.prototype.verify=function(y,m){return this.eddsa.verify(y,m,this)},b.prototype.getSecret=function(y){return o(this._secret,"KeyPair is public only"),f.encode(this.secret(),y)},b.prototype.getPublic=function(y){return f.encode(this.pubBytes(),y)},_h=b,_h}var wh,bp;function zB(){if(bp)return wh;bp=1;var f=Ja(),o=xi(),c=o.assert,l=o.cachedProperty,b=o.parseBytes;function C(y,m){this.eddsa=y,typeof m!="object"&&(m=b(m)),Array.isArray(m)&&(c(m.length===y.encodingLength*2,"Signature has invalid size"),m={R:m.slice(0,y.encodingLength),S:m.slice(y.encodingLength)}),c(m.R&&m.S,"Signature without R or S"),y.isPoint(m.R)&&(this._R=m.R),m.S instanceof f&&(this._S=m.S),this._Rencoded=Array.isArray(m.R)?m.R:m.Rencoded,this._Sencoded=Array.isArray(m.S)?m.S:m.Sencoded}return l(C,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),l(C,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),l(C,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),l(C,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),C.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},C.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},wh=C,wh}var Bh,vp;function qB(){if(vp)return Bh;vp=1;var f=au(),o=dg(),c=xi(),l=c.assert,b=c.parseBytes,C=OB(),y=zB();function m(N){if(l(N==="ed25519","only tested with ed25519 so far"),!(this instanceof m))return new m(N);N=o[N].curve,this.curve=N,this.g=N.g,this.g.precompute(N.n.bitLength()+1),this.pointClass=N.point().constructor,this.encodingLength=Math.ceil(N.n.bitLength()/8),this.hash=f.sha512}return Bh=m,m.prototype.sign=function(M,U){M=b(M);var w=this.keyFromSecret(U),ae=this.hashInt(w.messagePrefix(),M),Ee=this.g.mul(ae),pe=this.encodePoint(Ee),V=this.hashInt(pe,w.pubBytes(),M).mul(w.priv()),xe=ae.add(V).umod(this.curve.n);return this.makeSignature({R:Ee,S:xe,Rencoded:pe})},m.prototype.verify=function(M,U,w){if(M=b(M),U=this.makeSignature(U),U.S().gte(U.eddsa.curve.n)||U.S().isNeg())return!1;var ae=this.keyFromPublic(w),Ee=this.hashInt(U.Rencoded(),ae.pubBytes(),M),pe=this.g.mul(U.S()),V=U.R().add(ae.pub().mul(Ee));return V.eq(pe)},m.prototype.hashInt=function(){for(var M=this.hash(),U=0;U<arguments.length;U++)M.update(arguments[U]);return c.intFromLE(M.digest()).umod(this.curve.n)},m.prototype.keyFromPublic=function(M){return C.fromPublic(this,M)},m.prototype.keyFromSecret=function(M){return C.fromSecret(this,M)},m.prototype.makeSignature=function(M){return M instanceof y?M:new y(this,M)},m.prototype.encodePoint=function(M){var U=M.getY().toArray("le",this.encodingLength);return U[this.encodingLength-1]|=M.getX().isOdd()?128:0,U},m.prototype.decodePoint=function(M){M=c.parseBytes(M);var U=M.length-1,w=M.slice(0,U).concat(M[U]&-129),ae=(M[U]&128)!==0,Ee=c.intFromLE(w);return this.curve.pointFromY(Ee,ae)},m.prototype.encodeInt=function(M){return M.toArray("le",this.encodingLength)},m.prototype.decodeInt=function(M){return c.intFromLE(M)},m.prototype.isPoint=function(M){return M instanceof this.pointClass},Bh}var xp;function jB(){return xp||(xp=1,function(f){var o=f;o.version=PB.version,o.utils=xi(),o.rand=Oy(),o.curve=zy(),o.curves=dg(),o.ec=JB(),o.eddsa=qB()}(ch)),ch}var VB=jB();const XB=Yi(VB);var I2=function(f,o,c,l){var b=arguments.length,C=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,o,c,l);else for(var m=f.length-1;m>=0;m--)(y=f[m])&&(C=(b<3?y(C):b>3?y(o,c,C):y(o,c))||C);return b>3&&C&&Object.defineProperty(o,c,C),C},b2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)},lf,ad,o1,WB=XB.ec;let mh,ko=lf=class extends _s{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=qy(await Wf(c,Ua.ETH_KECCAK_256),l);return new lf({publicKey:b})}equals(o){return o instanceof lf?dA(this.publicKey,o.publicKey):!1}toString(){return"sepc256k1/"+jf(this.publicKey)}toPeerId(){return nu(ru(this.publicKey))}static fromPeerId(o){if(!o.publicKey)throw new Error("Missing public key");if(o.type==="secp256k1")return new lf({publicKey:o.publicKey.raw});throw new Error("Unsupported key type: "+o.type)}};I2([YA({type:kd("u8",33)}),b2("design:type",Uint8Array)],ko.prototype,"publicKey",void 0);ko=lf=I2([No(1),b2("design:paramtypes",[Object])],ko);let Qs=ad=class extends N3{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 ad?dA(this.privateKey,o.privateKey):!1}toString(){return"secp256k1s/"+jf(this.privateKey)}};I2([YA({type:Uint8Array}),b2("design:type",Uint8Array)],Qs.prototype,"privateKey",void 0);Qs=ad=I2([No(1),b2("design:paramtypes",[Object])],Qs);let k1=o1=class extends M3{publicKey;privateKey;_wallet;constructor(o){super(),this.privateKey=o.privateKey,this.publicKey=o.publicKey}static async create(){const o=await P9();return new o1({publicKey:new ko({publicKey:o.publicKey.raw}),privateKey:new Qs({privateKey:o.raw})})}async sign(o,c=Ua.ETH_KECCAK_256){const l=await Wf(o,c),b=ed((this._wallet||(this._wallet=new a2(this.privateKey.privateKey)))._signingKey().signDigest(l)),C=new Uint8Array(Qo.length(b));return Qo.write(b,C,0),new La({prehash:c,publicKey:this.publicKey,signature:C})}equals(o){return o instanceof o1?this.publicKey.equals(o.publicKey)&&this.privateKey.equals(o.privateKey):!1}toPeerId(){return nu(ru(this.publicKey.publicKey))}};I2([YA({type:ko}),b2("design:type",ko)],k1.prototype,"publicKey",void 0);I2([YA({type:Qs}),b2("design:type",Qs)],k1.prototype,"privateKey",void 0);k1=o1=I2([No(2),b2("design:paramtypes",[Object])],k1);const ZB=new TextDecoder;function $B(){return mh||(mh=new WB("secp256k1")),mh}const qy=(f,o)=>{const c=Fs(o),l={r:Nt(c.r),s:Nt(c.s)};return new Uint8Array($B().recoverPubKey(Nt(f),l,c.recoveryParam).encodeCompressed())},em=async(f,o)=>{const c=await Wf(o,f.prehash),l=qy(Nt(c),ZB.decode(f.signature));return dA(l,f.publicKey.publicKey)};var v2=function(f,o,c,l){var b=arguments.length,C=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,o,c,l);else for(var m=f.length-1;m>=0;m--)(y=f[m])&&(C=(b<3?y(C):b>3?y(o,c,C):y(o,c))||C);return b>3&&C&&Object.defineProperty(o,c,C),C},x2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)};let La=class{signature;publicKey;prehash=Ua.NONE;constructor(o){this.signature=o.signature,this.publicKey=o.publicKey,this.prehash=o.prehash}equals(o){return dA(this.signature,o.signature)?v3(Es(this.publicKey),Es(o.publicKey))===0&&this.prehash===o.prehash:!1}};v2([YA({type:Uint8Array}),x2("design:type",Uint8Array)],La.prototype,"signature",void 0);v2([YA({type:_s}),x2("design:type",_s)],La.prototype,"publicKey",void 0);v2([YA({type:"u8"}),x2("design:type",Number)],La.prototype,"prehash",void 0);La=v2([No(0),x2("design:paramtypes",[Object])],La);let M1=class{data;signature;constructor(o){this.data=o.data,this.signature=o.signature,this._value=o.value}_value;getValue(o){return dx(this.data,o)}async verify(){return this.signature?tm(this.signature,this.data):!0}equals(o){return!dA(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}};v2([YA({type:Uint8Array}),x2("design:type",Uint8Array)],M1.prototype,"data",void 0);v2([YA({type:ex(La)}),x2("design:type",La)],M1.prototype,"signature",void 0);M1=v2([No(0),x2("design:paramtypes",[Object])],M1);const tm=async(f,o)=>f.publicKey instanceof Mo?nm(f,o):f.publicKey instanceof ko?em(f,o):!1,rm=async(f,o,c)=>{const l=await Wf(f,c);return new La({prehash:c,publicKey:o.publicKey,signature:u2.crypto_sign_detached(l,o.privateKeyPublicKey)})},nm=async(f,o)=>{let c=!1;try{const l=await Wf(o,f.prehash);c=u2.crypto_sign_verify_detached(f.signature,l,f.publicKey.publicKey)}catch{return!1}return c};var E2=function(f,o,c,l){var b=arguments.length,C=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,o,c,l);else for(var m=f.length-1;m>=0;m--)(y=f[m])&&(C=(b<3?y(C):b>3?y(o,c,C):y(o,c))||C);return b>3&&C&&Object.defineProperty(o,c,C),C},_2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)},s1,od,f1;let Mo=s1=class extends _s{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 s1?dA(this.publicKey,o.publicKey):!1}toString(){return"ed25119p/"+jf(this.publicKey)}toPeerId(){return nu(ru(this.publicKey))}static fromPeerId(o){if(!o.publicKey)throw new Error("Missing public key");if(o.type==="Ed25519")return new s1({publicKey:Y9(o.publicKey.raw)});throw new Error("Unsupported key type: "+o.type)}};E2([YA({type:kd("u8",32)}),_2("design:type",Uint8Array)],Mo.prototype,"publicKey",void 0);Mo=s1=E2([No(0),_2("design:paramtypes",[Object])],Mo);let Ss=od=class extends N3{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 od?dA(this.privateKey,o.privateKey):!1}toString(){return"ed25119s/"+jf(this.privateKey)}keyObject};E2([YA({type:kd("u8",32)}),_2("design:type",Uint8Array)],Ss.prototype,"privateKey",void 0);Ss=od=E2([No(0),_2("design:paramtypes",[Object])],Ss);let Pf=f1=class extends M3{publicKey;privateKey;constructor(o){super(),this.privateKey=o.privateKey,this.publicKey=o.publicKey}static async create(){await u2.ready;const o=u2.crypto_sign_keypair();return new f1({publicKey:new Mo({publicKey:o.publicKey}),privateKey:new Ss({privateKey:o.privateKey.slice(0,32)})})}sign(o,c=Ua.NONE){return rm(o,this,c)}signer(o){return async c=>this.sign(c,o)}equals(o){return o instanceof f1?this.publicKey.equals(o.publicKey)&&this.privateKey.equals(o.privateKey):!1}_privateKeyPublicKey;get privateKeyPublicKey(){return this._privateKeyPublicKey||(this._privateKeyPublicKey=h2([this.privateKey.privateKey,this.publicKey.publicKey]))}toPeerId(){return nu(ru(this.publicKey.publicKey))}};E2([YA({type:Mo}),_2("design:type",Mo)],Pf.prototype,"publicKey",void 0);E2([YA({type:Ss}),_2("design:type",Ss)],Pf.prototype,"privateKey",void 0);Pf=f1=E2([No(0),_2("design:paramtypes",[Object])],Pf);const Ep=f=>{if(f.type==="Ed25519")return Mo.fromPeerId(f);if(f.type==="secp256k1")return ko.fromPeerId(f);throw new Error("Unsupported key type")},Am=f=>{if(f==="https:")return jy;if(f==="http:")return sd;throw new Error("Unsupported protocol: "+f)},jy=9002,sd=8082,_p="/trust",im="/peer/id",am="/peer/address",Vc="/program",Qh="/programs",om="/program/variants",sm="/install",fm="/network/bootstrap",cm="/restart",um="/path",lm="/log",hm="/versions",dm="modulepreload",gm=function(f){return"/"+f},wp={},Bp=function(o,c,l){let b=Promise.resolve();if(c&&c.length>0){let y=function(M){return Promise.all(M.map(U=>Promise.resolve(U).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),N=m?.nonce||m?.getAttribute("nonce");b=y(c.map(M=>{if(M=gm(M),M in wp)return;wp[M]=!0;const U=M.endsWith(".css"),w=U?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${M}"]${w}`))return;const ae=document.createElement("link");if(ae.rel=U?"stylesheet":dm,U||(ae.as="script"),ae.crossOrigin="",ae.href=M,N&&ae.setAttribute("nonce",N),document.head.appendChild(ae),U)return new Promise((Ee,pe)=>{ae.addEventListener("load",Ee),ae.addEventListener("error",()=>pe(new Error(`Unable to preload CSS for ${M}`)))})}))}function C(y){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=y,window.dispatchEvent(m),!m.defaultPrevented)throw y}return b.then(y=>{for(const m of y||[])m.status==="rejected"&&C(m.reason);return o().catch(C)})};class gi extends Error{static name="InvalidMultiaddrError";name="InvalidMultiaddrError"}class Kf extends Error{static name="ValidationError";name="ValidationError"}class pm extends Error{static name="InvalidParametersError";name="InvalidParametersError"}class ym extends Error{static name="UnknownProtocolError";name="UnknownProtocolError"}class Cm{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 C=0,y=0;const m=this.peekChar();if(m===void 0)return;const N=m==="0",M=2**(8*b)-1;for(;;){const U=this.readAtomically(()=>{const w=this.readChar();if(w===void 0)return;const ae=Number.parseInt(w,o);if(!Number.isNaN(ae))return ae});if(U===void 0)break;if(C*=o,C+=U,C>M||(y+=1,c!==void 0&&y>c))return}if(y!==0)return!l&&N&&y>1?void 0:C})}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 y=this.readSeparator(":",l,()=>this.readIPv4Addr());if(y!==void 0)return c[b]=y[0],c[b+1]=y[1],c[b+2]=y[2],c[b+3]=y[3],[b+4,!0]}const C=this.readSeparator(":",l,()=>this.readNumber(16,4,!0,2));if(C===void 0)return[b,!1];c[b]=C>>8,c[b+1]=C&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 C=new Uint8Array(14),y=16-(l+2),[m]=o(C.subarray(0,y));return c.set(C.subarray(0,m),16-m),c})}readIPAddr(){return this.readIPv4Addr()??this.readIPv6Addr()}}const Im=45,bm=15,N1=new Cm;function vm(f){if(!(f.length>bm))return N1.new(f).parseWith(()=>N1.readIPv4Addr())}function xm(f){if(f.includes("%")&&(f=f.split("%")[0]),!(f.length>Im))return N1.new(f).parseWith(()=>N1.readIPv6Addr())}function Vy(f){return!!vm(f)}function Em(f){return!!xm(f)}const fd=4,cd=6,ud=273,_m=33,c1=41,Xy=42,wm=43,Wy=53,Zy=54,gg=55,$y=56,Bm=132,mm=301,Qm=302,Sm=400,eC=421,Dm=444,km=445,Mm=446,Nm=447,Fm=448,Pm=449,Km=454,Hm=460,Um=461,Rm=465,Gm=466,Ym=480,Lm=481,Tm=443,Jm=477,Om=478,zm=479,qm=277,jm=275,Vm=276,Xm=280,Wm=281,tC=290,Zm=777;function mp(f){return o=>wA(o,f)}function Qp(f){return o=>Ga(o,f)}function hf(f){return new DataView(f.buffer).getUint16(f.byteOffset).toString()}function os(f){const o=new ArrayBuffer(2);return new DataView(o).setUint16(0,typeof f=="string"?parseInt(f):f),new Uint8Array(o)}function $m(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=os(l);return h2([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=gs.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=os(l);return h2([c,b],c.length+b.length)}function Sp(f){const o=f.subarray(0,f.length-2),c=f.subarray(f.length-2),l=wA(o,"base32"),b=hf(c);return`${l}:${b}`}const rC=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},tQ=function(f){let o=0;f=f.toString().trim();const c=f.split(":",8);let l;for(l=0;l<c.length;l++){const C=Vy(c[l]);let y;C&&(y=rC(c[l]),c[l]=wA(y.subarray(0,2),"base16")),y!=null&&++l<8&&c.splice(l,0,wA(y.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 C=[l,1];for(l=9-c.length;l>0;l--)C.push("0");c.splice.apply(c,C)}const b=new Uint8Array(o+16);for(l=0;l<c.length;l++){c[l]===""&&(c[l]="0");const C=parseInt(c[l],16);if(isNaN(C)||C<0||C>65535)throw new gi("Invalid byte value in IP address");b[o++]=C>>8&255,b[o++]=C&255}return b},rQ=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(".")},nQ=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],C=f[l+1],y=`${b.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`;o.push(y)}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 AQ(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 Sh=Object.values(Th).map(f=>f.decoder),iQ=function(){let f=Sh[0].or(Sh[1]);return Sh.slice(2).forEach(o=>f=f.or(o)),f}();function aQ(f){return iQ.decode(f)}function oQ(f){return o=>f.encoder.encode(o)}function sQ(f){if(parseInt(f).toString()!==f)throw new Kf("Value must be an integer")}function fQ(f){if(f<0)throw new Kf("Value must be a positive integer, or zero")}function cQ(f){return o=>{if(o>f)throw new Kf(`Value must be smaller than or equal to ${f}`)}}function uQ(...f){return o=>{for(const c of f)c(o)}}const Xc=uQ(sQ,fQ,cQ(65535)),fA=-1;class lQ{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 ym(`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 Ra=new lQ,hQ=[{code:fd,name:"ip4",size:32,valueToBytes:rC,bytesToValue:rQ,validate:f=>{if(!Vy(f))throw new Kf(`Invalid IPv4 address "${f}"`)}},{code:cd,name:"tcp",size:16,valueToBytes:os,bytesToValue:hf,validate:Xc},{code:ud,name:"udp",size:16,valueToBytes:os,bytesToValue:hf,validate:Xc},{code:_m,name:"dccp",size:16,valueToBytes:os,bytesToValue:hf,validate:Xc},{code:c1,name:"ip6",size:128,valueToBytes:tQ,bytesToValue:nQ,stringToValue:AQ,validate:f=>{if(!Em(f))throw new Kf(`Invalid IPv6 address "${f}"`)}},{code:Xy,name:"ip6zone",size:fA},{code:wm,name:"ipcidr",size:8,bytesToValue:mp("base10"),valueToBytes:Qp("base10")},{code:Wy,name:"dns",size:fA,resolvable:!0},{code:Zy,name:"dns4",size:fA,resolvable:!0},{code:gg,name:"dns6",size:fA,resolvable:!0},{code:$y,name:"dnsaddr",size:fA,resolvable:!0},{code:Bm,name:"sctp",size:16,valueToBytes:os,bytesToValue:hf,validate:Xc},{code:mm,name:"udt"},{code:Qm,name:"utp"},{code:Sm,name:"unix",size:fA,path:!0,stringToValue:f=>decodeURIComponent(f),valueToString:f=>encodeURIComponent(f)},{code:eC,name:"p2p",aliases:["ipfs"],size:fA,bytesToValue:mp("base58btc"),valueToBytes:f=>f.startsWith("Q")||f.startsWith("1")?Qp("base58btc")(f):fn.parse(f).multihash.bytes},{code:Dm,name:"onion",size:96,bytesToValue:Sp,valueToBytes:$m},{code:km,name:"onion3",size:296,bytesToValue:Sp,valueToBytes:eQ},{code:Mm,name:"garlic64",size:fA},{code:Nm,name:"garlic32",size:fA},{code:Fm,name:"tls"},{code:Pm,name:"sni",size:fA},{code:Km,name:"noise"},{code:Hm,name:"quic"},{code:Um,name:"quic-v1"},{code:Rm,name:"webtransport"},{code:Gm,name:"certhash",size:fA,bytesToValue:oQ(_3),valueToBytes:aQ},{code:Ym,name:"http"},{code:Lm,name:"http-path",size:fA,stringToValue:f=>`/${decodeURIComponent(f)}`,valueToString:f=>encodeURIComponent(f.substring(1))},{code:Tm,name:"https"},{code:Jm,name:"ws"},{code:Om,name:"wss"},{code:zm,name:"p2p-websocket-star"},{code:qm,name:"p2p-stardust"},{code:jm,name:"p2p-webrtc-star"},{code:Vm,name:"p2p-webrtc-direct"},{code:Xm,name:"webrtc-direct"},{code:Wm,name:"webrtc"},{code:tC,name:"p2p-circuit"},{code:Zm,name:"memory",size:fA}];hQ.forEach(f=>{Ra.addProtocol(f)});function dQ(f){const o=[];let c=0;for(;c<f.length;){const l=iy(f,c),b=Ra.getProtocol(l),C=g2(l),y=CQ(b,f,c+C);let m=0;y>0&&b.size===fA&&(m=g2(y));const N=C+m+y,M={code:l,name:b.name,bytes:f.subarray(c,c+N)};if(y>0){const U=c+C+m,w=f.subarray(U,U+y);M.value=b.bytesToValue?.(w)??wA(w)}o.push(M),c+=N}return o}function gQ(f){let o=0;const c=[];for(const l of f){if(l.bytes==null){const b=Ra.getProtocol(l.code),C=g2(l.code);let y,m=0,N=0;l.value!=null&&(y=b.valueToBytes?.(l.value)??Ga(l.value),m=y.byteLength,b.size===fA&&(N=g2(m)));const M=new Uint8Array(C+N+m);let U=0;jh(l.code,M,U),U+=C,y!=null&&(b.size===fA&&(jh(m,M,U),U+=N),M.set(y,U)),l.bytes=M}c.push(l.bytes),o+=l.bytes.byteLength}return h2(c,o)}function pQ(f){if(f.charAt(0)!=="/")throw new gi('String multiaddr must start with "/"');const o=[];let c="protocol",l="",b="";for(let C=1;C<f.length;C++){const y=f.charAt(C);y!=="/"&&(c==="protocol"?b+=f.charAt(C):l+=f.charAt(C));const m=C===f.length-1;if(y==="/"||m){const N=Ra.getProtocol(b);if(c==="protocol"){if(N.size==null||N.size===0){o.push({code:N.code,name:N.name}),l="",b="",c="protocol";continue}else if(m)throw new gi(`Component ${b} was missing value`);c="value"}else if(c==="value"){const M={code:N.code,name:N.name};if(N.size!=null&&N.size!==0){if(l==="")throw new gi(`Component ${b} was missing value`);M.value=N.stringToValue?.(l)??l}o.push(M),l="",b="",c="protocol"}}}if(b!==""&&l!=="")throw new gi("Incomplete multiaddr");return o}function yQ(f){return`/${f.flatMap(o=>{if(o.value==null)return o.name;const c=Ra.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 CQ(f,o,c){return f.size==null||f.size===0?0:f.size>0?f.size/8:iy(o,c)}const IQ=Symbol.for("nodejs.util.inspect.custom"),nC=Symbol.for("@multiformats/multiaddr"),bQ=[Wy,Zy,gg,$y];class vQ extends Error{constructor(o="No available resolver"){super(o),this.name="NoAvailableResolverError"}}function xQ(f){if(f==null&&(f="/"),wQ(f))return f.getComponents();if(f instanceof Uint8Array)return dQ(f);if(typeof f=="string")return f=f.replace(/\/(\/)+/,"/").replace(/(\/)+$/,""),f===""&&(f="/"),pQ(f);if(Array.isArray(f))return f;throw new gi("Must be a string, Uint8Array, Component[], or another Multiaddr")}class ss{[nC]=!0;#e;#t;#r;constructor(o="/",c={}){this.#e=xQ(o),c.validate!==!1&&EQ(this)}get bytes(){return this.#r==null&&(this.#r=gQ(this.#e)),this.#r}toString(){return this.#t==null&&(this.#t=yQ(this.#e)),this.#t}toJSON(){return this.toString()}toOptions(){let o,c,l,b,C="";for(const{code:m,name:N,value:M}of this.#e)m===Xy&&(C=`%${M??""}`),bQ.includes(m)&&(c="tcp",b=443,l=`${M??""}${C}`,o=m===gg?6:4),(m===cd||m===ud)&&(c=N==="tcp"?"tcp":"udp",b=parseInt(M??"")),(m===fd||m===c1)&&(c="tcp",l=`${M??""}${C}`,o=m===c1?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=Ra.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=Ra.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 ss(o);return new ss([...this.#e,...c.getComponents()],{validate:!1})}decapsulate(o){const c=o.toString(),l=this.toString(),b=l.lastIndexOf(c);if(b<0)throw new pm(`Address ${this.toString()} does not contain subaddress: ${o.toString()}`);return new ss(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 ss(this.#e.slice(0,c),{validate:!1})}getPeerId(){try{let o=[];this.#e.forEach(({code:l,value:b})=>{l===eC&&o.push([l,b]),l===tC&&(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(Ra.getProtocol(o.code).path)return o.value??null;return null}equals(o){return dA(this.bytes,o.bytes)}async resolve(o){const c=this.protos().find(C=>C.resolvable);if(c==null)return[this];const l=_Q.get(c.name);if(l==null)throw new vQ(`no available resolver for ${c.name}`);return(await l(this,o)).map(C=>AC(C))}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!==fd&&this.#e[0].code!==c1||this.#e[1].code!==cd&&this.#e[1].code!==ud)}[IQ](){return`Multiaddr(${this.toString()})`}}function EQ(f){f.getComponents().forEach(o=>{const c=Ra.getProtocol(o.code);o.value!=null&&c.validate?.(o.value)})}const _Q=new Map;function wQ(f){return!!f?.[nC]}function AC(f){return new ss(f)}const BQ="X-Peerbit-Signature",mQ="X-Peerbit-Signature-Time",QQ=async(f,o,c,l,b)=>{const C=Math.round(new Date().getTime()/1e3).toString(),y=new mr;if(!o)throw new Error("Expecting method");if(!c)throw new Error("Expecting path");y.string(o.toLowerCase()+c.toLowerCase()+C+(l||""));const m=await b.sign(y.finalize());f[mQ]=C,f[BQ]=k3(Es(m))},SQ=async(f,o={address:"http://localhost:"+sd})=>{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+":"+sd:c=c+":"+jy);const{default:b}=await Bp(async()=>{const{default:w}=await import("./index-DIycyeiE.js");return{default:w}},[]),C=b.create();C.interceptors.request.use(async w=>{const ae=new URL(w.url);return await QQ(w.headers,w.method,ae.pathname+ae.search,w.data,f),w});const y=w=>w>=200&&w<300||w===404,m=w=>{if(w.status!==200)throw new Error(w.data);return w},N=async()=>m(await C.get(c+im,{validateStatus:y,timeout:5e3})).data,M=async w=>m(await C.delete(c+Vc+"/"+encodeURIComponent(w.toString()),{validateStatus:y})),U=async w=>m(await C.delete(c+Vc+"/"+encodeURIComponent(w.toString())+"?delete=true",{validateStatus:y}));return{peer:{id:{get:N},addresses:{get:async()=>m(await C.get(c+am,{validateStatus:y})).data.map(w=>AC(w))}},access:{allow:async w=>{const ae=await C.put(c+_p+"/"+encodeURIComponent(typeof w=="string"?w:w instanceof _s?w.hashcode():Ep(w).hashcode()),void 0,{validateStatus:y});if(ae.status!==200&&ae.status!==404)throw new Error(ae.data);return ae.status===200},deny:async w=>{const ae=await C.delete(c+_p+"/"+encodeURIComponent(w instanceof _s?w.hashcode():Ep(w).hashcode()),{validateStatus:y});if(ae.status!==200&&ae.status!==404)throw new Error(ae.data);return ae.status===200}},program:{has:async w=>{const ae=await C.head(c+Vc+"/"+encodeURIComponent(w.toString()),{validateStatus:y});if(ae.status!==200&&ae.status!==404)throw new Error(ae.data);return ae.status===200},open:async w=>m(await C.put(c+Vc,JSON.stringify(w),{validateStatus:y})).data,close:async w=>{await M(w)},closeAll:async()=>{const w=m(await C.get(c+Qh,{validateStatus:y}));await Promise.all([...Object.keys(w.data)].map(ae=>M(ae)))},drop:async w=>{await U(w)},dropAll:async()=>{const w=m(await C.get(c+Qh,{validateStatus:y}));await Promise.all([...Object.keys(w.data)].map(ae=>U(ae)))},list:async()=>m(await C.get(c+Qh,{validateStatus:y})).data,variants:async()=>m(await C.get(c+om,{validateStatus:y})).data},dependency:{install:async w=>{const ae=await C.put(c+sm,JSON.stringify(w),{validateStatus:y});if(ae.status!==200)throw new Error(typeof ae.data=="string"?ae.data:ae.data.toString());return ae.data},versions:async()=>m(await C.get(c+hm,{validateStatus:y})).data},network:{bootstrap:async()=>{m(await C.post(c+fm,void 0,{validateStatus:y}))}},restart:async()=>{m(await C.post(c+cm,void 0,{validateStatus:y}))},stop:async()=>{m(await C.post(c+um,void 0,{validateStatus:y}))},log:{fetch:async w=>{const ae=c+lm+(w!==void 0?`?n=${w}`:"");return m(await C.get(ae,{validateStatus:y})).data}},terminate:async()=>{const{terminateNode:w}=await Bp(async()=>{const{terminateNode:ae}=await Promise.resolve().then(()=>MQ);return{terminateNode:ae}},void 0);o.origin?.type==="aws"&&await w({instanceId:o.origin.instanceId,region:o.origin.region})}}};let ld=Qd({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(",")}});ld=ev(ld);const DQ=()=>{const[f,o]=sr.useState(),[c,l]=sr.useState(),[b,C]=sr.useState(),[y,m]=sr.useState(),[N,M]=sr.useState([]);return sr.useEffect(()=>{Pf.create().then(U=>SQ(U,{address:window.location.protocol+"//"+window.location.hostname+":"+Am(window.location.protocol)}).then(w=>{o(w),w.peer.id.get().then(ae=>{l(ae)}).catch(ae=>{window.location.hostname!=="localhost"?alert(ae):console.error(ae)}),w.peer.addresses.get().then(ae=>{const Ee=ae.find(xe=>xe.protoNames().includes("tcp")&&!xe.protoNames().includes("ws")&&!xe.protoNames().includes("wss"));Ee&&C(Ee.toString());const pe=ae.find(xe=>xe.protoNames().includes("ws")||xe.protoNames().includes("wss"));pe&&m(pe.toString());let V=ae.filter(xe=>(!Ee||!xe.equals(Ee))&&(!pe||!xe.equals(pe)));M(V.map(xe=>xe.toString()))}).catch(ae=>{window.location.hostname!=="localhost"?alert(ae):console.error(ae)})}))},[]),nr.jsxs(pv,{theme:ld,children:[nr.jsx(Fv,{}),nr.jsx(Dv,{children:nr.jsx(ra,{container:!0,sx:{p:4,height:"100vh"},children:nr.jsxs(ra,{item:!0,container:!0,direction:"column",spacing:2,maxWidth:"400px",children:[nr.jsxs(ra,{item:!0,container:!0,direction:"row",alignItems:"center",mb:2,children:[nr.jsx(ra,{mr:2,display:"flex",justifyContent:"center",item:!0,children:nr.jsx("img",{width:"60px",height:"auto",src:"./android-chrome-192x192.png"})}),nr.jsx(ra,{item:!0,children:nr.jsx(ta,{variant:"h5",children:"Peerbit"})})]}),nr.jsxs(ra,{item:!0,children:[nr.jsx(ta,{variant:"overline",children:"Id"}),nr.jsx(ta,{children:c})]}),nr.jsx(ra,{item:!0,children:nr.jsx(ta,{variant:"overline",children:"Address"})}),b&&nr.jsxs(ra,{item:!0,children:[nr.jsx(ta,{variant:"caption",children:" TCP (non-browser)"}),nr.jsx(xl,{elevation:10,children:nr.jsx(ta,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:b})})]}),y&&nr.jsxs(ra,{item:!0,children:[nr.jsxs(ta,{variant:"caption",children:[" ","Websockets (browser and non-browser)"," "]}),nr.jsx(xl,{elevation:10,children:nr.jsx(ta,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:y})})]}),N.length>0&&nr.jsxs(ra,{item:!0,children:[nr.jsx(ta,{variant:"caption",children:" Other addresses"}),N.map(U=>nr.jsx(xl,{elevation:10,children:nr.jsx(ta,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:U})}))]})]})})})]})},kQ=VC.createRoot(document.getElementById("root"));kQ.render(nr.jsx(Dp.StrictMode,{children:nr.jsx(DQ,{})}));const MQ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));
|
|
66
|
+
`)}static register(o,c){c||(c=o.locale)}}const aB="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo";let bf=null;function X8(f){if(bf==null&&(bf=aB.replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),$f.check(f)!=="0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"))throw bf=null,new Error("BIP39 Wordlist for en (English) FAILED")}class oB extends $f{constructor(){super("en")}getWord(o){return X8(this),bf[o]}getWordIndex(o){return X8(this),bf.indexOf(o)}}const Fy=new oB;$f.register(Fy);const W8={en:Fy},sB="hdnode/5.8.0",D1=new zt(sB),fB=Wr.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),cB=Ri("Bitcoin seed"),af=2147483648;function Py(f){return(1<<f)-1<<8-f}function uB(f){return(1<<f)-1}function qc(f){return pi(or(f),32)}function Z8(f){return By.encode(So([f,Df(Nf(Nf(f)),0,4)]))}function cg(f){if(f==null)return W8.en;if(typeof f=="string"){const o=W8[f];return o==null&&D1.throwArgumentError("unknown locale","wordlist",f),o}return f}const rs={},Ff="m/44'/60'/0'/0/0";class hi{constructor(o,c,l,b,C,y,m,N){if(o!==rs)throw new Error("HDNode constructor cannot be called directly");if(c){const M=new Cs(c);lr(this,"privateKey",M.privateKey),lr(this,"publicKey",M.compressedPublicKey)}else lr(this,"privateKey",null),lr(this,"publicKey",or(l));lr(this,"parentFingerprint",b),lr(this,"fingerprint",Df(Rw(Nf(this.publicKey)),0,4)),lr(this,"address",Is(this.publicKey)),lr(this,"chainCode",C),lr(this,"index",y),lr(this,"depth",m),N==null?(lr(this,"mnemonic",null),lr(this,"path",null)):typeof N=="string"?(lr(this,"mnemonic",null),lr(this,"path",N)):(lr(this,"mnemonic",N),lr(this,"path",N.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return Z8(So([this.privateKey!=null?"0x0488ADE4":"0x0488B21E",or(this.depth),this.parentFingerprint,pi(or(this.index),4),this.chainCode,this.privateKey!=null?So(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new hi(rs,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&~af));const l=new Uint8Array(37);if(o&af){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(m1(Mf.sha512,this.chainCode,l)),C=b.slice(0,32),y=b.slice(32);let m=null,N=null;this.privateKey?m=qc(Wr.from(C).add(this.privateKey).mod(fB)):N=new Cs(or(C))._addPoint(this.publicKey);let M=c;const U=this.mnemonic;return U&&(M=Object.freeze({phrase:U.phrase,path:c,locale:U.locale||"en"})),new hi(rs,m,N,this.fingerprint,qc(y),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 C=c[b];if(C.match(/^[0-9]+'$/)){const y=parseInt(C.substring(0,C.length-1));if(y>=af)throw new Error("invalid path index - "+C);l=l._derive(af+y)}else if(C.match(/^[0-9]+$/)){const y=parseInt(C);if(y>=af)throw new Error("invalid path index - "+C);l=l._derive(y)}else throw new Error("invalid path component - "+C)}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(m1(Mf.sha512,cB,l));return new hi(rs,qc(b.slice(0,32)),null,"0x00000000",qc(b.slice(32)),0,0,c)}static fromMnemonic(o,c,l){return l=cg(l),o=ug(Ky(o,l),l),hi._fromSeed(lB(o,c),{phrase:o,path:"m",locale:l.locale})}static fromSeed(o){return hi._fromSeed(o,null)}static fromExtendedKey(o){const c=By.decode(o);(c.length!==82||Z8(c.slice(0,78))!==o)&&D1.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const l=c[4],b=or(c.slice(5,9)),C=parseInt(or(c.slice(9,13)).substring(2),16),y=or(c.slice(13,45)),m=c.slice(45,78);switch(or(c.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new hi(rs,null,or(m),b,y,C,l,null);case"0x0488ade4":case"0x04358394 ":if(m[0]!==0)break;return new hi(rs,or(m.slice(1)),null,b,y,C,l,null)}return D1.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function lB(f,o){o||(o="");const c=Ri("mnemonic"+o,p2.NFKD);return ag(Ri(f,p2.NFKD),c,2048,64,"sha512")}function Ky(f,o){o=cg(o),D1.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 U=o.getWordIndex(c[M].normalize("NFKD"));if(U===-1)throw new Error("invalid mnemonic");for(let w=0;w<11;w++)U&1<<10-w&&(l[b>>3]|=1<<7-b%8),b++}const C=32*c.length/3,y=c.length/3,m=Py(y);if((Nt(Nf(l.slice(0,C/8)))[0]&m)!==(l[l.length-1]&m))throw new Error("invalid checksum");return or(l.slice(0,C/8))}function ug(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 y=0;y<f.length;y++)l>8?(c[c.length-1]<<=8,c[c.length-1]|=f[y],l-=8):(c[c.length-1]<<=l,c[c.length-1]|=f[y]>>8-l,c.push(f[y]&uB(8-l)),l+=3);const b=f.length/4,C=Nt(Nf(f))[0]&Py(b);return c[c.length-1]<<=b,c[c.length-1]|=C>>8-b,o.join(c.map(y=>o.getWord(y)))}const hB="random/5.8.0",Ad=new zt(hB);function dB(){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 $8=dB();let i1=$8.crypto||$8.msCrypto;(!i1||!i1.getRandomValues)&&(Ad.warn("WARNING: Missing strong random number source"),i1={getRandomValues:function(f){return Ad.throwError("no secure random source avaialble",zt.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});function uf(f){(f<=0||f>1024||f%1||f!=f)&&Ad.throwArgumentError("invalid length","length",f);const o=new Uint8Array(f);return i1.getRandomValues(o),Nt(o)}var sh={exports:{}},ep;function gB(){return ep||(ep=1,function(f,o){(function(c){function l(Y){return parseInt(Y)===Y}function b(Y){if(!l(Y.length))return!1;for(var z=0;z<Y.length;z++)if(!l(Y[z])||Y[z]<0||Y[z]>255)return!1;return!0}function C(Y,z){if(Y.buffer&&ArrayBuffer.isView(Y)&&Y.name==="Uint8Array")return z&&(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 y(Y){return new Uint8Array(Y)}function m(Y,z,me,ze,se){(ze!=null||se!=null)&&(Y.slice?Y=Y.slice(ze,se):Y=Array.prototype.slice.call(Y,ze,se)),z.set(Y,me)}var N=function(){function Y(me){var ze=[],se=0;for(me=encodeURI(me);se<me.length;){var Ve=me.charCodeAt(se++);Ve===37?(ze.push(parseInt(me.substr(se,2),16)),se+=2):ze.push(Ve)}return C(ze)}function z(me){for(var ze=[],se=0;se<me.length;){var Ve=me[se];Ve<128?(ze.push(String.fromCharCode(Ve)),se++):Ve>191&&Ve<224?(ze.push(String.fromCharCode((Ve&31)<<6|me[se+1]&63)),se+=2):(ze.push(String.fromCharCode((Ve&15)<<12|(me[se+1]&63)<<6|me[se+2]&63)),se+=3)}return ze.join("")}return{toBytes:Y,fromBytes:z}}(),M=function(){function Y(ze){for(var se=[],Ve=0;Ve<ze.length;Ve+=2)se.push(parseInt(ze.substr(Ve,2),16));return se}var z="0123456789abcdef";function me(ze){for(var se=[],Ve=0;Ve<ze.length;Ve++){var h0=ze[Ve];se.push(z[(h0&240)>>4]+z[h0&15])}return se.join("")}return{toBytes:Y,fromBytes:me}}(),U={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],ae=[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],Ee=[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],pe=[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],xe=[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],Ie=[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],ie=[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],n0=[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],le=[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],Ne=[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],ye=[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],Xe=[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],re=[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 a0(Y){for(var z=[],me=0;me<Y.length;me+=4)z.push(Y[me]<<24|Y[me+1]<<16|Y[me+2]<<8|Y[me+3]);return z}var Qe=function(Y){if(!(this instanceof Qe))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:C(Y,!0)}),this._prepare()};Qe.prototype._prepare=function(){var Y=U[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 z=0;z<=Y;z++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);for(var me=(Y+1)*4,ze=this.key.length/4,se=a0(this.key),Ve,z=0;z<ze;z++)Ve=z>>2,this._Ke[Ve][z%4]=se[z],this._Kd[Y-Ve][z%4]=se[z];for(var h0=0,y0=ze,C0;y0<me;){if(C0=se[ze-1],se[0]^=ae[C0>>16&255]<<24^ae[C0>>8&255]<<16^ae[C0&255]<<8^ae[C0>>24&255]^w[h0]<<24,h0+=1,ze!=8)for(var z=1;z<ze;z++)se[z]^=se[z-1];else{for(var z=1;z<ze/2;z++)se[z]^=se[z-1];C0=se[ze/2-1],se[ze/2]^=ae[C0&255]^ae[C0>>8&255]<<8^ae[C0>>16&255]<<16^ae[C0>>24&255]<<24;for(var z=ze/2+1;z<ze;z++)se[z]^=se[z-1]}for(var z=0,q0,rt;z<ze&&y0<me;)q0=y0>>2,rt=y0%4,this._Ke[q0][rt]=se[z],this._Kd[Y-q0][rt]=se[z++],y0++}for(var q0=1;q0<Y;q0++)for(var rt=0;rt<4;rt++)C0=this._Kd[q0][rt],this._Kd[q0][rt]=Ne[C0>>24&255]^ye[C0>>16&255]^Xe[C0>>8&255]^re[C0&255]},Qe.prototype.encrypt=function(Y){if(Y.length!=16)throw new Error("invalid plaintext size (must be 16 bytes)");for(var z=this._Ke.length-1,me=[0,0,0,0],ze=a0(Y),se=0;se<4;se++)ze[se]^=this._Ke[0][se];for(var Ve=1;Ve<z;Ve++){for(var se=0;se<4;se++)me[se]=pe[ze[se]>>24&255]^V[ze[(se+1)%4]>>16&255]^xe[ze[(se+2)%4]>>8&255]^Ie[ze[(se+3)%4]&255]^this._Ke[Ve][se];ze=me.slice()}for(var h0=y(16),y0,se=0;se<4;se++)y0=this._Ke[z][se],h0[4*se]=(ae[ze[se]>>24&255]^y0>>24)&255,h0[4*se+1]=(ae[ze[(se+1)%4]>>16&255]^y0>>16)&255,h0[4*se+2]=(ae[ze[(se+2)%4]>>8&255]^y0>>8)&255,h0[4*se+3]=(ae[ze[(se+3)%4]&255]^y0)&255;return h0},Qe.prototype.decrypt=function(Y){if(Y.length!=16)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var z=this._Kd.length-1,me=[0,0,0,0],ze=a0(Y),se=0;se<4;se++)ze[se]^=this._Kd[0][se];for(var Ve=1;Ve<z;Ve++){for(var se=0;se<4;se++)me[se]=_e[ze[se]>>24&255]^ie[ze[(se+3)%4]>>16&255]^n0[ze[(se+2)%4]>>8&255]^le[ze[(se+1)%4]&255]^this._Kd[Ve][se];ze=me.slice()}for(var h0=y(16),y0,se=0;se<4;se++)y0=this._Kd[z][se],h0[4*se]=(Ee[ze[se]>>24&255]^y0>>24)&255,h0[4*se+1]=(Ee[ze[(se+3)%4]>>16&255]^y0>>16)&255,h0[4*se+2]=(Ee[ze[(se+2)%4]>>8&255]^y0>>8)&255,h0[4*se+3]=(Ee[ze[(se+1)%4]&255]^y0)&255;return h0};var L=function(Y){if(!(this instanceof L))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new Qe(Y)};L.prototype.encrypt=function(Y){if(Y=C(Y),Y.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var z=y(Y.length),me=y(16),ze=0;ze<Y.length;ze+=16)m(Y,me,0,ze,ze+16),me=this._aes.encrypt(me),m(me,z,ze);return z},L.prototype.decrypt=function(Y){if(Y=C(Y),Y.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var z=y(Y.length),me=y(16),ze=0;ze<Y.length;ze+=16)m(Y,me,0,ze,ze+16),me=this._aes.decrypt(me),m(me,z,ze);return z};var G=function(Y,z){if(!(this instanceof G))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",!z)z=y(16);else if(z.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastCipherblock=C(z,!0),this._aes=new Qe(Y)};G.prototype.encrypt=function(Y){if(Y=C(Y),Y.length%16!==0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var z=y(Y.length),me=y(16),ze=0;ze<Y.length;ze+=16){m(Y,me,0,ze,ze+16);for(var se=0;se<16;se++)me[se]^=this._lastCipherblock[se];this._lastCipherblock=this._aes.encrypt(me),m(this._lastCipherblock,z,ze)}return z},G.prototype.decrypt=function(Y){if(Y=C(Y),Y.length%16!==0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var z=y(Y.length),me=y(16),ze=0;ze<Y.length;ze+=16){m(Y,me,0,ze,ze+16),me=this._aes.decrypt(me);for(var se=0;se<16;se++)z[ze+se]=me[se]^this._lastCipherblock[se];m(Y,this._lastCipherblock,0,ze,ze+16)}return z};var S=function(Y,z,me){if(!(this instanceof S))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",!z)z=y(16);else if(z.length!=16)throw new Error("invalid initialation vector size (must be 16 size)");me||(me=1),this.segmentSize=me,this._shiftRegister=C(z,!0),this._aes=new Qe(Y)};S.prototype.encrypt=function(Y){if(Y.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var z=C(Y,!0),me,ze=0;ze<z.length;ze+=this.segmentSize){me=this._aes.encrypt(this._shiftRegister);for(var se=0;se<this.segmentSize;se++)z[ze+se]^=me[se];m(this._shiftRegister,this._shiftRegister,0,this.segmentSize),m(z,this._shiftRegister,16-this.segmentSize,ze,ze+this.segmentSize)}return z},S.prototype.decrypt=function(Y){if(Y.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var z=C(Y,!0),me,ze=0;ze<z.length;ze+=this.segmentSize){me=this._aes.encrypt(this._shiftRegister);for(var se=0;se<this.segmentSize;se++)z[ze+se]^=me[se];m(this._shiftRegister,this._shiftRegister,0,this.segmentSize),m(Y,this._shiftRegister,16-this.segmentSize,ze,ze+this.segmentSize)}return z};var J=function(Y,z){if(!(this instanceof J))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",!z)z=y(16);else if(z.length!=16)throw new Error("invalid initialation vector size (must be 16 bytes)");this._lastPrecipher=C(z,!0),this._lastPrecipherIndex=16,this._aes=new Qe(Y)};J.prototype.encrypt=function(Y){for(var z=C(Y,!0),me=0;me<z.length;me++)this._lastPrecipherIndex===16&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),z[me]^=this._lastPrecipher[this._lastPrecipherIndex++];return z},J.prototype.decrypt=J.prototype.encrypt;var W=function(Y){if(!(this instanceof W))throw Error("Counter must be instanitated with `new`");Y!==0&&!Y&&(Y=1),typeof Y=="number"?(this._counter=y(16),this.setValue(Y)):this.setBytes(Y)};W.prototype.setValue=function(Y){if(typeof Y!="number"||parseInt(Y)!=Y)throw new Error("invalid counter value (must be an integer)");for(var z=15;z>=0;--z)this._counter[z]=Y%256,Y=Y>>8},W.prototype.setBytes=function(Y){if(Y=C(Y,!0),Y.length!=16)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=Y},W.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 fe=function(Y,z){if(!(this instanceof fe))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",z instanceof W||(z=new W(z)),this._counter=z,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new Qe(Y)};fe.prototype.encrypt=function(Y){for(var z=C(Y,!0),me=0;me<z.length;me++)this._remainingCounterIndex===16&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),z[me]^=this._remainingCounter[this._remainingCounterIndex++];return z},fe.prototype.decrypt=fe.prototype.encrypt;function he(Y){Y=C(Y,!0);var z=16-Y.length%16,me=y(Y.length+z);m(Y,me);for(var ze=Y.length;ze<me.length;ze++)me[ze]=z;return me}function Ce(Y){if(Y=C(Y,!0),Y.length<16)throw new Error("PKCS#7 invalid length");var z=Y[Y.length-1];if(z>16)throw new Error("PKCS#7 padding byte out of range");for(var me=Y.length-z,ze=0;ze<z;ze++)if(Y[me+ze]!==z)throw new Error("PKCS#7 invalid padding byte");var se=y(me);return m(Y,se,0,0,me),se}var j={AES:Qe,Counter:W,ModeOfOperation:{ecb:L,cbc:G,cfb:S,ofb:J,ctr:fe},utils:{hex:M,utf8:N},padding:{pkcs7:{pad:he,strip:Ce}},_arrayTest:{coerceArray:C,createArray:y,copyArray:m}};f.exports=j})()}(sh)),sh.exports}var pB=gB();const sa=Yi(pB),Hy="json-wallets/5.8.0";function c2(f){return typeof f=="string"&&f.substring(0,2)!=="0x"&&(f="0x"+f),Nt(f)}function of(f,o){for(f=String(f);f.length<o;)f="0"+f;return f}function lg(f){return typeof f=="string"?Ri(f,p2.NFKC):Nt(f)}function En(f,o){let c=f;const l=o.toLowerCase().split("/");for(let b=0;b<l.length;b++){let C=null;for(const y in c)if(y.toLowerCase()===l[b]){C=c[y];break}if(C===null)return null;c=C}return c}function yB(f){const o=Nt(f);o[6]=o[6]&15|64,o[8]=o[8]&63|128;const c=or(o);return[c.substring(2,10),c.substring(10,14),c.substring(14,18),c.substring(18,22),c.substring(22,34)].join("-")}const CB=new zt(Hy);class IB extends vy{isCrowdsaleAccount(o){return!!(o&&o._isCrowdsaleAccount)}}function Uy(f,o){const c=JSON.parse(f);o=lg(o);const l=Gi(En(c,"ethaddr")),b=c2(En(c,"encseed"));(!b||b.length%16!==0)&&CB.throwArgumentError("invalid encseed","json",f);const C=Nt(ag(o,o,2e3,32,"sha256")).slice(0,16),y=b.slice(0,16),m=b.slice(16),N=new sa.ModeOfOperation.cbc(C,y),M=sa.padding.pkcs7.strip(Nt(N.decrypt(m)));let U="";for(let Ee=0;Ee<M.length;Ee++)U+=String.fromCharCode(M[Ee]);const w=Ri(U),ae=BA(w);return new IB({_isCrowdsaleAccount:!0,address:l,privateKey:ae})}function Ry(f){let o=null;try{o=JSON.parse(f)}catch{return!1}return o.encseed&&o.ethaddr}function Gy(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 fh={exports:{}},tp;function bB(){return tp||(tp=1,function(f,o){(function(c){function b(V){const xe=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 Ie=1779033703,_e=3144134277,ie=1013904242,n0=2773480762,le=1359893119,Ne=2600822924,ye=528734635,Xe=1541459225;const re=new Uint32Array(64);function a0(fe){let he=0,Ce=fe.length;for(;Ce>=64;){let j=Ie,Y=_e,z=ie,me=n0,ze=le,se=Ne,Ve=ye,h0=Xe,y0,C0,q0,rt,V0;for(C0=0;C0<16;C0++)q0=he+C0*4,re[C0]=(fe[q0]&255)<<24|(fe[q0+1]&255)<<16|(fe[q0+2]&255)<<8|fe[q0+3]&255;for(C0=16;C0<64;C0++)y0=re[C0-2],rt=(y0>>>17|y0<<15)^(y0>>>19|y0<<13)^y0>>>10,y0=re[C0-15],V0=(y0>>>7|y0<<25)^(y0>>>18|y0<<14)^y0>>>3,re[C0]=(rt+re[C0-7]|0)+(V0+re[C0-16]|0)|0;for(C0=0;C0<64;C0++)rt=(((ze>>>6|ze<<26)^(ze>>>11|ze<<21)^(ze>>>25|ze<<7))+(ze&se^~ze&Ve)|0)+(h0+(xe[C0]+re[C0]|0)|0)|0,V0=((j>>>2|j<<30)^(j>>>13|j<<19)^(j>>>22|j<<10))+(j&Y^j&z^Y&z)|0,h0=Ve,Ve=se,se=ze,ze=me+rt|0,me=z,z=Y,Y=j,j=rt+V0|0;Ie=Ie+j|0,_e=_e+Y|0,ie=ie+z|0,n0=n0+me|0,le=le+ze|0,Ne=Ne+se|0,ye=ye+Ve|0,Xe=Xe+h0|0,he+=64,Ce-=64}}a0(V);let Qe,L=V.length%64,G=V.length/536870912|0,S=V.length<<3,J=L<56?56:120,W=V.slice(V.length-L,V.length);for(W.push(128),Qe=L+1;Qe<J;Qe++)W.push(0);return W.push(G>>>24&255),W.push(G>>>16&255),W.push(G>>>8&255),W.push(G>>>0&255),W.push(S>>>24&255),W.push(S>>>16&255),W.push(S>>>8&255),W.push(S>>>0&255),a0(W),[Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie>>>0&255,_e>>>24&255,_e>>>16&255,_e>>>8&255,_e>>>0&255,ie>>>24&255,ie>>>16&255,ie>>>8&255,ie>>>0&255,n0>>>24&255,n0>>>16&255,n0>>>8&255,n0>>>0&255,le>>>24&255,le>>>16&255,le>>>8&255,le>>>0&255,Ne>>>24&255,Ne>>>16&255,Ne>>>8&255,Ne>>>0&255,ye>>>24&255,ye>>>16&255,ye>>>8&255,ye>>>0&255,Xe>>>24&255,Xe>>>16&255,Xe>>>8&255,Xe>>>0&255]}function C(V,xe,Ie){V=V.length<=64?V:b(V);const _e=64+xe.length+4,ie=new Array(_e),n0=new Array(64);let le,Ne=[];for(le=0;le<64;le++)ie[le]=54;for(le=0;le<V.length;le++)ie[le]^=V[le];for(le=0;le<xe.length;le++)ie[64+le]=xe[le];for(le=_e-4;le<_e;le++)ie[le]=0;for(le=0;le<64;le++)n0[le]=92;for(le=0;le<V.length;le++)n0[le]^=V[le];function ye(){for(let Xe=_e-1;Xe>=_e-4;Xe--){if(ie[Xe]++,ie[Xe]<=255)return;ie[Xe]=0}}for(;Ie>=32;)ye(),Ne=Ne.concat(b(n0.concat(b(ie)))),Ie-=32;return Ie>0&&(ye(),Ne=Ne.concat(b(n0.concat(b(ie))).slice(0,Ie))),Ne}function y(V,xe,Ie,_e,ie){let n0;for(U(V,(2*Ie-1)*16,ie,0,16),n0=0;n0<2*Ie;n0++)M(V,n0*16,ie,16),N(ie,_e),U(ie,0,V,xe+n0*16,16);for(n0=0;n0<Ie;n0++)U(V,xe+n0*2*16,V,n0*16,16);for(n0=0;n0<Ie;n0++)U(V,xe+(n0*2+1)*16,V,(n0+Ie)*16,16)}function m(V,xe){return V<<xe|V>>>32-xe}function N(V,xe){U(V,0,xe,0,16);for(let Ie=8;Ie>0;Ie-=2)xe[4]^=m(xe[0]+xe[12],7),xe[8]^=m(xe[4]+xe[0],9),xe[12]^=m(xe[8]+xe[4],13),xe[0]^=m(xe[12]+xe[8],18),xe[9]^=m(xe[5]+xe[1],7),xe[13]^=m(xe[9]+xe[5],9),xe[1]^=m(xe[13]+xe[9],13),xe[5]^=m(xe[1]+xe[13],18),xe[14]^=m(xe[10]+xe[6],7),xe[2]^=m(xe[14]+xe[10],9),xe[6]^=m(xe[2]+xe[14],13),xe[10]^=m(xe[6]+xe[2],18),xe[3]^=m(xe[15]+xe[11],7),xe[7]^=m(xe[3]+xe[15],9),xe[11]^=m(xe[7]+xe[3],13),xe[15]^=m(xe[11]+xe[7],18),xe[1]^=m(xe[0]+xe[3],7),xe[2]^=m(xe[1]+xe[0],9),xe[3]^=m(xe[2]+xe[1],13),xe[0]^=m(xe[3]+xe[2],18),xe[6]^=m(xe[5]+xe[4],7),xe[7]^=m(xe[6]+xe[5],9),xe[4]^=m(xe[7]+xe[6],13),xe[5]^=m(xe[4]+xe[7],18),xe[11]^=m(xe[10]+xe[9],7),xe[8]^=m(xe[11]+xe[10],9),xe[9]^=m(xe[8]+xe[11],13),xe[10]^=m(xe[9]+xe[8],18),xe[12]^=m(xe[15]+xe[14],7),xe[13]^=m(xe[12]+xe[15],9),xe[14]^=m(xe[13]+xe[12],13),xe[15]^=m(xe[14]+xe[13],18);for(let Ie=0;Ie<16;++Ie)V[Ie]+=xe[Ie]}function M(V,xe,Ie,_e){for(let ie=0;ie<_e;ie++)Ie[ie]^=V[xe+ie]}function U(V,xe,Ie,_e,ie){for(;ie--;)Ie[_e++]=V[xe++]}function w(V){if(!V||typeof V.length!="number")return!1;for(let xe=0;xe<V.length;xe++){const Ie=V[xe];if(typeof Ie!="number"||Ie%1||Ie<0||Ie>=256)return!1}return!0}function ae(V,xe){if(typeof V!="number"||V%1)throw new Error("invalid "+xe);return V}function Ee(V,xe,Ie,_e,ie,n0,le){if(Ie=ae(Ie,"N"),_e=ae(_e,"r"),ie=ae(ie,"p"),n0=ae(n0,"dkLen"),Ie===0||(Ie&Ie-1)!==0)throw new Error("N must be power of 2");if(Ie>2147483647/128/_e)throw new Error("N too large");if(_e>2147483647/128/ie)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(xe))throw new Error("salt must be an array or buffer");xe=Array.prototype.slice.call(xe);let Ne=C(V,xe,ie*128*_e);const ye=new Uint32Array(ie*32*_e);for(let ze=0;ze<ye.length;ze++){const se=ze*4;ye[ze]=(Ne[se+3]&255)<<24|(Ne[se+2]&255)<<16|(Ne[se+1]&255)<<8|(Ne[se+0]&255)<<0}const Xe=new Uint32Array(64*_e),re=new Uint32Array(32*_e*Ie),a0=32*_e,Qe=new Uint32Array(16),L=new Uint32Array(16),G=ie*Ie*2;let S=0,J=null,W=!1,fe=0,he=0,Ce,j;const Y=le?parseInt(1e3/_e):4294967295,z=typeof setImmediate<"u"?setImmediate:setTimeout,me=function(){if(W)return le(new Error("cancelled"),S/G);let ze;switch(fe){case 0:j=he*32*_e,U(ye,j,Xe,0,a0),fe=1,Ce=0;case 1:ze=Ie-Ce,ze>Y&&(ze=Y);for(let Ve=0;Ve<ze;Ve++)U(Xe,0,re,(Ce+Ve)*a0,a0),y(Xe,a0,_e,Qe,L);if(Ce+=ze,S+=ze,le){const Ve=parseInt(1e3*S/G);if(Ve!==J){if(W=le(null,S/G),W)break;J=Ve}}if(Ce<Ie)break;Ce=0,fe=2;case 2:ze=Ie-Ce,ze>Y&&(ze=Y);for(let Ve=0;Ve<ze;Ve++){const h0=(2*_e-1)*16,y0=Xe[h0]&Ie-1;M(re,y0*a0,Xe,a0),y(Xe,a0,_e,Qe,L)}if(Ce+=ze,S+=ze,le){const Ve=parseInt(1e3*S/G);if(Ve!==J){if(W=le(null,S/G),W)break;J=Ve}}if(Ce<Ie)break;if(U(Xe,0,ye,j,a0),he++,he<ie){fe=0;break}Ne=[];for(let Ve=0;Ve<ye.length;Ve++)Ne.push(ye[Ve]>>0&255),Ne.push(ye[Ve]>>8&255),Ne.push(ye[Ve]>>16&255),Ne.push(ye[Ve]>>24&255);const se=C(V,Ne,n0);return le&&le(null,1,se),se}le&&z(me)};if(!le)for(;;){const ze=me();if(ze!=null)return ze}me()}const pe={scrypt:function(V,xe,Ie,_e,ie,n0,le){return new Promise(function(Ne,ye){let Xe=0;le&&le(0),Ee(V,xe,Ie,_e,ie,n0,function(re,a0,Qe){if(re)ye(re);else if(Qe)le&&Xe!==1&&le(1),Ne(new Uint8Array(Qe));else if(le&&a0!==Xe)return Xe=a0,le(a0)})})},syncScrypt:function(V,xe,Ie,_e,ie,n0){return new Uint8Array(Ee(V,xe,Ie,_e,ie,n0))}};f.exports=pe})()}(fh)),fh.exports}var vB=bB();const hg=Yi(vB);var xB=function(f,o,c,l){function b(C){return C instanceof c?C:new c(function(y){y(C)})}return new(c||(c=Promise))(function(C,y){function m(U){try{M(l.next(U))}catch(w){y(w)}}function N(U){try{M(l.throw(U))}catch(w){y(w)}}function M(U){U.done?C(U.value):b(U.value).then(m,N)}M((l=l.apply(f,o||[])).next())})};const id=new zt(Hy);function rp(f){return f!=null&&f.mnemonic&&f.mnemonic.phrase}class EB extends vy{isKeystoreAccount(o){return!!(o&&o._isKeystoreAccount)}}function _B(f,o,c){if(En(f,"crypto/cipher")==="aes-128-ctr"){const b=c2(En(f,"crypto/cipherparams/iv")),C=new sa.Counter(b),y=new sa.ModeOfOperation.ctr(o,C);return Nt(y.decrypt(c))}return null}function Yy(f,o){const c=c2(En(f,"crypto/ciphertext"));if(or(BA(So([o.slice(16,32),c]))).substring(2)!==En(f,"crypto/mac").toLowerCase())throw new Error("invalid password");const b=_B(f,o.slice(0,16),c);b||id.throwError("unsupported cipher",zt.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const C=o.slice(32,64),y=Is(b);if(f.address){let N=f.address.toLowerCase();if(N.substring(0,2)!=="0x"&&(N="0x"+N),Gi(N)!==y)throw new Error("address mismatch")}const m={_isKeystoreAccount:!0,address:y,privateKey:or(b)};if(En(f,"x-ethers/version")==="0.1"){const N=c2(En(f,"x-ethers/mnemonicCiphertext")),M=c2(En(f,"x-ethers/mnemonicCounter")),U=new sa.Counter(M),w=new sa.ModeOfOperation.ctr(C,U),ae=En(f,"x-ethers/path")||Ff,Ee=En(f,"x-ethers/locale")||"en",pe=Nt(w.decrypt(N));try{const V=ug(pe,Ee),xe=hi.fromMnemonic(V,null,Ee).derivePath(ae);if(xe.privateKey!=m.privateKey)throw new Error("mnemonic mismatch");m.mnemonic=xe.mnemonic}catch(V){if(V.code!==zt.errors.INVALID_ARGUMENT||V.argument!=="wordlist")throw V}}return new EB(m)}function Ly(f,o,c,l,b){return Nt(ag(f,o,c,l,b))}function wB(f,o,c,l,b){return Promise.resolve(Ly(f,o,c,l,b))}function Ty(f,o,c,l,b){const C=lg(o),y=En(f,"crypto/kdf");if(y&&typeof y=="string"){const m=function(N,M){return id.throwArgumentError("invalid key-derivation function parameters",N,M)};if(y.toLowerCase()==="scrypt"){const N=c2(En(f,"crypto/kdfparams/salt")),M=parseInt(En(f,"crypto/kdfparams/n")),U=parseInt(En(f,"crypto/kdfparams/r")),w=parseInt(En(f,"crypto/kdfparams/p"));(!M||!U||!w)&&m("kdf",y),(M&M-1)!==0&&m("N",M);const ae=parseInt(En(f,"crypto/kdfparams/dklen"));return ae!==32&&m("dklen",ae),l(C,N,M,U,w,64,b)}else if(y.toLowerCase()==="pbkdf2"){const N=c2(En(f,"crypto/kdfparams/salt"));let M=null;const U=En(f,"crypto/kdfparams/prf");U==="hmac-sha256"?M="sha256":U==="hmac-sha512"?M="sha512":m("prf",U);const w=parseInt(En(f,"crypto/kdfparams/c")),ae=parseInt(En(f,"crypto/kdfparams/dklen"));return ae!==32&&m("dklen",ae),c(C,N,w,ae,M)}}return id.throwArgumentError("unsupported key-derivation function","kdf",y)}function BB(f,o){const c=JSON.parse(f),l=Ty(c,o,Ly,hg.syncScrypt);return Yy(c,l)}function mB(f,o,c){return xB(this,void 0,void 0,function*(){const l=JSON.parse(f),b=yield Ty(l,o,wB,hg.scrypt,c);return Yy(l,b)})}function QB(f,o,c,l){try{if(Gi(f.address)!==Is(f.privateKey))throw new Error("address/privateKey mismatch");if(rp(f)){const xe=f.mnemonic;if(hi.fromMnemonic(xe.phrase,null,xe.locale).derivePath(xe.path||Ff).privateKey!=f.privateKey)throw new Error("mnemonic mismatch")}}catch(xe){return Promise.reject(xe)}typeof c=="function"&&!l&&(l=c,c={}),c||(c={});const b=Nt(f.privateKey),C=lg(o);let y=null,m=null,N=null;if(rp(f)){const xe=f.mnemonic;y=Nt(Ky(xe.phrase,xe.locale||"en")),m=xe.path||Ff,N=xe.locale||"en"}let M=c.client;M||(M="ethers.js");let U=null;c.salt?U=Nt(c.salt):U=uf(32);let w=null;if(c.iv){if(w=Nt(c.iv),w.length!==16)throw new Error("invalid iv")}else w=uf(16);let ae=null;if(c.uuid){if(ae=Nt(c.uuid),ae.length!==16)throw new Error("invalid uuid")}else ae=uf(16);let Ee=1<<17,pe=8,V=1;return c.scrypt&&(c.scrypt.N&&(Ee=c.scrypt.N),c.scrypt.r&&(pe=c.scrypt.r),c.scrypt.p&&(V=c.scrypt.p)),hg.scrypt(C,U,Ee,pe,V,64,l).then(xe=>{xe=Nt(xe);const Ie=xe.slice(0,16),_e=xe.slice(16,32),ie=xe.slice(32,64),n0=new sa.Counter(w),le=new sa.ModeOfOperation.ctr(Ie,n0),Ne=Nt(le.encrypt(b)),ye=BA(So([_e,Ne])),Xe={address:f.address.substring(2).toLowerCase(),id:yB(ae),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:or(w).substring(2)},ciphertext:or(Ne).substring(2),kdf:"scrypt",kdfparams:{salt:or(U).substring(2),n:Ee,dklen:32,p:V,r:pe},mac:ye.substring(2)}};if(y){const re=uf(16),a0=new sa.Counter(re),Qe=new sa.ModeOfOperation.ctr(ie,a0),L=Nt(Qe.encrypt(y)),G=new Date,S=G.getUTCFullYear()+"-"+of(G.getUTCMonth()+1,2)+"-"+of(G.getUTCDate(),2)+"T"+of(G.getUTCHours(),2)+"-"+of(G.getUTCMinutes(),2)+"-"+of(G.getUTCSeconds(),2)+".0Z";Xe["x-ethers"]={client:M,gethFilename:"UTC--"+S+"--"+Xe.address,mnemonicCounter:or(re).substring(2),mnemonicCiphertext:or(L).substring(2),path:m,locale:N,version:"0.1"}}return JSON.stringify(Xe)})}function SB(f,o,c){if(Ry(f)){c&&c(0);const l=Uy(f,o);return c&&c(1),Promise.resolve(l)}return Gy(f)?mB(f,o,c):Promise.reject(new Error("invalid JSON wallet"))}function DB(f,o){if(Ry(f))return Uy(f,o);if(Gy(f))return BB(f,o);throw new Error("invalid JSON wallet")}const kB="wallet/5.8.0";var np=function(f,o,c,l){function b(C){return C instanceof c?C:new c(function(y){y(C)})}return new(c||(c=Promise))(function(C,y){function m(U){try{M(l.next(U))}catch(w){y(w)}}function N(U){try{M(l.throw(U))}catch(w){y(w)}}function M(U){U.done?C(U.value):b(U.value).then(m,N)}M((l=l.apply(f,o||[])).next())})};const ns=new zt(kB);function MB(f){return f!=null&&mA(f.privateKey,32)&&f.address!=null}function NB(f){const o=f.mnemonic;return o&&o.phrase}class a2 extends Ag{constructor(o,c){if(super(),MB(o)){const l=new Cs(o.privateKey);if(lr(this,"_signingKey",()=>l),lr(this,"address",Is(this.publicKey)),this.address!==Gi(o.address)&&ns.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),NB(o)){const b=o.mnemonic;lr(this,"_mnemonic",()=>({phrase:b.phrase,path:b.path||Ff,locale:b.locale||"en"}));const C=this.mnemonic,y=hi.fromMnemonic(C.phrase,null,C.locale).derivePath(C.path);Is(y.privateKey)!==this.address&&ns.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else lr(this,"_mnemonic",()=>null)}else{if(Cs.isSigningKey(o))o.curve!=="secp256k1"&&ns.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 Cs(o);lr(this,"_signingKey",()=>l)}lr(this,"_mnemonic",()=>null),lr(this,"address",Is(this.publicKey))}c&&!ng.isProvider(c)&&ns.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 a2(this,o)}signTransaction(o){return as(o).then(c=>{c.from!=null&&(Gi(c.from)!==this.address&&ns.throwArgumentError("transaction from address mismatch","transaction.from",o.from),delete c.from);const l=this._signingKey().signDigest(BA(V8(c)));return V8(c,l)})}signMessage(o){return np(this,void 0,void 0,function*(){return ed(this._signingKey().signDigest(xw(o)))})}_signTypedData(o,c,l){return np(this,void 0,void 0,function*(){const b=yield VA.resolveNames(o,c,l,C=>(this.provider==null&&ns.throwError("cannot resolve ENS names without a provider",zt.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:C}),this.provider.resolveName(C)));return ed(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={}),QB(this,o,c,l)}static createRandom(o){let c=uf(16);o||(o={}),o.extraEntropy&&(c=Nt(Df(BA(So([c,o.extraEntropy])),0,16)));const l=ug(c,o.locale);return a2.fromMnemonic(l,o.path,o.locale)}static fromEncryptedJson(o,c,l){return SB(o,c,l).then(b=>new a2(b))}static fromEncryptedJsonSync(o,c){return new a2(DB(o,c))}static fromMnemonic(o,c,l){return c||(c=Ff),new a2(hi.fromMnemonic(o,null,l).derivePath(c))}}var ch={};const FB="6.6.1",PB={version:FB};var uh={},a1={exports:{}},KB=a1.exports,Ap;function Ja(){return Ap||(Ap=1,function(f){(function(o,c){function l(Qe,L){if(!Qe)throw new Error(L||"Assertion failed")}function b(Qe,L){Qe.super_=L;var G=function(){};G.prototype=L.prototype,Qe.prototype=new G,Qe.prototype.constructor=Qe}function C(Qe,L,G){if(C.isBN(Qe))return Qe;this.negative=0,this.words=null,this.length=0,this.red=null,Qe!==null&&((L==="le"||L==="be")&&(G=L,L=10),this._init(Qe||0,L||10,G||"be"))}typeof o=="object"?o.exports=C:c.BN=C,C.BN=C,C.wordSize=26;var y;try{typeof window<"u"&&typeof window.Buffer<"u"?y=window.Buffer:y=Pa.Buffer}catch{}C.isBN=function(L){return L instanceof C?!0:L!==null&&typeof L=="object"&&L.constructor.wordSize===C.wordSize&&Array.isArray(L.words)},C.max=function(L,G){return L.cmp(G)>0?L:G},C.min=function(L,G){return L.cmp(G)<0?L:G},C.prototype._init=function(L,G,S){if(typeof L=="number")return this._initNumber(L,G,S);if(typeof L=="object")return this._initArray(L,G,S);G==="hex"&&(G=16),l(G===(G|0)&&G>=2&&G<=36),L=L.toString().replace(/\s+/g,"");var J=0;L[0]==="-"&&(J++,this.negative=1),J<L.length&&(G===16?this._parseHex(L,J,S):(this._parseBase(L,G,J),S==="le"&&this._initArray(this.toArray(),G,S)))},C.prototype._initNumber=function(L,G,S){L<0&&(this.negative=1,L=-L),L<67108864?(this.words=[L&67108863],this.length=1):L<4503599627370496?(this.words=[L&67108863,L/67108864&67108863],this.length=2):(l(L<9007199254740992),this.words=[L&67108863,L/67108864&67108863,1],this.length=3),S==="le"&&this._initArray(this.toArray(),G,S)},C.prototype._initArray=function(L,G,S){if(l(typeof L.length=="number"),L.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(L.length/3),this.words=new Array(this.length);for(var J=0;J<this.length;J++)this.words[J]=0;var W,fe,he=0;if(S==="be")for(J=L.length-1,W=0;J>=0;J-=3)fe=L[J]|L[J-1]<<8|L[J-2]<<16,this.words[W]|=fe<<he&67108863,this.words[W+1]=fe>>>26-he&67108863,he+=24,he>=26&&(he-=26,W++);else if(S==="le")for(J=0,W=0;J<L.length;J+=3)fe=L[J]|L[J+1]<<8|L[J+2]<<16,this.words[W]|=fe<<he&67108863,this.words[W+1]=fe>>>26-he&67108863,he+=24,he>=26&&(he-=26,W++);return this.strip()};function m(Qe,L){var G=Qe.charCodeAt(L);return G>=65&&G<=70?G-55:G>=97&&G<=102?G-87:G-48&15}function N(Qe,L,G){var S=m(Qe,G);return G-1>=L&&(S|=m(Qe,G-1)<<4),S}C.prototype._parseHex=function(L,G,S){this.length=Math.ceil((L.length-G)/6),this.words=new Array(this.length);for(var J=0;J<this.length;J++)this.words[J]=0;var W=0,fe=0,he;if(S==="be")for(J=L.length-1;J>=G;J-=2)he=N(L,G,J)<<W,this.words[fe]|=he&67108863,W>=18?(W-=18,fe+=1,this.words[fe]|=he>>>26):W+=8;else{var Ce=L.length-G;for(J=Ce%2===0?G+1:G;J<L.length;J+=2)he=N(L,G,J)<<W,this.words[fe]|=he&67108863,W>=18?(W-=18,fe+=1,this.words[fe]|=he>>>26):W+=8}this.strip()};function M(Qe,L,G,S){for(var J=0,W=Math.min(Qe.length,G),fe=L;fe<W;fe++){var he=Qe.charCodeAt(fe)-48;J*=S,he>=49?J+=he-49+10:he>=17?J+=he-17+10:J+=he}return J}C.prototype._parseBase=function(L,G,S){this.words=[0],this.length=1;for(var J=0,W=1;W<=67108863;W*=G)J++;J--,W=W/G|0;for(var fe=L.length-S,he=fe%J,Ce=Math.min(fe,fe-he)+S,j=0,Y=S;Y<Ce;Y+=J)j=M(L,Y,Y+J,G),this.imuln(W),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j);if(he!==0){var z=1;for(j=M(L,Y,L.length,G),Y=0;Y<he;Y++)z*=G;this.imuln(z),this.words[0]+j<67108864?this.words[0]+=j:this._iaddn(j)}this.strip()},C.prototype.copy=function(L){L.words=new Array(this.length);for(var G=0;G<this.length;G++)L.words[G]=this.words[G];L.length=this.length,L.negative=this.negative,L.red=this.red},C.prototype.clone=function(){var L=new C(null);return this.copy(L),L},C.prototype._expand=function(L){for(;this.length<L;)this.words[this.length++]=0;return this},C.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},C.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},C.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var U=["","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],ae=[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];C.prototype.toString=function(L,G){L=L||10,G=G|0||1;var S;if(L===16||L==="hex"){S="";for(var J=0,W=0,fe=0;fe<this.length;fe++){var he=this.words[fe],Ce=((he<<J|W)&16777215).toString(16);W=he>>>24-J&16777215,J+=2,J>=26&&(J-=26,fe--),W!==0||fe!==this.length-1?S=U[6-Ce.length]+Ce+S:S=Ce+S}for(W!==0&&(S=W.toString(16)+S);S.length%G!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(L===(L|0)&&L>=2&&L<=36){var j=w[L],Y=ae[L];S="";var z=this.clone();for(z.negative=0;!z.isZero();){var me=z.modn(Y).toString(L);z=z.idivn(Y),z.isZero()?S=me+S:S=U[j-me.length]+me+S}for(this.isZero()&&(S="0"+S);S.length%G!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}l(!1,"Base should be between 2 and 36")},C.prototype.toNumber=function(){var L=this.words[0];return this.length===2?L+=this.words[1]*67108864:this.length===3&&this.words[2]===1?L+=4503599627370496+this.words[1]*67108864:this.length>2&&l(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-L:L},C.prototype.toJSON=function(){return this.toString(16)},C.prototype.toBuffer=function(L,G){return l(typeof y<"u"),this.toArrayLike(y,L,G)},C.prototype.toArray=function(L,G){return this.toArrayLike(Array,L,G)},C.prototype.toArrayLike=function(L,G,S){var J=this.byteLength(),W=S||Math.max(1,J);l(J<=W,"byte array longer than desired length"),l(W>0,"Requested array length <= 0"),this.strip();var fe=G==="le",he=new L(W),Ce,j,Y=this.clone();if(fe){for(j=0;!Y.isZero();j++)Ce=Y.andln(255),Y.iushrn(8),he[j]=Ce;for(;j<W;j++)he[j]=0}else{for(j=0;j<W-J;j++)he[j]=0;for(j=0;!Y.isZero();j++)Ce=Y.andln(255),Y.iushrn(8),he[W-j-1]=Ce}return he},Math.clz32?C.prototype._countBits=function(L){return 32-Math.clz32(L)}:C.prototype._countBits=function(L){var G=L,S=0;return G>=4096&&(S+=13,G>>>=13),G>=64&&(S+=7,G>>>=7),G>=8&&(S+=4,G>>>=4),G>=2&&(S+=2,G>>>=2),S+G},C.prototype._zeroBits=function(L){if(L===0)return 26;var G=L,S=0;return(G&8191)===0&&(S+=13,G>>>=13),(G&127)===0&&(S+=7,G>>>=7),(G&15)===0&&(S+=4,G>>>=4),(G&3)===0&&(S+=2,G>>>=2),(G&1)===0&&S++,S},C.prototype.bitLength=function(){var L=this.words[this.length-1],G=this._countBits(L);return(this.length-1)*26+G};function Ee(Qe){for(var L=new Array(Qe.bitLength()),G=0;G<L.length;G++){var S=G/26|0,J=G%26;L[G]=(Qe.words[S]&1<<J)>>>J}return L}C.prototype.zeroBits=function(){if(this.isZero())return 0;for(var L=0,G=0;G<this.length;G++){var S=this._zeroBits(this.words[G]);if(L+=S,S!==26)break}return L},C.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},C.prototype.toTwos=function(L){return this.negative!==0?this.abs().inotn(L).iaddn(1):this.clone()},C.prototype.fromTwos=function(L){return this.testn(L-1)?this.notn(L).iaddn(1).ineg():this.clone()},C.prototype.isNeg=function(){return this.negative!==0},C.prototype.neg=function(){return this.clone().ineg()},C.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},C.prototype.iuor=function(L){for(;this.length<L.length;)this.words[this.length++]=0;for(var G=0;G<L.length;G++)this.words[G]=this.words[G]|L.words[G];return this.strip()},C.prototype.ior=function(L){return l((this.negative|L.negative)===0),this.iuor(L)},C.prototype.or=function(L){return this.length>L.length?this.clone().ior(L):L.clone().ior(this)},C.prototype.uor=function(L){return this.length>L.length?this.clone().iuor(L):L.clone().iuor(this)},C.prototype.iuand=function(L){var G;this.length>L.length?G=L:G=this;for(var S=0;S<G.length;S++)this.words[S]=this.words[S]&L.words[S];return this.length=G.length,this.strip()},C.prototype.iand=function(L){return l((this.negative|L.negative)===0),this.iuand(L)},C.prototype.and=function(L){return this.length>L.length?this.clone().iand(L):L.clone().iand(this)},C.prototype.uand=function(L){return this.length>L.length?this.clone().iuand(L):L.clone().iuand(this)},C.prototype.iuxor=function(L){var G,S;this.length>L.length?(G=this,S=L):(G=L,S=this);for(var J=0;J<S.length;J++)this.words[J]=G.words[J]^S.words[J];if(this!==G)for(;J<G.length;J++)this.words[J]=G.words[J];return this.length=G.length,this.strip()},C.prototype.ixor=function(L){return l((this.negative|L.negative)===0),this.iuxor(L)},C.prototype.xor=function(L){return this.length>L.length?this.clone().ixor(L):L.clone().ixor(this)},C.prototype.uxor=function(L){return this.length>L.length?this.clone().iuxor(L):L.clone().iuxor(this)},C.prototype.inotn=function(L){l(typeof L=="number"&&L>=0);var G=Math.ceil(L/26)|0,S=L%26;this._expand(G),S>0&&G--;for(var J=0;J<G;J++)this.words[J]=~this.words[J]&67108863;return S>0&&(this.words[J]=~this.words[J]&67108863>>26-S),this.strip()},C.prototype.notn=function(L){return this.clone().inotn(L)},C.prototype.setn=function(L,G){l(typeof L=="number"&&L>=0);var S=L/26|0,J=L%26;return this._expand(S+1),G?this.words[S]=this.words[S]|1<<J:this.words[S]=this.words[S]&~(1<<J),this.strip()},C.prototype.iadd=function(L){var G;if(this.negative!==0&&L.negative===0)return this.negative=0,G=this.isub(L),this.negative^=1,this._normSign();if(this.negative===0&&L.negative!==0)return L.negative=0,G=this.isub(L),L.negative=1,G._normSign();var S,J;this.length>L.length?(S=this,J=L):(S=L,J=this);for(var W=0,fe=0;fe<J.length;fe++)G=(S.words[fe]|0)+(J.words[fe]|0)+W,this.words[fe]=G&67108863,W=G>>>26;for(;W!==0&&fe<S.length;fe++)G=(S.words[fe]|0)+W,this.words[fe]=G&67108863,W=G>>>26;if(this.length=S.length,W!==0)this.words[this.length]=W,this.length++;else if(S!==this)for(;fe<S.length;fe++)this.words[fe]=S.words[fe];return this},C.prototype.add=function(L){var G;return L.negative!==0&&this.negative===0?(L.negative=0,G=this.sub(L),L.negative^=1,G):L.negative===0&&this.negative!==0?(this.negative=0,G=L.sub(this),this.negative=1,G):this.length>L.length?this.clone().iadd(L):L.clone().iadd(this)},C.prototype.isub=function(L){if(L.negative!==0){L.negative=0;var G=this.iadd(L);return L.negative=1,G._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(L),this.negative=1,this._normSign();var S=this.cmp(L);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,W;S>0?(J=this,W=L):(J=L,W=this);for(var fe=0,he=0;he<W.length;he++)G=(J.words[he]|0)-(W.words[he]|0)+fe,fe=G>>26,this.words[he]=G&67108863;for(;fe!==0&&he<J.length;he++)G=(J.words[he]|0)+fe,fe=G>>26,this.words[he]=G&67108863;if(fe===0&&he<J.length&&J!==this)for(;he<J.length;he++)this.words[he]=J.words[he];return this.length=Math.max(this.length,he),J!==this&&(this.negative=1),this.strip()},C.prototype.sub=function(L){return this.clone().isub(L)};function pe(Qe,L,G){G.negative=L.negative^Qe.negative;var S=Qe.length+L.length|0;G.length=S,S=S-1|0;var J=Qe.words[0]|0,W=L.words[0]|0,fe=J*W,he=fe&67108863,Ce=fe/67108864|0;G.words[0]=he;for(var j=1;j<S;j++){for(var Y=Ce>>>26,z=Ce&67108863,me=Math.min(j,L.length-1),ze=Math.max(0,j-Qe.length+1);ze<=me;ze++){var se=j-ze|0;J=Qe.words[se]|0,W=L.words[ze]|0,fe=J*W+z,Y+=fe/67108864|0,z=fe&67108863}G.words[j]=z|0,Ce=Y|0}return Ce!==0?G.words[j]=Ce|0:G.length--,G.strip()}var V=function(L,G,S){var J=L.words,W=G.words,fe=S.words,he=0,Ce,j,Y,z=J[0]|0,me=z&8191,ze=z>>>13,se=J[1]|0,Ve=se&8191,h0=se>>>13,y0=J[2]|0,C0=y0&8191,q0=y0>>>13,rt=J[3]|0,V0=rt&8191,$e=rt>>>13,gt=J[4]|0,Ue=gt&8191,t0=gt>>>13,s0=J[5]|0,ne=s0&8191,w0=s0>>>13,H0=J[6]|0,N0=H0&8191,ot=H0>>>13,W0=J[7]|0,X0=W0&8191,vt=W0>>>13,er=J[8]|0,Yt=er&8191,yr=er>>>13,xr=J[9]|0,Lt=xr&8191,hr=xr>>>13,kr=W[0]|0,qt=kr&8191,Er=kr>>>13,Mr=W[1]|0,Jt=Mr&8191,Qr=Mr>>>13,Sr=W[2]|0,$t=Sr&8191,Dr=Sr>>>13,Cr=W[3]|0,Ht=Cr&8191,br=Cr>>>13,dr=W[4]|0,jt=dr&8191,Fr=dr>>>13,Pr=W[5]|0,Vt=Pr&8191,_r=Pr>>>13,vr=W[6]|0,Ot=vr&8191,Ir=vr>>>13,Kr=W[7]|0,Xt=Kr&8191,o0=Kr>>>13,wr=W[8]|0,Ye=wr&8191,r0=wr>>>13,u0=W[9]|0,d0=u0&8191,E0=u0>>>13;S.negative=L.negative^G.negative,S.length=19,Ce=Math.imul(me,qt),j=Math.imul(me,Er),j=j+Math.imul(ze,qt)|0,Y=Math.imul(ze,Er);var P0=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(P0>>>26)|0,P0&=67108863,Ce=Math.imul(Ve,qt),j=Math.imul(Ve,Er),j=j+Math.imul(h0,qt)|0,Y=Math.imul(h0,Er),Ce=Ce+Math.imul(me,Jt)|0,j=j+Math.imul(me,Qr)|0,j=j+Math.imul(ze,Jt)|0,Y=Y+Math.imul(ze,Qr)|0;var G0=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(G0>>>26)|0,G0&=67108863,Ce=Math.imul(C0,qt),j=Math.imul(C0,Er),j=j+Math.imul(q0,qt)|0,Y=Math.imul(q0,Er),Ce=Ce+Math.imul(Ve,Jt)|0,j=j+Math.imul(Ve,Qr)|0,j=j+Math.imul(h0,Jt)|0,Y=Y+Math.imul(h0,Qr)|0,Ce=Ce+Math.imul(me,$t)|0,j=j+Math.imul(me,Dr)|0,j=j+Math.imul(ze,$t)|0,Y=Y+Math.imul(ze,Dr)|0;var it=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(it>>>26)|0,it&=67108863,Ce=Math.imul(V0,qt),j=Math.imul(V0,Er),j=j+Math.imul($e,qt)|0,Y=Math.imul($e,Er),Ce=Ce+Math.imul(C0,Jt)|0,j=j+Math.imul(C0,Qr)|0,j=j+Math.imul(q0,Jt)|0,Y=Y+Math.imul(q0,Qr)|0,Ce=Ce+Math.imul(Ve,$t)|0,j=j+Math.imul(Ve,Dr)|0,j=j+Math.imul(h0,$t)|0,Y=Y+Math.imul(h0,Dr)|0,Ce=Ce+Math.imul(me,Ht)|0,j=j+Math.imul(me,br)|0,j=j+Math.imul(ze,Ht)|0,Y=Y+Math.imul(ze,br)|0;var Et=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(Et>>>26)|0,Et&=67108863,Ce=Math.imul(Ue,qt),j=Math.imul(Ue,Er),j=j+Math.imul(t0,qt)|0,Y=Math.imul(t0,Er),Ce=Ce+Math.imul(V0,Jt)|0,j=j+Math.imul(V0,Qr)|0,j=j+Math.imul($e,Jt)|0,Y=Y+Math.imul($e,Qr)|0,Ce=Ce+Math.imul(C0,$t)|0,j=j+Math.imul(C0,Dr)|0,j=j+Math.imul(q0,$t)|0,Y=Y+Math.imul(q0,Dr)|0,Ce=Ce+Math.imul(Ve,Ht)|0,j=j+Math.imul(Ve,br)|0,j=j+Math.imul(h0,Ht)|0,Y=Y+Math.imul(h0,br)|0,Ce=Ce+Math.imul(me,jt)|0,j=j+Math.imul(me,Fr)|0,j=j+Math.imul(ze,jt)|0,Y=Y+Math.imul(ze,Fr)|0;var wt=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(wt>>>26)|0,wt&=67108863,Ce=Math.imul(ne,qt),j=Math.imul(ne,Er),j=j+Math.imul(w0,qt)|0,Y=Math.imul(w0,Er),Ce=Ce+Math.imul(Ue,Jt)|0,j=j+Math.imul(Ue,Qr)|0,j=j+Math.imul(t0,Jt)|0,Y=Y+Math.imul(t0,Qr)|0,Ce=Ce+Math.imul(V0,$t)|0,j=j+Math.imul(V0,Dr)|0,j=j+Math.imul($e,$t)|0,Y=Y+Math.imul($e,Dr)|0,Ce=Ce+Math.imul(C0,Ht)|0,j=j+Math.imul(C0,br)|0,j=j+Math.imul(q0,Ht)|0,Y=Y+Math.imul(q0,br)|0,Ce=Ce+Math.imul(Ve,jt)|0,j=j+Math.imul(Ve,Fr)|0,j=j+Math.imul(h0,jt)|0,Y=Y+Math.imul(h0,Fr)|0,Ce=Ce+Math.imul(me,Vt)|0,j=j+Math.imul(me,_r)|0,j=j+Math.imul(ze,Vt)|0,Y=Y+Math.imul(ze,_r)|0;var I=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(I>>>26)|0,I&=67108863,Ce=Math.imul(N0,qt),j=Math.imul(N0,Er),j=j+Math.imul(ot,qt)|0,Y=Math.imul(ot,Er),Ce=Ce+Math.imul(ne,Jt)|0,j=j+Math.imul(ne,Qr)|0,j=j+Math.imul(w0,Jt)|0,Y=Y+Math.imul(w0,Qr)|0,Ce=Ce+Math.imul(Ue,$t)|0,j=j+Math.imul(Ue,Dr)|0,j=j+Math.imul(t0,$t)|0,Y=Y+Math.imul(t0,Dr)|0,Ce=Ce+Math.imul(V0,Ht)|0,j=j+Math.imul(V0,br)|0,j=j+Math.imul($e,Ht)|0,Y=Y+Math.imul($e,br)|0,Ce=Ce+Math.imul(C0,jt)|0,j=j+Math.imul(C0,Fr)|0,j=j+Math.imul(q0,jt)|0,Y=Y+Math.imul(q0,Fr)|0,Ce=Ce+Math.imul(Ve,Vt)|0,j=j+Math.imul(Ve,_r)|0,j=j+Math.imul(h0,Vt)|0,Y=Y+Math.imul(h0,_r)|0,Ce=Ce+Math.imul(me,Ot)|0,j=j+Math.imul(me,Ir)|0,j=j+Math.imul(ze,Ot)|0,Y=Y+Math.imul(ze,Ir)|0;var e=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(e>>>26)|0,e&=67108863,Ce=Math.imul(X0,qt),j=Math.imul(X0,Er),j=j+Math.imul(vt,qt)|0,Y=Math.imul(vt,Er),Ce=Ce+Math.imul(N0,Jt)|0,j=j+Math.imul(N0,Qr)|0,j=j+Math.imul(ot,Jt)|0,Y=Y+Math.imul(ot,Qr)|0,Ce=Ce+Math.imul(ne,$t)|0,j=j+Math.imul(ne,Dr)|0,j=j+Math.imul(w0,$t)|0,Y=Y+Math.imul(w0,Dr)|0,Ce=Ce+Math.imul(Ue,Ht)|0,j=j+Math.imul(Ue,br)|0,j=j+Math.imul(t0,Ht)|0,Y=Y+Math.imul(t0,br)|0,Ce=Ce+Math.imul(V0,jt)|0,j=j+Math.imul(V0,Fr)|0,j=j+Math.imul($e,jt)|0,Y=Y+Math.imul($e,Fr)|0,Ce=Ce+Math.imul(C0,Vt)|0,j=j+Math.imul(C0,_r)|0,j=j+Math.imul(q0,Vt)|0,Y=Y+Math.imul(q0,_r)|0,Ce=Ce+Math.imul(Ve,Ot)|0,j=j+Math.imul(Ve,Ir)|0,j=j+Math.imul(h0,Ot)|0,Y=Y+Math.imul(h0,Ir)|0,Ce=Ce+Math.imul(me,Xt)|0,j=j+Math.imul(me,o0)|0,j=j+Math.imul(ze,Xt)|0,Y=Y+Math.imul(ze,o0)|0;var s=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(s>>>26)|0,s&=67108863,Ce=Math.imul(Yt,qt),j=Math.imul(Yt,Er),j=j+Math.imul(yr,qt)|0,Y=Math.imul(yr,Er),Ce=Ce+Math.imul(X0,Jt)|0,j=j+Math.imul(X0,Qr)|0,j=j+Math.imul(vt,Jt)|0,Y=Y+Math.imul(vt,Qr)|0,Ce=Ce+Math.imul(N0,$t)|0,j=j+Math.imul(N0,Dr)|0,j=j+Math.imul(ot,$t)|0,Y=Y+Math.imul(ot,Dr)|0,Ce=Ce+Math.imul(ne,Ht)|0,j=j+Math.imul(ne,br)|0,j=j+Math.imul(w0,Ht)|0,Y=Y+Math.imul(w0,br)|0,Ce=Ce+Math.imul(Ue,jt)|0,j=j+Math.imul(Ue,Fr)|0,j=j+Math.imul(t0,jt)|0,Y=Y+Math.imul(t0,Fr)|0,Ce=Ce+Math.imul(V0,Vt)|0,j=j+Math.imul(V0,_r)|0,j=j+Math.imul($e,Vt)|0,Y=Y+Math.imul($e,_r)|0,Ce=Ce+Math.imul(C0,Ot)|0,j=j+Math.imul(C0,Ir)|0,j=j+Math.imul(q0,Ot)|0,Y=Y+Math.imul(q0,Ir)|0,Ce=Ce+Math.imul(Ve,Xt)|0,j=j+Math.imul(Ve,o0)|0,j=j+Math.imul(h0,Xt)|0,Y=Y+Math.imul(h0,o0)|0,Ce=Ce+Math.imul(me,Ye)|0,j=j+Math.imul(me,r0)|0,j=j+Math.imul(ze,Ye)|0,Y=Y+Math.imul(ze,r0)|0;var nn=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(nn>>>26)|0,nn&=67108863,Ce=Math.imul(Lt,qt),j=Math.imul(Lt,Er),j=j+Math.imul(hr,qt)|0,Y=Math.imul(hr,Er),Ce=Ce+Math.imul(Yt,Jt)|0,j=j+Math.imul(Yt,Qr)|0,j=j+Math.imul(yr,Jt)|0,Y=Y+Math.imul(yr,Qr)|0,Ce=Ce+Math.imul(X0,$t)|0,j=j+Math.imul(X0,Dr)|0,j=j+Math.imul(vt,$t)|0,Y=Y+Math.imul(vt,Dr)|0,Ce=Ce+Math.imul(N0,Ht)|0,j=j+Math.imul(N0,br)|0,j=j+Math.imul(ot,Ht)|0,Y=Y+Math.imul(ot,br)|0,Ce=Ce+Math.imul(ne,jt)|0,j=j+Math.imul(ne,Fr)|0,j=j+Math.imul(w0,jt)|0,Y=Y+Math.imul(w0,Fr)|0,Ce=Ce+Math.imul(Ue,Vt)|0,j=j+Math.imul(Ue,_r)|0,j=j+Math.imul(t0,Vt)|0,Y=Y+Math.imul(t0,_r)|0,Ce=Ce+Math.imul(V0,Ot)|0,j=j+Math.imul(V0,Ir)|0,j=j+Math.imul($e,Ot)|0,Y=Y+Math.imul($e,Ir)|0,Ce=Ce+Math.imul(C0,Xt)|0,j=j+Math.imul(C0,o0)|0,j=j+Math.imul(q0,Xt)|0,Y=Y+Math.imul(q0,o0)|0,Ce=Ce+Math.imul(Ve,Ye)|0,j=j+Math.imul(Ve,r0)|0,j=j+Math.imul(h0,Ye)|0,Y=Y+Math.imul(h0,r0)|0,Ce=Ce+Math.imul(me,d0)|0,j=j+Math.imul(me,E0)|0,j=j+Math.imul(ze,d0)|0,Y=Y+Math.imul(ze,E0)|0;var dt=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(dt>>>26)|0,dt&=67108863,Ce=Math.imul(Lt,Jt),j=Math.imul(Lt,Qr),j=j+Math.imul(hr,Jt)|0,Y=Math.imul(hr,Qr),Ce=Ce+Math.imul(Yt,$t)|0,j=j+Math.imul(Yt,Dr)|0,j=j+Math.imul(yr,$t)|0,Y=Y+Math.imul(yr,Dr)|0,Ce=Ce+Math.imul(X0,Ht)|0,j=j+Math.imul(X0,br)|0,j=j+Math.imul(vt,Ht)|0,Y=Y+Math.imul(vt,br)|0,Ce=Ce+Math.imul(N0,jt)|0,j=j+Math.imul(N0,Fr)|0,j=j+Math.imul(ot,jt)|0,Y=Y+Math.imul(ot,Fr)|0,Ce=Ce+Math.imul(ne,Vt)|0,j=j+Math.imul(ne,_r)|0,j=j+Math.imul(w0,Vt)|0,Y=Y+Math.imul(w0,_r)|0,Ce=Ce+Math.imul(Ue,Ot)|0,j=j+Math.imul(Ue,Ir)|0,j=j+Math.imul(t0,Ot)|0,Y=Y+Math.imul(t0,Ir)|0,Ce=Ce+Math.imul(V0,Xt)|0,j=j+Math.imul(V0,o0)|0,j=j+Math.imul($e,Xt)|0,Y=Y+Math.imul($e,o0)|0,Ce=Ce+Math.imul(C0,Ye)|0,j=j+Math.imul(C0,r0)|0,j=j+Math.imul(q0,Ye)|0,Y=Y+Math.imul(q0,r0)|0,Ce=Ce+Math.imul(Ve,d0)|0,j=j+Math.imul(Ve,E0)|0,j=j+Math.imul(h0,d0)|0,Y=Y+Math.imul(h0,E0)|0;var An=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(An>>>26)|0,An&=67108863,Ce=Math.imul(Lt,$t),j=Math.imul(Lt,Dr),j=j+Math.imul(hr,$t)|0,Y=Math.imul(hr,Dr),Ce=Ce+Math.imul(Yt,Ht)|0,j=j+Math.imul(Yt,br)|0,j=j+Math.imul(yr,Ht)|0,Y=Y+Math.imul(yr,br)|0,Ce=Ce+Math.imul(X0,jt)|0,j=j+Math.imul(X0,Fr)|0,j=j+Math.imul(vt,jt)|0,Y=Y+Math.imul(vt,Fr)|0,Ce=Ce+Math.imul(N0,Vt)|0,j=j+Math.imul(N0,_r)|0,j=j+Math.imul(ot,Vt)|0,Y=Y+Math.imul(ot,_r)|0,Ce=Ce+Math.imul(ne,Ot)|0,j=j+Math.imul(ne,Ir)|0,j=j+Math.imul(w0,Ot)|0,Y=Y+Math.imul(w0,Ir)|0,Ce=Ce+Math.imul(Ue,Xt)|0,j=j+Math.imul(Ue,o0)|0,j=j+Math.imul(t0,Xt)|0,Y=Y+Math.imul(t0,o0)|0,Ce=Ce+Math.imul(V0,Ye)|0,j=j+Math.imul(V0,r0)|0,j=j+Math.imul($e,Ye)|0,Y=Y+Math.imul($e,r0)|0,Ce=Ce+Math.imul(C0,d0)|0,j=j+Math.imul(C0,E0)|0,j=j+Math.imul(q0,d0)|0,Y=Y+Math.imul(q0,E0)|0;var In=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(In>>>26)|0,In&=67108863,Ce=Math.imul(Lt,Ht),j=Math.imul(Lt,br),j=j+Math.imul(hr,Ht)|0,Y=Math.imul(hr,br),Ce=Ce+Math.imul(Yt,jt)|0,j=j+Math.imul(Yt,Fr)|0,j=j+Math.imul(yr,jt)|0,Y=Y+Math.imul(yr,Fr)|0,Ce=Ce+Math.imul(X0,Vt)|0,j=j+Math.imul(X0,_r)|0,j=j+Math.imul(vt,Vt)|0,Y=Y+Math.imul(vt,_r)|0,Ce=Ce+Math.imul(N0,Ot)|0,j=j+Math.imul(N0,Ir)|0,j=j+Math.imul(ot,Ot)|0,Y=Y+Math.imul(ot,Ir)|0,Ce=Ce+Math.imul(ne,Xt)|0,j=j+Math.imul(ne,o0)|0,j=j+Math.imul(w0,Xt)|0,Y=Y+Math.imul(w0,o0)|0,Ce=Ce+Math.imul(Ue,Ye)|0,j=j+Math.imul(Ue,r0)|0,j=j+Math.imul(t0,Ye)|0,Y=Y+Math.imul(t0,r0)|0,Ce=Ce+Math.imul(V0,d0)|0,j=j+Math.imul(V0,E0)|0,j=j+Math.imul($e,d0)|0,Y=Y+Math.imul($e,E0)|0;var Pn=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,Ce=Math.imul(Lt,jt),j=Math.imul(Lt,Fr),j=j+Math.imul(hr,jt)|0,Y=Math.imul(hr,Fr),Ce=Ce+Math.imul(Yt,Vt)|0,j=j+Math.imul(Yt,_r)|0,j=j+Math.imul(yr,Vt)|0,Y=Y+Math.imul(yr,_r)|0,Ce=Ce+Math.imul(X0,Ot)|0,j=j+Math.imul(X0,Ir)|0,j=j+Math.imul(vt,Ot)|0,Y=Y+Math.imul(vt,Ir)|0,Ce=Ce+Math.imul(N0,Xt)|0,j=j+Math.imul(N0,o0)|0,j=j+Math.imul(ot,Xt)|0,Y=Y+Math.imul(ot,o0)|0,Ce=Ce+Math.imul(ne,Ye)|0,j=j+Math.imul(ne,r0)|0,j=j+Math.imul(w0,Ye)|0,Y=Y+Math.imul(w0,r0)|0,Ce=Ce+Math.imul(Ue,d0)|0,j=j+Math.imul(Ue,E0)|0,j=j+Math.imul(t0,d0)|0,Y=Y+Math.imul(t0,E0)|0;var Mn=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,Ce=Math.imul(Lt,Vt),j=Math.imul(Lt,_r),j=j+Math.imul(hr,Vt)|0,Y=Math.imul(hr,_r),Ce=Ce+Math.imul(Yt,Ot)|0,j=j+Math.imul(Yt,Ir)|0,j=j+Math.imul(yr,Ot)|0,Y=Y+Math.imul(yr,Ir)|0,Ce=Ce+Math.imul(X0,Xt)|0,j=j+Math.imul(X0,o0)|0,j=j+Math.imul(vt,Xt)|0,Y=Y+Math.imul(vt,o0)|0,Ce=Ce+Math.imul(N0,Ye)|0,j=j+Math.imul(N0,r0)|0,j=j+Math.imul(ot,Ye)|0,Y=Y+Math.imul(ot,r0)|0,Ce=Ce+Math.imul(ne,d0)|0,j=j+Math.imul(ne,E0)|0,j=j+Math.imul(w0,d0)|0,Y=Y+Math.imul(w0,E0)|0;var LA=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(LA>>>26)|0,LA&=67108863,Ce=Math.imul(Lt,Ot),j=Math.imul(Lt,Ir),j=j+Math.imul(hr,Ot)|0,Y=Math.imul(hr,Ir),Ce=Ce+Math.imul(Yt,Xt)|0,j=j+Math.imul(Yt,o0)|0,j=j+Math.imul(yr,Xt)|0,Y=Y+Math.imul(yr,o0)|0,Ce=Ce+Math.imul(X0,Ye)|0,j=j+Math.imul(X0,r0)|0,j=j+Math.imul(vt,Ye)|0,Y=Y+Math.imul(vt,r0)|0,Ce=Ce+Math.imul(N0,d0)|0,j=j+Math.imul(N0,E0)|0,j=j+Math.imul(ot,d0)|0,Y=Y+Math.imul(ot,E0)|0;var QA=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(QA>>>26)|0,QA&=67108863,Ce=Math.imul(Lt,Xt),j=Math.imul(Lt,o0),j=j+Math.imul(hr,Xt)|0,Y=Math.imul(hr,o0),Ce=Ce+Math.imul(Yt,Ye)|0,j=j+Math.imul(Yt,r0)|0,j=j+Math.imul(yr,Ye)|0,Y=Y+Math.imul(yr,r0)|0,Ce=Ce+Math.imul(X0,d0)|0,j=j+Math.imul(X0,E0)|0,j=j+Math.imul(vt,d0)|0,Y=Y+Math.imul(vt,E0)|0;var je=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(je>>>26)|0,je&=67108863,Ce=Math.imul(Lt,Ye),j=Math.imul(Lt,r0),j=j+Math.imul(hr,Ye)|0,Y=Math.imul(hr,r0),Ce=Ce+Math.imul(Yt,d0)|0,j=j+Math.imul(Yt,E0)|0,j=j+Math.imul(yr,d0)|0,Y=Y+Math.imul(yr,E0)|0;var B=(he+Ce|0)+((j&8191)<<13)|0;he=(Y+(j>>>13)|0)+(B>>>26)|0,B&=67108863,Ce=Math.imul(Lt,d0),j=Math.imul(Lt,E0),j=j+Math.imul(hr,d0)|0,Y=Math.imul(hr,E0);var $n=(he+Ce|0)+((j&8191)<<13)|0;return he=(Y+(j>>>13)|0)+($n>>>26)|0,$n&=67108863,fe[0]=P0,fe[1]=G0,fe[2]=it,fe[3]=Et,fe[4]=wt,fe[5]=I,fe[6]=e,fe[7]=s,fe[8]=nn,fe[9]=dt,fe[10]=An,fe[11]=In,fe[12]=Pn,fe[13]=Mn,fe[14]=LA,fe[15]=QA,fe[16]=je,fe[17]=B,fe[18]=$n,he!==0&&(fe[19]=he,S.length++),S};Math.imul||(V=pe);function xe(Qe,L,G){G.negative=L.negative^Qe.negative,G.length=Qe.length+L.length;for(var S=0,J=0,W=0;W<G.length-1;W++){var fe=J;J=0;for(var he=S&67108863,Ce=Math.min(W,L.length-1),j=Math.max(0,W-Qe.length+1);j<=Ce;j++){var Y=W-j,z=Qe.words[Y]|0,me=L.words[j]|0,ze=z*me,se=ze&67108863;fe=fe+(ze/67108864|0)|0,se=se+he|0,he=se&67108863,fe=fe+(se>>>26)|0,J+=fe>>>26,fe&=67108863}G.words[W]=he,S=fe,fe=J}return S!==0?G.words[W]=S:G.length--,G.strip()}function Ie(Qe,L,G){var S=new _e;return S.mulp(Qe,L,G)}C.prototype.mulTo=function(L,G){var S,J=this.length+L.length;return this.length===10&&L.length===10?S=V(this,L,G):J<63?S=pe(this,L,G):J<1024?S=xe(this,L,G):S=Ie(this,L,G),S};function _e(Qe,L){this.x=Qe,this.y=L}_e.prototype.makeRBT=function(L){for(var G=new Array(L),S=C.prototype._countBits(L)-1,J=0;J<L;J++)G[J]=this.revBin(J,S,L);return G},_e.prototype.revBin=function(L,G,S){if(L===0||L===S-1)return L;for(var J=0,W=0;W<G;W++)J|=(L&1)<<G-W-1,L>>=1;return J},_e.prototype.permute=function(L,G,S,J,W,fe){for(var he=0;he<fe;he++)J[he]=G[L[he]],W[he]=S[L[he]]},_e.prototype.transform=function(L,G,S,J,W,fe){this.permute(fe,L,G,S,J,W);for(var he=1;he<W;he<<=1)for(var Ce=he<<1,j=Math.cos(2*Math.PI/Ce),Y=Math.sin(2*Math.PI/Ce),z=0;z<W;z+=Ce)for(var me=j,ze=Y,se=0;se<he;se++){var Ve=S[z+se],h0=J[z+se],y0=S[z+se+he],C0=J[z+se+he],q0=me*y0-ze*C0;C0=me*C0+ze*y0,y0=q0,S[z+se]=Ve+y0,J[z+se]=h0+C0,S[z+se+he]=Ve-y0,J[z+se+he]=h0-C0,se!==Ce&&(q0=j*me-Y*ze,ze=j*ze+Y*me,me=q0)}},_e.prototype.guessLen13b=function(L,G){var S=Math.max(G,L)|1,J=S&1,W=0;for(S=S/2|0;S;S=S>>>1)W++;return 1<<W+1+J},_e.prototype.conjugate=function(L,G,S){if(!(S<=1))for(var J=0;J<S/2;J++){var W=L[J];L[J]=L[S-J-1],L[S-J-1]=W,W=G[J],G[J]=-G[S-J-1],G[S-J-1]=-W}},_e.prototype.normalize13b=function(L,G){for(var S=0,J=0;J<G/2;J++){var W=Math.round(L[2*J+1]/G)*8192+Math.round(L[2*J]/G)+S;L[J]=W&67108863,W<67108864?S=0:S=W/67108864|0}return L},_e.prototype.convert13b=function(L,G,S,J){for(var W=0,fe=0;fe<G;fe++)W=W+(L[fe]|0),S[2*fe]=W&8191,W=W>>>13,S[2*fe+1]=W&8191,W=W>>>13;for(fe=2*G;fe<J;++fe)S[fe]=0;l(W===0),l((W&-8192)===0)},_e.prototype.stub=function(L){for(var G=new Array(L),S=0;S<L;S++)G[S]=0;return G},_e.prototype.mulp=function(L,G,S){var J=2*this.guessLen13b(L.length,G.length),W=this.makeRBT(J),fe=this.stub(J),he=new Array(J),Ce=new Array(J),j=new Array(J),Y=new Array(J),z=new Array(J),me=new Array(J),ze=S.words;ze.length=J,this.convert13b(L.words,L.length,he,J),this.convert13b(G.words,G.length,Y,J),this.transform(he,fe,Ce,j,J,W),this.transform(Y,fe,z,me,J,W);for(var se=0;se<J;se++){var Ve=Ce[se]*z[se]-j[se]*me[se];j[se]=Ce[se]*me[se]+j[se]*z[se],Ce[se]=Ve}return this.conjugate(Ce,j,J),this.transform(Ce,j,ze,fe,J,W),this.conjugate(ze,fe,J),this.normalize13b(ze,J),S.negative=L.negative^G.negative,S.length=L.length+G.length,S.strip()},C.prototype.mul=function(L){var G=new C(null);return G.words=new Array(this.length+L.length),this.mulTo(L,G)},C.prototype.mulf=function(L){var G=new C(null);return G.words=new Array(this.length+L.length),Ie(this,L,G)},C.prototype.imul=function(L){return this.clone().mulTo(L,this)},C.prototype.imuln=function(L){l(typeof L=="number"),l(L<67108864);for(var G=0,S=0;S<this.length;S++){var J=(this.words[S]|0)*L,W=(J&67108863)+(G&67108863);G>>=26,G+=J/67108864|0,G+=W>>>26,this.words[S]=W&67108863}return G!==0&&(this.words[S]=G,this.length++),this.length=L===0?1:this.length,this},C.prototype.muln=function(L){return this.clone().imuln(L)},C.prototype.sqr=function(){return this.mul(this)},C.prototype.isqr=function(){return this.imul(this.clone())},C.prototype.pow=function(L){var G=Ee(L);if(G.length===0)return new C(1);for(var S=this,J=0;J<G.length&&G[J]===0;J++,S=S.sqr());if(++J<G.length)for(var W=S.sqr();J<G.length;J++,W=W.sqr())G[J]!==0&&(S=S.mul(W));return S},C.prototype.iushln=function(L){l(typeof L=="number"&&L>=0);var G=L%26,S=(L-G)/26,J=67108863>>>26-G<<26-G,W;if(G!==0){var fe=0;for(W=0;W<this.length;W++){var he=this.words[W]&J,Ce=(this.words[W]|0)-he<<G;this.words[W]=Ce|fe,fe=he>>>26-G}fe&&(this.words[W]=fe,this.length++)}if(S!==0){for(W=this.length-1;W>=0;W--)this.words[W+S]=this.words[W];for(W=0;W<S;W++)this.words[W]=0;this.length+=S}return this.strip()},C.prototype.ishln=function(L){return l(this.negative===0),this.iushln(L)},C.prototype.iushrn=function(L,G,S){l(typeof L=="number"&&L>=0);var J;G?J=(G-G%26)/26:J=0;var W=L%26,fe=Math.min((L-W)/26,this.length),he=67108863^67108863>>>W<<W,Ce=S;if(J-=fe,J=Math.max(0,J),Ce){for(var j=0;j<fe;j++)Ce.words[j]=this.words[j];Ce.length=fe}if(fe!==0)if(this.length>fe)for(this.length-=fe,j=0;j<this.length;j++)this.words[j]=this.words[j+fe];else this.words[0]=0,this.length=1;var Y=0;for(j=this.length-1;j>=0&&(Y!==0||j>=J);j--){var z=this.words[j]|0;this.words[j]=Y<<26-W|z>>>W,Y=z&he}return Ce&&Y!==0&&(Ce.words[Ce.length++]=Y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},C.prototype.ishrn=function(L,G,S){return l(this.negative===0),this.iushrn(L,G,S)},C.prototype.shln=function(L){return this.clone().ishln(L)},C.prototype.ushln=function(L){return this.clone().iushln(L)},C.prototype.shrn=function(L){return this.clone().ishrn(L)},C.prototype.ushrn=function(L){return this.clone().iushrn(L)},C.prototype.testn=function(L){l(typeof L=="number"&&L>=0);var G=L%26,S=(L-G)/26,J=1<<G;if(this.length<=S)return!1;var W=this.words[S];return!!(W&J)},C.prototype.imaskn=function(L){l(typeof L=="number"&&L>=0);var G=L%26,S=(L-G)/26;if(l(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(G!==0&&S++,this.length=Math.min(S,this.length),G!==0){var J=67108863^67108863>>>G<<G;this.words[this.length-1]&=J}return this.strip()},C.prototype.maskn=function(L){return this.clone().imaskn(L)},C.prototype.iaddn=function(L){return l(typeof L=="number"),l(L<67108864),L<0?this.isubn(-L):this.negative!==0?this.length===1&&(this.words[0]|0)<L?(this.words[0]=L-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(L),this.negative=1,this):this._iaddn(L)},C.prototype._iaddn=function(L){this.words[0]+=L;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},C.prototype.isubn=function(L){if(l(typeof L=="number"),l(L<67108864),L<0)return this.iaddn(-L);if(this.negative!==0)return this.negative=0,this.iaddn(L),this.negative=1,this;if(this.words[0]-=L,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()},C.prototype.addn=function(L){return this.clone().iaddn(L)},C.prototype.subn=function(L){return this.clone().isubn(L)},C.prototype.iabs=function(){return this.negative=0,this},C.prototype.abs=function(){return this.clone().iabs()},C.prototype._ishlnsubmul=function(L,G,S){var J=L.length+S,W;this._expand(J);var fe,he=0;for(W=0;W<L.length;W++){fe=(this.words[W+S]|0)+he;var Ce=(L.words[W]|0)*G;fe-=Ce&67108863,he=(fe>>26)-(Ce/67108864|0),this.words[W+S]=fe&67108863}for(;W<this.length-S;W++)fe=(this.words[W+S]|0)+he,he=fe>>26,this.words[W+S]=fe&67108863;if(he===0)return this.strip();for(l(he===-1),he=0,W=0;W<this.length;W++)fe=-(this.words[W]|0)+he,he=fe>>26,this.words[W]=fe&67108863;return this.negative=1,this.strip()},C.prototype._wordDiv=function(L,G){var S=this.length-L.length,J=this.clone(),W=L,fe=W.words[W.length-1]|0,he=this._countBits(fe);S=26-he,S!==0&&(W=W.ushln(S),J.iushln(S),fe=W.words[W.length-1]|0);var Ce=J.length-W.length,j;if(G!=="mod"){j=new C(null),j.length=Ce+1,j.words=new Array(j.length);for(var Y=0;Y<j.length;Y++)j.words[Y]=0}var z=J.clone()._ishlnsubmul(W,1,Ce);z.negative===0&&(J=z,j&&(j.words[Ce]=1));for(var me=Ce-1;me>=0;me--){var ze=(J.words[W.length+me]|0)*67108864+(J.words[W.length+me-1]|0);for(ze=Math.min(ze/fe|0,67108863),J._ishlnsubmul(W,ze,me);J.negative!==0;)ze--,J.negative=0,J._ishlnsubmul(W,1,me),J.isZero()||(J.negative^=1);j&&(j.words[me]=ze)}return j&&j.strip(),J.strip(),G!=="div"&&S!==0&&J.iushrn(S),{div:j||null,mod:J}},C.prototype.divmod=function(L,G,S){if(l(!L.isZero()),this.isZero())return{div:new C(0),mod:new C(0)};var J,W,fe;return this.negative!==0&&L.negative===0?(fe=this.neg().divmod(L,G),G!=="mod"&&(J=fe.div.neg()),G!=="div"&&(W=fe.mod.neg(),S&&W.negative!==0&&W.iadd(L)),{div:J,mod:W}):this.negative===0&&L.negative!==0?(fe=this.divmod(L.neg(),G),G!=="mod"&&(J=fe.div.neg()),{div:J,mod:fe.mod}):(this.negative&L.negative)!==0?(fe=this.neg().divmod(L.neg(),G),G!=="div"&&(W=fe.mod.neg(),S&&W.negative!==0&&W.isub(L)),{div:fe.div,mod:W}):L.length>this.length||this.cmp(L)<0?{div:new C(0),mod:this}:L.length===1?G==="div"?{div:this.divn(L.words[0]),mod:null}:G==="mod"?{div:null,mod:new C(this.modn(L.words[0]))}:{div:this.divn(L.words[0]),mod:new C(this.modn(L.words[0]))}:this._wordDiv(L,G)},C.prototype.div=function(L){return this.divmod(L,"div",!1).div},C.prototype.mod=function(L){return this.divmod(L,"mod",!1).mod},C.prototype.umod=function(L){return this.divmod(L,"mod",!0).mod},C.prototype.divRound=function(L){var G=this.divmod(L);if(G.mod.isZero())return G.div;var S=G.div.negative!==0?G.mod.isub(L):G.mod,J=L.ushrn(1),W=L.andln(1),fe=S.cmp(J);return fe<0||W===1&&fe===0?G.div:G.div.negative!==0?G.div.isubn(1):G.div.iaddn(1)},C.prototype.modn=function(L){l(L<=67108863);for(var G=(1<<26)%L,S=0,J=this.length-1;J>=0;J--)S=(G*S+(this.words[J]|0))%L;return S},C.prototype.idivn=function(L){l(L<=67108863);for(var G=0,S=this.length-1;S>=0;S--){var J=(this.words[S]|0)+G*67108864;this.words[S]=J/L|0,G=J%L}return this.strip()},C.prototype.divn=function(L){return this.clone().idivn(L)},C.prototype.egcd=function(L){l(L.negative===0),l(!L.isZero());var G=this,S=L.clone();G.negative!==0?G=G.umod(L):G=G.clone();for(var J=new C(1),W=new C(0),fe=new C(0),he=new C(1),Ce=0;G.isEven()&&S.isEven();)G.iushrn(1),S.iushrn(1),++Ce;for(var j=S.clone(),Y=G.clone();!G.isZero();){for(var z=0,me=1;(G.words[0]&me)===0&&z<26;++z,me<<=1);if(z>0)for(G.iushrn(z);z-- >0;)(J.isOdd()||W.isOdd())&&(J.iadd(j),W.isub(Y)),J.iushrn(1),W.iushrn(1);for(var ze=0,se=1;(S.words[0]&se)===0&&ze<26;++ze,se<<=1);if(ze>0)for(S.iushrn(ze);ze-- >0;)(fe.isOdd()||he.isOdd())&&(fe.iadd(j),he.isub(Y)),fe.iushrn(1),he.iushrn(1);G.cmp(S)>=0?(G.isub(S),J.isub(fe),W.isub(he)):(S.isub(G),fe.isub(J),he.isub(W))}return{a:fe,b:he,gcd:S.iushln(Ce)}},C.prototype._invmp=function(L){l(L.negative===0),l(!L.isZero());var G=this,S=L.clone();G.negative!==0?G=G.umod(L):G=G.clone();for(var J=new C(1),W=new C(0),fe=S.clone();G.cmpn(1)>0&&S.cmpn(1)>0;){for(var he=0,Ce=1;(G.words[0]&Ce)===0&&he<26;++he,Ce<<=1);if(he>0)for(G.iushrn(he);he-- >0;)J.isOdd()&&J.iadd(fe),J.iushrn(1);for(var j=0,Y=1;(S.words[0]&Y)===0&&j<26;++j,Y<<=1);if(j>0)for(S.iushrn(j);j-- >0;)W.isOdd()&&W.iadd(fe),W.iushrn(1);G.cmp(S)>=0?(G.isub(S),J.isub(W)):(S.isub(G),W.isub(J))}var z;return G.cmpn(1)===0?z=J:z=W,z.cmpn(0)<0&&z.iadd(L),z},C.prototype.gcd=function(L){if(this.isZero())return L.abs();if(L.isZero())return this.abs();var G=this.clone(),S=L.clone();G.negative=0,S.negative=0;for(var J=0;G.isEven()&&S.isEven();J++)G.iushrn(1),S.iushrn(1);do{for(;G.isEven();)G.iushrn(1);for(;S.isEven();)S.iushrn(1);var W=G.cmp(S);if(W<0){var fe=G;G=S,S=fe}else if(W===0||S.cmpn(1)===0)break;G.isub(S)}while(!0);return S.iushln(J)},C.prototype.invm=function(L){return this.egcd(L).a.umod(L)},C.prototype.isEven=function(){return(this.words[0]&1)===0},C.prototype.isOdd=function(){return(this.words[0]&1)===1},C.prototype.andln=function(L){return this.words[0]&L},C.prototype.bincn=function(L){l(typeof L=="number");var G=L%26,S=(L-G)/26,J=1<<G;if(this.length<=S)return this._expand(S+1),this.words[S]|=J,this;for(var W=J,fe=S;W!==0&&fe<this.length;fe++){var he=this.words[fe]|0;he+=W,W=he>>>26,he&=67108863,this.words[fe]=he}return W!==0&&(this.words[fe]=W,this.length++),this},C.prototype.isZero=function(){return this.length===1&&this.words[0]===0},C.prototype.cmpn=function(L){var G=L<0;if(this.negative!==0&&!G)return-1;if(this.negative===0&&G)return 1;this.strip();var S;if(this.length>1)S=1;else{G&&(L=-L),l(L<=67108863,"Number is too big");var J=this.words[0]|0;S=J===L?0:J<L?-1:1}return this.negative!==0?-S|0:S},C.prototype.cmp=function(L){if(this.negative!==0&&L.negative===0)return-1;if(this.negative===0&&L.negative!==0)return 1;var G=this.ucmp(L);return this.negative!==0?-G|0:G},C.prototype.ucmp=function(L){if(this.length>L.length)return 1;if(this.length<L.length)return-1;for(var G=0,S=this.length-1;S>=0;S--){var J=this.words[S]|0,W=L.words[S]|0;if(J!==W){J<W?G=-1:J>W&&(G=1);break}}return G},C.prototype.gtn=function(L){return this.cmpn(L)===1},C.prototype.gt=function(L){return this.cmp(L)===1},C.prototype.gten=function(L){return this.cmpn(L)>=0},C.prototype.gte=function(L){return this.cmp(L)>=0},C.prototype.ltn=function(L){return this.cmpn(L)===-1},C.prototype.lt=function(L){return this.cmp(L)===-1},C.prototype.lten=function(L){return this.cmpn(L)<=0},C.prototype.lte=function(L){return this.cmp(L)<=0},C.prototype.eqn=function(L){return this.cmpn(L)===0},C.prototype.eq=function(L){return this.cmp(L)===0},C.red=function(L){return new re(L)},C.prototype.toRed=function(L){return l(!this.red,"Already a number in reduction context"),l(this.negative===0,"red works only with positives"),L.convertTo(this)._forceRed(L)},C.prototype.fromRed=function(){return l(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},C.prototype._forceRed=function(L){return this.red=L,this},C.prototype.forceRed=function(L){return l(!this.red,"Already a number in reduction context"),this._forceRed(L)},C.prototype.redAdd=function(L){return l(this.red,"redAdd works only with red numbers"),this.red.add(this,L)},C.prototype.redIAdd=function(L){return l(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,L)},C.prototype.redSub=function(L){return l(this.red,"redSub works only with red numbers"),this.red.sub(this,L)},C.prototype.redISub=function(L){return l(this.red,"redISub works only with red numbers"),this.red.isub(this,L)},C.prototype.redShl=function(L){return l(this.red,"redShl works only with red numbers"),this.red.shl(this,L)},C.prototype.redMul=function(L){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.mul(this,L)},C.prototype.redIMul=function(L){return l(this.red,"redMul works only with red numbers"),this.red._verify2(this,L),this.red.imul(this,L)},C.prototype.redSqr=function(){return l(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},C.prototype.redISqr=function(){return l(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},C.prototype.redSqrt=function(){return l(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},C.prototype.redInvm=function(){return l(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},C.prototype.redNeg=function(){return l(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},C.prototype.redPow=function(L){return l(this.red&&!L.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,L)};var ie={k256:null,p224:null,p192:null,p25519:null};function n0(Qe,L){this.name=Qe,this.p=new C(L,16),this.n=this.p.bitLength(),this.k=new C(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}n0.prototype._tmp=function(){var L=new C(null);return L.words=new Array(Math.ceil(this.n/13)),L},n0.prototype.ireduce=function(L){var G=L,S;do this.split(G,this.tmp),G=this.imulK(G),G=G.iadd(this.tmp),S=G.bitLength();while(S>this.n);var J=S<this.n?-1:G.ucmp(this.p);return J===0?(G.words[0]=0,G.length=1):J>0?G.isub(this.p):G.strip!==void 0?G.strip():G._strip(),G},n0.prototype.split=function(L,G){L.iushrn(this.n,0,G)},n0.prototype.imulK=function(L){return L.imul(this.k)};function le(){n0.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}b(le,n0),le.prototype.split=function(L,G){for(var S=4194303,J=Math.min(L.length,9),W=0;W<J;W++)G.words[W]=L.words[W];if(G.length=J,L.length<=9){L.words[0]=0,L.length=1;return}var fe=L.words[9];for(G.words[G.length++]=fe&S,W=10;W<L.length;W++){var he=L.words[W]|0;L.words[W-10]=(he&S)<<4|fe>>>22,fe=he}fe>>>=22,L.words[W-10]=fe,fe===0&&L.length>10?L.length-=10:L.length-=9},le.prototype.imulK=function(L){L.words[L.length]=0,L.words[L.length+1]=0,L.length+=2;for(var G=0,S=0;S<L.length;S++){var J=L.words[S]|0;G+=J*977,L.words[S]=G&67108863,G=J*64+(G/67108864|0)}return L.words[L.length-1]===0&&(L.length--,L.words[L.length-1]===0&&L.length--),L};function Ne(){n0.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}b(Ne,n0);function ye(){n0.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}b(ye,n0);function Xe(){n0.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}b(Xe,n0),Xe.prototype.imulK=function(L){for(var G=0,S=0;S<L.length;S++){var J=(L.words[S]|0)*19+G,W=J&67108863;J>>>=26,L.words[S]=W,G=J}return G!==0&&(L.words[L.length++]=G),L},C._prime=function(L){if(ie[L])return ie[L];var G;if(L==="k256")G=new le;else if(L==="p224")G=new Ne;else if(L==="p192")G=new ye;else if(L==="p25519")G=new Xe;else throw new Error("Unknown prime "+L);return ie[L]=G,G};function re(Qe){if(typeof Qe=="string"){var L=C._prime(Qe);this.m=L.p,this.prime=L}else l(Qe.gtn(1),"modulus must be greater than 1"),this.m=Qe,this.prime=null}re.prototype._verify1=function(L){l(L.negative===0,"red works only with positives"),l(L.red,"red works only with red numbers")},re.prototype._verify2=function(L,G){l((L.negative|G.negative)===0,"red works only with positives"),l(L.red&&L.red===G.red,"red works only with red numbers")},re.prototype.imod=function(L){return this.prime?this.prime.ireduce(L)._forceRed(this):L.umod(this.m)._forceRed(this)},re.prototype.neg=function(L){return L.isZero()?L.clone():this.m.sub(L)._forceRed(this)},re.prototype.add=function(L,G){this._verify2(L,G);var S=L.add(G);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},re.prototype.iadd=function(L,G){this._verify2(L,G);var S=L.iadd(G);return S.cmp(this.m)>=0&&S.isub(this.m),S},re.prototype.sub=function(L,G){this._verify2(L,G);var S=L.sub(G);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},re.prototype.isub=function(L,G){this._verify2(L,G);var S=L.isub(G);return S.cmpn(0)<0&&S.iadd(this.m),S},re.prototype.shl=function(L,G){return this._verify1(L),this.imod(L.ushln(G))},re.prototype.imul=function(L,G){return this._verify2(L,G),this.imod(L.imul(G))},re.prototype.mul=function(L,G){return this._verify2(L,G),this.imod(L.mul(G))},re.prototype.isqr=function(L){return this.imul(L,L.clone())},re.prototype.sqr=function(L){return this.mul(L,L)},re.prototype.sqrt=function(L){if(L.isZero())return L.clone();var G=this.m.andln(3);if(l(G%2===1),G===3){var S=this.m.add(new C(1)).iushrn(2);return this.pow(L,S)}for(var J=this.m.subn(1),W=0;!J.isZero()&&J.andln(1)===0;)W++,J.iushrn(1);l(!J.isZero());var fe=new C(1).toRed(this),he=fe.redNeg(),Ce=this.m.subn(1).iushrn(1),j=this.m.bitLength();for(j=new C(2*j*j).toRed(this);this.pow(j,Ce).cmp(he)!==0;)j.redIAdd(he);for(var Y=this.pow(j,J),z=this.pow(L,J.addn(1).iushrn(1)),me=this.pow(L,J),ze=W;me.cmp(fe)!==0;){for(var se=me,Ve=0;se.cmp(fe)!==0;Ve++)se=se.redSqr();l(Ve<ze);var h0=this.pow(Y,new C(1).iushln(ze-Ve-1));z=z.redMul(h0),Y=h0.redSqr(),me=me.redMul(Y),ze=Ve}return z},re.prototype.invm=function(L){var G=L._invmp(this.m);return G.negative!==0?(G.negative=0,this.imod(G).redNeg()):this.imod(G)},re.prototype.pow=function(L,G){if(G.isZero())return new C(1).toRed(this);if(G.cmpn(1)===0)return L.clone();var S=4,J=new Array(1<<S);J[0]=new C(1).toRed(this),J[1]=L;for(var W=2;W<J.length;W++)J[W]=this.mul(J[W-1],L);var fe=J[0],he=0,Ce=0,j=G.bitLength()%26;for(j===0&&(j=26),W=G.length-1;W>=0;W--){for(var Y=G.words[W],z=j-1;z>=0;z--){var me=Y>>z&1;if(fe!==J[0]&&(fe=this.sqr(fe)),me===0&&he===0){Ce=0;continue}he<<=1,he|=me,Ce++,!(Ce!==S&&(W!==0||z!==0))&&(fe=this.mul(fe,J[he]),Ce=0,he=0)}j=26}return fe},re.prototype.convertTo=function(L){var G=L.umod(this.m);return G===L?G.clone():G},re.prototype.convertFrom=function(L){var G=L.clone();return G.red=null,G},C.mont=function(L){return new a0(L)};function a0(Qe){re.call(this,Qe),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new C(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(a0,re),a0.prototype.convertTo=function(L){return this.imod(L.ushln(this.shift))},a0.prototype.convertFrom=function(L){var G=this.imod(L.mul(this.rinv));return G.red=null,G},a0.prototype.imul=function(L,G){if(L.isZero()||G.isZero())return L.words[0]=0,L.length=1,L;var S=L.imul(G),J=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=S.isub(J).iushrn(this.shift),fe=W;return W.cmp(this.m)>=0?fe=W.isub(this.m):W.cmpn(0)<0&&(fe=W.iadd(this.m)),fe._forceRed(this)},a0.prototype.mul=function(L,G){if(L.isZero()||G.isZero())return new C(0)._forceRed(this);var S=L.mul(G),J=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),W=S.isub(J).iushrn(this.shift),fe=W;return W.cmp(this.m)>=0?fe=W.isub(this.m):W.cmpn(0)<0&&(fe=W.iadd(this.m)),fe._forceRed(this)},a0.prototype.invm=function(L){var G=this.imod(L._invmp(this.m).mul(this.r2));return G._forceRed(this)}})(f,KB)}(a1)),a1.exports}var lh={},ip;function Jy(){return ip||(ip=1,function(f){var o=f;function c(C,y){if(Array.isArray(C))return C.slice();if(!C)return[];var m=[];if(typeof C!="string"){for(var N=0;N<C.length;N++)m[N]=C[N]|0;return m}if(y==="hex"){C=C.replace(/[^a-z0-9]+/ig,""),C.length%2!==0&&(C="0"+C);for(var N=0;N<C.length;N+=2)m.push(parseInt(C[N]+C[N+1],16))}else for(var N=0;N<C.length;N++){var M=C.charCodeAt(N),U=M>>8,w=M&255;U?m.push(U,w):m.push(w)}return m}o.toArray=c;function l(C){return C.length===1?"0"+C:C}o.zero2=l;function b(C){for(var y="",m=0;m<C.length;m++)y+=l(C[m].toString(16));return y}o.toHex=b,o.encode=function(y,m){return m==="hex"?b(y):y}}(lh)),lh}var ap;function xi(){return ap||(ap=1,function(f){var o=f,c=Ja(),l=y2(),b=Jy();o.assert=l,o.toArray=b.toArray,o.zero2=b.zero2,o.toHex=b.toHex,o.encode=b.encode;function C(U,w,ae){var Ee=new Array(Math.max(U.bitLength(),ae)+1),pe;for(pe=0;pe<Ee.length;pe+=1)Ee[pe]=0;var V=1<<w+1,xe=U.clone();for(pe=0;pe<Ee.length;pe++){var Ie,_e=xe.andln(V-1);xe.isOdd()?(_e>(V>>1)-1?Ie=(V>>1)-_e:Ie=_e,xe.isubn(Ie)):Ie=0,Ee[pe]=Ie,xe.iushrn(1)}return Ee}o.getNAF=C;function y(U,w){var ae=[[],[]];U=U.clone(),w=w.clone();for(var Ee=0,pe=0,V;U.cmpn(-Ee)>0||w.cmpn(-pe)>0;){var xe=U.andln(3)+Ee&3,Ie=w.andln(3)+pe&3;xe===3&&(xe=-1),Ie===3&&(Ie=-1);var _e;(xe&1)===0?_e=0:(V=U.andln(7)+Ee&7,(V===3||V===5)&&Ie===2?_e=-xe:_e=xe),ae[0].push(_e);var ie;(Ie&1)===0?ie=0:(V=w.andln(7)+pe&7,(V===3||V===5)&&xe===2?ie=-Ie:ie=Ie),ae[1].push(ie),2*Ee===_e+1&&(Ee=1-Ee),2*pe===ie+1&&(pe=1-pe),U.iushrn(1),w.iushrn(1)}return ae}o.getJSF=y;function m(U,w,ae){var Ee="_"+w;U.prototype[w]=function(){return this[Ee]!==void 0?this[Ee]:this[Ee]=ae.call(this)}}o.cachedProperty=m;function N(U){return typeof U=="string"?o.toArray(U,"hex"):U}o.parseBytes=N;function M(U){return new c(U,"hex","le")}o.intFromLE=M}(uh)),uh}var jc={exports:{}},op;function Oy(){if(op)return jc.exports;op=1;var f;jc.exports=function(b){return f||(f=new o(null)),f.generate(b)};function o(l){this.rand=l}if(jc.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 C=new Uint8Array(b),y=0;y<C.length;y++)C[y]=this.rand.getByte();return C},typeof self=="object")self.crypto&&self.crypto.getRandomValues?o.prototype._rand=function(b){var C=new Uint8Array(b);return self.crypto.getRandomValues(C),C}:self.msCrypto&&self.msCrypto.getRandomValues?o.prototype._rand=function(b){var C=new Uint8Array(b);return self.msCrypto.getRandomValues(C),C}: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 jc.exports}var hh={},dh,sp;function fu(){if(sp)return dh;sp=1;var f=Ja(),o=xi(),c=o.getNAF,l=o.getJSF,b=o.assert;function C(m,N){this.type=m,this.p=new f(N.p,16),this.red=N.prime?f.red(N.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=N.n&&new f(N.n,16),this.g=N.g&&this.pointFromJSON(N.g,N.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))}dh=C,C.prototype.point=function(){throw new Error("Not implemented")},C.prototype.validate=function(){throw new Error("Not implemented")},C.prototype._fixedNafMul=function(N,M){b(N.precomputed);var U=N._getDoubles(),w=c(M,1,this._bitLength),ae=(1<<U.step+1)-(U.step%2===0?2:1);ae/=3;var Ee=[],pe,V;for(pe=0;pe<w.length;pe+=U.step){V=0;for(var xe=pe+U.step-1;xe>=pe;xe--)V=(V<<1)+w[xe];Ee.push(V)}for(var Ie=this.jpoint(null,null,null),_e=this.jpoint(null,null,null),ie=ae;ie>0;ie--){for(pe=0;pe<Ee.length;pe++)V=Ee[pe],V===ie?_e=_e.mixedAdd(U.points[pe]):V===-ie&&(_e=_e.mixedAdd(U.points[pe].neg()));Ie=Ie.add(_e)}return Ie.toP()},C.prototype._wnafMul=function(N,M){var U=4,w=N._getNAFPoints(U);U=w.wnd;for(var ae=w.points,Ee=c(M,U,this._bitLength),pe=this.jpoint(null,null,null),V=Ee.length-1;V>=0;V--){for(var xe=0;V>=0&&Ee[V]===0;V--)xe++;if(V>=0&&xe++,pe=pe.dblp(xe),V<0)break;var Ie=Ee[V];b(Ie!==0),N.type==="affine"?Ie>0?pe=pe.mixedAdd(ae[Ie-1>>1]):pe=pe.mixedAdd(ae[-Ie-1>>1].neg()):Ie>0?pe=pe.add(ae[Ie-1>>1]):pe=pe.add(ae[-Ie-1>>1].neg())}return N.type==="affine"?pe.toP():pe},C.prototype._wnafMulAdd=function(N,M,U,w,ae){var Ee=this._wnafT1,pe=this._wnafT2,V=this._wnafT3,xe=0,Ie,_e,ie;for(Ie=0;Ie<w;Ie++){ie=M[Ie];var n0=ie._getNAFPoints(N);Ee[Ie]=n0.wnd,pe[Ie]=n0.points}for(Ie=w-1;Ie>=1;Ie-=2){var le=Ie-1,Ne=Ie;if(Ee[le]!==1||Ee[Ne]!==1){V[le]=c(U[le],Ee[le],this._bitLength),V[Ne]=c(U[Ne],Ee[Ne],this._bitLength),xe=Math.max(V[le].length,xe),xe=Math.max(V[Ne].length,xe);continue}var ye=[M[le],null,null,M[Ne]];M[le].y.cmp(M[Ne].y)===0?(ye[1]=M[le].add(M[Ne]),ye[2]=M[le].toJ().mixedAdd(M[Ne].neg())):M[le].y.cmp(M[Ne].y.redNeg())===0?(ye[1]=M[le].toJ().mixedAdd(M[Ne]),ye[2]=M[le].add(M[Ne].neg())):(ye[1]=M[le].toJ().mixedAdd(M[Ne]),ye[2]=M[le].toJ().mixedAdd(M[Ne].neg()));var Xe=[-3,-1,-5,-7,0,7,5,1,3],re=l(U[le],U[Ne]);for(xe=Math.max(re[0].length,xe),V[le]=new Array(xe),V[Ne]=new Array(xe),_e=0;_e<xe;_e++){var a0=re[0][_e]|0,Qe=re[1][_e]|0;V[le][_e]=Xe[(a0+1)*3+(Qe+1)],V[Ne][_e]=0,pe[le]=ye}}var L=this.jpoint(null,null,null),G=this._wnafT4;for(Ie=xe;Ie>=0;Ie--){for(var S=0;Ie>=0;){var J=!0;for(_e=0;_e<w;_e++)G[_e]=V[_e][Ie]|0,G[_e]!==0&&(J=!1);if(!J)break;S++,Ie--}if(Ie>=0&&S++,L=L.dblp(S),Ie<0)break;for(_e=0;_e<w;_e++){var W=G[_e];W!==0&&(W>0?ie=pe[_e][W-1>>1]:W<0&&(ie=pe[_e][-W-1>>1].neg()),ie.type==="affine"?L=L.mixedAdd(ie):L=L.add(ie))}}for(Ie=0;Ie<w;Ie++)pe[Ie]=null;return ae?L:L.toP()};function y(m,N){this.curve=m,this.type=N,this.precomputed=null}return C.BasePoint=y,y.prototype.eq=function(){throw new Error("Not implemented")},y.prototype.validate=function(){return this.curve.validate(this)},C.prototype.decodePoint=function(N,M){N=o.toArray(N,M);var U=this.p.byteLength();if((N[0]===4||N[0]===6||N[0]===7)&&N.length-1===2*U){N[0]===6?b(N[N.length-1]%2===0):N[0]===7&&b(N[N.length-1]%2===1);var w=this.point(N.slice(1,1+U),N.slice(1+U,1+2*U));return w}else if((N[0]===2||N[0]===3)&&N.length-1===U)return this.pointFromX(N.slice(1,1+U),N[0]===3);throw new Error("Unknown point format")},y.prototype.encodeCompressed=function(N){return this.encode(N,!0)},y.prototype._encode=function(N){var M=this.curve.p.byteLength(),U=this.getX().toArray("be",M);return N?[this.getY().isEven()?2:3].concat(U):[4].concat(U,this.getY().toArray("be",M))},y.prototype.encode=function(N,M){return o.encode(this._encode(M),N)},y.prototype.precompute=function(N){if(this.precomputed)return this;var M={doubles:null,naf:null,beta:null};return M.naf=this._getNAFPoints(8),M.doubles=this._getDoubles(4,N),M.beta=this._getBeta(),this.precomputed=M,this},y.prototype._hasDoubles=function(N){if(!this.precomputed)return!1;var M=this.precomputed.doubles;return M?M.points.length>=Math.ceil((N.bitLength()+1)/M.step):!1},y.prototype._getDoubles=function(N,M){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var U=[this],w=this,ae=0;ae<M;ae+=N){for(var Ee=0;Ee<N;Ee++)w=w.dbl();U.push(w)}return{step:N,points:U}},y.prototype._getNAFPoints=function(N){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var M=[this],U=(1<<N)-1,w=U===1?null:this.dbl(),ae=1;ae<U;ae++)M[ae]=M[ae-1].add(w);return{wnd:N,points:M}},y.prototype._getBeta=function(){return null},y.prototype.dblp=function(N){for(var M=this,U=0;U<N;U++)M=M.dbl();return M},dh}var gh,fp;function HB(){if(fp)return gh;fp=1;var f=xi(),o=Ja(),c=iu(),l=fu(),b=f.assert;function C(N){l.call(this,"short",N),this.a=new o(N.a,16).toRed(this.red),this.b=new o(N.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(N),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}c(C,l),gh=C,C.prototype._getEndomorphism=function(M){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var U,w;if(M.beta)U=new o(M.beta,16).toRed(this.red);else{var ae=this._getEndoRoots(this.p);U=ae[0].cmp(ae[1])<0?ae[0]:ae[1],U=U.toRed(this.red)}if(M.lambda)w=new o(M.lambda,16);else{var Ee=this._getEndoRoots(this.n);this.g.mul(Ee[0]).x.cmp(this.g.x.redMul(U))===0?w=Ee[0]:(w=Ee[1],b(this.g.mul(w).x.cmp(this.g.x.redMul(U))===0))}var pe;return M.basis?pe=M.basis.map(function(V){return{a:new o(V.a,16),b:new o(V.b,16)}}):pe=this._getEndoBasis(w),{beta:U,lambda:w,basis:pe}}},C.prototype._getEndoRoots=function(M){var U=M===this.p?this.red:o.mont(M),w=new o(2).toRed(U).redInvm(),ae=w.redNeg(),Ee=new o(3).toRed(U).redNeg().redSqrt().redMul(w),pe=ae.redAdd(Ee).fromRed(),V=ae.redSub(Ee).fromRed();return[pe,V]},C.prototype._getEndoBasis=function(M){for(var U=this.n.ushrn(Math.floor(this.n.bitLength()/2)),w=M,ae=this.n.clone(),Ee=new o(1),pe=new o(0),V=new o(0),xe=new o(1),Ie,_e,ie,n0,le,Ne,ye,Xe=0,re,a0;w.cmpn(0)!==0;){var Qe=ae.div(w);re=ae.sub(Qe.mul(w)),a0=V.sub(Qe.mul(Ee));var L=xe.sub(Qe.mul(pe));if(!ie&&re.cmp(U)<0)Ie=ye.neg(),_e=Ee,ie=re.neg(),n0=a0;else if(ie&&++Xe===2)break;ye=re,ae=w,w=re,V=Ee,Ee=a0,xe=pe,pe=L}le=re.neg(),Ne=a0;var G=ie.sqr().add(n0.sqr()),S=le.sqr().add(Ne.sqr());return S.cmp(G)>=0&&(le=Ie,Ne=_e),ie.negative&&(ie=ie.neg(),n0=n0.neg()),le.negative&&(le=le.neg(),Ne=Ne.neg()),[{a:ie,b:n0},{a:le,b:Ne}]},C.prototype._endoSplit=function(M){var U=this.endo.basis,w=U[0],ae=U[1],Ee=ae.b.mul(M).divRound(this.n),pe=w.b.neg().mul(M).divRound(this.n),V=Ee.mul(w.a),xe=pe.mul(ae.a),Ie=Ee.mul(w.b),_e=pe.mul(ae.b),ie=M.sub(V).sub(xe),n0=Ie.add(_e).neg();return{k1:ie,k2:n0}},C.prototype.pointFromX=function(M,U){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),ae=w.redSqrt();if(ae.redSqr().redSub(w).cmp(this.zero)!==0)throw new Error("invalid point");var Ee=ae.fromRed().isOdd();return(U&&!Ee||!U&&Ee)&&(ae=ae.redNeg()),this.point(M,ae)},C.prototype.validate=function(M){if(M.inf)return!0;var U=M.x,w=M.y,ae=this.a.redMul(U),Ee=U.redSqr().redMul(U).redIAdd(ae).redIAdd(this.b);return w.redSqr().redISub(Ee).cmpn(0)===0},C.prototype._endoWnafMulAdd=function(M,U,w){for(var ae=this._endoWnafT1,Ee=this._endoWnafT2,pe=0;pe<M.length;pe++){var V=this._endoSplit(U[pe]),xe=M[pe],Ie=xe._getBeta();V.k1.negative&&(V.k1.ineg(),xe=xe.neg(!0)),V.k2.negative&&(V.k2.ineg(),Ie=Ie.neg(!0)),ae[pe*2]=xe,ae[pe*2+1]=Ie,Ee[pe*2]=V.k1,Ee[pe*2+1]=V.k2}for(var _e=this._wnafMulAdd(1,ae,Ee,pe*2,w),ie=0;ie<pe*2;ie++)ae[ie]=null,Ee[ie]=null;return _e};function y(N,M,U,w){l.BasePoint.call(this,N,"affine"),M===null&&U===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(M,16),this.y=new o(U,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(y,l.BasePoint),C.prototype.point=function(M,U,w){return new y(this,M,U,w)},C.prototype.pointFromJSON=function(M,U){return y.fromJSON(this,M,U)},y.prototype._getBeta=function(){if(this.curve.endo){var M=this.precomputed;if(M&&M.beta)return M.beta;var U=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(M){var w=this.curve,ae=function(Ee){return w.point(Ee.x.redMul(w.endo.beta),Ee.y)};M.beta=U,U.precomputed={beta:null,naf:M.naf&&{wnd:M.naf.wnd,points:M.naf.points.map(ae)},doubles:M.doubles&&{step:M.doubles.step,points:M.doubles.points.map(ae)}}}return U}},y.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]},y.fromJSON=function(M,U,w){typeof U=="string"&&(U=JSON.parse(U));var ae=M.point(U[0],U[1],w);if(!U[2])return ae;function Ee(V){return M.point(V[0],V[1],w)}var pe=U[2];return ae.precomputed={beta:null,doubles:pe.doubles&&{step:pe.doubles.step,points:[ae].concat(pe.doubles.points.map(Ee))},naf:pe.naf&&{wnd:pe.naf.wnd,points:[ae].concat(pe.naf.points.map(Ee))}},ae},y.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)+">"},y.prototype.isInfinity=function(){return this.inf},y.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 U=this.y.redSub(M.y);U.cmpn(0)!==0&&(U=U.redMul(this.x.redSub(M.x).redInvm()));var w=U.redSqr().redISub(this.x).redISub(M.x),ae=U.redMul(this.x.redSub(w)).redISub(this.y);return this.curve.point(w,ae)},y.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 U=this.curve.a,w=this.x.redSqr(),ae=M.redInvm(),Ee=w.redAdd(w).redIAdd(w).redIAdd(U).redMul(ae),pe=Ee.redSqr().redISub(this.x.redAdd(this.x)),V=Ee.redMul(this.x.redSub(pe)).redISub(this.y);return this.curve.point(pe,V)},y.prototype.getX=function(){return this.x.fromRed()},y.prototype.getY=function(){return this.y.fromRed()},y.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)},y.prototype.mulAdd=function(M,U,w){var ae=[this,U],Ee=[M,w];return this.curve.endo?this.curve._endoWnafMulAdd(ae,Ee):this.curve._wnafMulAdd(1,ae,Ee,2)},y.prototype.jmulAdd=function(M,U,w){var ae=[this,U],Ee=[M,w];return this.curve.endo?this.curve._endoWnafMulAdd(ae,Ee,!0):this.curve._wnafMulAdd(1,ae,Ee,2,!0)},y.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)},y.prototype.neg=function(M){if(this.inf)return this;var U=this.curve.point(this.x,this.y.redNeg());if(M&&this.precomputed){var w=this.precomputed,ae=function(Ee){return Ee.neg()};U.precomputed={naf:w.naf&&{wnd:w.naf.wnd,points:w.naf.points.map(ae)},doubles:w.doubles&&{step:w.doubles.step,points:w.doubles.points.map(ae)}}}return U},y.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 m(N,M,U,w){l.BasePoint.call(this,N,"jacobian"),M===null&&U===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(U,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(m,l.BasePoint),C.prototype.jpoint=function(M,U,w){return new m(this,M,U,w)},m.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var M=this.z.redInvm(),U=M.redSqr(),w=this.x.redMul(U),ae=this.y.redMul(U).redMul(M);return this.curve.point(w,ae)},m.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},m.prototype.add=function(M){if(this.isInfinity())return M;if(M.isInfinity())return this;var U=M.z.redSqr(),w=this.z.redSqr(),ae=this.x.redMul(U),Ee=M.x.redMul(w),pe=this.y.redMul(U.redMul(M.z)),V=M.y.redMul(w.redMul(this.z)),xe=ae.redSub(Ee),Ie=pe.redSub(V);if(xe.cmpn(0)===0)return Ie.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var _e=xe.redSqr(),ie=_e.redMul(xe),n0=ae.redMul(_e),le=Ie.redSqr().redIAdd(ie).redISub(n0).redISub(n0),Ne=Ie.redMul(n0.redISub(le)).redISub(pe.redMul(ie)),ye=this.z.redMul(M.z).redMul(xe);return this.curve.jpoint(le,Ne,ye)},m.prototype.mixedAdd=function(M){if(this.isInfinity())return M.toJ();if(M.isInfinity())return this;var U=this.z.redSqr(),w=this.x,ae=M.x.redMul(U),Ee=this.y,pe=M.y.redMul(U).redMul(this.z),V=w.redSub(ae),xe=Ee.redSub(pe);if(V.cmpn(0)===0)return xe.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var Ie=V.redSqr(),_e=Ie.redMul(V),ie=w.redMul(Ie),n0=xe.redSqr().redIAdd(_e).redISub(ie).redISub(ie),le=xe.redMul(ie.redISub(n0)).redISub(Ee.redMul(_e)),Ne=this.z.redMul(V);return this.curve.jpoint(n0,le,Ne)},m.prototype.dblp=function(M){if(M===0)return this;if(this.isInfinity())return this;if(!M)return this.dbl();var U;if(this.curve.zeroA||this.curve.threeA){var w=this;for(U=0;U<M;U++)w=w.dbl();return w}var ae=this.curve.a,Ee=this.curve.tinv,pe=this.x,V=this.y,xe=this.z,Ie=xe.redSqr().redSqr(),_e=V.redAdd(V);for(U=0;U<M;U++){var ie=pe.redSqr(),n0=_e.redSqr(),le=n0.redSqr(),Ne=ie.redAdd(ie).redIAdd(ie).redIAdd(ae.redMul(Ie)),ye=pe.redMul(n0),Xe=Ne.redSqr().redISub(ye.redAdd(ye)),re=ye.redISub(Xe),a0=Ne.redMul(re);a0=a0.redIAdd(a0).redISub(le);var Qe=_e.redMul(xe);U+1<M&&(Ie=Ie.redMul(le)),pe=Xe,xe=Qe,_e=a0}return this.curve.jpoint(pe,_e.redMul(Ee),xe)},m.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},m.prototype._zeroDbl=function(){var M,U,w;if(this.zOne){var ae=this.x.redSqr(),Ee=this.y.redSqr(),pe=Ee.redSqr(),V=this.x.redAdd(Ee).redSqr().redISub(ae).redISub(pe);V=V.redIAdd(V);var xe=ae.redAdd(ae).redIAdd(ae),Ie=xe.redSqr().redISub(V).redISub(V),_e=pe.redIAdd(pe);_e=_e.redIAdd(_e),_e=_e.redIAdd(_e),M=Ie,U=xe.redMul(V.redISub(Ie)).redISub(_e),w=this.y.redAdd(this.y)}else{var ie=this.x.redSqr(),n0=this.y.redSqr(),le=n0.redSqr(),Ne=this.x.redAdd(n0).redSqr().redISub(ie).redISub(le);Ne=Ne.redIAdd(Ne);var ye=ie.redAdd(ie).redIAdd(ie),Xe=ye.redSqr(),re=le.redIAdd(le);re=re.redIAdd(re),re=re.redIAdd(re),M=Xe.redISub(Ne).redISub(Ne),U=ye.redMul(Ne.redISub(M)).redISub(re),w=this.y.redMul(this.z),w=w.redIAdd(w)}return this.curve.jpoint(M,U,w)},m.prototype._threeDbl=function(){var M,U,w;if(this.zOne){var ae=this.x.redSqr(),Ee=this.y.redSqr(),pe=Ee.redSqr(),V=this.x.redAdd(Ee).redSqr().redISub(ae).redISub(pe);V=V.redIAdd(V);var xe=ae.redAdd(ae).redIAdd(ae).redIAdd(this.curve.a),Ie=xe.redSqr().redISub(V).redISub(V);M=Ie;var _e=pe.redIAdd(pe);_e=_e.redIAdd(_e),_e=_e.redIAdd(_e),U=xe.redMul(V.redISub(Ie)).redISub(_e),w=this.y.redAdd(this.y)}else{var ie=this.z.redSqr(),n0=this.y.redSqr(),le=this.x.redMul(n0),Ne=this.x.redSub(ie).redMul(this.x.redAdd(ie));Ne=Ne.redAdd(Ne).redIAdd(Ne);var ye=le.redIAdd(le);ye=ye.redIAdd(ye);var Xe=ye.redAdd(ye);M=Ne.redSqr().redISub(Xe),w=this.y.redAdd(this.z).redSqr().redISub(n0).redISub(ie);var re=n0.redSqr();re=re.redIAdd(re),re=re.redIAdd(re),re=re.redIAdd(re),U=Ne.redMul(ye.redISub(M)).redISub(re)}return this.curve.jpoint(M,U,w)},m.prototype._dbl=function(){var M=this.curve.a,U=this.x,w=this.y,ae=this.z,Ee=ae.redSqr().redSqr(),pe=U.redSqr(),V=w.redSqr(),xe=pe.redAdd(pe).redIAdd(pe).redIAdd(M.redMul(Ee)),Ie=U.redAdd(U);Ie=Ie.redIAdd(Ie);var _e=Ie.redMul(V),ie=xe.redSqr().redISub(_e.redAdd(_e)),n0=_e.redISub(ie),le=V.redSqr();le=le.redIAdd(le),le=le.redIAdd(le),le=le.redIAdd(le);var Ne=xe.redMul(n0).redISub(le),ye=w.redAdd(w).redMul(ae);return this.curve.jpoint(ie,Ne,ye)},m.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var M=this.x.redSqr(),U=this.y.redSqr(),w=this.z.redSqr(),ae=U.redSqr(),Ee=M.redAdd(M).redIAdd(M),pe=Ee.redSqr(),V=this.x.redAdd(U).redSqr().redISub(M).redISub(ae);V=V.redIAdd(V),V=V.redAdd(V).redIAdd(V),V=V.redISub(pe);var xe=V.redSqr(),Ie=ae.redIAdd(ae);Ie=Ie.redIAdd(Ie),Ie=Ie.redIAdd(Ie),Ie=Ie.redIAdd(Ie);var _e=Ee.redIAdd(V).redSqr().redISub(pe).redISub(xe).redISub(Ie),ie=U.redMul(_e);ie=ie.redIAdd(ie),ie=ie.redIAdd(ie);var n0=this.x.redMul(xe).redISub(ie);n0=n0.redIAdd(n0),n0=n0.redIAdd(n0);var le=this.y.redMul(_e.redMul(Ie.redISub(_e)).redISub(V.redMul(xe)));le=le.redIAdd(le),le=le.redIAdd(le),le=le.redIAdd(le);var Ne=this.z.redAdd(V).redSqr().redISub(w).redISub(xe);return this.curve.jpoint(n0,le,Ne)},m.prototype.mul=function(M,U){return M=new o(M,U),this.curve._wnafMul(this,M)},m.prototype.eq=function(M){if(M.type==="affine")return this.eq(M.toJ());if(this===M)return!0;var U=this.z.redSqr(),w=M.z.redSqr();if(this.x.redMul(w).redISub(M.x.redMul(U)).cmpn(0)!==0)return!1;var ae=U.redMul(this.z),Ee=w.redMul(M.z);return this.y.redMul(Ee).redISub(M.y.redMul(ae)).cmpn(0)===0},m.prototype.eqXToP=function(M){var U=this.z.redSqr(),w=M.toRed(this.curve.red).redMul(U);if(this.x.cmp(w)===0)return!0;for(var ae=M.clone(),Ee=this.curve.redN.redMul(U);;){if(ae.iadd(this.curve.n),ae.cmp(this.curve.p)>=0)return!1;if(w.redIAdd(Ee),this.x.cmp(w)===0)return!0}},m.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)+">"},m.prototype.isInfinity=function(){return this.z.cmpn(0)===0},gh}var ph,cp;function UB(){if(cp)return ph;cp=1;var f=Ja(),o=iu(),c=fu(),l=xi();function b(y){c.call(this,"mont",y),this.a=new f(y.a,16).toRed(this.red),this.b=new f(y.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),ph=b,b.prototype.validate=function(m){var N=m.normalize().x,M=N.redSqr(),U=M.redMul(N).redAdd(M.redMul(this.a)).redAdd(N),w=U.redSqrt();return w.redSqr().cmp(U)===0};function C(y,m,N){c.BasePoint.call(this,y,"projective"),m===null&&N===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new f(m,16),this.z=new f(N,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(C,c.BasePoint),b.prototype.decodePoint=function(m,N){return this.point(l.toArray(m,N),1)},b.prototype.point=function(m,N){return new C(this,m,N)},b.prototype.pointFromJSON=function(m){return C.fromJSON(this,m)},C.prototype.precompute=function(){},C.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},C.fromJSON=function(m,N){return new C(m,N[0],N[1]||m.one)},C.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)+">"},C.prototype.isInfinity=function(){return this.z.cmpn(0)===0},C.prototype.dbl=function(){var m=this.x.redAdd(this.z),N=m.redSqr(),M=this.x.redSub(this.z),U=M.redSqr(),w=N.redSub(U),ae=N.redMul(U),Ee=w.redMul(U.redAdd(this.curve.a24.redMul(w)));return this.curve.point(ae,Ee)},C.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.diffAdd=function(m,N){var M=this.x.redAdd(this.z),U=this.x.redSub(this.z),w=m.x.redAdd(m.z),ae=m.x.redSub(m.z),Ee=ae.redMul(M),pe=w.redMul(U),V=N.z.redMul(Ee.redAdd(pe).redSqr()),xe=N.x.redMul(Ee.redISub(pe).redSqr());return this.curve.point(V,xe)},C.prototype.mul=function(m){for(var N=m.clone(),M=this,U=this.curve.point(null,null),w=this,ae=[];N.cmpn(0)!==0;N.iushrn(1))ae.push(N.andln(1));for(var Ee=ae.length-1;Ee>=0;Ee--)ae[Ee]===0?(M=M.diffAdd(U,w),U=U.dbl()):(U=M.diffAdd(U,w),M=M.dbl());return U},C.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},C.prototype.eq=function(m){return this.getX().cmp(m.getX())===0},C.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},C.prototype.getX=function(){return this.normalize(),this.x.fromRed()},ph}var yh,up;function RB(){if(up)return yh;up=1;var f=xi(),o=Ja(),c=iu(),l=fu(),b=f.assert;function C(m){this.twisted=(m.a|0)!==1,this.mOneA=this.twisted&&(m.a|0)===-1,this.extended=this.mOneA,l.call(this,"edwards",m),this.a=new o(m.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(m.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(m.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),b(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(m.c|0)===1}c(C,l),yh=C,C.prototype._mulA=function(N){return this.mOneA?N.redNeg():this.a.redMul(N)},C.prototype._mulC=function(N){return this.oneC?N:this.c.redMul(N)},C.prototype.jpoint=function(N,M,U,w){return this.point(N,M,U,w)},C.prototype.pointFromX=function(N,M){N=new o(N,16),N.red||(N=N.toRed(this.red));var U=N.redSqr(),w=this.c2.redSub(this.a.redMul(U)),ae=this.one.redSub(this.c2.redMul(this.d).redMul(U)),Ee=w.redMul(ae.redInvm()),pe=Ee.redSqrt();if(pe.redSqr().redSub(Ee).cmp(this.zero)!==0)throw new Error("invalid point");var V=pe.fromRed().isOdd();return(M&&!V||!M&&V)&&(pe=pe.redNeg()),this.point(N,pe)},C.prototype.pointFromY=function(N,M){N=new o(N,16),N.red||(N=N.toRed(this.red));var U=N.redSqr(),w=U.redSub(this.c2),ae=U.redMul(this.d).redMul(this.c2).redSub(this.a),Ee=w.redMul(ae.redInvm());if(Ee.cmp(this.zero)===0){if(M)throw new Error("invalid point");return this.point(this.zero,N)}var pe=Ee.redSqrt();if(pe.redSqr().redSub(Ee).cmp(this.zero)!==0)throw new Error("invalid point");return pe.fromRed().isOdd()!==M&&(pe=pe.redNeg()),this.point(pe,N)},C.prototype.validate=function(N){if(N.isInfinity())return!0;N.normalize();var M=N.x.redSqr(),U=N.y.redSqr(),w=M.redMul(this.a).redAdd(U),ae=this.c2.redMul(this.one.redAdd(this.d.redMul(M).redMul(U)));return w.cmp(ae)===0};function y(m,N,M,U,w){l.BasePoint.call(this,m,"projective"),N===null&&M===null&&U===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(N,16),this.y=new o(M,16),this.z=U?new o(U,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(y,l.BasePoint),C.prototype.pointFromJSON=function(N){return y.fromJSON(this,N)},C.prototype.point=function(N,M,U,w){return new y(this,N,M,U,w)},y.fromJSON=function(N,M){return new y(N,M[0],M[1],M[2])},y.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)+">"},y.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},y.prototype._extDbl=function(){var N=this.x.redSqr(),M=this.y.redSqr(),U=this.z.redSqr();U=U.redIAdd(U);var w=this.curve._mulA(N),ae=this.x.redAdd(this.y).redSqr().redISub(N).redISub(M),Ee=w.redAdd(M),pe=Ee.redSub(U),V=w.redSub(M),xe=ae.redMul(pe),Ie=Ee.redMul(V),_e=ae.redMul(V),ie=pe.redMul(Ee);return this.curve.point(xe,Ie,ie,_e)},y.prototype._projDbl=function(){var N=this.x.redAdd(this.y).redSqr(),M=this.x.redSqr(),U=this.y.redSqr(),w,ae,Ee,pe,V,xe;if(this.curve.twisted){pe=this.curve._mulA(M);var Ie=pe.redAdd(U);this.zOne?(w=N.redSub(M).redSub(U).redMul(Ie.redSub(this.curve.two)),ae=Ie.redMul(pe.redSub(U)),Ee=Ie.redSqr().redSub(Ie).redSub(Ie)):(V=this.z.redSqr(),xe=Ie.redSub(V).redISub(V),w=N.redSub(M).redISub(U).redMul(xe),ae=Ie.redMul(pe.redSub(U)),Ee=Ie.redMul(xe))}else pe=M.redAdd(U),V=this.curve._mulC(this.z).redSqr(),xe=pe.redSub(V).redSub(V),w=this.curve._mulC(N.redISub(pe)).redMul(xe),ae=this.curve._mulC(pe).redMul(M.redISub(U)),Ee=pe.redMul(xe);return this.curve.point(w,ae,Ee)},y.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},y.prototype._extAdd=function(N){var M=this.y.redSub(this.x).redMul(N.y.redSub(N.x)),U=this.y.redAdd(this.x).redMul(N.y.redAdd(N.x)),w=this.t.redMul(this.curve.dd).redMul(N.t),ae=this.z.redMul(N.z.redAdd(N.z)),Ee=U.redSub(M),pe=ae.redSub(w),V=ae.redAdd(w),xe=U.redAdd(M),Ie=Ee.redMul(pe),_e=V.redMul(xe),ie=Ee.redMul(xe),n0=pe.redMul(V);return this.curve.point(Ie,_e,n0,ie)},y.prototype._projAdd=function(N){var M=this.z.redMul(N.z),U=M.redSqr(),w=this.x.redMul(N.x),ae=this.y.redMul(N.y),Ee=this.curve.d.redMul(w).redMul(ae),pe=U.redSub(Ee),V=U.redAdd(Ee),xe=this.x.redAdd(this.y).redMul(N.x.redAdd(N.y)).redISub(w).redISub(ae),Ie=M.redMul(pe).redMul(xe),_e,ie;return this.curve.twisted?(_e=M.redMul(V).redMul(ae.redSub(this.curve._mulA(w))),ie=pe.redMul(V)):(_e=M.redMul(V).redMul(ae.redSub(w)),ie=this.curve._mulC(pe).redMul(V)),this.curve.point(Ie,_e,ie)},y.prototype.add=function(N){return this.isInfinity()?N:N.isInfinity()?this:this.curve.extended?this._extAdd(N):this._projAdd(N)},y.prototype.mul=function(N){return this._hasDoubles(N)?this.curve._fixedNafMul(this,N):this.curve._wnafMul(this,N)},y.prototype.mulAdd=function(N,M,U){return this.curve._wnafMulAdd(1,[this,M],[N,U],2,!1)},y.prototype.jmulAdd=function(N,M,U){return this.curve._wnafMulAdd(1,[this,M],[N,U],2,!0)},y.prototype.normalize=function(){if(this.zOne)return this;var N=this.z.redInvm();return this.x=this.x.redMul(N),this.y=this.y.redMul(N),this.t&&(this.t=this.t.redMul(N)),this.z=this.curve.one,this.zOne=!0,this},y.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},y.prototype.getX=function(){return this.normalize(),this.x.fromRed()},y.prototype.getY=function(){return this.normalize(),this.y.fromRed()},y.prototype.eq=function(N){return this===N||this.getX().cmp(N.getX())===0&&this.getY().cmp(N.getY())===0},y.prototype.eqXToP=function(N){var M=N.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(M)===0)return!0;for(var U=N.clone(),w=this.curve.redN.redMul(this.z);;){if(U.iadd(this.curve.n),U.cmp(this.curve.p)>=0)return!1;if(M.redIAdd(w),this.x.cmp(M)===0)return!0}},y.prototype.toP=y.prototype.normalize,y.prototype.mixedAdd=y.prototype.add,yh}var lp;function zy(){return lp||(lp=1,function(f){var o=f;o.base=fu(),o.short=HB(),o.mont=UB(),o.edwards=RB()}(hh)),hh}var Ch={},Ih,hp;function GB(){return hp||(hp=1,Ih={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"]]}}),Ih}var dp;function dg(){return dp||(dp=1,function(f){var o=f,c=au(),l=zy(),b=xi(),C=b.assert;function y(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,C(this.g.validate(),"Invalid curve"),C(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}o.PresetCurve=y;function m(M,U){Object.defineProperty(o,M,{configurable:!0,enumerable:!0,get:function(){var w=new y(U);return Object.defineProperty(o,M,{configurable:!0,enumerable:!0,value:w}),w}})}m("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"]}),m("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"]}),m("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"]}),m("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"]}),m("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"]}),m("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"]}),m("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 N;try{N=GB()}catch{N=void 0}m("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",N]})}(Ch)),Ch}var bh,gp;function YB(){if(gp)return bh;gp=1;var f=au(),o=Jy(),c=y2();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 C=o.toArray(b.entropy,b.entropyEnc||"hex"),y=o.toArray(b.nonce,b.nonceEnc||"hex"),m=o.toArray(b.pers,b.persEnc||"hex");c(C.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(C,y,m)}return bh=l,l.prototype._init=function(C,y,m){var N=C.concat(y).concat(m);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(N),this._reseed=1,this.reseedInterval=281474976710656},l.prototype._hmac=function(){return new f.hmac(this.hash,this.K)},l.prototype._update=function(C){var y=this._hmac().update(this.V).update([0]);C&&(y=y.update(C)),this.K=y.digest(),this.V=this._hmac().update(this.V).digest(),C&&(this.K=this._hmac().update(this.V).update([1]).update(C).digest(),this.V=this._hmac().update(this.V).digest())},l.prototype.reseed=function(C,y,m,N){typeof y!="string"&&(N=m,m=y,y=null),C=o.toArray(C,y),m=o.toArray(m,N),c(C.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(C.concat(m||[])),this._reseed=1},l.prototype.generate=function(C,y,m,N){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof y!="string"&&(N=m,m=y,y=null),m&&(m=o.toArray(m,N||"hex"),this._update(m));for(var M=[];M.length<C;)this.V=this._hmac().update(this.V).digest(),M=M.concat(this.V);var U=M.slice(0,C);return this._update(m),this._reseed++,o.encode(U,y)},bh}var vh,pp;function LB(){if(pp)return vh;pp=1;var f=Ja(),o=xi(),c=o.assert;function l(b,C){this.ec=b,this.priv=null,this.pub=null,C.priv&&this._importPrivate(C.priv,C.privEnc),C.pub&&this._importPublic(C.pub,C.pubEnc)}return vh=l,l.fromPublic=function(C,y,m){return y instanceof l?y:new l(C,{pub:y,pubEnc:m})},l.fromPrivate=function(C,y,m){return y instanceof l?y:new l(C,{priv:y,privEnc:m})},l.prototype.validate=function(){var C=this.getPublic();return C.isInfinity()?{result:!1,reason:"Invalid public key"}:C.validate()?C.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(C,y){return typeof C=="string"&&(y=C,C=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),y?this.pub.encode(y,C):this.pub},l.prototype.getPrivate=function(C){return C==="hex"?this.priv.toString(16,2):this.priv},l.prototype._importPrivate=function(C,y){this.priv=new f(C,y||16),this.priv=this.priv.umod(this.ec.curve.n)},l.prototype._importPublic=function(C,y){if(C.x||C.y){this.ec.curve.type==="mont"?c(C.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&c(C.x&&C.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(C.x,C.y);return}this.pub=this.ec.curve.decodePoint(C,y)},l.prototype.derive=function(C){return C.validate()||c(C.validate(),"public point not validated"),C.mul(this.priv).getX()},l.prototype.sign=function(C,y,m){return this.ec.sign(C,this,y,m)},l.prototype.verify=function(C,y,m){return this.ec.verify(C,y,this,void 0,m)},l.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"},vh}var xh,yp;function TB(){if(yp)return xh;yp=1;var f=Ja(),o=xi(),c=o.assert;function l(N,M){if(N instanceof l)return N;this._importDER(N,M)||(c(N.r&&N.s,"Signature without r or s"),this.r=new f(N.r,16),this.s=new f(N.s,16),N.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=N.recoveryParam)}xh=l;function b(){this.place=0}function C(N,M){var U=N[M.place++];if(!(U&128))return U;var w=U&15;if(w===0||w>4||N[M.place]===0)return!1;for(var ae=0,Ee=0,pe=M.place;Ee<w;Ee++,pe++)ae<<=8,ae|=N[pe],ae>>>=0;return ae<=127?!1:(M.place=pe,ae)}function y(N){for(var M=0,U=N.length-1;!N[M]&&!(N[M+1]&128)&&M<U;)M++;return M===0?N:N.slice(M)}l.prototype._importDER=function(M,U){M=o.toArray(M,U);var w=new b;if(M[w.place++]!==48)return!1;var ae=C(M,w);if(ae===!1||ae+w.place!==M.length||M[w.place++]!==2)return!1;var Ee=C(M,w);if(Ee===!1||(M[w.place]&128)!==0)return!1;var pe=M.slice(w.place,Ee+w.place);if(w.place+=Ee,M[w.place++]!==2)return!1;var V=C(M,w);if(V===!1||M.length!==V+w.place||(M[w.place]&128)!==0)return!1;var xe=M.slice(w.place,V+w.place);if(pe[0]===0)if(pe[1]&128)pe=pe.slice(1);else return!1;if(xe[0]===0)if(xe[1]&128)xe=xe.slice(1);else return!1;return this.r=new f(pe),this.s=new f(xe),this.recoveryParam=null,!0};function m(N,M){if(M<128){N.push(M);return}var U=1+(Math.log(M)/Math.LN2>>>3);for(N.push(U|128);--U;)N.push(M>>>(U<<3)&255);N.push(M)}return l.prototype.toDER=function(M){var U=this.r.toArray(),w=this.s.toArray();for(U[0]&128&&(U=[0].concat(U)),w[0]&128&&(w=[0].concat(w)),U=y(U),w=y(w);!w[0]&&!(w[1]&128);)w=w.slice(1);var ae=[2];m(ae,U.length),ae=ae.concat(U),ae.push(2),m(ae,w.length);var Ee=ae.concat(w),pe=[48];return m(pe,Ee.length),pe=pe.concat(Ee),o.encode(pe,M)},xh}var Eh,Cp;function JB(){if(Cp)return Eh;Cp=1;var f=Ja(),o=YB(),c=xi(),l=dg(),b=Oy(),C=c.assert,y=LB(),m=TB();function N(M){if(!(this instanceof N))return new N(M);typeof M=="string"&&(C(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 Eh=N,N.prototype.keyPair=function(U){return new y(this,U)},N.prototype.keyFromPrivate=function(U,w){return y.fromPrivate(this,U,w)},N.prototype.keyFromPublic=function(U,w){return y.fromPublic(this,U,w)},N.prototype.genKeyPair=function(U){U||(U={});for(var w=new o({hash:this.hash,pers:U.pers,persEnc:U.persEnc||"utf8",entropy:U.entropy||b(this.hash.hmacStrength),entropyEnc:U.entropy&&U.entropyEnc||"utf8",nonce:this.n.toArray()}),ae=this.n.byteLength(),Ee=this.n.sub(new f(2));;){var pe=new f(w.generate(ae));if(!(pe.cmp(Ee)>0))return pe.iaddn(1),this.keyFromPrivate(pe)}},N.prototype._truncateToN=function(U,w,ae){var Ee;if(f.isBN(U)||typeof U=="number")U=new f(U,16),Ee=U.byteLength();else if(typeof U=="object")Ee=U.length,U=new f(U,16);else{var pe=U.toString();Ee=pe.length+1>>>1,U=new f(pe,16)}typeof ae!="number"&&(ae=Ee*8);var V=ae-this.n.bitLength();return V>0&&(U=U.ushrn(V)),!w&&U.cmp(this.n)>=0?U.sub(this.n):U},N.prototype.sign=function(U,w,ae,Ee){if(typeof ae=="object"&&(Ee=ae,ae=null),Ee||(Ee={}),typeof U!="string"&&typeof U!="number"&&!f.isBN(U)){C(typeof U=="object"&&U&&typeof U.length=="number","Expected message to be an array-like, a hex string, or a BN instance"),C(U.length>>>0===U.length);for(var pe=0;pe<U.length;pe++)C((U[pe]&255)===U[pe])}w=this.keyFromPrivate(w,ae),U=this._truncateToN(U,!1,Ee.msgBitLength),C(!U.isNeg(),"Can not sign a negative message");var V=this.n.byteLength(),xe=w.getPrivate().toArray("be",V),Ie=U.toArray("be",V);C(new f(Ie).eq(U),"Can not sign message");for(var _e=new o({hash:this.hash,entropy:xe,nonce:Ie,pers:Ee.pers,persEnc:Ee.persEnc||"utf8"}),ie=this.n.sub(new f(1)),n0=0;;n0++){var le=Ee.k?Ee.k(n0):new f(_e.generate(this.n.byteLength()));if(le=this._truncateToN(le,!0),!(le.cmpn(1)<=0||le.cmp(ie)>=0)){var Ne=this.g.mul(le);if(!Ne.isInfinity()){var ye=Ne.getX(),Xe=ye.umod(this.n);if(Xe.cmpn(0)!==0){var re=le.invm(this.n).mul(Xe.mul(w.getPrivate()).iadd(U));if(re=re.umod(this.n),re.cmpn(0)!==0){var a0=(Ne.getY().isOdd()?1:0)|(ye.cmp(Xe)!==0?2:0);return Ee.canonical&&re.cmp(this.nh)>0&&(re=this.n.sub(re),a0^=1),new m({r:Xe,s:re,recoveryParam:a0})}}}}}},N.prototype.verify=function(U,w,ae,Ee,pe){pe||(pe={}),U=this._truncateToN(U,!1,pe.msgBitLength),ae=this.keyFromPublic(ae,Ee),w=new m(w,"hex");var V=w.r,xe=w.s;if(V.cmpn(1)<0||V.cmp(this.n)>=0||xe.cmpn(1)<0||xe.cmp(this.n)>=0)return!1;var Ie=xe.invm(this.n),_e=Ie.mul(U).umod(this.n),ie=Ie.mul(V).umod(this.n),n0;return this.curve._maxwellTrick?(n0=this.g.jmulAdd(_e,ae.getPublic(),ie),n0.isInfinity()?!1:n0.eqXToP(V)):(n0=this.g.mulAdd(_e,ae.getPublic(),ie),n0.isInfinity()?!1:n0.getX().umod(this.n).cmp(V)===0)},N.prototype.recoverPubKey=function(M,U,w,ae){C((3&w)===w,"The recovery param is more than two bits"),U=new m(U,ae);var Ee=this.n,pe=new f(M),V=U.r,xe=U.s,Ie=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),Ie):V=this.curve.pointFromX(V,Ie);var ie=U.r.invm(Ee),n0=Ee.sub(pe).mul(ie).umod(Ee),le=xe.mul(ie).umod(Ee);return this.g.mulAdd(n0,V,le)},N.prototype.getKeyRecoveryParam=function(M,U,w,ae){if(U=new m(U,ae),U.recoveryParam!==null)return U.recoveryParam;for(var Ee=0;Ee<4;Ee++){var pe;try{pe=this.recoverPubKey(M,U,Ee)}catch{continue}if(pe.eq(w))return Ee}throw new Error("Unable to find valid recovery factor")},Eh}var _h,Ip;function OB(){if(Ip)return _h;Ip=1;var f=xi(),o=f.assert,c=f.parseBytes,l=f.cachedProperty;function b(C,y){this.eddsa=C,this._secret=c(y.secret),C.isPoint(y.pub)?this._pub=y.pub:this._pubBytes=c(y.pub)}return b.fromPublic=function(y,m){return m instanceof b?m:new b(y,{pub:m})},b.fromSecret=function(y,m){return m instanceof b?m:new b(y,{secret:m})},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 y=this.eddsa,m=this.hash(),N=y.encodingLength-1,M=m.slice(0,y.encodingLength);return M[0]&=248,M[N]&=127,M[N]|=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(y){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(y,this)},b.prototype.verify=function(y,m){return this.eddsa.verify(y,m,this)},b.prototype.getSecret=function(y){return o(this._secret,"KeyPair is public only"),f.encode(this.secret(),y)},b.prototype.getPublic=function(y){return f.encode(this.pubBytes(),y)},_h=b,_h}var wh,bp;function zB(){if(bp)return wh;bp=1;var f=Ja(),o=xi(),c=o.assert,l=o.cachedProperty,b=o.parseBytes;function C(y,m){this.eddsa=y,typeof m!="object"&&(m=b(m)),Array.isArray(m)&&(c(m.length===y.encodingLength*2,"Signature has invalid size"),m={R:m.slice(0,y.encodingLength),S:m.slice(y.encodingLength)}),c(m.R&&m.S,"Signature without R or S"),y.isPoint(m.R)&&(this._R=m.R),m.S instanceof f&&(this._S=m.S),this._Rencoded=Array.isArray(m.R)?m.R:m.Rencoded,this._Sencoded=Array.isArray(m.S)?m.S:m.Sencoded}return l(C,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),l(C,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),l(C,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),l(C,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),C.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},C.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},wh=C,wh}var Bh,vp;function qB(){if(vp)return Bh;vp=1;var f=au(),o=dg(),c=xi(),l=c.assert,b=c.parseBytes,C=OB(),y=zB();function m(N){if(l(N==="ed25519","only tested with ed25519 so far"),!(this instanceof m))return new m(N);N=o[N].curve,this.curve=N,this.g=N.g,this.g.precompute(N.n.bitLength()+1),this.pointClass=N.point().constructor,this.encodingLength=Math.ceil(N.n.bitLength()/8),this.hash=f.sha512}return Bh=m,m.prototype.sign=function(M,U){M=b(M);var w=this.keyFromSecret(U),ae=this.hashInt(w.messagePrefix(),M),Ee=this.g.mul(ae),pe=this.encodePoint(Ee),V=this.hashInt(pe,w.pubBytes(),M).mul(w.priv()),xe=ae.add(V).umod(this.curve.n);return this.makeSignature({R:Ee,S:xe,Rencoded:pe})},m.prototype.verify=function(M,U,w){if(M=b(M),U=this.makeSignature(U),U.S().gte(U.eddsa.curve.n)||U.S().isNeg())return!1;var ae=this.keyFromPublic(w),Ee=this.hashInt(U.Rencoded(),ae.pubBytes(),M),pe=this.g.mul(U.S()),V=U.R().add(ae.pub().mul(Ee));return V.eq(pe)},m.prototype.hashInt=function(){for(var M=this.hash(),U=0;U<arguments.length;U++)M.update(arguments[U]);return c.intFromLE(M.digest()).umod(this.curve.n)},m.prototype.keyFromPublic=function(M){return C.fromPublic(this,M)},m.prototype.keyFromSecret=function(M){return C.fromSecret(this,M)},m.prototype.makeSignature=function(M){return M instanceof y?M:new y(this,M)},m.prototype.encodePoint=function(M){var U=M.getY().toArray("le",this.encodingLength);return U[this.encodingLength-1]|=M.getX().isOdd()?128:0,U},m.prototype.decodePoint=function(M){M=c.parseBytes(M);var U=M.length-1,w=M.slice(0,U).concat(M[U]&-129),ae=(M[U]&128)!==0,Ee=c.intFromLE(w);return this.curve.pointFromY(Ee,ae)},m.prototype.encodeInt=function(M){return M.toArray("le",this.encodingLength)},m.prototype.decodeInt=function(M){return c.intFromLE(M)},m.prototype.isPoint=function(M){return M instanceof this.pointClass},Bh}var xp;function jB(){return xp||(xp=1,function(f){var o=f;o.version=PB.version,o.utils=xi(),o.rand=Oy(),o.curve=zy(),o.curves=dg(),o.ec=JB(),o.eddsa=qB()}(ch)),ch}var VB=jB();const XB=Yi(VB);var I2=function(f,o,c,l){var b=arguments.length,C=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,o,c,l);else for(var m=f.length-1;m>=0;m--)(y=f[m])&&(C=(b<3?y(C):b>3?y(o,c,C):y(o,c))||C);return b>3&&C&&Object.defineProperty(o,c,C),C},b2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)},lf,ad,o1,WB=XB.ec;let mh,ko=lf=class extends _s{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=qy(await Wf(c,Ua.ETH_KECCAK_256),l);return new lf({publicKey:b})}equals(o){return o instanceof lf?dA(this.publicKey,o.publicKey):!1}toString(){return"sepc256k1/"+jf(this.publicKey)}toPeerId(){return nu(ru(this.publicKey))}static fromPeerId(o){if(!o.publicKey)throw new Error("Missing public key");if(o.type==="secp256k1")return new lf({publicKey:o.publicKey.raw});throw new Error("Unsupported key type: "+o.type)}};I2([YA({type:kd("u8",33)}),b2("design:type",Uint8Array)],ko.prototype,"publicKey",void 0);ko=lf=I2([No(1),b2("design:paramtypes",[Object])],ko);let Qs=ad=class extends N3{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 ad?dA(this.privateKey,o.privateKey):!1}toString(){return"secp256k1s/"+jf(this.privateKey)}};I2([YA({type:Uint8Array}),b2("design:type",Uint8Array)],Qs.prototype,"privateKey",void 0);Qs=ad=I2([No(1),b2("design:paramtypes",[Object])],Qs);let k1=o1=class extends M3{publicKey;privateKey;_wallet;constructor(o){super(),this.privateKey=o.privateKey,this.publicKey=o.publicKey}static async create(){const o=await P9();return new o1({publicKey:new ko({publicKey:o.publicKey.raw}),privateKey:new Qs({privateKey:o.raw})})}async sign(o,c=Ua.ETH_KECCAK_256){const l=await Wf(o,c),b=ed((this._wallet||(this._wallet=new a2(this.privateKey.privateKey)))._signingKey().signDigest(l)),C=new Uint8Array(Qo.length(b));return Qo.write(b,C,0),new La({prehash:c,publicKey:this.publicKey,signature:C})}equals(o){return o instanceof o1?this.publicKey.equals(o.publicKey)&&this.privateKey.equals(o.privateKey):!1}toPeerId(){return nu(ru(this.publicKey.publicKey))}};I2([YA({type:ko}),b2("design:type",ko)],k1.prototype,"publicKey",void 0);I2([YA({type:Qs}),b2("design:type",Qs)],k1.prototype,"privateKey",void 0);k1=o1=I2([No(2),b2("design:paramtypes",[Object])],k1);const ZB=new TextDecoder;function $B(){return mh||(mh=new WB("secp256k1")),mh}const qy=(f,o)=>{const c=Fs(o),l={r:Nt(c.r),s:Nt(c.s)};return new Uint8Array($B().recoverPubKey(Nt(f),l,c.recoveryParam).encodeCompressed())},em=async(f,o)=>{const c=await Wf(o,f.prehash),l=qy(Nt(c),ZB.decode(f.signature));return dA(l,f.publicKey.publicKey)};var v2=function(f,o,c,l){var b=arguments.length,C=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,o,c,l);else for(var m=f.length-1;m>=0;m--)(y=f[m])&&(C=(b<3?y(C):b>3?y(o,c,C):y(o,c))||C);return b>3&&C&&Object.defineProperty(o,c,C),C},x2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)};let La=class{signature;publicKey;prehash=Ua.NONE;constructor(o){this.signature=o.signature,this.publicKey=o.publicKey,this.prehash=o.prehash}equals(o){return dA(this.signature,o.signature)?v3(Es(this.publicKey),Es(o.publicKey))===0&&this.prehash===o.prehash:!1}};v2([YA({type:Uint8Array}),x2("design:type",Uint8Array)],La.prototype,"signature",void 0);v2([YA({type:_s}),x2("design:type",_s)],La.prototype,"publicKey",void 0);v2([YA({type:"u8"}),x2("design:type",Number)],La.prototype,"prehash",void 0);La=v2([No(0),x2("design:paramtypes",[Object])],La);let M1=class{data;signature;constructor(o){this.data=o.data,this.signature=o.signature,this._value=o.value}_value;getValue(o){return dx(this.data,o)}async verify(){return this.signature?tm(this.signature,this.data):!0}equals(o){return!dA(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}};v2([YA({type:Uint8Array}),x2("design:type",Uint8Array)],M1.prototype,"data",void 0);v2([YA({type:ex(La)}),x2("design:type",La)],M1.prototype,"signature",void 0);M1=v2([No(0),x2("design:paramtypes",[Object])],M1);const tm=async(f,o)=>f.publicKey instanceof Mo?nm(f,o):f.publicKey instanceof ko?em(f,o):!1,rm=async(f,o,c)=>{const l=await Wf(f,c);return new La({prehash:c,publicKey:o.publicKey,signature:u2.crypto_sign_detached(l,o.privateKeyPublicKey)})},nm=async(f,o)=>{let c=!1;try{const l=await Wf(o,f.prehash);c=u2.crypto_sign_verify_detached(f.signature,l,f.publicKey.publicKey)}catch{return!1}return c};var E2=function(f,o,c,l){var b=arguments.length,C=b<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,c):l,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(f,o,c,l);else for(var m=f.length-1;m>=0;m--)(y=f[m])&&(C=(b<3?y(C):b>3?y(o,c,C):y(o,c))||C);return b>3&&C&&Object.defineProperty(o,c,C),C},_2=function(f,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(f,o)},s1,od,f1;let Mo=s1=class extends _s{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 s1?dA(this.publicKey,o.publicKey):!1}toString(){return"ed25119p/"+jf(this.publicKey)}toPeerId(){return nu(ru(this.publicKey))}static fromPeerId(o){if(!o.publicKey)throw new Error("Missing public key");if(o.type==="Ed25519")return new s1({publicKey:Y9(o.publicKey.raw)});throw new Error("Unsupported key type: "+o.type)}};E2([YA({type:kd("u8",32)}),_2("design:type",Uint8Array)],Mo.prototype,"publicKey",void 0);Mo=s1=E2([No(0),_2("design:paramtypes",[Object])],Mo);let Ss=od=class extends N3{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 od?dA(this.privateKey,o.privateKey):!1}toString(){return"ed25119s/"+jf(this.privateKey)}keyObject};E2([YA({type:kd("u8",32)}),_2("design:type",Uint8Array)],Ss.prototype,"privateKey",void 0);Ss=od=E2([No(0),_2("design:paramtypes",[Object])],Ss);let Pf=f1=class extends M3{publicKey;privateKey;constructor(o){super(),this.privateKey=o.privateKey,this.publicKey=o.publicKey}static async create(){await u2.ready;const o=u2.crypto_sign_keypair();return new f1({publicKey:new Mo({publicKey:o.publicKey}),privateKey:new Ss({privateKey:o.privateKey.slice(0,32)})})}sign(o,c=Ua.NONE){return rm(o,this,c)}signer(o){return async c=>this.sign(c,o)}equals(o){return o instanceof f1?this.publicKey.equals(o.publicKey)&&this.privateKey.equals(o.privateKey):!1}_privateKeyPublicKey;get privateKeyPublicKey(){return this._privateKeyPublicKey||(this._privateKeyPublicKey=h2([this.privateKey.privateKey,this.publicKey.publicKey]))}toPeerId(){return nu(ru(this.publicKey.publicKey))}};E2([YA({type:Mo}),_2("design:type",Mo)],Pf.prototype,"publicKey",void 0);E2([YA({type:Ss}),_2("design:type",Ss)],Pf.prototype,"privateKey",void 0);Pf=f1=E2([No(0),_2("design:paramtypes",[Object])],Pf);const Ep=f=>{if(f.type==="Ed25519")return Mo.fromPeerId(f);if(f.type==="secp256k1")return ko.fromPeerId(f);throw new Error("Unsupported key type")},Am=f=>{if(f==="https:")return jy;if(f==="http:")return sd;throw new Error("Unsupported protocol: "+f)},jy=9002,sd=8082,_p="/trust",im="/peer/id",am="/peer/address",Vc="/program",Qh="/programs",om="/program/variants",sm="/install",fm="/network/bootstrap",cm="/restart",um="/path",lm="/log",hm="/versions",dm="modulepreload",gm=function(f){return"/"+f},wp={},Bp=function(o,c,l){let b=Promise.resolve();if(c&&c.length>0){let y=function(M){return Promise.all(M.map(U=>Promise.resolve(U).then(w=>({status:"fulfilled",value:w}),w=>({status:"rejected",reason:w}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),N=m?.nonce||m?.getAttribute("nonce");b=y(c.map(M=>{if(M=gm(M),M in wp)return;wp[M]=!0;const U=M.endsWith(".css"),w=U?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${M}"]${w}`))return;const ae=document.createElement("link");if(ae.rel=U?"stylesheet":dm,U||(ae.as="script"),ae.crossOrigin="",ae.href=M,N&&ae.setAttribute("nonce",N),document.head.appendChild(ae),U)return new Promise((Ee,pe)=>{ae.addEventListener("load",Ee),ae.addEventListener("error",()=>pe(new Error(`Unable to preload CSS for ${M}`)))})}))}function C(y){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=y,window.dispatchEvent(m),!m.defaultPrevented)throw y}return b.then(y=>{for(const m of y||[])m.status==="rejected"&&C(m.reason);return o().catch(C)})};class gi extends Error{static name="InvalidMultiaddrError";name="InvalidMultiaddrError"}class Kf extends Error{static name="ValidationError";name="ValidationError"}class pm extends Error{static name="InvalidParametersError";name="InvalidParametersError"}class ym extends Error{static name="InvalidProtocolError";name="InvalidProtocolError"}class Cm{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 C=0,y=0;const m=this.peekChar();if(m===void 0)return;const N=m==="0",M=2**(8*b)-1;for(;;){const U=this.readAtomically(()=>{const w=this.readChar();if(w===void 0)return;const ae=Number.parseInt(w,o);if(!Number.isNaN(ae))return ae});if(U===void 0)break;if(C*=o,C+=U,C>M||(y+=1,c!==void 0&&y>c))return}if(y!==0)return!l&&N&&y>1?void 0:C})}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 y=this.readSeparator(":",l,()=>this.readIPv4Addr());if(y!==void 0)return c[b]=y[0],c[b+1]=y[1],c[b+2]=y[2],c[b+3]=y[3],[b+4,!0]}const C=this.readSeparator(":",l,()=>this.readNumber(16,4,!0,2));if(C===void 0)return[b,!1];c[b]=C>>8,c[b+1]=C&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 C=new Uint8Array(14),y=16-(l+2),[m]=o(C.subarray(0,y));return c.set(C.subarray(0,m),16-m),c})}readIPAddr(){return this.readIPv4Addr()??this.readIPv6Addr()}}const Im=45,bm=15,N1=new Cm;function vm(f){if(!(f.length>bm))return N1.new(f).parseWith(()=>N1.readIPv4Addr())}function xm(f){if(f.includes("%")&&(f=f.split("%")[0]),!(f.length>Im))return N1.new(f).parseWith(()=>N1.readIPv6Addr())}function Vy(f){return!!vm(f)}function Em(f){return!!xm(f)}const fd=4,cd=6,ud=273,_m=33,c1=41,Xy=42,wm=43,Wy=53,Zy=54,gg=55,$y=56,Bm=132,mm=301,Qm=302,Sm=400,eC=421,Dm=444,km=445,Mm=446,Nm=447,Fm=448,Pm=449,Km=454,Hm=460,Um=461,Rm=465,Gm=466,Ym=480,Lm=481,Tm=443,Jm=477,Om=478,zm=479,qm=277,jm=275,Vm=276,Xm=280,Wm=281,tC=290,Zm=777;function mp(f){return o=>wA(o,f)}function Qp(f){return o=>Ga(o,f)}function hf(f){return new DataView(f.buffer).getUint16(f.byteOffset).toString()}function os(f){const o=new ArrayBuffer(2);return new DataView(o).setUint16(0,typeof f=="string"?parseInt(f):f),new Uint8Array(o)}function $m(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=os(l);return h2([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=gs.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=os(l);return h2([c,b],c.length+b.length)}function Sp(f){const o=f.subarray(0,f.length-2),c=f.subarray(f.length-2),l=wA(o,"base32"),b=hf(c);return`${l}:${b}`}const rC=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},tQ=function(f){let o=0;f=f.toString().trim();const c=f.split(":",8);let l;for(l=0;l<c.length;l++){const C=Vy(c[l]);let y;C&&(y=rC(c[l]),c[l]=wA(y.subarray(0,2),"base16")),y!=null&&++l<8&&c.splice(l,0,wA(y.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 C=[l,1];for(l=9-c.length;l>0;l--)C.push("0");c.splice.apply(c,C)}const b=new Uint8Array(o+16);for(l=0;l<c.length;l++){c[l]===""&&(c[l]="0");const C=parseInt(c[l],16);if(isNaN(C)||C<0||C>65535)throw new gi("Invalid byte value in IP address");b[o++]=C>>8&255,b[o++]=C&255}return b},rQ=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(".")},nQ=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],C=f[l+1],y=`${b.toString(16).padStart(2,"0")}${C.toString(16).padStart(2,"0")}`;o.push(y)}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 AQ(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 Sh=Object.values(Th).map(f=>f.decoder),iQ=function(){let f=Sh[0].or(Sh[1]);return Sh.slice(2).forEach(o=>f=f.or(o)),f}();function aQ(f){return iQ.decode(f)}function oQ(f){return o=>f.encoder.encode(o)}function sQ(f){if(parseInt(f).toString()!==f)throw new Kf("Value must be an integer")}function fQ(f){if(f<0)throw new Kf("Value must be a positive integer, or zero")}function cQ(f){return o=>{if(o>f)throw new Kf(`Value must be smaller than or equal to ${f}`)}}function uQ(...f){return o=>{for(const c of f)c(o)}}const Xc=uQ(sQ,fQ,cQ(65535)),fA=-1;class lQ{protocolsByCode=new Map;protocolsByName=new Map;getCodec(o){let c;if(typeof o=="string"?c=this.protocolsByName.get(o):c=this.protocolsByCode.get(o),c==null)throw new ym(`Protocol ${o} was unknown`);return c}addCodec(o,c,l){this.protocolsByCode.set(o,c),this.protocolsByName.set(c.name,c),l?.forEach(b=>{this.protocolsByName.set(b,c)})}deleteCodec(o){const c=this.getCodec(o);c!=null&&(this.protocolsByCode.delete(c.code),this.protocolsByName.delete(c.name),c.aliases?.forEach(l=>{this.protocolsByName.delete(l)}))}}const Ra=new lQ,hQ=[{code:fd,name:"ip4",size:32,valueToBytes:rC,bytesToValue:rQ,validate:f=>{if(!Vy(f))throw new Kf(`Invalid IPv4 address "${f}"`)}},{code:cd,name:"tcp",size:16,valueToBytes:os,bytesToValue:hf,validate:Xc},{code:ud,name:"udp",size:16,valueToBytes:os,bytesToValue:hf,validate:Xc},{code:_m,name:"dccp",size:16,valueToBytes:os,bytesToValue:hf,validate:Xc},{code:c1,name:"ip6",size:128,valueToBytes:tQ,bytesToValue:nQ,stringToValue:AQ,validate:f=>{if(!Em(f))throw new Kf(`Invalid IPv6 address "${f}"`)}},{code:Xy,name:"ip6zone",size:fA},{code:wm,name:"ipcidr",size:8,bytesToValue:mp("base10"),valueToBytes:Qp("base10")},{code:Wy,name:"dns",size:fA,resolvable:!0},{code:Zy,name:"dns4",size:fA,resolvable:!0},{code:gg,name:"dns6",size:fA,resolvable:!0},{code:$y,name:"dnsaddr",size:fA,resolvable:!0},{code:Bm,name:"sctp",size:16,valueToBytes:os,bytesToValue:hf,validate:Xc},{code:mm,name:"udt"},{code:Qm,name:"utp"},{code:Sm,name:"unix",size:fA,path:!0,stringToValue:f=>decodeURIComponent(f),valueToString:f=>encodeURIComponent(f)},{code:eC,name:"p2p",aliases:["ipfs"],size:fA,bytesToValue:mp("base58btc"),valueToBytes:f=>f.startsWith("Q")||f.startsWith("1")?Qp("base58btc")(f):fn.parse(f).multihash.bytes},{code:Dm,name:"onion",size:96,bytesToValue:Sp,valueToBytes:$m},{code:km,name:"onion3",size:296,bytesToValue:Sp,valueToBytes:eQ},{code:Mm,name:"garlic64",size:fA},{code:Nm,name:"garlic32",size:fA},{code:Fm,name:"tls"},{code:Pm,name:"sni",size:fA},{code:Km,name:"noise"},{code:Hm,name:"quic"},{code:Um,name:"quic-v1"},{code:Rm,name:"webtransport"},{code:Gm,name:"certhash",size:fA,bytesToValue:oQ(_3),valueToBytes:aQ},{code:Ym,name:"http"},{code:Lm,name:"http-path",size:fA,stringToValue:f=>`/${decodeURIComponent(f)}`,valueToString:f=>encodeURIComponent(f.substring(1))},{code:Tm,name:"https"},{code:Jm,name:"ws"},{code:Om,name:"wss"},{code:zm,name:"p2p-websocket-star"},{code:qm,name:"p2p-stardust"},{code:jm,name:"p2p-webrtc-star"},{code:Vm,name:"p2p-webrtc-direct"},{code:Xm,name:"webrtc-direct"},{code:Wm,name:"webrtc"},{code:tC,name:"p2p-circuit"},{code:Zm,name:"memory",size:fA}];hQ.forEach(f=>{Ra.addCodec(f.code,f,f.aliases)});function dQ(f){const o=[];let c=0;for(;c<f.length;){const l=iy(f,c),b=Ra.getCodec(l),C=g2(l),y=CQ(b,f,c+C);let m=0;y>0&&b.size===fA&&(m=g2(y));const N=C+m+y,M={code:l,name:b.name,bytes:f.subarray(c,c+N)};if(y>0){const U=c+C+m,w=f.subarray(U,U+y);M.value=b.bytesToValue?.(w)??wA(w)}o.push(M),c+=N}return o}function gQ(f){let o=0;const c=[];for(const l of f){if(l.bytes==null){const b=Ra.getCodec(l.code),C=g2(l.code);let y,m=0,N=0;l.value!=null&&(y=b.valueToBytes?.(l.value)??Ga(l.value),m=y.byteLength,b.size===fA&&(N=g2(m)));const M=new Uint8Array(C+N+m);let U=0;jh(l.code,M,U),U+=C,y!=null&&(b.size===fA&&(jh(m,M,U),U+=N),M.set(y,U)),l.bytes=M}c.push(l.bytes),o+=l.bytes.byteLength}return h2(c,o)}function pQ(f){if(f.charAt(0)!=="/")throw new gi('String multiaddr must start with "/"');const o=[];let c="protocol",l="",b="";for(let C=1;C<f.length;C++){const y=f.charAt(C);y!=="/"&&(c==="protocol"?b+=f.charAt(C):l+=f.charAt(C));const m=C===f.length-1;if(y==="/"||m){const N=Ra.getCodec(b);if(c==="protocol"){if(N.size==null||N.size===0){o.push({code:N.code,name:N.name}),l="",b="",c="protocol";continue}else if(m)throw new gi(`Component ${b} was missing value`);c="value"}else if(c==="value"){const M={code:N.code,name:N.name};if(N.size!=null&&N.size!==0){if(l==="")throw new gi(`Component ${b} was missing value`);M.value=N.stringToValue?.(l)??l}o.push(M),l="",b="",c="protocol"}}}if(b!==""&&l!=="")throw new gi("Incomplete multiaddr");return o}function yQ(f){return`/${f.flatMap(o=>{if(o.value==null)return o.name;const c=Ra.getCodec(o.code);if(c==null)throw new gi(`Unknown protocol code ${o.code}`);return[o.name,c.valueToString?.(o.value)??o.value]}).join("/")}`}function CQ(f,o,c){return f.size==null||f.size===0?0:f.size>0?f.size/8:iy(o,c)}const IQ=Symbol.for("nodejs.util.inspect.custom"),nC=Symbol.for("@multiformats/multiaddr"),bQ=[Wy,Zy,gg,$y];class vQ extends Error{constructor(o="No available resolver"){super(o),this.name="NoAvailableResolverError"}}function xQ(f){if(f==null&&(f="/"),wQ(f))return f.getComponents();if(f instanceof Uint8Array)return dQ(f);if(typeof f=="string")return f=f.replace(/\/(\/)+/,"/").replace(/(\/)+$/,""),f===""&&(f="/"),pQ(f);if(Array.isArray(f))return f;throw new gi("Must be a string, Uint8Array, Component[], or another Multiaddr")}class ss{[nC]=!0;#e;#t;#r;constructor(o="/",c={}){this.#e=xQ(o),c.validate!==!1&&EQ(this)}get bytes(){return this.#r==null&&(this.#r=gQ(this.#e)),this.#r}toString(){return this.#t==null&&(this.#t=yQ(this.#e)),this.#t}toJSON(){return this.toString()}toOptions(){let o,c,l,b,C="";for(const{code:m,name:N,value:M}of this.#e)m===Xy&&(C=`%${M??""}`),bQ.includes(m)&&(c="tcp",b=443,l=`${M??""}${C}`,o=m===gg?6:4),(m===cd||m===ud)&&(c=N==="tcp"?"tcp":"udp",b=parseInt(M??"")),(m===fd||m===c1)&&(c="tcp",l=`${M??""}${C}`,o=m===c1?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=Ra.getCodec(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=Ra.getCodec(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 ss(o);return new ss([...this.#e,...c.getComponents()],{validate:!1})}decapsulate(o){const c=o.toString(),l=this.toString(),b=l.lastIndexOf(c);if(b<0)throw new pm(`Address ${this.toString()} does not contain subaddress: ${o.toString()}`);return new ss(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 ss(this.#e.slice(0,c),{validate:!1})}getPeerId(){try{let o=[];this.#e.forEach(({code:l,value:b})=>{l===eC&&o.push([l,b]),l===tC&&(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(Ra.getCodec(o.code).path)return o.value??null;return null}equals(o){return dA(this.bytes,o.bytes)}async resolve(o){const c=this.protos().find(C=>C.resolvable);if(c==null)return[this];const l=_Q.get(c.name);if(l==null)throw new vQ(`no available resolver for ${c.name}`);return(await l(this,o)).map(C=>AC(C))}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!==fd&&this.#e[0].code!==c1||this.#e[1].code!==cd&&this.#e[1].code!==ud)}[IQ](){return`Multiaddr(${this.toString()})`}}function EQ(f){f.getComponents().forEach(o=>{const c=Ra.getCodec(o.code);o.value!=null&&c.validate?.(o.value)})}const _Q=new Map;function wQ(f){return!!f?.[nC]}function AC(f){return new ss(f)}const BQ="X-Peerbit-Signature",mQ="X-Peerbit-Signature-Time",QQ=async(f,o,c,l,b)=>{const C=Math.round(new Date().getTime()/1e3).toString(),y=new mr;if(!o)throw new Error("Expecting method");if(!c)throw new Error("Expecting path");y.string(o.toLowerCase()+c.toLowerCase()+C+(l||""));const m=await b.sign(y.finalize());f[mQ]=C,f[BQ]=k3(Es(m))},SQ=async(f,o={address:"http://localhost:"+sd})=>{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+":"+sd:c=c+":"+jy);const{default:b}=await Bp(async()=>{const{default:w}=await import("./index-DIycyeiE.js");return{default:w}},[]),C=b.create();C.interceptors.request.use(async w=>{const ae=new URL(w.url);return await QQ(w.headers,w.method,ae.pathname+ae.search,w.data,f),w});const y=w=>w>=200&&w<300||w===404,m=w=>{if(w.status!==200)throw new Error(w.data);return w},N=async()=>m(await C.get(c+im,{validateStatus:y,timeout:5e3})).data,M=async w=>m(await C.delete(c+Vc+"/"+encodeURIComponent(w.toString()),{validateStatus:y})),U=async w=>m(await C.delete(c+Vc+"/"+encodeURIComponent(w.toString())+"?delete=true",{validateStatus:y}));return{peer:{id:{get:N},addresses:{get:async()=>m(await C.get(c+am,{validateStatus:y})).data.map(w=>AC(w))}},access:{allow:async w=>{const ae=await C.put(c+_p+"/"+encodeURIComponent(typeof w=="string"?w:w instanceof _s?w.hashcode():Ep(w).hashcode()),void 0,{validateStatus:y});if(ae.status!==200&&ae.status!==404)throw new Error(ae.data);return ae.status===200},deny:async w=>{const ae=await C.delete(c+_p+"/"+encodeURIComponent(w instanceof _s?w.hashcode():Ep(w).hashcode()),{validateStatus:y});if(ae.status!==200&&ae.status!==404)throw new Error(ae.data);return ae.status===200}},program:{has:async w=>{const ae=await C.head(c+Vc+"/"+encodeURIComponent(w.toString()),{validateStatus:y});if(ae.status!==200&&ae.status!==404)throw new Error(ae.data);return ae.status===200},open:async w=>m(await C.put(c+Vc,JSON.stringify(w),{validateStatus:y})).data,close:async w=>{await M(w)},closeAll:async()=>{const w=m(await C.get(c+Qh,{validateStatus:y}));await Promise.all([...Object.keys(w.data)].map(ae=>M(ae)))},drop:async w=>{await U(w)},dropAll:async()=>{const w=m(await C.get(c+Qh,{validateStatus:y}));await Promise.all([...Object.keys(w.data)].map(ae=>U(ae)))},list:async()=>m(await C.get(c+Qh,{validateStatus:y})).data,variants:async()=>m(await C.get(c+om,{validateStatus:y})).data},dependency:{install:async w=>{const ae=await C.put(c+sm,JSON.stringify(w),{validateStatus:y});if(ae.status!==200)throw new Error(typeof ae.data=="string"?ae.data:ae.data.toString());return ae.data},versions:async()=>m(await C.get(c+hm,{validateStatus:y})).data},network:{bootstrap:async()=>{m(await C.post(c+fm,void 0,{validateStatus:y}))}},restart:async()=>{m(await C.post(c+cm,void 0,{validateStatus:y}))},stop:async()=>{m(await C.post(c+um,void 0,{validateStatus:y}))},log:{fetch:async w=>{const ae=c+lm+(w!==void 0?`?n=${w}`:"");return m(await C.get(ae,{validateStatus:y})).data}},terminate:async()=>{const{terminateNode:w}=await Bp(async()=>{const{terminateNode:ae}=await Promise.resolve().then(()=>MQ);return{terminateNode:ae}},void 0);o.origin?.type==="aws"&&await w({instanceId:o.origin.instanceId,region:o.origin.region})}}};let ld=Qd({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(",")}});ld=ev(ld);const DQ=()=>{const[f,o]=sr.useState(),[c,l]=sr.useState(),[b,C]=sr.useState(),[y,m]=sr.useState(),[N,M]=sr.useState([]);return sr.useEffect(()=>{Pf.create().then(U=>SQ(U,{address:window.location.protocol+"//"+window.location.hostname+":"+Am(window.location.protocol)}).then(w=>{o(w),w.peer.id.get().then(ae=>{l(ae)}).catch(ae=>{window.location.hostname!=="localhost"?alert(ae):console.error(ae)}),w.peer.addresses.get().then(ae=>{const Ee=ae.find(xe=>xe.protoNames().includes("tcp")&&!xe.protoNames().includes("ws")&&!xe.protoNames().includes("wss"));Ee&&C(Ee.toString());const pe=ae.find(xe=>xe.protoNames().includes("ws")||xe.protoNames().includes("wss"));pe&&m(pe.toString());let V=ae.filter(xe=>(!Ee||!xe.equals(Ee))&&(!pe||!xe.equals(pe)));M(V.map(xe=>xe.toString()))}).catch(ae=>{window.location.hostname!=="localhost"?alert(ae):console.error(ae)})}))},[]),nr.jsxs(pv,{theme:ld,children:[nr.jsx(Fv,{}),nr.jsx(Dv,{children:nr.jsx(ra,{container:!0,sx:{p:4,height:"100vh"},children:nr.jsxs(ra,{item:!0,container:!0,direction:"column",spacing:2,maxWidth:"400px",children:[nr.jsxs(ra,{item:!0,container:!0,direction:"row",alignItems:"center",mb:2,children:[nr.jsx(ra,{mr:2,display:"flex",justifyContent:"center",item:!0,children:nr.jsx("img",{width:"60px",height:"auto",src:"./android-chrome-192x192.png"})}),nr.jsx(ra,{item:!0,children:nr.jsx(ta,{variant:"h5",children:"Peerbit"})})]}),nr.jsxs(ra,{item:!0,children:[nr.jsx(ta,{variant:"overline",children:"Id"}),nr.jsx(ta,{children:c})]}),nr.jsx(ra,{item:!0,children:nr.jsx(ta,{variant:"overline",children:"Address"})}),b&&nr.jsxs(ra,{item:!0,children:[nr.jsx(ta,{variant:"caption",children:" TCP (non-browser)"}),nr.jsx(xl,{elevation:10,children:nr.jsx(ta,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:b})})]}),y&&nr.jsxs(ra,{item:!0,children:[nr.jsxs(ta,{variant:"caption",children:[" ","Websockets (browser and non-browser)"," "]}),nr.jsx(xl,{elevation:10,children:nr.jsx(ta,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:y})})]}),N.length>0&&nr.jsxs(ra,{item:!0,children:[nr.jsx(ta,{variant:"caption",children:" Other addresses"}),N.map(U=>nr.jsx(xl,{elevation:10,children:nr.jsx(ta,{m:2,sx:{verticalAlign:"middle"},variant:"caption",children:U})}))]})]})})})]})},kQ=VC.createRoot(document.getElementById("root"));kQ.render(nr.jsx(Dp.StrictMode,{children:nr.jsx(DQ,{})}));const MQ=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));
|